	
	
	
	// Author: SE Teague Rector
	// Email: bradfordcp@gmail.com
	// Last Updated: 07/23/2007
	// Changelog:
	//	<07/23/2007> Created
		
	YAHOO.example.init = function() {
    var tabView = new YAHOO.widget.TabView();
 
    YAHOO.util.Event.onContentReady('searchbox', function() {
        var modules = YAHOO.util.Dom.getElementsByClassName('mod', 'div', this);
        
        YAHOO.util.Dom.batch(modules, function(module) {
            tabView.addTab( new YAHOO.widget.Tab({
                label: module.getElementsByTagName('h3')[0].innerHTML,
                contentEl: YAHOO.util.Dom.getElementsByClassName('bd', 
                        'div', module)[0]
            }));
            YAHOO.util.Dom.setStyle(module, 'display', 'none'); /* hide modules */
        });

        tabView.set('activeIndex', 0); // make first tab active
        tabView.appendTo(this); // append to 
    });
	};

	YAHOO.example.init();


  	YAHOO.onMenuBarReady = function() {
    // Instantiate and render the menu bar
    var oMenuBar = new YAHOO.widget.MenuBar("liboptions", { autosubmenudisplay:true, hidedelay:750, lazyload:true });
    oMenuBar.render();
    };

    // Initialize and render the menu bar when it is available in the DOM
    YAHOO.util.Event.onContentReady("liboptions", YAHOO.onMenuBarReady);