!function(a){function e(){var a=document.createElement("iframe"),e=(this.dataset.src,"");e=this.dataset.sourcelink,a.setAttribute("src",e),a.setAttribute("frameborder","0"),a.setAttribute("allowfullscreen","1"),this.parentNode.replaceChild(a,this)}UAELModalPopup={_center:function(){setTimeout(function(){a(".uael-modal-parent-wrapper").each(function(){var e=a(this).attr("id").replace("-overlay","");UAELModalPopup._centerModal(e)})},300)},_centerModal:function(e){var o=a(".uamodal-"+e),t="#modal-"+e,l=0,d=a("#modal-"+e).find(".uael-modal-close"),n=(a(window).height()-a("#modal-"+e).outerHeight())/2;a("#modal-"+e).hasClass("uael-center-modal")&&a("#modal-"+e).removeClass("uael-center-modal"),(d.hasClass("uael-close-custom-popup-top-right")||d.hasClass("uael-close-custom-popup-top-left"))&&(l=parseInt(d.outerHeight())),o.find(".uael-content").outerHeight()>a(window).height()?(n=20+l,a("#modal-"+e).hasClass("uael-show")&&(a("html").addClass("uael-html-modal"),a("#modal-"+e).addClass("uael-modal-scroll"),a("#wpadminbar").length>0&&(n+=parseInt(a("#wpadminbar").outerHeight())),a(t).find(".uael-content").css("margin-top",+n+"px"),a(t).find(".uael-content").css("margin-bottom","20px"))):n=parseInt(n)+20,a(t).css("top",+n+"px"),a(t).css("margin-bottom","20px")},_show:function(e){a(window).trigger("uael_before_modal_popup_open",[e]),UAELModalPopup._autoPlay(e),a("#modal-"+e).hasClass("uael-modal-vimeo")||a("#modal-"+e).hasClass("uael-modal-youtube")?setTimeout(function(){a("#modal-"+e).addClass("uael-show")},300):a("#modal-"+e).addClass("uael-show"),setTimeout(function(){a("#modal-"+e).removeClass("uael-effect-13")},1e3),UAELModalPopup._centerModal(e),UAELModalPopup._afterOpen(e)},_close:function(e){a("#modal-"+e).removeClass("uael-show"),a("html").removeClass("uael-html-modal"),a("#modal-"+e).removeClass("uael-modal-scroll"),UAELModalPopup._stopVideo(e)},_canShow:function(e){var o=a(".uamodal-"+e).data("cookies"),t=Cookies.get("uael-modal-popup-"+e),l=!0;return void 0!==o&&"yes"===o&&void 0!==t&&"true"==t?l=!1:Cookies.remove("uael-modal-popup-"+e),a(".uael-show").length>0&&(l=!1),a("#modal-"+e).hasClass("uael-modal-editor")&&(l=!1),l},_autoPlay:function(e){var o=a(".uamodal-"+e),t=o.data("autoplay"),l=o.data("content");if("yes"==t&&("youtube"==l||"vimeo"==l)){var d=a("#modal-"+e).find(".uael-video-player").data("id");if(0==a("#modal-"+e).find(".uael-video-player iframe").length)a("#modal-"+e).find(".uael-video-player div[data-id="+d+"]").trigger("click");else{var n=o.find("iframe"),i=n.attr("src")+"&autoplay=1";n.attr("src",i)}}if("iframe"==l&&0==o.find(".uael-modal-content-data iframe").length){var r=o.find(".uael-modal-content-type-iframe").data("src"),s=document.createElement("iframe");s.setAttribute("src",r),s.setAttribute("style","display:none;"),s.setAttribute("frameborder","0"),s.setAttribute("allowfullscreen","1"),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("class","uael-content-iframe"),o.find(".uael-modal-content-data").html(s),o.find(".uael-modal-content-data").append('
'),s.onload=function(){window.parent.jQuery(document).find("#modal-"+e+" .uael-loader").fadeOut(),this.style.display="block"}}},_stopVideo:function(e){var o=a(".uamodal-"+e);if("photo"!=o.data("content")){var t=o.find("iframe"),l=o.find("video");if(t.length){var d=t.attr("src").replace("&autoplay=1","");t.attr("src",""),t.attr("src",d)}else l.length&&(l[0].pause(),l[0].currentTime=0)}},_afterOpen:function(e){var o=Cookies.get("uael-modal-popup-"+e),t=parseInt(a(".uamodal-"+e).data("cookies-days"));void 0===o&&void 0!==t&&Cookies.set("uael-modal-popup-"+e,!0,{expires:t}),a(window).trigger("uael_after_modal_popup_open",[e])}},a(document).on("keyup",function(e){27==e.keyCode&&a(".uael-modal-parent-wrapper").each(function(){var e=a(this),o=e.attr("id").replace("-overlay","");"yes"==e.data("close-on-esc")&&UAELModalPopup._close(o)})}),a(document).on("click touchstart",".uael-overlay, .uael-modal-scroll",function(e){if(!(a(e.target).hasClass("uael-content")||a(e.target).closest(".uael-content").length>0)){var o=a(this).closest(".uael-modal-parent-wrapper"),t=o.attr("id").replace("-overlay","");"yes"==o.data("close-on-overlay")&&UAELModalPopup._close(t)}}),a(document).on("click",".uael-modal-close, .uael-close-modal",function(){var e=a(this).closest(".uael-modal-parent-wrapper").attr("id").replace("-overlay","");UAELModalPopup._close(e)}),a(document).on("click",".uael-trigger",function(){var e=a(this).closest(".elementor-element").data("id"),o=a(".uamodal-"+e).data("trigger-on");"text"!=o&&"icon"!=o&&"photo"!=o&&"button"!=o||UAELModalPopup._show(e)}),a(document).on("uael_modal_popup_init",function(o,t){a("#modal-"+t).hasClass("uael-show-preview")&&setTimeout(function(){UAELModalPopup._show(t)},400);var l=a("#"+t+"-overlay").data("content"),d=a("#"+t+"-overlay").data("play-icon"),n=a("#"+t+"-overlay").data("device");"youtube"!=l&&"vimeo"!=l||0==a(".uael-video-player iframe").length&&a(".uael-video-player").each(function(o,t){var l=a("
");l.attr("data-id",a(this).data("id")),l.attr("data-src",a(this).data("src")),l.attr("data-sourcelink",a(this).data("sourcelink")),l.html('
'),l.bind("click",e),a(this).html(l),1==n&&l[0].click()}),UAELModalPopup._centerModal(t)}),a(window).resize(function(){UAELModalPopup._center()}),a(document).on("mouseleave",function(e){e.clientY>20||a(".uael-modal-parent-wrapper").each(function(){var e=a(this),o=e.attr("id").replace("-overlay",""),t=e.data("trigger-on"),l=e.data("exit-intent");"automatic"==t&&"yes"==l&&UAELModalPopup._canShow(o)&&UAELModalPopup._show(o)})}),a(document).ready(function(e){window.location.href.indexOf("&action=elementor")<=0&&a(".uael-modal-parent-wrapper").each(function(){a(this).appendTo(document.body)}),UAELModalPopup._center(),a(".uael-modal-content-data").resize(function(){UAELModalPopup._center()}),a(".uael-modal-parent-wrapper").each(function(){var e,o=a(this),t=o.attr("id").replace("-overlay",""),l=o.data("trigger-on"),d=o.data("after-sec"),n=o.data("after-sec-val"),i=o.data("custom"),r=o.data("custom-id");if("automatic"==l&&"yes"==d&&void 0!==n){var s=t;setTimeout(function(){UAELModalPopup._canShow(s)&&UAELModalPopup._show(s)},1e3*parseInt(n))}if("custom"==l&&(void 0!==i&&""!=i&&(e=i.split(",")).length>0))for(var u=0;u0))for(u=0;u