// JS

$(document).ready( function(){
  autoFill($("#term"), "Restaurant or Type of Food");
  autoFill($("#loc"), "Address");
});

//Auto-Fill function accepts id of input and fills it with the given value.
//Written by Joe Sak http://www.joesak.com/2008/11/19/a-jquery-function-to-auto-fill-input-fields-and-clear-them-on-click/
function autoFill(id, v) {
	$(id).css({ color: "#b2adad" }).attr({ value: v }).focus(function() {
		if($(this).val()==v){
			$(this).val("").css({ color: "#333" });
		}
	}).blur(function(){
		if($(this).val()==""){
			$(this).css({ color: "#b2adad" }).val(v);
		}
	});
}
