// JavaScript Document

// Initialize and render the menu bar when it is available in the DOM



    YAHOO.util.Event.onContentReady("topmenu", function () {



        // "beforerender" event handler for the menu bar

		function onMenuBarBeforeRender(p_sType, p_sArgs) {



                    var oSubmenuData = {

                    

                        "aboutus_menulink": [ 

                

							{ text: "Vision Statement", url: "html/vision-statement.php" },

							{ text: "Meet Dr. Reza Hekmat", url: "html/meet-dr-reza-hekmat.php" },

							{ text: "Meet The Team", url: "html/meet-the-team.php" },

							{ text: "Community Involvement", url: "html/community-involvement.php" }

				

						],

						

						"procedures_menulink": [

							

							{ text: "Cleanings & Prevention", url: "html/cleanings-and-prevention.php", submenu: { id: "cleaning_prevention_link", itemdata: [

			

									{ text: "Dental X-Rays", url: "html/dental-x-rays.php" },

									{ text: "Fluoride Treatment", url: "html/fluoride-treatment.php" } ,

									{ text: "Sealants", url: "html/sealants.php" },

									{ text: "Home Care", url: "html/home-care.php" }

		

								] }						

							

							},

							{ text: "Cosmetic Dentistry ", url: "html/cosmetic-dentistry.php", submenu: { id: "cosmetic_dentistry_link", itemdata: [

			

									{ text: "Porcelain Crowns (Caps)", url: "html/porcelain-crowns.php" },

									{ text: "Porcelain Fixed Bridges", url: "html/porcelain-fixed-bridges.php" } ,

									{ text: "Porcelain Veneers", url: "html/porcelain-veneers.php" },

									{ text: "Tooth Whitening", url: "html/tooth-whitening.php" },

									{ text: "Invisalign", url: "html/invisalign.php" }

		

								] }						

							

							},

							

							{ text: "Periodontal Disease", url: "html/periodontal-disease.php" , submenu: { id: "periodontal_disease_link", itemdata: [

			

									{ text: "What is Periodontal (Gum) Disease?", url: "html/periodontal-disease.php" },

									{ text: "Diagnosis", url: "html/periodontal-diagnosis.php" } ,

									{ text: "Treatment", url: "html/periodontal-disease-treatment.php" },

									{ text: "Maintenance", url: "html/periodontal-disease-maintenance.php" }									

		

								] }						

							

							},

							

							{ text: "Restorations", url: "html/restorations .php", submenu: { id: "restorations_link", itemdata: [

			

									{ text: "Composite Fillings", url: "html/composite-fillings.php" },

									{ text: "Crowns (Caps)", url: "html/porcelain-crowns.php" } ,

									{ text: "Dental Implants", url: "html/dental-implants.php" },

									{ text: "Dentures & Partial Dentures", url: "html/dentures.php" },

									{ text: "Fixed Bridges", url: "html/porcelain-fixed-bridges.php" },

									{ text: "Root Canal Therapy ", url: "html/root-canal-therapy.php" }	

		

								] }						

							

							}                    

						],

                        "galleries_menulink": [
							

							{ text: "Smile Gallery", url: "html/gallery.php" },

							{ text: "Video Gallery", url: "html/video-gallery.php" }
						

						],
						
						"testimonials_menulink": [
							

							{ text: "Patient Reviews", url: "http://www.dentalsenders.com/MicroSite/03731805f2/RezaHekmat/" }
						

						],					

                        "links_menulink": [

							{ text: "Arestin&reg;", url: "http://www.arestin.com/for-patients.jsp" },

							{ text: "Colgate ", url: "http://www.colgate.com/app/Colgate/US/HomePage.cvsp" },

							{ text: "Crest", url: "http://www.crest.com" },
						
							{ text: "Oral-B", url: "http://www.oralb.com" },
					
							{ text: "National Museum of Dentistry", url: "http://www.dentalmuseum.org" },
							
							{ text: "Healthy Teeth Education Database", url: "http://www.healthyteeth.org" },
							
							{ text: "The Tooth Fairy Online", url: "http://www.toothfairy.org" }
						

						],
						
						"generalinfo_menulink": [							

							{ text: "Financial Arrangements", url: "html/financial-arrangements.php" }						

						]

                    };



                    // Add a submenu to each of the menu items in the menu bar



                    this.getItem(1).cfg.setProperty("submenu", { id: "aboutus_menulink", itemdata: oSubmenuData["aboutus_menulink"] });

					this.getItem(2).cfg.setProperty("submenu", { id: "procedures_menulink", itemdata: oSubmenuData["procedures_menulink"] });
					
					this.getItem(4).cfg.setProperty("submenu", { id: "galleries_menulink", itemdata: oSubmenuData["galleries_menulink"] });
					
					this.getItem(5).cfg.setProperty("submenu", { id: "testimonials_menulink", itemdata: oSubmenuData["testimonials_menulink"] });

					this.getItem(6).cfg.setProperty("submenu", { id: "links_menulink", itemdata: oSubmenuData["links_menulink"] });														
					
					this.getItem(8).cfg.setProperty("submenu", { id: "generalinfo_menulink", itemdata: oSubmenuData["generalinfo_menulink"] });

                }



        /*

             Instantiate the menubar.  The first argument passed to the 

             constructor is the id of the element in the DOM that 

             represents the menubar; the second is an object literal 

             representing a set of configuration properties for 

             the menubar.

        */



        var oMenuBar = new YAHOO.widget.MenuBar("topmenu", { autosubmenudisplay: true, showdelay: 250, hidedelay:  750, lazyload: false });





        // Subscribe to the "beforerender" event



        oMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender);





        /*

             Call the "render" method with no arguments since the markup for 

             this menu already exists in the DOM.

        */



        oMenuBar.render();            

    

    });


