Codice PHP:
<script type="text/javascript">

   var 
listToSlider = (function( listClassname ){
       
       
//Selezioni tutti gli elementi lista con uno specifico classname
       
var lists = $( '.' .listClassname  );

       var 
slideShow = (function( currentImage ){

           
currentImage.fadeOut5000 );

           if ( 
currentImage.next( ).length === )
              
currentImage currentImage.parent( ).children(":first"); 
           else
              
currentImage currentImage.next();
    
           
currentImage.fadeIn5000 ); 

       });
               
       
lists.each(function( ){

           var 
firstImg = $(this).children(":first"); 

           
firstImg .addClass("first");

           $(
this).find('img').each(function(){
                   
                  $(
this).css('display','none');

            });

            
slideShowfirstImg );

       });


   })( 
'ppt' );
</script>
//alla prossima puntata come creare il throttle per l'animazione