jQuery(document).ready(function($) {
    var options = { 
        target:        '#response',   // target element(s) to be updated with server response 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
		clearForm: true
    }; 

    $('#contactform').ajaxForm(options); 
	

}); 
 

function showRequest(formData, jqForm, options) { 
	
	jQuery("#loader").html("loading...<br /><img src=\"/wp-content/themes/rawfoodnation/images/loading_small.gif\" alt=\"loading...\" />");
	jQuery("#submitform").attr("disabled", "disabled");
    return true;
} 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 


	jQuery("#loader").html("");
	jQuery("#submitform").attr("disabled", "");	

} 

