// JavaScript Document

$("document").ready(function()
{
	var image_interval;
	image_interval = setInterval(rotateImages, 4000);
});

function rotateImages()
{	
	var oCurPhoto = $(".banner div.current");
	var oNxtPhoto = oCurPhoto.next();
	
	if (oNxtPhoto.length == 0)
		oNxtPhoto = $(".banner div:first");
	
	oCurPhoto.removeClass('current').css({opacity: 1}).addClass('previous').animate({opacity: 0}, 1000);
	oNxtPhoto.css({opacity: 0}).addClass('current').animate({opacity: 1}, 1000, 
		
		function()
		{
			oCurPhoto.removeClass('previous');
		});
}
