//	good browsers can fade-in/out the dropdown menus; IE7 isn't one

$(document).ready(function() {
	if (!jQuery.browser.msie)
	{
		$('#nav-primary li').hover(function() {
			$(this).find('.secondary').fadeIn(450);
			},function() {
			$(this).find('.secondary').fadeOut(300);
		}); 
	}
	else	// for IE
	{
		$('#nav-primary li').hover(function() {
			$(this).find('.secondary').css('display', 'block');
			},function() {
			$(this).find('.secondary').css('display', 'none');
		}); 
	}
});	// end doc.ready.func

//	add class to the last div.tertiary re: margin, border
//$(document).ready(function() {
	//$('#equipment-rentals').find('.tertiary').filter(':last').addClass('last');
//});	// closes doc.ready.func




/*	in the jumbo #equipment-rental dropdown menu, auto-columnize each section's horizontally-rendered UL
	1. get the index of each list item
	2. assign column class according to li's index

	$(document).ready(function() {
		// assign class according to li's index ... index = li number -1: 1-6 = 0-5; 7-12 = 6-11, etc.
		$('#equipment-rentals ul').each(function(olIndex){
			$(this).children('li')
			.filter(':lt(4)').addClass('column-1')					// <li> 1-4 = [0-3]
			.filter(':first').addClass('reset').end().end()
			.filter(':gt(3):lt(8)').addClass('column-2')			// <li> 5-8 = [4-7]
			.filter(':first').addClass('reset').end().end()
			.filter(':gt(7):lt(12)').addClass('column-3')		// <li> 9-12 = [8-11]
			.filter(':first').addClass('reset').end().end()
			.filter(':gt(11):lt(16)').addClass('column-4')		// <li> 13-16 = [12-15]
			.filter(':first').addClass('reset').end().end()
			.filter(':gt(15)').addClass('column-5')				// <li> 17-20 = [16-19]
			.filter(':first').addClass('reset').end().end()
		});	// closes ul .each func
	});	// closes doc.ready.func


*/

// RE: ACTIVE STATE IN PRIMARY AND SECONDARY NAV
$(document).ready(function(){

	//	according to the ***FIRST*** class of div#main-content:
	//	1) highlight the corresponding Primary Nav
	//	2) display the corresponding Secondary Nav

	contentClass	= $('#main-content').attr('class').split(' ')[0];
	//$('#nav-primary li#'+contentClass).addClass('active');			//	'li#'+containerClass is looking for an li with an id exactly matching the container's class
	//$('#aux-left div[id$='+contentClass+']').addClass('active');	//	'div[id$='+containerClass+']' is looking for a div with an id ending in the container's class

	//	according to the ***SECOND*** class of div#main-content:
	//	highlight the corresponding Secondary Nav list item:
	secondaryClass	= $('#main-content').attr('class').split(' ')[1];
	//$('#aux-left div').find('li[id|='+secondaryClass+']').addClass('active');

});	// close doc.ready

