/*! PopUp Free - v4.7.11 * https://wordpress.org/plugins/wordpress-popup/ * Copyright (c) 2015; * Licensed GPLv2+ */ (function(){function e(e){"closed"===l?e._show()?(h=e,l="open"):t(e):c[c.length]=e}function t(){if(l="closed",h=null,c.length>0){var t=c.shift();e(t)}}function i(e,t,i){var o,r,a=0,l=s(""+window.location),c=s(""+document.referrer),h=null,u=function u(t){h=jQuery.extend({},e),h.popup=t,n(h)};return void 0!==window.force_popover&&(a=""+window.force_popover),void 0!==t&&(a=""+t),e.ajax_data=e.ajax_data||{},r=jQuery.extend({},e.ajax_data),r.action="inc_popup",r["do"]=e["do"],r.thefrom=l,r.thereferrer=c,a&&(r.po_id=a),i&&(r.data=i),e.preview&&(r.preview=!0),o={url:e.ajaxurl,dataType:"jsonp",jsonpCallback:"po_data",data:r,success:function(e){u(e)},complete:function(){jQuery(document).trigger("popup-load-done",[h])}},jQuery.ajax(o)}function n(e){if(void 0!==e){var t=function t(e){void 0!==e&&(void 0!==e.popup&&void 0!==e.popup.html&&(jQuery('").appendTo("head"),jQuery(e.popup.html).appendTo("body").hide()),window.inc_popup=new a(e),window.inc_popups[window.inc_popups.length]=window.inc_popup,jQuery(document).trigger("popup-initialized",[window.inc_popup]),e.noinit||e.preview||window.inc_popup.init())};if(e.popup instanceof Array)for(var i=0;e.popup.length>i;i+=1){var n=jQuery.extend({},e);n.popup=e.popup[i],t(n)}else e instanceof Object&&t(e)}}function s(e){for(var t=[],i=0;e.length>i;i++){if(e.length>i+1){var n=e.charCodeAt(i),s=e.charCodeAt(i+1);if(n>=55296&&56319>=n&&56320===(64512&s)||s>=768&&879>=s){t.unshift(e.substring(i,i+2)),i++;continue}}t.unshift(e[i])}return t.join("")}var o=[],r=!1,a=function(n){var s=this,a=jQuery(document),l=jQuery(window),c=null,h=null,u=null,d=null,g=null,f=null,m=null,p=null;return this.data={},this.have_popup=!1,this.ajax_data={},this.opened=0,this.close_forever=function(){var e=s.data.expiry||365;return s.close_popup(),n.preview?!1:(s.set_cookie("po_h",1,e),!1)},this.close_popup=function(){function e(){s.data.display_data.click_multi?(p.hide(),c.hide()):(p.remove(),c.remove(),s.have_popup=!1),a.trigger("popup-closed"),a.trigger("popover-closed")}return jQuery("html").removeClass("has-popup"),s.data.animation_out?(h.addClass(s.data.animation_out+" animated"),h.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){h.removeClass("animated"),h.removeClass(s.data.animation_out),e()})):e(),t(s),!1},this.background_clicked=function(e){var t=jQuery(e.target);if(t.hasClass("wdpu-background")){if(!s.data.overlay_close)return;s.data.close_hide?s.close_forever():s.close_popup()}},this.move_popup=function(){var e,t,i,n=0,o=0;s.data.custom_size&&(s.data.height&&!isNaN(s.data.height)&&(f.data("reduce-height")&&(i=jQuery(f.data("reduce-height")),o=i.outerHeight()),t=s.data.height-o,100>t&&(t=100),f.height(t)),s.data.width&&!isNaN(s.data.width)&&(f.data("reduce-width")&&(i=jQuery(f.data("reduce-width")),n=i.outerWidth()),e=s.data.width-n,100>e&&(e=100),f.width(e)));var r=function r(){if(!g.hasClass("no-move-x")){var e=l.width(),t=h.outerWidth(),i=(e-t)/2;10>i&&(i=10),g.css({left:i})}if(!g.hasClass("no-move-y")){var n=l.height(),s=h.outerHeight(),o=(n-s)/2;10>o&&(o=10),g.css({top:o})}if(m.length){var r,a,c=m.width(),u=m.height(),d=m.parent().width(),f=m.parent().height();c>d?(r=(d-c)/2,m.css({"margin-left":r})):m.css({"margin-left":0}),u>f?(a=(f-u)/2,m.css({"margin-top":a})):m.css({"margin-top":0})}};window.setTimeout(r,20),r()},this.reject=function(){s.have_popup=!1,s.data={}},this.prepare=function(){if(s.fetch_dom(),c.css({opacity:0,"z-index":-1,position:"fixed",left:-1e3,width:100,right:"auto",top:-1e3,height:100,bottom:"auto"}).show(),a.trigger("popup-init",[s,s.data]),s.have_popup)switch(s.data.display){case"scroll":l.on("scroll",s.show_at_position);break;case"anchor":l.on("scroll",s.show_at_element);break;case"delay":var t=1e3*s.data.display_data.delay;"m"===s.data.display_data.delay_type&&(t*=60),window.setTimeout(function(){e(s)},t);break;default:window.setTimeout(function(){"function"==typeof s.custom_handler&&s.custom_handler(s)},20)}},this.show_at_position=function(){var t,i,n=jQuery(this),o=n.scrollTop();"px"===s.data.display_data.scroll_type?o>=s.data.display_data.scroll&&(l.off("scroll",s.show_at_position),e(s)):(t=a.height()-l.height(),i=100*o/t,i>=s.data.display_data.scroll&&(l.off("scroll",s.show_at_position),e(s)))},this.show_at_element=function(){var t=jQuery(s.data.display_data.anchor),i=l.scrollTop(),n=i+l.height(),o=t.offset().top,r=n-o;r>10&&(l.off("scroll",s.show_at_element),e(s))},this.show_popup=function(){return e(s),!1},this._show=function(){var e;return c.length?(e=parseInt(s.get_cookie("po_c"),10),isNaN(e)&&(e=0),s.set_cookie("po_c",e+1,365),s.opened+=1,p.on("click",s.background_clicked),l.off("resize.popup").on("resize.popup",function(){s.move_popup(s.data)}),c.removeAttr("style").show(),p.show(),s.data.scroll_body?jQuery("html").addClass("has-popup can-scroll"):jQuery("html").addClass("has-popup no-scroll"),h.hide(),window.setTimeout(function(){h.show()},2),s.move_popup(s.data),s.setup_popup(),s.prepare_animation(),s.data.animation_in&&(h.addClass(s.data.animation_in+" animated"),h.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){h.removeClass("animated"),h.removeClass(s.data.animation_in)})),!0):!1},this.prepare_animation=function(){var e=!1,t="Webkit Moz O ms Khtml".split(" ");if(void 0!==h[0].style.animationName&&(e=!0),e===!1)for(var i=0;t.length>i;i++)if(void 0!==h[0].style[t[i]+"AnimationName"]){e=!0;break}e||(s.data.animation_in="",s.data.animation_out="")},this.setup_popup=function(){d.off("click",s.close_forever).on("click",s.close_forever),s.data&&s.data.close_hide?(u.off("click",s.close_forever).on("click",s.close_forever),h.off("click",".close",s.close_forever).on("click",".close",s.close_forever)):(u.off("click",s.close_popup).on("click",s.close_popup),h.off("click",".close",s.close_popup).on("click",".close",s.close_popup)),h.hover(function(){jQuery(".claimbutton").removeClass("hide")},function(){jQuery(".claimbutton").addClass("hide")}),a.trigger("popup-displayed",[s.data,s]),a.trigger("popover-displayed",[s.data,s]),c.off("submit","form",s.form_submit).on("submit","form",s.form_submit)},this.fetch_dom=function(){c=jQuery("#"+s.data.html_id),c.length||s.reject(),f=c.find(".resize"),g=c.find(".move"),h=c.find(".wdpu-msg"),u=c.find(".wdpu-close"),d=c.find(".wdpu-hide-forever"),m=c.find(".wdpu-image > img"),c.hasClass("wdpu-background")?p=c:(p=c.find(".wdpu-background"),p.length||(p=c.parents(".wdpu-background"))),g.length||(g=c),f.length||(f=c)},this.load_popup=function(e,t){void 0===e&&n.preview||(s.have_popup=!1,i(n,e,t))},this.form_submit=function(){function e(){var e=!1;"complete"!==c[0].contentDocument.readyState||r?(h+=1,h>200&&(a.trigger("popup-submit-timeout",[s,s.data]),e=!0)):e=!0,e&&(window.clearInterval(l),n())}function t(e){return void 0!==e&&(s.data.close_popup=e),o?(s.data.ajax_history=o,o.length&&(s.data.last_ajax=o[0])):(s.data.ajax_history=[],s.data.last_ajax={}),a.trigger("popup-submit-done",[s,s.data]),s.data.close_popup?(s.close_popup(),!0):!1}function i(e,i,n){var o=e,r=d.find(".wdpu-msg-inner"),l=d.find(".wdpu-title"),c=d.find(".wdpu-subtitle");o instanceof jQuery||(o=jQuery("
").html(e)),o instanceof jQuery&&(o.hasClass("wdpu-msg-inner")?r.replaceWith(o):r.find(".wdpu-content").empty().append(o)),void 0!==i&&l.html(i),void 0!==n&&c.html(n),s.move_popup(),s.setup_popup(),t(),s.fetch_dom(),s.setup_popup(),a.trigger("popup-init",[s,s.data])}function n(){var e,n,o,r,l;if(a.trigger("popup-submit-process",[c,s,s.data]),!s.data.form_submit)return!1;l="ignore"===s.data.form_submit?!1:!0;try{o=jQuery(m,c[0].contentDocument),r=s.data.did_ajax}catch(h){o=jQuery(""),r=!0}s.data.close_popup=!1,g.removeClass("wdpu-loading"),e=o.find(".wdpu-msg-inner"),n=d.find(".wdpu-msg-inner"),jQuery("#wdpu-frame").remove(),s.data.last_ajax=void 0,"close"===s.data.form_submit?t(!0):s.data.new_content?i(s.data.new_content,s.data.new_title,s.data.new_subtitle):r?t(l):o.length&&o.html().length?n.length&&e.length&&e.text().length?i(e):t(l):t(!0)}var l,c,h,u=jQuery(this),d=u.parents(".wdpu-container").first(),g=d.find(".wdpu-msg"),f=jQuery(''),m=".wdpu-"+s.data.popup_id;return d.length?("redirect"!==s.data.form_submit&&(c=jQuery('').hide().appendTo("body"),u.attr("target","wdpu-frame"),f.appendTo(u).val("raw")),g.addClass("wdpu-loading"),"redirect"===s.data.form_submit?window.setTimeout(function(){s.close_popup()},10):r?(s.data.did_ajax=!0,h=0,l=window.setInterval(e,50)):(s.data.did_ajax=!1,c.load(n)),!0):!0},this.init=function(){n.popup?(s.have_popup=!0,s.data=n.popup,s.exec_scripts(),s.prepare()):s.load_popup()},this.exec_scripts=function(){var e;void 0!==s.data.script&&(e=Function("me",s.data.script),e(s))},this.get_cookie=function(e){var t,i,n,o=document.cookie.split(";");for(n=s.data&&s.data.popup_id?e+"-"+s.data.popup_id+"=":e+"=",t=0;o.length>t;t+=1){for(i=o[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(n))return i.substring(n.length,i.length)}return null},this.set_cookie=function(e,t,i){var o,r,a;n.preview||(isNaN(i)?r="":(o=new Date,o.setTime(o.getTime()+1e3*60*60*24*i),r="; expires="+o.toGMTString()),a=s.data&&s.data.popup_id?e+"-"+s.data.popup_id:e,document.cookie=a+"="+t+r+"; path=/")},{init:s.init,load:s.load_popup,extend:s}},l="closed",c=[],h=null;jQuery(document).ajaxStart(function(){r=!0}),jQuery(document).ajaxComplete(function(e,t){r=!1,o.unshift(t)}),jQuery(function(){window.inc_popups=[],n(_popup_data)})})();