!function(){"use strict";({initialized:!1,initialize:function(){this.initialized||(this.initialized=!0,this.build(),this.events())},build:function(){$("#contactForm").get(0)&&this.basicValidations()},events:function(){},basicValidations:function(){var t=$("#contactForm"),e=t.attr("action");t.validate({submitHandler:function(t){var s=$(this.submitButton);s.button("loading"),$.ajax({type:"POST",url:e,data:{name:$("#contactForm #name").val(),email:$("#contactForm #email").val(),subject:$("#contactForm #subject").val(),message:$("#contactForm #message").val(),tel:$("#contactForm #tel").val(),form_botcheck:$("#contactForm #form_botcheck").val(),"g-recaptcha-response":grecaptcha.getResponse()},dataType:"json",success:function(t){"success"==t.response?($("#alertSuccess").removeClass("hidden"),$("#alertError").addClass("hidden"),$("#contactForm .form-control").val("").blur().parent().removeClass("has-success").removeClass("has-error").find("label.error").remove(),$("#alertSuccess").position().top-80<$(window).scrollTop()&&$("html, body").animate({scrollTop:$("#alertSuccess").offset().top-80},300)):($("#alertError").removeClass("hidden"),$("#alertSuccess").addClass("hidden"),$("#alertError").position().top-80<$(window).scrollTop()&&$("html, body").animate({scrollTop:$("#alertError").offset().top-80},300))},complete:function(){s.button("reset")}})},highlight:function(t){$(t).parent().removeClass("has-success").addClass("has-error")},success:function(t){$(t).parent().removeClass("has-error").addClass("has-success").find("label.error").remove()}})}}).initialize()}();