// JavaScript Document
$(function(){
	var aEles=$('.bannerList > li');
	var i=0;
	var aBtn=$('.arrows a');
	function show()
	{
		if(i<0)
		{
			i=aEles.length-1;
		}
		else if(i>aEles.length-1)
		{
			i=0;
		}
		aEles.eq(i).fadeIn().siblings().fadeOut();
		aBtn.eq(i).addClass('cur').siblings().removeClass('cur');
	}
	show();
	
	function next()
	{
		i++;
		show();
	}
	
	var timer=setInterval(next, 3300);
	
		aBtn.hover(function(){
			clearInterval(timer);
			i=$(this).index();
			show();
			timer=setInterval(next, 3000);	
		})
});


  

	$(function(){
		var aBtn=$('.pro_xuan a');
		var aDiv=$('.tabSec .tabArt');
		
		aBtn.click(function(){
			$(this).addClass('active').siblings().removeClass('active');
			aDiv.eq($(this).index()).show().siblings().hide();
		});
	});
	
	
			$(function(){
			$('.pro_qie_01').kxbdMarquee({
				direction:'left',
				controlBtn:{left:'.pro_prev_01 a',right:'.pro_next_01 a'},
				newAmount:10,
				eventA:'mouseenter',
				eventB:'mouseleave'
			});
			
		});
		$(function(){
			$('.pro_qie_02').kxbdMarquee({
				direction:'left',
				controlBtn:{left:'.pro_prev_02 a',right:'.pro_next_02 a'},
				newAmount:10,
				eventA:'mouseenter',
				eventB:'mouseleave'
			});
			
		});
		$(function(){
			$('.pro_qie_03').kxbdMarquee({
				direction:'left',
				controlBtn:{left:'.pro_prev_03 a',right:'.pro_next_03 a'},
				newAmount:10,
				eventA:'mouseenter',
				eventB:'mouseleave'
			});
			
		});
		$(function(){
			$('.pro_qie_04').kxbdMarquee({
				direction:'left',
				controlBtn:{left:'.pro_prev_04 a',right:'.pro_next_04 a'},
				newAmount:10,
				eventA:'mouseenter',
				eventB:'mouseleave'
			});
			
		});
		
		
	$(function(){
		var sudu=25;
		var xianshi=3;
		var $scrul=$(".ind_fqa .ind_fqa_dong ul");
		var l=$scrul.children("li").length;
		var w=$scrul.children("li").outerHeight(true)*l;	
		var num=0;
		
		if(l<=xianshi){return false;}
		$scrul.height(2*w);
		$scrul.children("li").each(function(index, element) {
			if(index<xianshi){
				$(this).clone().appendTo($scrul);
			}else{
				return false;
			}
		});	
		
		var timer=setInterval(yundong,sudu);
		
		function yundong(){
			$scrul.css('marginTop',num-=1);
			if(num<-w){				
				num=0;
			}
		}
		
		$scrul.hover(function(){
			clearInterval(timer);
		},function(){
			timer=setInterval(yundong,sudu);
		})
			
	});	
	
	
	  $(".ind_fqa_dong ul li:odd").each(function(index, element){
	 	$(this).addClass("a");
  	});   

		
		
		$(function(){
	jQuery(".left_pro li:not('.gao')").hover(function(){

		 $(this).find("div").stop().slideDown(500)
   	},function(){
		
		 $(this).find("div").stop().slideUp(500)
		})
	});	
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
