//	The [load] event on [window] fires after all page images are loadedEvent.observe(window, 'load', function(){});//	The [dom:loaded] event fires immediately after the HTML document is fully loaded, but before images on the page are fully loadeddocument.observe("dom:loaded", function(){	Event.observe($('mailchimp'), 'submit', Jedi.contact.bindAsEventListener($('mailchimp')));});var Jedi ={	fetching:function(running)	{		if (running)		{		//	$('send').hide();			$('mailchimp').disable();		} else {		//	$('send').show();			$('mailchimp').enable();		}	},	contact:function(e)	{		e = e || window.event;		Event.stop(e);		new Ajax.Request('/mcapi_listSubscribe.php', {			method: 'post',			parameters: 'ajax=true&emailaddress=' + escape($F('email')),			onCreate: Jedi.fetching(true),			onComplete: function(transport) {				// we're no longer fetching, hide spinner				Jedi.fetching(false);				var response = $H(transport.responseText.toQueryParams()) || "no response text";				if (response.get('SUCCESS') == 1) alert('You\'ve been subscribed!');				else alert(util.remove(response.get('ERRORMSG'), 'Error:'));			},			onFailure: function() { alert('Sorry, something went wrong.'); }		});	}}var util ={	remove:function(s, t)	{		/*		**  Remove all occurrences of a token in a string		**    s  string to be processed		**    t  token to be removed		**  returns new string		*/		i = s.indexOf(t);		r = '';		if (i == -1) return s;		r += s.substring(0,i) + util.remove(s.substring(i + t.length), t);		return r;	}}