function initContactFormSubmit() { 
	var options = { 
		target:        '#hiddenDIV',   // target element(s) to be updated with server response 
	    beforeSubmit:  beforePost,  // pre-submit callback 
	    success:       afterPost  // post-submit callback 
	};
	$('#ContactForm').validate({
	    submitHandler: function(form) {
			$('#ContactForm').ajaxSubmit(options);
		}
	});
	// pre-submit callback 
	function beforePost() { 
		$("#contactSubmit").hide();
		$("#submitMessage").show();
	    // here we could return false to prevent the form from being submitted; 
	    // returning anything other than false will allow the form submit to continue 
	    return true; 
	} 
	// post-submit callback 
	function afterPost(rtn)  { 
	    if(rtn=="success") {
			$("#ContactForm").hide();
			$("#contactFormNotification").fadeIn("slow");
		}else{
	        //there was an error, so grab the UL in the content ID, 
	        //inside the hidden DIV, and put it into the Message Notification
	      $("#errorMessage").html(  $("#hiddenDIV").html() );
		  $("#hiddenDIV").empty(); 
	     }
	}
}
function initMemberFormSubmit() { 
	var options = { 
		target:        '#hiddenDIV',   // target element(s) to be updated with server response 
	    beforeSubmit:  beforePost,  // pre-submit callback 
	    success:       afterPost  // post-submit callback 
	};
	$('#MemberForm').validate({
	    submitHandler: function(form) {
			$('#MemberForm').ajaxSubmit(options);
		}
	});
	// pre-submit callback 
	function beforePost() { 
		$("#memberSubmit").hide();
		$("#submitMessage").show();
	    // here we could return false to prevent the form from being submitted; 
	    // returning anything other than false will allow the form submit to continue 
	    return true; 
	} 
	// post-submit callback 
	function afterPost(rtn)  { 
	    if(rtn=="success") {
			$("#MemberForm").hide();
			$("#memberFormNotification").fadeIn("slow");
		}else{
	        //there was an error, so grab the UL in the content ID, 
	        //inside the hidden DIV, and put it into the Message Notification
	      $("#errorMessage").html(  $("#hiddenDIV").html() );
		  $("#hiddenDIV").empty(); 
	     }
	}
}
function initCycle() {
	$('#slideshow').cycle({ 
	   fx: 'fade', 
	   speed: 1000,
	   timeout: 8000,
	   cleartypeNoBg: true
	 });
}
$(document).ready(function() {
	initContactFormSubmit();
	initMemberFormSubmit();
	initCycle();
	});
