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

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

    /*
    var $jsibs  = $jactive.siblings();
    var rndNum = Math.floor(Math.random() * $jsibs.length );
    var $jnext  = $j( $jsibs[ rndNum ] );
    */
    
    $jactive.addClass('last-active');
    
    
 	var $jnext_alt = $jnext.attr("alt");
	
	$j("p#alternate").fadeOut("fast", function(){$j("p#alternate").empty().append($jnext_alt).fadeIn('slow')});

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

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

