function slideSwitch() {
	
	// designate the "caption" (in this case the link)
	var $caption = $('a.caption');
	
	// set the active image
	var $active = $('#slideShow div.slideActive');
	if ( $active.length == 0 ) $active = $('#slideShow div:last');
	
	// set the next image to be active (first if current active is last)
	var $next =  $active.next().length ? $active.next()
		: $('#slideShow div:first');

	// mark the active as last active
	$active.addClass('slidePrevious');
	
	// fade out the active and fade in the next, then trade classes
	$next.css({display: "block", opacity: 0.0})
		.addClass('slideActive')
		.animate({opacity: 1.0}, 1000, function() {
			$active.removeClass('slideActive slidePrevious')
				.css({display: "none"});
			var $nexturl = $next.children().attr('title');
			var $nextcaption = $next.children().attr('alt');
			$caption.attr('href', $nexturl)
				.attr('title', $nextcaption);
		});
}
$(window).load(function() {
	// Set the length between transitions in milliseconds below
	setInterval( "slideSwitch()", 4200 );
});
