$(document).ready(function() {

	/*
		To use this script, simply attach class="contextFriendly"
		 to each input. Then add rel="Input Description"
		 This script will do the rest.
	*/

	function toggleContextHelp() {
		var helpfulInfo = $(this).attr("rel");
		if ($(this).val()==helpfulInfo) {
			$(this).val("");
			$(this).css("color", "#333333");
		}
		else if ($(this).val()=="") {
			$(this).val(helpfulInfo);
			$(this).css("color", "#888888");
		}
	}

	function addContextHelp() {
		var helpfulInfo = $(this).attr("rel");
		$(this).val(helpfulInfo);
		$(this).css("color", "#888888");
	}

	$("input.contextFriendly").focus(toggleContextHelp);
	$("input.contextFriendly").blur(toggleContextHelp);

	$("input.contextFriendly").each(addContextHelp);

});