$( document ).ready(function(){
 	$('a[@href$=email]').each(function(){e = this.rel.replace('/','@');this.href = 'mailto:' + e;$(this).text(e);});
	$.get("/token.php",function(txt){$(".secure").append('<input type="hidden" name="ts" value="'+txt+'" />');});

	var options2 = {
		target:        "div.result2",
		beforeSubmit:  beforeSubmitListForm,
		success:       afterSubmitListForm
	};
	jQuery("#LoadingListForm").hide();

	function beforeSubmitListForm() {
		jQuery('#submitListForm').hide();
		jQuery('#LoadingListForm').show();
		return true;
	}
	function afterSubmitListForm() {
		jQuery('#submitListForm').show();
		jQuery('#LoadingListForm').hide();
	}

	jQuery("#MailListForm").validate({
		submitHandler: function(form) {
			jQuery(form).ajaxSubmit(options2);
		}
	});


});
