var pause = 5500;
var xFadeTime = 2000;

$(document).ready(function () {
	$("#splash").delay(3000).fadeOut(2000, function() {
		timer = setTimeout(slideshow, pause)
	});
});

function slideshow() {
	var visible, next;
	$(".slide").each(function () {
		if($(this).is(":visible")) {
			visible = $(this);
			next = $(this).next();
			if(next.length == 0) {
				next = $(".slide:first");
			}
		}
	});
	
	if(visible != null) {
		visible.fadeOut(xFadeTime);
		next.fadeIn(xFadeTime);
	
		timer = setTimeout(slideshow, pause);
	}
}
