#myslidebox{
width:100%;
height:100%;
background:#ccc;
}
#myslideboxshow{
width:100%;
height:100%;
position:relative;
overflow:hidden;
}
#myslideboxshow li{
position:absolute;
width:100%;
height:100%;
left:100%;
top:0;
}
#myslideboxshow li img{
width:100%;
height:100%;
}
var slidesubnumber = $('#myslideboxshow').children().length;
var i = 0;//显示当前的图片
function slide(){
$("#myslideboxshow").find("li").css({"left":"100%","z-index":"1"});
if(i == 4){
$("#myslideboxshow").find("li").eq(4).css({"left":"0px","z-index":"2"}).animate({"left":"-100%"});
$("#myslideboxshow").find("li").eq(0).css({"left":"100%","z-index":"4"}).animate({"left":"0px"});
}else{
$("#myslideboxshow").find("li").eq(i).css({"left":"0px","z-index":"2"}).animate({"left":"-100%"});
$("#myslideboxshow").find("li").eq(i+1).css({"left":"100%","z-index":"4"}).animate({"left":"0px"});
}
if(i < slidesubnumber - 1){i = i + 1;}else{i = 0;}
setTimeout('slide()',5000);
}
slide();