// JavaScript Document



 function auto(){
	 $(".tu ul").animate({marginLeft:"-183"},500,
						 function(){
								$(this).css("marginLeft","0").find("li:first").appendTo(".tu ul")						  
								})
	 }
	 
$(function(){
   timer = window.setInterval(auto,3000);
		   })


 $(function(){
	 $(".prev").click(function(){
	    $(".tu ul").animate({marginLeft:"-183"},500,
						 function(){
								$(this).css("marginLeft","0").find("li:first").appendTo(".tu ul")						  
								})						   
							   
							   })	
	  $(".next").click(function(){
	    $(".tu ul").animate({marginLeft:"183"},500,
						 function(){
								$(this).css("marginLeft","0").find("li:last").prependTo(".tu ul")						  
								})						   
							   
							   })	
			})
 
 $(function(){
	$(".prev,.next").hover(function(){
									clearInterval(timer)
									},function(){
									timer = window.setInterval(auto,3000);			 
												 })		
			})
 
 
 
 
 
  $(function(){
			 $(".banner dl dd ul").css("opacity",0.6)
			 })
 
 $(function(){
			autoscroll();
			over();
			})
 var i = -1
 function autoscroll(){
	   n = $(".banner dl dd ul").length-1;
	   i++;
	   if(i > n){
		  i =0 
		   }
	 	hh()
		 id = window.setTimeout(autoscroll,4500)
	 }
	 
	 
	 
 function hh(){
	 $(".banner dl dd ul").eq(i).css("opacity",1).siblings().css("opacity",0.6);
	 $(".banner dl dt ul").eq(i).fadeIn(800).siblings().fadeOut(800);
	 }	 
 
 function over(){
	 $(".banner dl dd ul").hover(function(){
								if(id){
									clearTimeout(id);
									i = $(this).prevAll().length;
									hh()
									}		  
							                 },
							     function(){
								 id = window.setTimeout(autoscroll,4500)			  
							    			  })
	 }
	 
	 
	 
	 
	 
	 
	 
	 $(function(){
			
			$(".menu>li").mouseover(function(){
								$(this).addClass("vi").find("ul").slideDown();			 
											 })
			$(".menu>li").mouseleave(function(){
								$(this).removeClass("vi").find("ul").slideUp();			 
											 })
				
				})
 
