$(document).ready(function(){var options={target:'#formResult',beforeSubmit:function(){$("#formSubmit").attr("value","Please wait...");$("#formSubmit").attr("disabled","disabled");},success:function(responseText){switch(responseText){case"success":$("#formResult").html("<strong>Your e-mail message has been sent. Thank you!</strong>");$("#formFields").hide("slide",{direction:"up"},1000);break;case"error":default:$("#formResult").html('<p class="error">There was a problem sending your e-mail. Please check if the e-mail address you entered is valid, and if you filled in all the fields. If this problem persists, please contact us using the information on the right.</p>');$("#formSubmit").attr("value","Send e-mail");$("#formSubmit").attr("disabled","");$("#formFields").effect("shake",{times:3,distance:6});break;}},url:'query.php',clearForm:false};$('#contactForm').submit(function(){$(this).ajaxSubmit(options);return false;});});