1.轮播图片
$(function(){
var _img = $('.showpic img');//img arrayvar _len = _img.length;
var _index=0;
var _moving;
//插入图片索引数字
var _ul='<ul>'
for(var i=1; i<=_len; i++){
_ul=_ul+'<li>'+'</li>';
}
_ul=_ul+'</ul>';
$('div.ico').append(_ul);
var _ico=$('.ico li');
//划过数字
_ico.mouseover(function(){
_index=_ico.index(this);
_img.filter(':visible').fadeOut(800,function(){
_img.eq(_index).fadeIn(800);
})
$(this).addClass('high').siblings().removeClass('high');
}).eq(0).mouseover();
//自动渐变
_moving=setInterval(autoShow,12000);
_img.hover(function(){clearInterval(_moving)},function(){
_moving=setInterval(autoShow,12000);
})
function autoShow(){
_index++;
if(_index==_len) _index=0;
_ico.eq(_index).trigger('mouseover');
};
});
2.