/*** 
    Simple jQuery Slideshow Script
    Released by Jon Raasch (jonraasch.com) under FreeBSD license
***/

function slideSwitch(slideshowdiv) {
    var $active = jQuery('#' + slideshowdiv + ' IMG.active');

    if ( $active.length == 0 ) $active = jQuery('#' + slideshowdiv + ' IMG:last');

    var $next =  $active.next('img').length ? $active.next('img')
        : jQuery('#' + slideshowdiv + ' IMG:first');

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

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