!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n(e.jQuery)}(this,function(m){"use strict";function w(e,n){var t=e.getBoundingClientRect(),o=t.top,i=t.bottom,r=t.left,s=t.right,c=m.extend({tolerance:0,viewport:window},n),l=!1,a=c.viewport.jquery?c.viewport:m(c.viewport);a.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),a=m(window));var f=a.height(),p=a.width(),u=a[0].toString();if(a[0]!==window&&"[object Window]"!==u&&"[object DOMWindow]"!==u){var d=a[0].getBoundingClientRect();o-=d.top,i-=d.top,r-=d.left,s-=d.left,p-=w.scrollBarWidth=w.scrollBarWidth||function(e){var n=m("
").css({width:"100%"});e.append(n);var t=e.width()-n.width();return n.remove(),t}(a)}return c.tolerance=~~Math.round(parseFloat(c.tolerance)),c.tolerance<0&&(c.tolerance=f+c.tolerance),s<=0||p<=r?l:l=c.tolerance?o<=c.tolerance&&i>=c.tolerance:0"),t("body").on("click",".btn-popup-form",function(e){e.preventDefault(),t.magnificPopup.close(),form=t(this).attr("data-popup-form-id"),o(form)}),t(".form-popup-form").submit(function(e){e.preventDefault(),t.magnificPopup.close();var n=t(".form-popup-form .form-url").val();t('.popup-form input[name="cf-url"]').val(n),form=t(this).attr("data-popup-form-id"),o(form)}),t(".cf7mls_btn").each(function(){t(this).addClass("btn").addClass("btn-wrr")})}(jQuery),function(o){o("body").on("click",".cf7mls_back",function(){var e=o(this),n=e.parent().closest("form.wpcf7-form");return o(".wpcf7-response-output.wpcf7-display-none").removeClass("wpcf7-validation-errors").html(""),o(".wpcf7-response-output.wpcf7-display-none.wpcf7-mail-sent-ok").hide(),current_fs=e.closest(".fieldset-cf7mls"),previous_fs=current_fs.prev(),current_fs.find(".wpcf7-form-control-wrap").removeClass("cf7mls-invalid"),current_fs.find(".cf7mls-invalid").removeClass("cf7mls-invalid"),current_fs.find(".wpcf7-form-control-wrap .wpcf7-not-valid-tip").remove(),n.find(".fieldset-cf7mls").removeClass("cf7mls_current_fs"),previous_fs.addClass("cf7mls_current_fs").removeClass("cf7mls_back_fs"),n.find(".cf7mls_progress_bar").length&&n.find(".cf7mls_progress_bar li").eq(n.find("fieldset.fieldset-cf7mls").index(current_fs)).removeClass("active"),dhScrollTo(n),o.event.trigger({type:"cf7mls-back",time:new Date}),!1}),o("body").on("click",'.mfp-content .popup-form input[type="submit"]',function(){var e=o(".mfp-content .popup-form"),n=o(e).find(".fieldset-cf7mls").length,t=o(e).find("fieldset.fieldset-cf7mls.cf7mls_current_fs");if(t.data("cf7mls-order")!=n-1)return t.find(".cf7mls_next").click(),!1})}(jQuery);