// JavaScript Document
var testimonials;
$(document).ready(function() {
	
	if ($('#success')) {
		$("p.test", this).hide();	
		testimonials=new Array();
		testimonials = $("p.test");
		selectTest();
	}	
});

function selectTest(jp) {
	var j = Math.floor( Math.random() * ( 5 + 1 ) );
	if (j == jp) {
		j = j+1;
	}
	for (i = 0; i < testimonials.length; i++) {
		$(testimonials[i]).hide();
	}
	if (testimonials[j] == "" || j == null) {
		$(testimonials[1]).animate({
	   opacity: 'show'
	 }, 1000);
	}
	else {
		$(testimonials[j]).animate({
	   opacity: 'show'
	 }, 1000);
	}
	var delay = setTimeout("selectTest(" + j + ")",10000)
}
