// JavaScript Document
var isRotating = 0; /* Controls "button mashing" (ie. repeated clicks of the buttons). */
var isStopped = 0;
var rotate;

var $j = jQuery.noConflict();
$j(document).ready(function(){
	// create the image rotator
	setInterval("rotateShow()", 5000);

});

function rotateShow() {
	var oCurPhoto = $j('#slider div.current');
	var oNxtPhoto = oCurPhoto.next();
	if (oNxtPhoto.length == 0){
		oNxtPhoto = $j('#slider div:first');
	}
	oCurPhoto.removeClass('current').addClass('previous');
	oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 1000,
		function() {
			oCurPhoto.removeClass('previous');
		});
}