// JavaScript Document

$(function(){
	var _img2=$('.slides3 img');
	var _len2=_img2.length;
	var _index2=0;
	var _moving2;
	//插入图片索引数字
	var _ul2='<ul>'
	for(var i=1; i<=_len2; i++){
		_ul2=_ul2+'<li>'+i+'</li>';
	}
	_ul2=_ul2+'</ul>';
	$('div.ico3').append(_ul2);
	var _ico2=$('.ico3 li');
	//划过数字
	_ico2.mouseover(function(){
		_index2=_ico2.index(this);
		_img2.filter(':visible').fadeOut(10,function(){
			_img2.eq(_index2).fadeIn(10);
		})
		$(this).addClass('high').siblings().removeClass('high');
	}).eq(0).mouseover();
	//自动渐变
	_moving2=setInterval(autoShow,4000);
	_img2.hover(function(){clearInterval(_moving2)},function(){
		_moving2=setInterval(autoShow,4000);
	})
	function autoShow(){
		_index2++;
		if(_index2==_len2) _index2=0;
		_ico2.eq(_index2).trigger('mouseover');
	};
});
