$(document).ready(function() { 

/* BEGIN TARGET FOR CONTACT FORM */
var ocean = { target: '#alert1', beforeSubmit: showRequest, success: showResponse }; 
$('#oceanForm').ajaxForm(ocean); });
 
function showRequest(formData, jqForm, ocean) { 
var queryString = $.param(formData);
return true; }
/* END TARGET FOR CONTACT FORM */

/* FUNCTION TO CLEAR FORM AFTER SUBMISSION */ 
function showResponse(responseText, statusText) { } 
$.fn.clearForm = function() {
  return this.each(function() {
	var type = this.type, tag = this.tagName.toLowerCase();
	if (tag == 'form')
	  return $(':input',this).clearForm();
	if (type == 'text' || type == 'password' || tag == 'textarea')
	  this.value = '';
	else if (type == 'checkbox' || type == 'radio')
	  this.checked = false;
	else if (tag == 'select')
	  this.selectedIndex = -1;
  });
};
