jQuery(function($) {
	
	// Keep primary nav items highlighted when dropdown is active
	$('#primary-nav li ul').hover(function() {
		$(this).siblings('a').addClass('highlight');
	}, function() {
		$(this).siblings('a').removeClass('highlight');
	});
	
	// Apply descending z-index values to the primary nav items for IE
	var theZ = 50;
	$('#primary-nav>ul>li').each(function() {
		$(this).css("z-index", theZ);
		theZ = theZ - 1;
	});
	
	// Bump z-index of last menu item on hover to allow for left-facing dropdown
	$('#primary-nav>ul>li:last-child').hover(function() {
		$(this).css("z-index", 60);
	}, function() {
		$(this).css("z-index", theZ);
	});
	
});
