

function slideSwitch1() {
    var $active1 = $('#slideshow1 IMG.active');

    if ( $active1.length == 0 ) $active1 = $('#slideshow1 IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next1 =  $active1.next().length ? $active1.next()
        : $('#slideshow1 IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active1.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next1  = $( $sibs[ rndNum ] );


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

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

$(function() {
    setInterval( "slideSwitch1()", 5000 );
});







