var t_count=0;

$(document).ready(function(){
	if(page == 'home'){
		$('#leftBoxwrapper .main').each(function(index){
			t = this.innerHTML;
			this.innerHTML = t.substring(0,100)+'...(Read More)';
			t_count++;
		});
		$('#leftBoxwrapper').click(function(){
			window.location = "/testimonials.asp"
		});
		show_test(Math.floor(Math.random()*t_count));
		
	}
});

function show_test(num){
	if(num < 1 || num > t_count){
		show_test(Math.floor(Math.random()*t_count));
	}else{
		$('#'+num).animate({opacity:1}, 2000);
		setTimeout(function(){
			$('#'+num).animate({opacity:0},1000, function(){
				setTimeout(function(){
					show_test(Math.floor(Math.random()*t_count));
				}, 500);
			});
		}, 5000);
	}
}
