function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next() : $('#slideshow IMG:first');
    var $width = $next.attr('width');

    $active.addClass('last-active');

    $next.css({'opacity' : '0.0', 'left' : function() { return 479 - ($width / 2) + "px"; } }).addClass('active').animate({opacity: 1.0}, 1000);//, function() { $active.removeClass('active last-active'); });
    $active.css({opacity: 1.0}).animate({opacity: 0.0}, 1000, function() { $active.removeClass('active last-active'); });
}

$(document).ready(function () {
    setInterval( "slideSwitch()", 5000 );
});


