
 $(document).ready(function() {
	
	/*(var loaded = false;
	var mainImage = new Image();
	$(mainImage).attr("src", "../images/main-image.jpg")
	.load(function(){
		loaded=true;
		$('#loading-text').hide();
		$("a#big-link").removeClass("loading");
		});


	//ROLLOVERS
	$("a#big-link").hover(function(){
		if(loaded) $(".rollover").show();
	},
	
	function(){
		if(loaded) $(".rollover").hide();
	}); 
	
	*/
	
	
	//EMAIL OBFUSCATION
	$(".email").each(function()
	{
		var email = String($(this).attr('href')).replace(/\s*\(.+\)\s*/, "@");
		$(this).attr('href', email);
	});
	
	//SUBSCRIBE AJAX SUBMIT
	$("input#submit-button").click(function(e){
		e.preventDefault();
		if($("input#email").val() == "") alert("Please enter an email address to subscribe.");
		else{
			$.post('subscribe.php', 
			{email: $("input#email").val()}, 
			function(html){
				//CALLBACK FUNCTION
				$("#mailingList").html("<p id=\"mailListConfirm\">Thanks. You are now subscribed.</p>");
			}, 'html');
		}
	});
	
	


	 
 });




