// init
$(document).ready(function(){
		var ie = (function(){
    	var undef,
        v = 3,
        div = document.createElement('div'),
        all = div.getElementsByTagName('i');
	    while (
        	div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
        	all[0]
    	);
    	return v > 4 ? v : undef;
	}());
	if(ie > 7 || ie===undefined){
		$("ul.mainMenu > li").each(function(){
			var $mainLi = $(this);
			var $detailMenu = $(this).find("ul.sub-menu");

			$mainLi.bind("mouseenter" , function(){
				$detailMenu.stop(true, true).slideDown(200);
			});
			$mainLi.bind("mouseleave" , function(){
				$detailMenu.stop(true, true).slideUp(200);
			});
		});

		$(".sub-menu > li").bind("mouseenter", function(){
			$(this).stop().animate({ backgroundColor:"#777777" }, 150).find("a").css("color", "#ffffff");
		});
		$(".sub-menu > li").bind("mouseleave", function(){
			$(this).stop().animate({ backgroundColor:"#ffffff" }, 150).find("a").css("color", "#000000");
		});
	}
	$('a').focus(function(){
	     $(this).blur();
	});
});
