jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	}
});
/* 懒加载八联版后7版 */
LoadSNTabFlash = function(){
	$("#SNflashContent").find("ul").append($("#fcs").html());
}

/* 首页八联版 */
SNTabFlash = function(){
	LoadSNTabFlash();
	var timer;
	var len = $("#SNflashBtn").find("dt").length ;
	var index = 0 ;
	$("#SNflashContent").find("ul").width( 460*len );
	
	$("#SNflash").hover(function(){
		 clearInterval(timer);
	},function(){
		 timer = setInterval(function(){
			if(index>=len-1){index=-1};						 
			index++;
			auto(index);			
		},3600);
	}).trigger("mouseleave");
	
	$("#SNflashBtn").find("dt").mouseover(function(){
		index  =  $("#SNflashBtn").find("dt").index(this);
		setTimeout(function(){
			auto(index);
		},200);				
	});
	
	function auto(index){
		$("#SNflashBtn").find("dt").removeClass("on").eq(index).addClass("on");				   
		$("#SNflashContent").find("ul").stop().animate({"left":[-460*index,'easeOutCubic']},300);	
	}	
}
/*搜索获得焦点*/


$(function(){
	SNTabFlash();	
})
