// JavaScript Document

$(document).ready(function(){
				$(".menu>li").mouseover(function(){
												 $(this).addClass("vi").find("ul").show();
												 })
				$(".menu>li").mouseleave(function(){
												 $(this).removeClass("vi").find("ul").hide();
												 })
				$(".product-lie dl").hover(function(){
											$(this).children("dt").css("border","1px solid #00aaea")		
													},function(){
											$(this).children("dt").css("border","1px solid #eee")			
														})
				
				$(".tu dl dd>ul").mouseover(function(){
												$(this).css("border","1px solid #13cbed").siblings().css("border","1px solid #e6e6e6")	
												var index = $(".tu dl dd>ul").index(this);
												$(".tu dl dt>ul").eq(index).fadeIn().siblings().hide();
													 })
				
				$(".xinxi dl dt>ul").click(function(){
												$(this).addClass("vi").siblings().removeClass("vi")	
												var index = $(".xinxi dl dt>ul").index(this);
												$(".xinxi dl dd>ul").eq(index).show().siblings().hide();
													 })
				
				
						   });


$(document).ready(function(){
		$('.banner dl dt ul:first').css("marginLeft","0");				   
 autoroll();
 hookThumb();
});

var i = -1; 
var offset = 5000; 


function autoroll(){
 n = $('.banner dl dt ul').length-1;          
 i++;
 if(i > n){
 i = 0;
 }
 hhh();
    timer = window.setTimeout(autoroll, offset);
 }
 
 
function hhh(){
 $('.banner dl dt ul').eq(i).addClass('highlight').siblings().removeClass('highlight');
 $('.banner dl dd ul').eq(i).fadeIn().siblings('.banner dl dd ul').hide();
 }
 
 
 
function hookThumb(){    
 $('.banner dl dt ul').hover(
  function () {
    if (timer) {clearTimeout(timer);
    i = $(this).prevAll().length;
             hhh(); 
            }
  },
  function () {
            timer = window.setTimeout(autoroll, offset);        
			  
            return false;
  }
); 
}



     function csrollAuto(){
			  $(".leibiao").animate({left:-147},500,function(){
					$(".leibiao").css("left","0px").find("dl:first").appendTo(".leibiao")		  
			 });
		 
		 }


$(document).ready(function(){
					id = window.setInterval(csrollAuto,3000)	   
						   });

 $(function(){
			
		var $ul = $(".leibiao");	
        
		$(".next a").click(function(){
									if("!$ul(:animated)"){
			    $ul.animate({left:-147},500,function(){
					$ul.css("left","0px").find("dl:first").appendTo(".leibiao")  
											});	}
	                                     });
		
		$(".prev a").click(function(){
									if("!$ul(:animated)"){
									
                $ul.animate({left:147},500,function(){
					$ul.css("left","0px").find("dl:last").prependTo(".leibiao")  
								  });}	
							return false
								})
			})

 $(function(){
	$(".next a,.prev a,.leibiao dl").hover(
		function(){
			   clearInterval(id)	 
				   }, 
		function(){
			   id =window.setInterval(csrollAuto,3000)	 
				   });
			})
 
 $(function(){
			$(".leitu dl dd.vid img").click(function(){
									$(".vk").fadeIn();				 
													 })
			
			$("..vk ul.guan img").click(function(){
									$(".vk").hide();				 
													 })
			})
 
 
 $(function(){
			$(".leibiao dl").mouseover(function(){
							$(this).find("dt").css("border","1px solid #fc8646")					
												})
			$(".leibiao dl").mouseleave(function(){
							$(this).find("dt").css("border","1px solid #EEEEEE")					
												})
			})



  
  $(function(){
		$(".text span.b").click(function(){
									$(".text table.bb").css("display","block");		   
											   })
		$(".text span.c").click(function(){
									$(".text table.cc").css("display","block");			   
											   })
		$(".text span.d").click(function(){
									$(".text table.dd").css("display","block");			   
											   })
			 })
