/**
* Begin Configuration Variables
*/

<!-- Begin Counter Configuration -->
var year = 2011;
var month = 11;
var day = 21;
var hour = 5;
var minute = 30;
var second = 1;
<!-- End Counter Configuration -->

<!-- Begin Twitter Configuration -->
var twitterusername = 'lifeobject1';
var twittercount = 1;
<!-- End Twitter Configuration -->

/**
* 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 Countdown Code -->
	$('#counter').countdown({
		until: new Date( year, month - 1, day, hour, minute, second ),
		compact: true,
		layout: '<div class="days"><span class="image{d100}"></span><span class="image{d10}"></span><span class="image{d1}"></span></div>' +
				'<div class="hours"><span class="image{h10}"></span><span class="image{h1}"></span></div>' +
				'<div class="minutes"><span class="image{m10}"></span><span class="image{m1}"></span></div>' +
				'<div class="seconds"><span class="image{s10}"></span><span class="image{s1}"></span></div>'
	});
	<!-- End Countdown Code -->
	
	<!-- Begin Twitter Code -->
	$(".tweet").tweet({
      join_text: "auto",
      username: twitterusername,
      avatar_size: 48,
      count: twittercount,
      auto_join_text_default: "we said,",
      auto_join_text_ed: "we",
      auto_join_text_ing: "we were",
      auto_join_text_reply: "we replied",
      auto_join_text_url: "we were checking out",
      loading_text: "loading tweets..."
    });
	<!-- End Twitter Code -->
	
	<!-- 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 -->
