	$(function(){
		
		$("#vid").click(
			function(){
				$("#vid > ul.show").animate({height:"0px"});
				$("#vid > ul.play").animate({height:"150px"});
				$("#homeContact ul").animate({height:"80px"});
				$("#playShow").show();
				},
			function(){
				$("#vid > ul.show").animate({height:"60px"});
				$("#vid > ul.play").animate({height:"0px"});
				$("#homeContact ul").animate({height:"172px"});
				$("#playShow").hide();
				})



			   var has=$(".has:empty");
			   has.each(function(i){
								  $(this).parent().find(".pic").hide();
								  //alert("好")
								 })
	     /** 下拉框效果选项设置  start **/
	     var changeIndex=3;
		 $('#change').change(function(){
		   changeIndex = $("#change").val();
		 })
		 /** 下拉框效果选项设置  end  **/
         
	     var $obj = $('#hot_ranks ul');
		 var len  = $obj.length;
		 var i = 0;
		 $("#next").click(function(){
		      i++;
			  if(i==len){
			    i = 0;
			  }
			  if(changeIndex==1){//  这里是根据下拉框的值，来执行相应的效果。
				$obj.stop(true,true).hide().eq(i).show();
			  }else if(changeIndex==2){
                $obj.stop(true,true).hide().eq(i).slideDown(400);
			  }else if(changeIndex==3){
				$obj.stop(true,true).hide().eq(i).fadeIn(600);
			  }
			  return false;
		 });	
		 $("#previous").click(function(){
		      i--;
			  if(i==-1){
			    i = len-1;
			  }
              if(changeIndex==1){
				$obj.stop(true,true).hide().eq(i).show();
			  }else if(changeIndex==2){
                $obj.stop(true,true).hide().eq(i).slideDown(400);
			  }else if(changeIndex==3){
				$obj.stop(true,true).hide().eq(i).fadeIn(600);
			  }
			  return false;
		 });
         
		 //滑入div 停止动画，滑出开始动画.
         $('#hot_ranks').hover(function(){
		      if(MyTime){
			     clearInterval(MyTime);
			  }
		 },function(){
              MyTime = setInterval(function(){
				 $("#next").trigger("click");
			  } , 5000);
		 })

		 //每2秒，自动切换。触发".next"的click事件.
		 var MyTime = setInterval(function(){
		    $("#next").trigger("click");
		 } , 5000);
	})

