
	document.observe("dom:loaded", function() {
		// set this var with the total amount of testimonials
		var total_testimonials = 4;
		var sec_till_update = 10;
		
		current_index = random_number(0, total_testimonials-1);
		next_index = (current_index+1) % total_testimonials;
	
		$('testimonial'+current_index).show();
		
		new PeriodicalExecuter(function(pe) {
	
			Effect.Fade('testimonial'+current_index, { queue:'front', duration: 0.0 });
			Effect.Appear('testimonial'+next_index,  { queue:  'end', duration: 0.0 });
			
			current_index = next_index;
			next_index = (current_index+1) % total_testimonials;
		}, sec_till_update);
		
	});
	
	
	function random_number(min,max) {
	    return (Math.round((max-min) * Math.random() + min));
	}