// JavaScript Document
function slideSwitch(switchSpeed) {
    var $active = $('#slideshow IMG.active');
    
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

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

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

$(function() {
    setInterval ( "slideSwitch(1000)", 5000 );    
});

// JavaScript Document
function slideSwitch2(switchSpeed2) {
    var $active2 = $('#slideshow2 IMG.active');
    
    if ( $active2.length == 0 ) $active = $('#slideshow2 IMG:last');

    var $next =  $active2.next('IMG').length ? $active2.next('IMG')
        : $('#slideshow2 IMG:first');

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

$(function() {
    setInterval ( "slideSwitch2(1000)", 5100 );    
});

// JavaScript Document
function slideSwitch3(switchSpeed3) {
    var $active3 = $('#slideshow3 IMG.active');
    
    if ( $active3.length == 0 ) $active = $('#slideshow3 IMG:last');

    var $next =  $active3.next('IMG').length ? $active3.next('IMG')
        : $('#slideshow3 IMG:first');

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

$(function() {
    setInterval ( "slideSwitch3(1000)", 5000 );    
});

// JavaScript Document
function slideSwitch4(switchSpeed4) {
    var $active4 = $('#slideshow4 IMG.active');
    
    if ( $active4.length == 0 ) $active = $('#slideshow4 IMG:last');

    var $next =  $active4.next('IMG').length ? $active4.next('IMG')
        : $('#slideshow4 IMG:first');

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

$(function() {
    setInterval ( "slideSwitch4(1000)", 5100 );    
});