$(document).ready(function(){

	/*
	 * add the focus highlights to all input controls on the page with a class of .fade
	 */
	$(".fade").focus(function() {
		$(this).highlightFade({start: "#FFF", end:"#EFEFF4", speed: 200});
	});

	$(".fade").blur(function() {
		$(this).highlightFade({start: "#EFEFF4", end:"#FFF", speed: 200});
	});

/*search box*/
	$("#query").focus(function() {
		$(this).val("");
	});	

	$("#query").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Search");
		}
	});
	$("#docStoreSearchTerms").focus(function() {
		$(this).val("");
	});	

	$("#docStoreSearchTerms").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter search terms");
		}
	});

/*signIn form*/
	$("#username").focus(function() {
		$(this).val("");
	});
	$("#username").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your user name");
		}
	});
/*subscription (eBulletin) form*/
	$("#Email").focus(function() {
		$(this).val("");
	});
	$("#Email").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your email address");
		}
	});
	$("#fname").focus(function() {
		$(this).val("");
	});
	$("#fname").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your first name");
		}
	});
	$("#lname").focus(function() {
		$(this).val("");
	});
	$("#lname").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your last name");
		}
	});
	$("#organisation").focus(function() {
		$(this).val("");
	});
	$("#organisation").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your organisation name");
		}
	});

/*contact form*/
	$("#name").focus(function() {
		$(this).val("");
	});
	$("#name").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your name");
		}
	});
	$("#organisation").focus(function() {
		$(this).val("");
	});
	$("#organisation").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your Organisation name");
		}
	});
	$("#email").focus(function() {
		$(this).val("");
	});
	$("#email").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your email address");
		}
	});
	$("#telephone").focus(function() {
		$(this).val("");
	});
	$("#telephone").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your telephone number");
		}
	});
	$("#timeDate").focus(function() {
		$(this).val("");
	});
	$("#timeDate").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your suggested time and date");
		}
	});
	$("#from").focus(function() {
		$(this).val("");
	});
	$("#from").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your email address");
		}
	});
	$("#message").focus(function() {
		$(this).val("");
	});
	$("#message").blur(function() {
		if ($(this).val()=="") {
			$(this).val("Enter your comments here");
		}
	});
});