/*** 
Simple jQuery Slideshow Script
Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify,not responsible for anything,etc.  Please link out to me if you like it :)
***/

function slideSwitch() {
var $ssImgActive=$('#slideshow IMG.active');
if ( $ssImgActive.length == 0 ) $ssImgActive=$('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next= $ssImgActive.next().length ? $ssImgActive.next() : $('#slideshow IMG:first');

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

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

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