function slideSwitch1() {
    var $active1 = $('#slideshow1 IMG.active1');

    if ( $active1.length == 0 ) $active = $('#slideshow1 IMG:last');

    var $next =  $active1.next().length ? $active1.next()
        : $('#slideshow1 IMG:first');

    $active1.addClass('last-active1');

    $next.css({opacity: 0.0})
        .addClass('active1')
        .animate({opacity: 1.0}, 1000, function() {
            $active1.removeClass('active1 last-active1');
        });

};

function slideSwitch2() {
    var $active2 = $('#slideshow2 IMG.active2');

    if ( $active2.length == 0 ) $active2 = $('#slideshow2 IMG:last');

    var $next =  $active2.next().length ? $active2.next()
        : $('#slideshow2 IMG:first');

    $active2.addClass('last-active2');

    $next.css({opacity: 0.0})
        .addClass('active2')
        .animate({opacity: 1.0}, 1000, function() {
            $active2.removeClass('active2 last-active2');
        });

};

function slideSwitch3() {
    var $active3 = $('#slideshow3 IMG.active3');

    if ( $active3.length == 0 ) $active3 = $('#slideshow3 IMG:last');

    var $next =  $active3.next().length ? $active3.next()
        : $('#slideshow3 IMG:first');

    $active3.addClass('last-active3');

    $next.css({opacity: 0.0})
        .addClass('active3')
        .animate({opacity: 1.0}, 1000, function() {
            $active3.removeClass('active3 last-active3');
        });
};

function intervalSlideSwitch1() {
    setInterval( "slideSwitch1()", 6000 );
};

function intervalSlideSwitch2() {
    setInterval( "slideSwitch2()", 6000 );
};

function intervalSlideSwitch3() {
    setInterval( "slideSwitch3()", 6000 );
};

setTimeout("intervalSlideSwitch1()", 2000);
setTimeout("slideSwitch1()", 2000);
setTimeout("intervalSlideSwitch2()", 4000);
setTimeout("slideSwitch2()", 4000);
setTimeout("intervalSlideSwitch3()", 6000);
setTimeout("slideSwitch3()", 6000);
