 function slideSwitch() {
    var $active = $('#slideshow div.activeimg');

    if ( $active.length == 0 ) $active = $('#slideshow div:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow div:first');

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

$(function() {
    setInterval( "slideSwitch()", 10000 );
});
