
		YAHOO.util.Event.onContentReady("headerMenu", function () {
			
			    /*
			         Instantiate a MenuBar:  The first argument passed to the 
			         constructor is the id of the element in the page 
			         representing the MenuBar; the second is an object literal 
			         of configuration properties.
			    */
			
			    var oMenuBar = new YAHOO.widget.MenuBar("headerMenu", { 
			                                                autosubmenudisplay: true, 
			                                                hidedelay: 750, 
			                                                lazyload: false });
			
			
			/*
			     Define an array of object literals, each containing 
			     the data necessary to create a submenu.
			*/
			
			var aSubmenuData = [
			
			    {
			        id: "bandItems", 
			        itemdata: [ 
			            { classname: "menuitem", text: "O zespole", url: "/polski/band/aboutus.html" },
			            { classname: "menuitem", text: "Natalia", url: "/polski/band/natalia.html" },
			            { classname: "menuitem", text: "Milena", url: "/polski/band/milena.html" },
			            { classname: "menuitem", text: "Ania", url: "/polski/band/ania.html" },
			            { classname: "menuitem", text: "Krzysiek", url: "/polski/band/krzysiek.html" },
						{ classname: "menuitem", text: "Micha&#322;", url: "/polski/band/michal.html" },
			            { classname: "menuitem", text: "Marek", url: "/polski/band/marek.html" },

			        ]
			    },
			
			    {
			        id: "discography", 
			        itemdata: [
			            { classname: "menuitem", text: "Silvae", url: "/polski/disco/silvae.html" },
			            { classname: "menuitem", text: "At the Lake", url: "/polski/disco/atthelake.html" },
			            { classname: "menuitem", text: "Live Again", url: "/polski/disco/liveagain.html" }                  
			        ]    
			    },
			    
			    {
			        id: "media", 
			        itemdata: [
			            { classname: "menuitem", text: "Galeria", url: "/gallery/", target: "_blank" },
			            { classname: "menuitem", text: "Materia&#322;y promo", url: "/polski/promo.html" },
			            //{ classname: "menuitem", text: "Reviews & interviews", url: "/polski/reviews.html" }           
			        ] 
			    },
			    
			    {
			        id: "community",
			        itemdata: [
			            { classname: "menuitem", text: "Forum", url: "/forum/", target: "_blank" },
			            { classname: "menuitem", text: "Ksi&#281;ga go&#347;ci", url: "/polski/guestbook.html" },
			            { classname: "menuitem", text: "MySpace", url: "http://www.myspace.com/bandatthelake", target: "_blank" },
			            { classname: "menuitem", text: "YouTube", url: "http://www.youtube.com/atthelakemetal/", target: "_blank" },
			            {classname: "menuitem",  text: "Last.fm", url: "http://www.last.fm/music/At+the+Lake", target: "_blank" },
					{classname: "menuitem",  text: "Facebook", url: "http://www.facebook.com/pages/At-the-Lake/126220717417038", target: "_blank" }
			        ]
			    }                    
			];
			
			
			/*
			     Subscribe to the "beforerender" event, adding a submenu 
			     to each of the items in the MenuBar instance.
			*/
			
			oMenuBar.subscribe("beforeRender", function () {
			
			    if (this.getRoot() == this) {
			
			        this.getItem(1).cfg.setProperty("submenu", aSubmenuData[0]);
			        this.getItem(3).cfg.setProperty("submenu", aSubmenuData[1]);
			        this.getItem(4).cfg.setProperty("submenu", aSubmenuData[2]);
			        this.getItem(5).cfg.setProperty("submenu", aSubmenuData[3]);
			
			    }
			
			});
			
			
			/*
			     Call the "render" method with no arguments since the 
			     markup for this MenuBar instance is already exists in 
			     the page.
			*/
			
			oMenuBar.render();    
 			var ua = YAHOO.env.ua,
				    oAnim;  // Animation instance
				
				
				/*
				     "beforeshow" event handler for each submenu of the MenuBar
				     instance, used to setup certain style properties before
				     the menu is animated.
				*/
				
				function onSubmenuBeforeShow(p_sType, p_sArgs) {
				
				    var oBody,
				        oElement,
				        oShadow,
				        oUL;
				
				
				    if (this.parent) {
				
				        oElement = this.element;
				
				        /*
				             Get a reference to the Menu's shadow element and 
				             set its "height" property to "0px" to syncronize 
				             it with the height of the Menu instance.
				        */
				
				        oShadow = oElement.lastChild;
				        oShadow.style.height = "0px";
				
				        
				        /*
				            Stop the Animation instance if it is currently 
				            animating a Menu.
				        */ 
				    
				        if (oAnim && oAnim.isAnimated()) {
				        
				            oAnim.stop();
				            oAnim = null;
				        
				        }
				
				
				        /*
				            Set the body element's "overflow" property to 
				            "hidden" to clip the display of its negatively 
				            positioned <ul> element.
				        */ 
				
				        oBody = this.body;
				
				
				        //  Check if the menu is a submenu of a submenu.
				
				        if (this.parent && 
				            !(this.parent instanceof YAHOO.widget.MenuBarItem)) {
				            if (ua.gecko) {
				            
				                oBody.style.width = oBody.clientWidth + "px";
				            
				            }
				            if (ua.ie == 7) {
				
				                oElement.style.width = oElement.clientWidth + "px";
				
				            }
				        
				        }
				
				
				        oBody.style.overflow = "hidden";
				
				        oUL = oBody.getElementsByTagName("ul")[0];
				
				        oUL.style.marginTop = ("-" + oUL.offsetHeight + "px");
				    
				    }
				
				}
								
				function onTween(p_sType, p_aArgs, p_oShadow) {
				
				    if (this.cfg.getProperty("iframe")) {
				    
				        this.syncIframe();
				
				    }
				
				    if (p_oShadow) {
				
				        p_oShadow.style.height = this.element.offsetHeight + "px";
				    
				    }
				
				}
				function onAnimationComplete(p_sType, p_aArgs, p_oShadow) {
				
				    var oBody = this.body,
				        oUL = oBody.getElementsByTagName("ul")[0];
				
				    if (p_oShadow) {
				    
				        p_oShadow.style.height = this.element.offsetHeight + "px";
				    
				    }
				
				
				    oUL.style.marginTop = "";
				    oBody.style.overflow = "";
				    
				    if (this.parent && 
				        !(this.parent instanceof YAHOO.widget.MenuBarItem)) {
				        if (ua.gecko) {
				        
				            oBody.style.width = "";
				        
				        }
				        
				        if (ua.ie == 7) {
				
				            this.element.style.width = "";
				
				        }
				    
				    }
				    
				}
				function onSubmenuShow(p_sType, p_sArgs) {
				
				    var oElement,
				        oShadow,
				        oUL;
				
				    if (this.parent) {
				
				        oElement = this.element;
				        oShadow = oElement.lastChild;
				        oUL = this.body.getElementsByTagName("ul")[0];
				
				        oAnim = new YAHOO.util.Anim(oUL, 
				            { marginTop: { to: 0 } },
				            .5, YAHOO.util.Easing.easeOut);
				
				
				        oAnim.onStart.subscribe(function () {
				
				            oShadow.style.height = "100%";
				        
				        });
				
				
				        oAnim.animate();
				
				        if (YAHOO.env.ua.ie) {
				            
				            oShadow.style.height = oElement.offsetHeight + "px";
				
				            oAnim.onTween.subscribe(onTween, oShadow, this);
				
				        }
				
				        oAnim.onComplete.subscribe(onAnimationComplete, oShadow, this);
				    
				    }
				
				}
				
				oMenuBar.subscribe("beforeRender", function () {
				
				    if (this.getRoot() == this) {
				
				        this.getItem(0).cfg.setProperty("submenu", aSubmenuData[0]);
				        this.getItem(1).cfg.setProperty("submenu", aSubmenuData[1]);
				        this.getItem(2).cfg.setProperty("submenu", aSubmenuData[2]);
				        this.getItem(3).cfg.setProperty("submenu", aSubmenuData[3]);
				
				    }
				
				});
				
				oMenuBar.subscribe("beforeShow", onSubmenuBeforeShow);
				oMenuBar.subscribe("show", onSubmenuShow);
});
