/**
* 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 = $('#slides1 li').size()-1;
var nownow = 0;
var inout = 0;
var tt = 0;
var speed = 5000;
$('#slides1 li').eq(0).siblings('li').css({'display':'none'});
var ulstart = '
';
addli();
var pagination = $('#pagination1 li');
var paginationwidth = $('#pagination1').width();
$('#pagination1').css('margin-left',(460-paginationwidth))
pagination.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);
}
pagination.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();
pagination.eq(changenow).addclass('current').siblings('li').removeclass('current');
$('#slides1 li').eq(nownow).fadeout(400,function(){$('#slides1 li').eq(changenow).fadein(500);});
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){
$('#slides1 li').eq(nownow).css('z-index','900');
$('#slides1 li').eq(nn).css({'z-index':'800'}).show();
pagination.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);});
pagination.eq(nn).addclass('current').siblings('li').removeclass('current');
nownow=0;
}
}
tt = settimeout(gogo, speed);
}
tt = settimeout(gogo, speed);
})