var blowerfish = {

	init : function() 
	{
		//Add JS Behavior for IE for activating the menus.  
		//		Note: An unexpected behavior exists that moving from the LI to the child UL causes the 'mouseout' event to fire
		//			on the main LI, casuing the function to fire.
		//		Note: I tried using an .invoke('observe') method, but it did not work correctly in IE.  
		if (document.all) {
			$$('#topMenuList > li').each(function(e) {
				e.onmouseover = function() { this.addClassName('navover'); blowerfish.hideSelects(); }
				e.onmouseout = function() {this.removeClassName('navover'); blowerfish.showSelects(); }
 			});
		}
		
		//Add Sticky Class to keep the top level menu lit-up.
		$$('#topMenuList > li > ul')
			.invoke('observe', 'mouseover', function() { this.up('li').addClassName('navsticky'); })
			.invoke('observe', 'mouseout', function() { this.up('li').removeClassName('navsticky'); });
	},
	
	hideSelects : function() 
	{
		$$('#refineBar select').invoke('setStyle', {visibility: 'hidden'});
		$$('.sortBar select').invoke('setStyle', {visibility: 'hidden'});
	},

	showSelects : function() 
	{
		$$('#refineBar select').invoke('setStyle', {visibility: 'visible'});
		$$('.sortBar select').invoke('setStyle', {visibility: 'visible'});
	}

};

Event.observe(window, 'load', blowerfish.init);




