$(document).ready(function(){$("input, textarea").focusout(function(){if(""==$(this).val()&&"mobile_number"==!$(this).attr("name")){var t=$(this).parent().attr("data-text");"undefined"!=typeof t&&t!==!1?$(this).parent().hasClass("input--2")||$(this).parent().addClass("input--error2"):$(this).parent().addClass("input--error2")}else $(this).parent().removeClass("input--error2")})}),_submitContactForm=function(){var t=window.location.origin,a=t+"/support/contact-us",e=$("#form_contact").serialize();$.ajax({url:a,type:"POST",data:e,headers:{"X-CSRF-TOKEN":$('input[name="_token"]').val()},success:function(a,e){0==a.status?($(".error_wrapper").each(function(){$(this).removeClass("input--error2"),$(this).removeAttr("data-text")}),$.each(a.message,function(t,a){$("."+t.replace(".","_")).addClass("input--error2"),$("."+t.replace(".","_")).attr("data-text",a)})):a.status&&(window.location=t+"/"+facile.current_language+"/support/contact-us/thank-you")},error:function(t,a,e){console.log(a,e)}})};