jQuery(document).ready(function(){
    var time_delay = 10000;
    var show_image = 0;
    
    next_featured_image = function () {
      if (typeof(featured_step_count)!='undefined') {
        var featured_count = 0;
        jQuery('.pageitem').each ( function () {
            featured_count++;
            if (featured_count == show_image) jQuery(this).fadeOut();
        });

        show_image = show_image + 1;
        if (show_image == (featured_step_count+1)) show_image = 1;
        
        var featured_count = 0;
        jQuery('.pageitem').each ( function () {
            featured_count++;
            if (featured_count == show_image) jQuery(this).fadeIn();
        });
        
        setTimeout('next_featured_image()',time_delay);
       }        
    }
    next_featured_image();
});
