/**
* Begin Configuration Variables
*/



/**
* End Configuration Variables
*/

/**
* Begin Core Methods and Logic
*/

<!-- Begin Email Validation Method -->
function isValidEmail( email ) {
  var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
  return pattern.test( email );
}
<!-- End Email Validation Method -->

<!-- Begin Pre Submit Callback -->
function showRequest(formData, jqForm, options) { 
    
	var email = $("#email").val();
	
	if ( !isValidEmail( email ) ) {
		
		jAlert('Please enter a valid email address', '');
		return false
	}
	
	return true; 
}
<!-- End Pre Submit Callback --> 
 
<!-- Begin Post Submit Callback -->
function showResponse(responseText, statusText, xhr, $form)  {	 
}
<!-- End Post Submit Callback -->

<!-- Begin Document Ready -->
jQuery(document).ready(function($) {
	
	
	
	<!-- Begin Ajax Form -->
	var options = { 
        target:        '#notifyoutput',   // target element(s) to be updated with server response 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse,  // post-submit callback 
 
        // other available options: 
        //url:       url         // override for form's 'action' attribute 
        //type:      type        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: true,        // clear all form fields after successful submit 
        resetForm: true,        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        timeout:   3000 
    }; 
 
    // bind form using 'ajaxForm' 
    $('#notifyform').ajaxForm(options);
	<!-- End Ajax Form -->
	
	<!-- Begin Ajax Handling -->
	$(document).ajaxStart(function() {		
		jLoading('<img src="images/loader.gif" width="160" height="40" />', 'Working');		
	}).ajaxStop(function() {		
		$.alerts._hide();		
	}).ajaxComplete(function() {
		$.alerts._hide();		
	});
	<!-- End Ajax -->		
	
	
});
<!-- End Document Ready -->
