var curr_no = 1;
var timer_no = 1;
var rotate_timer = "";
//
function showItem(no){
	if(curr_no!=no){
		if(no > 4){
			showItem(1);
		} else if(no < 1){
			showItem(4);
		} else{
			/* Afbeelding animaties */
			var currentIMG = $("#slide-"+curr_no);
			var nextIMG = $("#slide-"+no);
			nextIMG.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);
			currentIMG.animate({opacity: 0.0}, 1000).removeClass('show');
			//
			// Knop aan / uit zetten
			$("#s"+curr_no).removeClass("aan");
			$("#s"+no).addClass("aan");
			$("#slide-pijl-"+curr_no).removeClass("show");
			$("#slide-pijl-"+no).addClass("show");
			//
			curr_no = no;
			timer_no = no;
		}
	}
}
//
function RotateSlides(){
	//
	/* Start de slideshow */
	showItem(timer_no);
	timer_no++;
	if(timer_no>4){
		timer_no=1;
	}
	rotate_timer = setTimeout("RotateSlides()", 6000);
}
