$(document).ready(function() {
	//When one of the header categories on the home page is hovered, display according contents in the hidden div
	$('ul#headerCategories li.siteHeaderCategory').hover(function() {
		theLI = $(this);
		$('div.headerDropDown').css('display', 'none');
		$('div.headerDropDownShadow').css('display', 'none');
		
		//Once the load is done, bring the div to the front
		$('div.headerDropDownContents', theLI).html("<div id='loading'><img id='loading' src='/images/misc/loading.gif' /></div>");
		$('div.headerDropDownShadow', theLI).css('display', 'block').height($('div.headerDropDownContents', theLI).height());
		$('div.headerDropDown', theLI).fadeIn(350);
		
		$('div.headerDropDownContents', theLI).load('/_shared/headerCategoryFill.cfm?category=' + $(this).attr('id') + '&catTitle=' + $('a', this).html(), '', function(data) {
			$('div.headerDropDownShadow', theLI).height($(this).height());
			$('div#loading', this).remove();
		});
	}, function() {
		//They left the LI, close the div
		$('div.headerDropDown', this).css('display', 'none');
	});
});
