function slideSwitch() {
	
    var $active = jQuery('#slideshow .slideshow-item.active');

    $active.addClass('last-active');

    // verifica se existe um próximo objeto na div #slideshow, caso ele nao exista, retorna para o primeiro
    var $next =  $active.next().length ? $active.next() : jQuery('#slideshow li:first');

    $next.css({
        opacity: 0.0
    })
    .addClass('active')
    .animate({
        opacity: 1.0
    }, 1000, function() {
        $active.removeClass('active last-active');
    });
}

window.onload = function() {
    window.setInterval("slideSwitch()", 5000);
}
