$(function(){var e=$("#contact-form"),t=$(".ajax-response");$(e).submit(function(a){a.preventDefault();var r=$(e).serialize();$.ajax({type:"POST",url:$(e).attr("action"),data:r}).done(function(e){$(t).removeClass("error"),$(t).addClass("success"),$(t).text(e),$("#contact-form input,#contact-form textarea").val("")}).fail(function(e){$(t).removeClass("success"),$(t).addClass("error"),""!==e.responseText?$(t).text(e.responseText):$(t).text("Oops! An error occured and your message could not be sent.")})})});