/*
 * Header Navigation Menu jQuery Animation
 *
 * Copyright 2011 F.A. Richard and Associates, Inc
 *
 * Date: 01/03/2011
 */
 
if(navigator.appName == "Microsoft Internet Explorer") 
{
	/* 
	** Since IE7's rendering engine stacks elements, 
	** their z-index is somewhat backwards. This loop 
	** re-assigns the zindex of each div element in 
	** descending order.
	*/
	$(function() {
		var zIndexNumber = 1000;
		$('div#header').each(function() {
			$(this).css('zIndex', zIndexNumber);
			zIndexNumber -= 10;
		});
	});
}

$(function() {
		
	/*
	** Dropdown Menu Hover Action
	*/
	$('.sub_menu ul').css('display', 'none');
	
	$('#header_menu ul li').hover(

		function () {
			$('.lbl_top', this).css('background','#EDEDED');
			$('.lbl_top img', this).css('visibility','visible');
			$('.lbl_top_single img', this).css('visibility','visible');
			$('ul', this).css('display','none').slideDown(175);
		}, 
		function () {
			$('.lbl_top', this).css('background','none');
			$('.lbl_top img', this).css('visibility','hidden');
			$('.lbl_top_single img', this).css('visibility','hidden');
			$('ul', this).css('display','none').stop(true,true).slideUp(0);
		}
	);
	
	$('.sub_menu ').hover(
	
		function () {
			$('.arrow', this).css('visibility','visible');
		}, 
		function () {
			$('.arrow', this).css('visibility','hidden');
		}
	);
	
	/*
	** List Element Hover Action
	*/
	$('.list_el').hover(
	
		function () {
			$('.arrow', this).css('visibility','visible');
		}, 
		function () {
			$('.arrow', this).css('visibility','hidden');
		}
	);
});
