/**
* jQuery jslides5 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 = $('#slides5 li').size()-1;
var nownow = 0;
var inout = 0;
var TT = 0;
var SPEED = 5000;
$('#slides5 li').eq(0).siblings('li').css({'display':'none'});
var ulstart = '
';
ADDLI();
var pagination5 = $('#pagination5 li');
var pagination5width = $('#pagination5').width();
$('#pagination5').css('margin-left',(470-pagination5width))
pagination5.eq(0).addClass('current')
function ADDLI(){
//var lilicount = numpic + 1;
for(var i = 0; i <= numpic; i++){
ulcontent += '' + '' + (i+1) + '' + '';
}
$('#slides5').after(ulstart + ulcontent + ulend);
}
pagination5.on('click',DOTCHANGE)
function DOTCHANGE(){
var changenow = $(this).index();
$('#slides5 li').eq(nownow).css('z-index','900');
$('#slides5 li').eq(changenow).css({'z-index':'800'}).show();
pagination5.eq(changenow).addClass('current').siblings('li').removeClass('current');
$('#slides5 li').eq(nownow).fadeOut(400,function(){$('#slides5 li').eq(changenow).fadeIn(500);});
nownow = changenow;
}
pagination5.mouseenter(function(){
inout = 1;
})
pagination5.mouseleave(function(){
inout = 0;
})
function GOGO(){
var NN = nownow+1;
if( inout == 1 ){
} else {
if(nownow < numpic){
$('#slides5 li').eq(nownow).css('z-index','900');
$('#slides5 li').eq(NN).css({'z-index':'800'}).show();
pagination5.eq(NN).addClass('current').siblings('li').removeClass('current');
$('#slides5 li').eq(nownow).fadeOut(400,function(){$('#slides5 li').eq(NN).fadeIn(500);});
nownow += 1;
}else{
NN = 0;
$('#slides5 li').eq(nownow).css('z-index','900');
$('#slides5 li').eq(NN).stop(true,true).css({'z-index':'800'}).show();
$('#slides5 li').eq(nownow).fadeOut(400,function(){$('#slides5 li').eq(0).fadeIn(500);});
pagination5.eq(NN).addClass('current').siblings('li').removeClass('current');
nownow=0;
}
}
TT = setTimeout(GOGO, SPEED);
}
TT = setTimeout(GOGO, SPEED);
})