function slideSwitch() {
    var $jactive = $j('#slider IMG.active');

    if ( $jactive.length == 0 ) $jactive = $j('#slider IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $jnext =  $jactive.next().length ? $jactive.next()
        : $j('#slider IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $jsibs  = $jactive.siblings();
    // var rndNum = Math.floor(Math.random() * $jsibs.length );
    // var $jnext  = $j( $jsibs[ rndNum ] );


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

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

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