jQuery(document).ready(function($) {
	var container = $("#testimonials");
	var delay = 10 * 1000; // milliseconds
	var index = 0;
	var elements = container.children();
	var max = elements.length - 1;
	var timer = null;
	
	// start
	timer = window.setTimeout(rotate, delay);
	
	function rotate() {
		var prev = index;
		index += 1;
		if (index > max) {
			index = 0;
		}
		elements.eq(prev).fadeOut("slow", function() {
			elements.eq(index).fadeIn("slow");
		});
		timer = window.setTimeout(rotate, delay);
	}
});
