function randomXToY(minVal,maxVal,floatVal)
{
  var randVal = minVal+(Math.random()*(maxVal-minVal));
  return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
}

function testimonialChange() {
$('ul#testimonials li').hide();
var randomNo = randomXToY(0,4);
$('ul#testimonials li:eq('+randomNo+')').fadeIn(1000);
}

$(function() {

	$('ul#testimonials li').hide();
	var randomNo = randomXToY(0,4);
	$('ul#testimonials li:eq('+randomNo+')').fadeIn(1000);
			
	setInterval("testimonialChange()", 10000 );

			
	$('input#first_name').focus(function() {
		if($(this).attr("value") == "First Name") { $(this).attr("value",""); }
	});$('input#first_name').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","First Name"); }
	});
	
	$('input#last_name').focus(function() {
		if($(this).attr("value") == "Last Name") { $(this).attr("value",""); }
	});$('input#last_name').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Last Name"); }
	});
	
	$('input#phone').focus(function() {
		if($(this).attr("value") == "Phone") { $(this).attr("value",""); }
	});$('input#phone').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Phone"); }
	});
	
	$('input#email').focus(function() {
		if($(this).attr("value") == "Email") { $(this).attr("value",""); }
	});$('input#email').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Email"); }
	});
	
	$('input#company').focus(function() {
		if($(this).attr("value") == "Church/Company") { $(this).attr("value",""); }
	});$('input#company').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Church/Company"); }
	});
	
	$('input#city').focus(function() {
		if($(this).attr("value") == "City") { $(this).attr("value",""); }
	});$('input#city').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","City"); }
	});
	
	$('input#state').focus(function() {
		if($(this).attr("value") == "State") { $(this).attr("value",""); }
	});$('input#state').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","State"); }
	});
	
	$('input#zip').focus(function() {
		if($(this).attr("value") == "Zip") { $(this).attr("value",""); }
	});$('input#zip').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Zip"); }
	});
	
	$('textarea#description').focus(function() {
		if($(this).attr("value") == "Other") { $(this).attr("value",""); }
	});$('textarea#description').blur(function() {
		if($(this).attr("value") == "") { $(this).attr("value","Other"); }
	});
	
	

	
});