$(document).ready(function(){


	//create 2-column sub-nav
	$('#navPrimary > li').each(
		function(intIndex){
			if( $(this).find('ul > li').length > 4 ) {		// if the sub-nav has more than 4 items

				$(this).find('ul').addClass('column1')
				//$('#navPrimary > li.current > ul').addClass('column1')		// get the sub-nav and add class of 'column1'
					.clone(true)											// clone the sub-nav
						.removeClass('column1')								// with cloned sub-nav, remove 'column1' class
						.addClass('column2')								// with cloned sub-nav, add 'column2' class
						.insertAfter($(this).find('ul'))
						//.insertAfter($('#navPrimary > li.current > ul'));	// with cloned sub-nav, insert after original sub-nav

				$(this).find('ul.column1 li:gt(3)').remove();				// with original sub-nav, remove all LIs after the 4th LI
				$(this).find('ul.column2 li:lt(4)').remove();				// with cloned sub-nav, remove all LIs before the 5th LI
			}
		}
	);


	// homepage nav hover
	$('.home #navPrimary > li').hover(
		function(){
			$(this).siblings().removeClass('current');
			$(this).addClass('current');
		},
		function(){}
	);
	$('.home #header').hover(
		function(){},
		function(){
			$(this).find('#navPrimary > li').removeClass('current');
		}
	);


	// Learn More show/hide
	$('.moreInfo > div').hide();
	$('.moreInfo h3').click(function(){
		$(this).next().slideToggle('normal');
	});


	// Footer :first-child hack
	$('#footer li:first-child').addClass('first-child');


});