(function($) {

	mailingList = {
		
		valMailingList: function() {
			if ($('#maillistEmail').val().length == 0) {
				alert("You must enter an email address before submitting the form.");
				return false;
			} else if ($('#subUnsub').val().length == 0) {
				alert("You must choose either 'subscribe' or 'unsubscribe' before submitting the form.");
				return false;
			} else {
				mailingListForm.submit();
			}
		} /* end validate function */ 
		
	} /* end mailingList object */


	/****************************************
	 * 
	 *			DOCUMENT.READY
	 * 
	 ****************************************/
	$(document).ready(function(){
	
		$(document.mailingListForm).bind('submit',function() {
			mailingList.valMailingList();
			return false;
		});
	
	}); /* end document.ready */
	
}) (jQuery); /* end of the main jQuery object */
