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) {
			$j('#navlist-main > li').each(
				function(index, e) {
					e.onmouseover = function() { $j(this).addClass('navover'); blowerfish.hideSelects(); }
					e.onmouseout = function() { $j(this).removeClass('navover'); blowerfish.showSelects(); }
				}
			);
		}
		
		//Add Sticky Class to keep the top level menu lit-up.
		$j('#navlist-main > li > ul').mouseover( function() { $j(this).parent('li').addClass('navsticky'); } );
		$j('#navlist-main > li > ul').mouseout( function() { $j(this).parent('li').removeClass('navsticky'); } );
	},
	
	hideSelects: function() {
		$j('#refineBar select').css('visibility', 'hidden');
		$j('.sortBar select').css('visibility', 'hidden');
	},

	showSelects: function() {
		$j('#refineBar select').css('visibility', 'visible');
		$j('.sortBar select').css('visibility', 'visible');
	}
};

$j(document).ready(blowerfish.init);


