var curr_no = 1;
var timer_no = 1;
var rotate_timer = "";
//
function showItem(no){
	if(curr_no!=no){
		/* Afbeelding animaties */
		var currentIMG = $("#tm_"+curr_no);
		var nextIMG = $("#tm_"+no);
		nextIMG.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000);
		currentIMG.animate({opacity: 0.0}, 1000).removeClass('show');
		//
		curr_no = no;
	}
}
//
function RotateNieuws(){
	/* CSS voor de afbeeldingen */
	$('.tm').css({opacity: 0.0});
	$('.tm.show').css({opacity: 1.0});
	//
	/* Start de slideshow */
	showItem(timer_no);
	timer_no++;
	if(timer_no>5){
		timer_no=1;
	}
	rotate_timer = setTimeout("RotateNieuws()", 30000);
}
