function rotateImages() {
	var curPhoto = $("#slideshow img.current");
	var nxtPhoto = curPhoto.next();
	if (nxtPhoto.length == 0)
		nxtPhoto = $("#slideshow img:first");
	
	curPhoto.removeClass("current").addClass("previous");
	nxtPhoto.css({ opacity: 0.0 }).addClass("current").animate({opacity:1.0}, 1000,
		function() {	
			curPhoto.removeClass("previous");
	});		
}

$(function(){
	Cufon.replace('h3', { fontFamily: 'MetroScript' });
	Cufon.replace('h1', { fontFamily: 'DIN-Bold' });

		
	setInterval("rotateImages()", 4000);
	
	$("#homeButtons > div").hover(
		function() {
			$(this).children(".buttonTextWrapper").css("display", "block");
		},
		function () {
			$(this).children(".buttonTextWrapper").css("display", "none");
		}
	);
});