/**
* jquery jslides 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 = $('#slides li').size()-1;
var nownow = 0;
var inout = 0;
var tt = 0;
var speed = 5000;
$('#slides li').eq(0).siblings('li').css({'display':'none'});
var ulstart = '
';
addli();
var pagination = $('#pagination li');
var paginationwidth = $('#pagination').width();
$('#pagination').css('margin-left',(470-paginationwidth))
pagination.eq(0).addclass('current')
function addli(){
//var lilicount = numpic + 1;
for(var i = 0; i <= numpic; i++){
ulcontent += '' + '' + (i+1) + '' + '';
}
$('#slides').after(ulstart + ulcontent + ulend);
}
pagination.on('click',dotchange)
function dotchange(){
var changenow = $(this).index();
$('#slides li').eq(nownow).css('z-index','900');
$('#slides li').eq(changenow).css({'z-index':'800'}).show();
pagination.eq(changenow).addclass('current').siblings('li').removeclass('current');
$('#slides li').eq(nownow).hide(0,function(){$('#slides li').eq(changenow).show();});
nownow = changenow;
}
pagination.mouseenter(function(){
inout = 1;
})
pagination.mouseleave(function(){
inout = 0;
})
function gogo(){
var nn = nownow+1;
if( inout == 1 ){
} else {
if(nownow < numpic){
$('#slides li').eq(nownow).css('z-index','900');
$('#slides li').eq(nn).css({'z-index':'800'}).show();
pagination.eq(nn).addclass('current').siblings('li').removeclass('current');
$('#slides li').eq(nownow).hide(0,function(){$('#slides li').eq(nn).show();});
nownow += 1;
}else{
nn = 0;
$('#slides li').eq(nownow).css('z-index','900');
$('#slides li').eq(nn).stop(true,true).css({'z-index':'800'}).show();
$('#slides li').eq(nownow).hide(0,function(){$('#slides li').eq(0).show();});
pagination.eq(nn).addclass('current').siblings('li').removeclass('current');
nownow=0;
}
}
tt = settimeout(gogo, speed);
}
tt = settimeout(gogo, speed);
})