


$(function() {

	for(i=1;i<$("#splash").children().length;i++) { $("#splash img#splash_" + i).css('opacity', '0'); }
	setInterval(splashAnimation, 5000);
});

var currentSplashImage = 1;
var previousSplashImage = 0;

function splashAnimation() {
	

	var numberOfSplashImages = $("#splash").children().length;
	$("#splash img#splash_" + previousSplashImage).animate({
	  opacity: .0
	}, 1000, "linear");
	$("#splash img#splash_" + currentSplashImage).animate({
	  opacity: 1
	}, 1000, "linear");
	
	
	previousSplashImage = currentSplashImage;
	currentSplashImage++;
	if(currentSplashImage == numberOfSplashImages) { currentSplashImage = 0; previousSplashImage = numberOfSplashImages - 1;}
}


