text: function displayFormMsg(a,t){var s;if($(".content-section.contact").hasClass("style-2"))$(".content-section.contact .alert").remove(),s="warning"==t?'<div class="alert alert-warning alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><strong>Oops!</strong> '+a+"</div>":'<div class="alert alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><strong>Wait!</strong> + '+a+"</div>";else{var e="";"warning"==t&&(e='<i class="fa fa-exclamation-triangle"></i>'),s='<div class="message '+t+'"><div class="col-lg-12"><p>'+e+a+'</p><i class="fa fa-sort-asc arr"></i></div></div>'}msg=$(".form #message"),msg.css("opacity","0"),msg.append(s),msg.animate({opacity:1},400,"easeOutCirc")}var pathToAjax="ajax/email.php",processing=!1;$("a#submit_contact").click(function(a){if(a.preventDefault(),!processing){processing=!0,msg=$(".form #message");var t=msg.find("div.message");t.length&&$(t).animate({opacity:0},100,"easeOutCirc",function(){$(this).remove()});var s=!0;$(".form.contact input, .form.contact textarea").each(function(){if($(this).val()<=0)return displayFormMsg("Looks like you've missed something.","warning"),$(this).addClass("err"),s=!1;if("contactEmail"==$(this).attr("name")){var a=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(!a.test($(this).val()))return displayFormMsg("Human, that's not a valid email!","warning"),$(this).addClass("err"),s=!1}}),s?$.ajax({type:"POST",url:pathToAjax,data:{name:$(".form.contact input[name='contactName']").val(),email:$(".form.contact input[name='contactEmail']").val(),subject:$(".form.contact input[name='contactSubject']").val(),message:$(".form.contact textarea").val()}}).done(function(a){return $(".content-section.contact").hasClass("style-2")?($(".alert").remove(),$(".form.contact #message").append('<div class="alert alert-success"><strong>Success!</strong> Message sent, we will get back to you shortly.</div>'),void $("button#submit_contact").fadeOut(400,"easeOutExpo")):void(1==a?$(".form.contact #message_sent").css({opacity:"0",display:"block"}).animate({opacity:1},400,"easeOutCirc",function(){$(this).append("<p>Message Sent, Thank You</p>"),$(this).find("i.fa").css({opacity:"0",display:"block"}).animate({opacity:1},400,"easeOutCirc")}):(displayFormMsg("Something went wrong :/","warning"),processing=!1))}).fail(function(){displayFormMsg("Something went wrong :/","warning"),processing=!1}).always(function(){}):processing=!1}}),$(".form.contact input").focus(function(){var a="#6ebff3";$(this).hasClass("err")&&(a="#f5b075"),$(this).siblings("i.fa").animate({color:a},600,"easeOutCirc")}).blur(function(){$(this).siblings("i.fa").animate({color:"#8b8b8b"},300,"easeOutCirc")}),$(".form.contact #message").click(function(){$(this).stop().animate({opacity:0},100,"easeOutCirc",function(){$(this).children(".message").remove()})});