			$fs(function()
			{
				$fs("#subForm input:image").click(function() {	
					
					// First, disable the form from submitting
					$fs('form#subForm').submit(function() { return false; });
					
					// Grab form action
					formAction = $fs("form#subForm").attr("action");
					
					// Hacking together id for email field
					// Replace the xxxxx below:
					// If your form action were http://mysiteaddress.createsend.com/t/r/s/abcde/, then you'd enter "abcde" below
					emailId = "djwju";
					emailId = emailId.replace("/", "");
					emailId = emailId + "-" + emailId;
					
					// Validate email address with regex
					if (!checkEmail(emailId)) 
					{
						alert("Please enter a valid email address");
						return;
					}
					
					// Serialize form values to be submitted with POST
					var str = $fs("form#subForm").serialize();
					
					// Add form action to end of serialized data
					final = str + "&action=" + formAction;
					
					// Submit the form via ajax
					$fs.ajax({
						url: "/proxy.php",
						type: "POST",
						data: final,
						success: function(html){
							$fs("#theForm").hide(); // If successfully submitted hides the form
							$fs("#confirmation").slideDown("slow");  // Shows "Thanks for subscribing" div
						}
					});
				});
			});
			function checkEmail(email)
			{	
				var pattern = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
				var emailVal = $fs("#" + email).val();
				return pattern.test(emailVal);
			}