var Home = {
    init: function() {
        var slide_images = $('#sidebar-scroller img')
            slides = new Array(),
            delay = 5, // the delay before switching a photo
            current = 0; 

        slide_images.each(function(index) {
            if ($(this).is(":visible")) { current = index }
            slides.push($(this));
        });
        
        var interval = setInterval(function() {
            target = (current < (slides.length-1)) ? current+1 : 0;

            slides[current].fadeOut('slow');
            slides[target].fadeIn('slow');

            current = target;
        }, delay*1000);
        
    }
}
