slide cross fade
$(document).ready(function(){ rotatePics(1); }); function rotatePics(currentPhoto){ var numberOfPhoto=$('#photos img').length; currentPhoto=currentPhoto % numberOfPhoto; $('#photos img').eq(currentPhoto).fadeOut(function(){ $('#photos img').each(function(i){ $(this).css( 'zIndex',((numberOfPhoto-i)+currentPhoto) % numberOfPhoto ); }); $(this).show(); setTimeout(function(){rotatePics(++currentPhoto);},4000); }); } #photos img { position: absolute;…