// JavaScript Document
	$(document).ready(function(){
		$('#form1').validate() ;
		$('.SubmitNow').click(function() {
				$('#NewsEmail').focus() ;
				$('#form1').trigger('submit');
				return false ;
		}) ;	// $('.SubmitNow').click
	
		$('#form1').submit(function() {
			if( !$('#NewsEmail').hasClass('error') )
			{
				showForm(false) ;
				//this.form.reset() ;
				setTimeout('showForm(true)', 10000) ;
			}
			else
				return false ;
		}) ;	// $('#form1').submit
		

		showForm(true) ;

		swap_val = [];  
		$(".swap").each(function(i){  
			swap_val[i] = $(this).val();

			$(this).focusin(function(){  
				if ($(this).val() == swap_val[i]) {  
					$(this).val("");  
				}  	// if ($(this).val() == swap_val[i])
			}).focusout(function(){  
				if ($.trim($(this).val()) == "") {  
					$(this).val(swap_val[i]);  
				}  
			});  
		}); 	// $(".swap").each
	}) ;	// $(document).ready



	function showForm(ShowForm)
	{
		if (ShowForm)
		{
		
			$('#NewsEmailForm').show() ;
			$('#NewsThanksMsg').hide() ;
			document.form1.reset() ;
		}
		else
		{
			$('#NewsEmailForm').hide() ;
			$('#NewsThanksMsg').show() ;
		}
	}	// function showForm(ShowForm)

