	function slideshow_switchto(toshownr){
		if ( toshownr == '1') { nextnr = '2'; }
		if ( toshownr == '2') { nextnr = '3'; }
		if ( toshownr == '3') { nextnr = '1'; }
 		$('.ticker_element').not('#ticker_'+toshownr).fadeOut(500);	
		$('.foto_home').not('#foto'+toshownr).fadeOut(500);																				
		$('#ticker_'+toshownr).delay(500).fadeIn(500);
		$('#foto'+toshownr).fadeIn(500);
		t=setTimeout('slideshow_switchto('+nextnr+')', 10000);
	}

$(document).ready(function() {

	t=setTimeout("slideshow_switchto('2')", 10000);

	$('.arrow_prev')
	.click(function(){ 			
		clearTimeout(t);
		if ( $('#foto1').is(':visible')){ var toshownr = '3'; }
		if ( $('#foto2').is(':visible')){ var toshownr = '1'; }
		if ( $('#foto3').is(':visible')){ var toshownr = '2'; }
		slideshow_switchto(toshownr);
	});

	$('.arrow_next')
	.click(function(){ 			
		clearTimeout(t);
		if ( $('#foto1').is(':visible')){ var toshownr = '2'; }
		if ( $('#foto2').is(':visible')){ var toshownr = '3'; }
		if ( $('#foto3').is(':visible')){ var toshownr = '1'; }
		slideshow_switchto(toshownr);
	});

});
