proj = 0;
fadeIndex=0;

function rotateProj(){
	proj += 1;
	proj %= 5;
	
	var slideout = $("#fp" + (proj-1)); 
	var slidein =  $("#fp" + proj);
	if(proj == 0){
		var slideout =  $("#fp4");
		var slidein = $("#fp0");
	}
		
	slideout.hide();
	slidein.fadeIn(500);

}

function timerset(){
	var timer = setInterval(fadehelp, 5000);
}
function fadehelp(){
	fadeIndex++;
	fadeIndex%=10;
	fade(fadeIndex);
}

function fade(index){
	var out = $("#fade" + (index - 1));
	var fade = $("#fade" + index);
	if(index == 0){
		var out = $("#fade9");
		var fade = $("#fade0");
	}
	fade.fadeIn(750, function(){out.fadeOut(750);});
}