$(document).ready(function(){
    count=0;
    imgs = jQuery.makeArray($("#featured_photo img"));
    
    $("#featured_photo img").css("z-index", 4);
    $(imgs[0]).show();
    inter = setInterval(function(){
        $(imgs[count%imgs.length]).css("z-index", 5);
        $(imgs[(count+1)%imgs.length]).show();
        $(imgs[count++%imgs.length]).fadeOut("slow",function(){
            $(this).css("z-index", 4);
        })
    }, 5000)
})

