function articleSlideSwitch() {
	var $current = $(".articleSlideshow div.current");
	
	// 判断div.current个数为0的时候 $current的取值
	if ( $current.length == 0 ) $current = $(".articleSlideshow div:last");
	
	// 判断div.current存在时则匹配$current.next(),否则转到第一个div
	var $next =  $current.next().length ? $current.next() : $(".articleSlideshow div:first");
	$current.addClass('prev');
	
	$next.css({opacity: 0.0}).addClass("current").animate({opacity: 1.0}, 1000, function() {
		//因为原理是层叠,删除类,让z-index的值只放在轮转到的div.current,从而最前端显示
		$current.removeClass("current prev");
	});
}

var articleIntervalId;
var articleIntervalStep=3000;
function articleSlideNext () {
	articleSlideSwitch();

	// 设定时间为3秒(1000=1秒)
	clearInterval(articleIntervalId);
    articleIntervalId = setInterval( "articleSlideSwitch()", articleIntervalStep ); 
}

function articleSlideStart () {
    $(".articleSlideshow div.current").removeClass("current prev");
	$(".articleSlideshow").find("div").eq(0).addClass("current");

	$(".current").css("opacity","1.0");

	// 设定时间为3秒(1000=1秒)
	clearInterval(articleIntervalId);
    articleIntervalId = setInterval( "articleSlideSwitch()", articleIntervalStep ); 
}

