// JavaScript Document
var _bdhm_top = 0;
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
var _bdhm_tim = new Image(1,1);
_bdhm_tim.id = "bdhmPerimg";
_bdhm_tim.src = _bdhmProtocol + "hm.baidu.com/_tt.gif?si=c1082e40d6bd5c5d64f2ccb8f73cea5c&rnd=" + Math.round(Math.random()*2147483647);
_bdhm_tim.onload=function(){_bdhm_top = 1;}


$(document).ready(function() {

	$("ul#topnav li").hover(function() { //Hover over event on list item
		//$(this).css({ 'background' : '#1376c9 url(images/topnav_active1.gif) repeat-x'}); //Add background color and image on hovered list item
		$(this).find("span").slideDown("fast"); //Show the subnav
	} , function() { //on hover out...
		//$(this).css({ 'background' : 'none'}); //Ditch the background
		$(this).find("span").slideUp("fast"); //Hide the subnav
	});
	
	$(".input_search").focus(function(){
	  $(this).addClass("active");
	 },function(){
	  if($(this).val().length==0){
	   $(this).removeClass("active");
	  }
	 });
	 
	 $(".input_search").blur(function(){
	  if($(this).val().length==0){
	   $(this).removeClass("active");
	  }
	 });
	
	//if($(".input_search").val().length!=0){
	//  $(".input_search").addClass("active");
	// }
	 
	 //mainshow
	 $("#s1").mouseover(function(){
		$("#show1").addClass("show");
		$("#show2").removeClass("show");
		$("#show3").removeClass("show");
		$("#flash").addClass("hiden");
	});
	 $("#s2").mouseover(function(){
		$("#show2").addClass("show");
		$("#show1").removeClass("show");
		$("#show3").removeClass("show");
		$("#flash").addClass("hiden");
	});
	 $("#s3").mouseover(function(){
		$("#show3").addClass("show");
		$("#show1").removeClass("show");
		$("#show2").removeClass("show");
		$("#flash").addClass("hiden");
	});
});
