/**
* jquery jslides1 1.1.0
*
* http://www.cactussoft.cn
*
* copyright (c) 2009 - 2013 jerry
*
* dual licensed under the mit and gpl licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
$(function(){
var numpic = $('#slides1 li').size()-1;
var nownow = 0;
var inout = 0;
var tt = 0;
var speed = 3000;
$('#slides1 li').eq(0).siblings('li').css({'display':'none'});
var ulstart = '
';
addli();
var pagination1 = $('#pagination1 li');
var pagination1width = $('#pagination1').width();
$('#pagination1').css('margin-left',(50-pagination1width))
pagination1.eq(0).addclass('current')
function addli(){
//var lilicount = numpic + 1;
for(var i = 0; i <= numpic; i++){
ulcontent += '' + '' + (i+1) + '' + '';
}
$('#slides1').after(ulstart + ulcontent + ulend);
}
pagination1.on('click',dotchange)
function dotchange(){
var changenow = $(this).index();
$('#slides1 li').eq(nownow).css('z-index','900');
$('#slides1 li').eq(changenow).css({'z-index':'800'}).show();
pagination1.eq(changenow).addclass('current').siblings('li').removeclass('current');
$('#slides1 li').eq(nownow).fadeout(400,function(){$('#slides1 li').eq(changenow).fadein(500);});
nownow = changenow;
}
pagination1.mouseenter(function(){
inout = 1;
})
pagination1.mouseleave(function(){
inout = 0;
})
function gogo(){
var nn = nownow+1;
if( inout == 1 ){
} else {
if(nownow < numpic){
$('#slides1 li').eq(nownow).css('z-index','900');
$('#slides1 li').eq(nn).css({'z-index':'800'}).show();
pagination1.eq(nn).addclass('current').siblings('li').removeclass('current');
$('#slides1 li').eq(nownow).fadeout(400,function(){$('#slides1 li').eq(nn).fadein(500);});
nownow += 1;
}else{
nn = 0;
$('#slides1 li').eq(nownow).css('z-index','900');
$('#slides1 li').eq(nn).stop(true,true).css({'z-index':'800'}).show();
$('#slides1 li').eq(nownow).fadeout(400,function(){$('#slides1 li').eq(0).fadein(500);});
pagination1.eq(nn).addclass('current').siblings('li').removeclass('current');
nownow=0;
}
}
tt = settimeout(gogo, speed);
}
tt = settimeout(gogo, speed);
})