// JavaScript Document
jQuery(function($){
	var index = 0;
	$('<div id="silideSlct"></div>').appendTo("#slideBox");
	//滑动导航改变内容	
	$("#slideTxt li").hover(function(){
		if(MyTime){
			clearInterval(MyTime);
		}
		index  =  $("#slideTxt li").index(this);
		MyTime = setTimeout(function(){
		ShowjQueryFlash(index);
		$("#slideImg").stop();
		} , 100);
	}, function(){
		clearInterval(MyTime);
		MyTime = setInterval(function(){
		ShowjQueryFlash(index);
		index++;
		if(index==4){index=0;}
		} , 3000);
	});
	//滑入停止动画，滑出开始动画.
	 $("#slideImg").hover(function(){
			  if(MyTime){
				 clearInterval(MyTime);
			  }
	 },function(){
				MyTime = setInterval(function(){
				ShowjQueryFlash(index);
				index++;
				if(index==4){index=0;}
			  } , 3000);
	 });
	//自动播放
	var MyTime = setInterval(function(){
		ShowjQueryFlash(index);
		index++;
		if(index==4){index=0;}
	} , 3000);
});
function ShowjQueryFlash(i) {
$("#slideImg div").eq(i).animate({opacity:1},500).css({"z-index":"1"}).siblings().animate({opacity:0},500).css({"z-index":"0"});
$("#silideSlct").animate({left:i*126+4+"px"}, 10 ); //滑块滑动
$("#slideTxt li").eq(i).addClass("slideCurrent").siblings().removeClass("slideCurrent");}
