            YAHOO.example.onMenuBarReady = function() {
                
                // "beforerender" event handler for the menu bar

                function onMenuBarBeforeRender(p_sType, p_sArgs, p_oMenu) {

                    var oSubmenuData = {

                        "information": [
                            { text: "Home", url: "/" },
                            { text: "Contact Us", url: "/information/contact_us" },
                            { text: "Publications", url: "/information/publications" },
                            { text: "Maps", url: "/information/maps" },
                            { text: "Meeting place, dates and times", url:"/information/meeting_place_dates_and_times" },
                            { text: "Committee Members", url: "/information/committee_members" },             
                            { text: "Chaiplaincy", url: "/information/chaiplaincy" }                  
                        ],

                        "community": [ 
                            { text: "Calendar of Events", url: "/forums/index.php?action=calendar" },
                            { text: "Gallery", url: "/forums/index.php?action=gallery" },
                            { text: "Venue Hire", url: "/community/venue_hire" }
                        
                        ],

                        "services": [
                            { text: "Shop", url: "/services/shop" },
                            { text: "Venue Hire", url: "/services/venue_hire" },
                            { text: "OSHC", url: "/services/oshc" }          
                        ]

                    }; 

                    this.getItem(0).cfg.setProperty("submenu", { id:"information", itemdata: oSubmenuData["information"] });
                    this.getItem(1).cfg.setProperty("submenu", { id:"community", itemdata: oSubmenuData["community"] });
                    this.getItem(2).cfg.setProperty("submenu", { id:"services", itemdata: oSubmenuData["services"] });
                    

                }


                // Instantiate and render the menu bar
                var oMenuBar = new YAHOO.widget.MenuBar("menu", { autosubmenudisplay:true, showdelay:250, hidedelay:750, lazyload:true });


                // Subscribe to the "beforerender" event
                oMenuBar.beforeRenderEvent.subscribe(onMenuBarBeforeRender, oMenuBar, true);


                // Render the menu bar
                oMenuBar.render();
                
            };


            // Initialize and render the menu bar when it is available in the DOM

            YAHOO.util.Event.onContentReady("menu", YAHOO.example.onMenuBarReady);

