// JavaScript Document
$(document).ready(function() {
$a = $("#top_menu_box .hv_child");
$a.each(
	function(index,em){
			$(this).hover(
			function () {
			 $(em).addClass("hv_child_show");
				$(em).removeClass("hv_child");
			 menuOpenerTimeout = window.setTimeout(function() {
			 menuOpenerTimeout = null; 
				
			 $(em).children(".xiala_caidan").slideDown(
			 function() { 			
				 
			 }
			 );
		 	},250);
			 
			},
			function () {
 						 
			if (menuOpenerTimeout) {
			 window.clearTimeout(menuOpenerTimeout);
				$(em).removeClass("hv_child_show");
				$(em).addClass("hv_child");
				 return;
			 }
			 if($(em).children(".xiala_caidan").length !=0){
					$(em).children(".xiala_caidan").slideUp(function() {
					  $(em).removeClass("hv_child_show");
					  $(em).addClass("hv_child");
				 }); 
				 }
			 else
			 {
				   $(em).removeClass("hv_child_show");
					$(em).addClass("hv_child");
				 }
			 
			}
		);
	}
);


$b = $(".xiala_caidan li");
$b.each(
	function(index,em2){
			$(em2).hover(
 				function () {
				 $(em2).css({ background:"#2571da" });
				},
				function () {
			 	$(em2).css({ background:null });
			}
			)
	}
	);
});
