//------------------- for clearing and replacing text in form input fields and textareas -------------------//
function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

$().ready(function() {		
	// validate signup form on keyup and submit
	$("#contact-form").validate({
		rules: {
			name: { required: true },
			email: {
				required: true,
				email: true
			}
		},
		messages: {
			name: "Please enter your name",
			email: "Please enter a valid email address"
		}
	});
});