Skip to content

Instantly share code, notes, and snippets.

@tobsn
Created May 17, 2018 14:59
Show Gist options
  • Save tobsn/0761b9d657fa7757df982c7a62b51fb9 to your computer and use it in GitHub Desktop.
Save tobsn/0761b9d657fa7757df982c7a62b51fb9 to your computer and use it in GitHub Desktop.
poptin.js
var poptin, poptin_position, jQ224, all_poptins, test, query_string = new Object,
env = "app",
api_link = "https://display.popt.in",
cdn_server = "https://cdn.popt.in",
poptin_il_url = "https://www.poptin.co.il/",
poptin_com_url = "https://www.poptin.com/",
html_poptin_x_button = '<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;cursor: pointer;background: 0 0;border: 0;float: right;padding:0pxfont-size: 20px;line-height: 0.5;color: #000;text-shadow: #fff 0px 0px 10px;filter: alpha(opacity=20);text-transform: none;overflow: visible;margin: 0;font-size:53px;line-height: 31px;z-index: 9999;position: relative;">&times;</button>',
html_poptin_skip_button = '<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;padding: 5px;cursor: pointer;background: 0 0;border: 0;float: right;font-size: 25px;line-height: 0.5;color: #000;text-shadow: 0 1px 0 #fff;filter: alpha(opacity=20);opacity: 0.7;text-transform: none;overflow: visible;margin: 0;font-weight:bold;z-index: 9999;position: relative;">Skip</button>',
html_button_note = '<div id="closeButtonNote" class="close-button-note" style="display:none;text-align: center;padding: 9px 14px;position: absolute;top: -65px;right:0px;background: white;border-radius: 6px;word-wrap: break-word;max-width: 200px;border: 1px solid rgba(0,0,0,.2);opacity: 1;z-index:8999"></div>',
html_credit = '<div class="poptin-credit" style="z-index:100000;position: absolute;bottom: 0px;left: 0px;line-height: 0px;"><a href="https://www.poptin.co.il" target="_BLANK"><img src="' + cdn_server + '/css/images/credit.png" alt="Powered by poptin"></a></div>',
redirect = new Array,
screen_width = window.screen.availWidth,
screen_height = window.innerHeight,
litghtbox_poptin_width = 800,
litghtbox_poptin_height = 500,
bar_poptin_width = 1920,
bar_poptin_height = 100,
bar_poptin_height_2 = 197,
bar_poptin_height_4 = 50,
browsing_poptin_width = 285,
browsing_poptin_height = 186,
sside_poptin_width = 300,
sside_poptin_width_2 = 500,
sside_poptin_height = 200,
sside_poptin_width_4 = 300,
sside_poptin_height_4 = 450,
bside_poptin_width = 402,
bside_poptin_height = 1080,
fullpage_poptin_width = 1920,
fullpage_poptin_height = 1080,
fullpage_poptin_width_2 = screen.width,
fullpage_poptin_height_2 = screen.height,
mobile_poptin_width = 483,
mobile_poptin_height = 150,
mobile_poptin_width_2 = 390,
mobile_poptin_height_2 = 242,
mobile_poptin_height_4 = 100,
mobile_poptin_height_5 = 75,
social_poptin_height = 214,
social_poptin_width = 340,
social_poptin_height_2 = 70,
social_poptin_width_2 = 70,
social_poptin_height_4 = 150,
social_poptin_width_4 = 300,
responsive_fullpage_height = !1,
responsive_fullpage_width = !1,
poptin_size = new Object,
redirect_flag = !1,
socialProofInterval = new Object,
country = new Object,
poptins = new Array,
ifAndroid = !!/Android/i.test(navigator.userAgent),
isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") > -1,
isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor),
ifMobile = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),
if_display = !1,
if_html_pad = !1,
user_lang = "en",
skip_en = "Are you sure?",
skip_he = "האם אתה בטוח?";
function showLog(i) {
"app" != env && console.info(i)
}
function poptinInit() {
function i() {
(jQ224 = jQuery.noConflict(!0)).ui = window.jQuery.ui, poptinDependentFunction()
}
function t() {
(jQ224 = jQuery.noConflict(!0)).ui = window.$.ui, poptinDependentFunction()
}
function p() {
jQ224 = jQuery.noConflict(!0), poptinDependentFunction()
}
function o(i) {
var t = document.createElement("script");
t.setAttribute("type", "text/javascript"), t.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"), t.setAttribute("async", "true"), t.readyState ? t.onreadystatechange = function() {
"complete" != this.readyState && "loaded" != this.readyState || i()
} : t.onload = i, (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(t)
}
setPoptinSession(), setClientId(),
function() {
try {
void 0 !== window.$ && void 0 !== window.$.ui ? o(t) : void 0 !== window.jQuery && void 0 !== window.jQuery.ui ? o(i) : o(p)
} catch (i) {
o(p)
}
}()
}
function setClientId() {
void 0 !== query_string.id && ("undefined" != typeof Storage ? null == window.sessionStorage.getItem("poptin_client_id") && window.sessionStorage.setItem("poptin_client_id", query_string.id) : poptinCheckCookie("poptin_client_id") || poptinSetCookie("poptin_client_id", query_string.id, 365))
}
function getClientId() {
var i = query_string.id;
return null == query_string.id && ("undefined" != typeof Storage && null != window.sessionStorage.getItem("poptin_client_id") ? i = window.sessionStorage.getItem("poptin_client_id") : poptinCheckCookie("poptin_client_id") && (i = poptinGetCookie("poptin_client_id"))), i
}
function poptinDependentFunction() {
setReferrer(), displayPoptinOnClick(), onTextClickClose(), getGeoLocation()
}
function setReferrer() {
poptinCheckCookie("poptin_referrer") || poptinSetCookie("poptin_referrer", document.referrer, .00138888888888889), setInterval(function() {
poptinSetCookie("poptin_referrer", getReferrer().length > 1 ? getReferrer() : document.referrer, .00138888888888889)
}, 6e4)
}
function displayPoptinOnClick() {
jQ224("a").click(function(i) {
if (showLog("displayPoptinOnClick"), -1 !== this.href.indexOf("/APIRequest/click/")) {
i.preventDefault();
try {
initiatePullPoptinsRequestOnClick(this.href.split("?")[0])
} catch (i) {
monitorError("displayPoptinOnClick()->error()", i, "OK", this.href, !1)
}
}
})
}
function closePoptinOnXclick(i) {
poptin_id = jQ224(i).parents(".poptin-popup").attr("data-poptin-id"), poptins[poptin_id].poptin_trigger.close_trigger = "x_click", setClosePoptinOnXCookie(poptin_id), closePoptin(poptin_id)
}
function onTextClickClose() {
showLog("set: onTextClickClose()");
try {
jQ224(".o-close").unbind("click")
} catch (i) {
showLog(i)
}
jQ224(document).on("click", ".o-close", function(i) {
poptin_id = jQ224(i.target).parents(".poptin-popup").attr("data-poptin-id"), poptins[poptin_id].poptin_trigger.close_trigger = "cancel_click", closePoptin(poptin_id)
})
}
function initiatePullPoptinsRequestOnClick(i) {
console.log("initiatePullPoptinsRequestOnClick()"), domain = window.location.href, cookies = getReleventCookie(), triggers = getAutoPilots(), jQ224.get(i.replace("app", "app") + "?client_id=" + getClientId() + "&domain=" + domain + "&referrer=" + getReferrer() + "&cookies=" + cookies + "&triggers=" + triggers, {}, "json").done(function(i) {
showLog(i), "not_allowed" !== i.display ? (lang = i.lang, fontDownload(lang), jQ224.each(i.poptins, function(i, t) {
(poptin = this).display && void 0 === jQ224(".poptin-popup[data-poptin-id=" + poptin.poptin_id + "]")[0] && (poptins[poptin.poptin_id] = {}, timerDownload(poptin), poptins[poptin.poptin_id].poptin_trigger = {
poptin_active: !0,
scroll_flag: !0,
mouse_leave_flag: !0,
click_counter: 0,
trigger: "",
close_trigger: ""
}, setPoptinSize(poptin, !0), setAutoPilot(poptin, !0), appendPoptin(poptin, !0))
})) : showLog(i.display)
}).fail(function(i, t, p) {})
}
function getGeoLocation() {
if (poptinCheckCookie("poptin_user_country_code")) poptinInitiate();
else try {
showLog("setLocation()"), jQ224.ajax({
url: "https://freegeoip.net/json/",
dataType: "json",
timeout: 1500
}).complete(function(i) {
c = i.responseJSON, country = c, country_code = null != c.country_code && c.country_code, country_code && poptinSetCookie("poptin_user_country_code", country_code, 365), poptinInitiate()
}).fail(function(i, t, p) {
poptinInitiate()
})
} catch (i) {
poptinInitiate()
}
}
function poptinInitiate() {
try {
initiatePullPoptinsRequest()
} catch (i) {}
}
function initiatePullPoptinsRequest() {
console.log("initiatePullPoptinsRequest()"), domain = window.location.href, cookies = getReleventCookie() + " " + getEveryVisitSession(), triggers = getAutoPilots(), country_code = getUserCountryCode(), referrer_url = getReferrer(), jQ224.ajax({
url: api_link + "/APIRequest/" + getClientId(),
type: "get",
data: {
domain: domain,
referrer: referrer_url,
cookies: cookies,
triggers: triggers,
cc: country_code
},
dataType: "json",
async: !0
}, "json").done(function(i) {
all_poptins = i.poptins, showLog(i), "not_allowed" !== i.display ? (jQ224.each(all_poptins, function(i, t) {
this.display && (timerDownload(this), setPoptinsArray(this.poptin_id), setPoptinSize(this), setAutoPilot(this), setPoptinTrigger(this), if_display = !0)
}), if_display && (user_lang = i.lang, fontDownload(i.lang), downloadJqueryUi())) : showLog(i.display), deafultCookie()
}).fail(function(i, t, p) {
showLog("initiatePullPoptinsRequest()->auto->->error()")
})
}
function fontDownload(i) {
winie = /Windows NT 6.1/i.test(navigator.userAgent) && (/Trident/i.test(navigator.userAgent) || /MSIE/i.test(navigator.userAgent)) ? "-ie" : "", font_link = '<link rel="stylesheet" type="text/css" href="' + cdn_server + "/css/heb-fonts" + winie + '.min.css">', font_link += '<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">', api_link.indexOf("dev") >= 0 ? font_link += '<link rel="stylesheet" type="text/css" href="' + api_link + "/css/poptin-style-" + i + '.css">' : font_link += '<link rel="stylesheet" type="text/css" href="' + cdn_server + "/css/poptin-style-" + i + '.css">', jQ224("head").append(font_link), setPoptinStyle()
}
function timerDownload(i) {
i.poptin_type + "_" + i.poptin_format != "lightbox_format_5" && i.poptin_type + "_" + i.poptin_format != "bar_format_5" || jQ224("head").append('<link rel="stylesheet" type="text/css" href="' + cdn_server + '/css/timer.css">')
}
function downloadJqueryUi() {
showLog("downloadJqueryUi"), jquery_link = '<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js"><\/script>';
try {
jQ224("head").append(jquery_link)
} catch (i) {
showLog(i)
}
}
function downloadPoptinBackground(i) {
if (jQ224("body").append(i.poptin), jQ224("[data-poptin-id=" + i.poptin_id + "]").css("display", "none").addClass("poptin_background_" + i.poptin_id), jQ224(".poptin_background_" + i.poptin_id).attr("data-poptin-id", ""), $class = i.poptin_type + "_" + i.poptin_format == "lightbox_format_3" ? ".alternative-background" : ".draggable-container", $this = jQ224(".poptin_background_" + i.poptin_id + " " + $class).css("background-image"), null != $this && "none" != $this && -1 == $this.indexOf("data:image")) {
var t = new Image;
t.onload = function() {
showLog("*****************loadimage***************"), jQ224(".poptin_background_" + i.poptin_id).remove()
}, image_url = $this.replace("url(", "").replace(")", "").replace(/\"/gi, ""), t.src = image_url
} else jQ224(".poptin_background_" + i.poptin_id).remove()
}
function setPoptinTrigger(i) {
if (showLog("setPoptinTrigger for: " + i.poptin_id), poptins[i.poptin_id].poptin_trigger = {
poptin_active: !0,
scroll_flag: !0,
mouse_leave_flag: !0,
click_counter: 0,
trigger: "",
close_trigger: ""
}, "yes" == i.display_after_exit_website_active && (ifMobile ? jQ224(document).ready(function(t) {
window.history && window.history.pushState && (jQ224(window).on("popstate", function() {
"" !== location.hash.split("#!/")[1] && ("" === window.location.hash && poptins[i.poptin_id] && poptins[i.poptin_id].poptin_trigger.mouse_leave_flag && poptins[i.poptin_id].poptin_trigger.poptin_active && (showLog("load after back button trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, poptins[i.poptin_id].poptin_trigger.trigger = "close tab", appendPoptin(i), poptins[i.poptin_id].poptin_trigger.mouse_leave_flag = !1))
}), window.history.pushState("forward", null))
}) : jQ224(document).mouseleave(function(t) {
var p = t.clientY,
o = document.body.clientWidth - t.pageX,
e = jQ224(window).height() - t.clientY;
t.pageX;
o > 0 && e > 0 && p <= 0 && poptins[i.poptin_id] && poptins[i.poptin_id].poptin_trigger.mouse_leave_flag && poptins[i.poptin_id].poptin_trigger.poptin_active && (showLog("load after mouse leave trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, poptins[i.poptin_id].poptin_trigger.trigger = "close tab", appendPoptin(i), poptins[i.poptin_id].poptin_trigger.mouse_leave_flag = !1)
})), "no" != i.display_after_sec_active && setTimeout(function() {
poptins[i.poptin_id].poptin_trigger.poptin_active && (showLog("load after " + i.display_after_sec_active + " seconds trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, poptins[i.poptin_id].poptin_trigger.trigger = "after " + i.display_after_sec_active + " seconds", appendPoptin(i))
}, 1e3 * i.display_after_sec_active), "no" != i.display_after_scroll_active) {
showLog(i.display_after_scroll_active);
jQ224(document).height(), jQ224(window).height(), i.display_after_scroll_active;
jQ224(window).scroll(function() {
var t = (jQ224(document).height() - jQ224(window).height()) * i.display_after_scroll_active * .01;
jQ224(window).scrollTop() >= t && poptins[i.poptin_id].poptin_trigger.scroll_flag && poptins[i.poptin_id].poptin_trigger.poptin_active && (showLog("load after " + i.display_after_scroll_active + " scroll page trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, poptins[i.poptin_id].poptin_trigger.trigger = "after " + i.display_after_scroll_active + "% scrolling", appendPoptin(i), poptins[i.poptin_id].poptin_trigger.scroll_flag = !1)
})
}
"no" != i.display_after_page_click_number_active && jQ224(document).on("click tap", function() {
showLog(poptins[i.poptin_id].poptin_trigger.click_counter), poptins[i.poptin_id].poptin_trigger.click_counter++, poptins[i.poptin_id].poptin_trigger.click_counter == i.display_after_page_click_number_active && poptins[i.poptin_id].poptin_trigger.poptin_active && (showLog("load after " + i.display_after_page_click_number_active + " clicks page trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, poptins[i.poptin_id].poptin_trigger.trigger = "after " + i.display_after_page_click_number_active + " clicks", appendPoptin(i), poptins[i.poptin_id].poptin_trigger.click_counter = 0)
}), "no" != i.display_after_visit_page_active && ("undefined" != typeof Storage ? "disactive" != window.sessionStorage.getItem("display_after_visit_page_active_" + i.poptin_id) && (window.sessionStorage.getItem("page_url_" + i.poptin_id) != window.location.href && (counter = (window.sessionStorage.getItem("page_visit_" + i.poptin_id) ? Number(window.sessionStorage.getItem("page_visit_" + i.poptin_id)) : 0) + 1, window.sessionStorage.setItem("page_visit_" + i.poptin_id, counter)), window.sessionStorage.getItem("page_visit_" + i.poptin_id) == i.display_after_visit_page_active && window.sessionStorage.getItem("page_url_" + i.poptin_id) != window.location.href ? (showLog("load after " + i.display_after_visit_page_active + " clicks page trigger"), poptins[i.poptin_id].poptin_trigger.poptin_active = !1, appendPoptin(i), window.sessionStorage.setItem("page_visit_" + i.poptin_id, 0), window.sessionStorage.setItem("page_url_" + i.poptin_id, window.location.href), window.sessionStorage.setItem("display_after_visit_page_active_" + i.poptin_id, "disactive")) : window.sessionStorage.setItem("page_url_" + i.poptin_id, window.location.href)) : showLog("Sorry! No Web Storage support.."))
}
function GetIEVersion() {
var i = window.navigator.userAgent,
t = i.indexOf("MSIE");
return t > 0 ? parseInt(i.substring(t + 5, i.indexOf(".", t))) : navigator.userAgent.match(/Trident\/7\./) ? 11 : 0
}
function setPoptinStyle() {
showLog("setPoptinStyle()"), poptin_style = '<style type="text/css"> .poptin-popup .close-x-button{min-height: initial;background-color:initial;}, .draggable-container p{font-family: "Open Sans Hebrew" !important;} .draggable-container form{display:initial;background-color:initial;width: initial;height: initial;top: initial;position: initial;} .draggable-container .draggable{border: none;} .poptin-popup .fa-phone-square:before{font: normal normal normal 90px/1 FontAwesome !important; } .draggable-container .inputs-container input{font-family: "Open Sans Hebrew";background-image:none;background-color:#ffffff;background:#ffffff;border-radius:0px;} .empty-field{border:2px solid red !important} .empty-field::-webkit-input-placeholder{color:red;} .empty-field::-moz-placeholder{color:red;} .draggable-container input, .draggable-container button{background-image: none;padding: 0px;margin: 0px;box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;} .draggable-container p{box-sizing: initial;-webkit-box-sizing: initial;-moz-box-sizing: initial;} .poptin-popup a{text-decoration: none;} .poptin-popup a:hover{text-decoration: underline;}</style>', jQ224("body").append(poptin_style)
}
function appendPoptin(i, t) {
showLog("appendPoptin"), "" == i.poptin ? jQ224.when(jQ224.ajax(i.poptin_url)).then(function(p, o, e) {
jQ224("body").append(p), setPoptin(i, t)
}, function(t, p, o) {
showLog(t), monitorError("appendPoptin()->error()", "Error get poptin from cloudfront", p, o.responseText, i)
}) : (jQ224("body").append(i.poptin), setPoptin(i, t))
}
function setPoptin(i, t) {
if (showLog("setPoptin poptinid: " + i.poptin_id), null == t ? (poptin_width = poptins[i.poptin_id].poptin_size.width, poptin_height = poptins[i.poptin_id].poptin_size.height, poptins[i.poptin_id].poptin_area_flag = !1, getPoptinPosition(i), ("bar" == i.poptin_type || "lightbox" == i.poptin_type || "mobile" == i.poptin_type && "format_3" == i.poptin_format) && (poptin_position_center_up = poptins[i.poptin_id].position_center.up, poptin_position_center_left = poptins[i.poptin_id].position_center.left), showLog("click undefined:" + t)) : (showLog("click true:" + t), poptin_width = poptin_size.width, poptin_height = poptin_size.height, poptin_area_flag = !1, getPoptinPosition(i, !0), ("bar" == i.poptin_type || "lightbox" == i.poptin_type || "mobile" == i.poptin_type && "format_3" == i.poptin_format) && (poptin_position_center_up = poptin_position.up, poptin_position_center_left = poptin_position.left)), jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").html('<form method="GET" action="#" id="poptinFormSubmit' + i.poptin_id + '">' + jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").html() + "</form>"), "lightbox" == i.poptin_type && (this_poptin_width = jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").attr("data-width"), this_poptin_height = jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").attr("data-height"), null == t && (poptins[i.poptin_id].poptin_size.height = this_poptin_height, poptins[i.poptin_id].poptin_size.width = this_poptin_width), null == this_poptin_width || "undefined" == this_poptin_width || "" == this_poptin_width ? poptin_width = 800 : poptin_width = this_poptin_width, null == this_poptin_height || "undefined" == this_poptin_height || "" == this_poptin_height ? poptin_height = 500 : (poptin_height = this_poptin_height, "format_3" == i.poptin_format && (poptin_width = poptin_height))), jQ224("[data-poptin-id=" + i.poptin_id + "]").attr("data-poptin-type", i.poptin_type).attr("data-poptin-format", i.poptin_format).attr("data-poptin-type-format", i.poptin_type + "_" + i.poptin_format), i.design_properties && jQ224("[data-poptin-id=" + i.poptin_id + "]").attr("data-poptin-location", i.design_properties.poptin_location), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css({
display: "none",
margin: "0px auto",
transform: "translate(0,0)",
transition: "transform .3s ease-out",
"max-width": poptin_width + "px",
width: poptin_width + "px",
height: poptin_height + "px",
"z-index": "999999999999999",
position: "fixed",
overflow: "visible",
left: "0px",
top: "0px",
bottom: "0px",
right: "0px",
"line-height": "normal",
"transform-origin": "bottom"
}), jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").css({
width: poptin_width + "px",
"background-clip": "padding-box"
}), jQ224("[data-poptin-id=" + i.poptin_id + "] .alternative-background").css("box-shadow", "0 3px 12px rgba(0,0,0,.5)"), jQ224(".poptin-popup.no-box-shadow .alternative-background").css("box-shadow", ""), timer_container = jQ224(".timer-container"), timer_container.css({
position: ""
}), timer_container && timer_container.attr("style") && -1 == timer_container.attr("style").indexOf("left") && (points_count = 0, jQ224(".timer-points").each(function() {
jQ224(this).is(":visible") && points_count++
}), timer_left = "260px", points_count > 1 && (timer_left = "114px"), timer_container.css({
left: timer_left
})), setTelForMobile(i), "lightbox" == i.poptin_type && "format_3" == i.poptin_format) jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin_thank_you_screen").prepend(jQ224("[data-poptin-id=" + i.poptin_id + "] #liteboxFormat3Circle").clone(!0));
else {
var p = jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container");
jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin_thank_you_screen").css({
height: p.css("height"),
"background-image": p.css("background-image"),
"background-size": p.css("background-size"),
"background-color": p.css("background-color"),
background: ("none" != p.css("background-image") ? p.css("background-image") : "") + " " + p.css("background-color")
})
}
if (jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin-form-submit-button").css("cursor", "pointer").children().css("cursor", "pointer"), jQ224("[data-poptin-id=" + i.poptin_id + "] .o-close").css("cursor", "pointer").children().css("cursor", "pointer"), "mobile" == i.poptin_type && "format_1" == i.poptin_format && (poptin_style = '<style type="text/css">.draggable-container a.fa-phone-square:before{color:' + jQ224("[data-poptin-id=" + i.poptin_id + "] a.fa-phone-square").css("color") + " !important}</style>", jQ224("body").append(poptin_style)), ifAndroidKeyborad(i, t), direction = i.design_properties.poptin_design_entry_effect.split("-")[1], !parseInt(i.design_properties.poptin_design_content_lock) && (null != i.design_properties.poptin_design_auto_close && setTimeout(function() {
showLog("close poptin auto after " + i.design_properties.poptin_design_auto_close_sec + " seconds"), poptins[i.poptin_id].poptin_trigger.close_trigger = "auto_close", closePoptin(i.poptin_id)
}, 1e3 * parseInt(i.design_properties.poptin_design_auto_close_sec)), parseInt(i.design_properties.poptin_design_close_on_screen_click) && (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").on("mouseenter", function(p) {
null == t ? poptins[i.poptin_id].poptin_area_flag = !0 : poptin_area_flag = !0
}).on("mouseleave", function(p) {
null == t ? poptins[i.poptin_id].poptin_area_flag = !1 : poptin_area_flag = !1
}), jQ224(document).click(function(p) {
jQ224(p.target).closest(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").length || (t ? poptin_area_flag : poptins[i.poptin_id].poptin_area_flag) || jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").is(":visible") && (showLog("close poptin poptin_design_close_on_screen_click"), poptins[i.poptin_id].poptin_trigger.close_trigger = "bg_click", closePoptin(i.poptin_id))
})), "closing_options-" != i.design_properties.poptin_design_close_options_type))
if ("closing_options-x" == i.design_properties.poptin_design_close_options_type ? (jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").prepend(html_poptin_x_button), null == i.design_properties.poptin_design_show_x_comment || ifMobile || (showLog("show poptin x comment: " + i.design_properties.poptin_design_show_x_comment), i.design_properties.poptin_design_show_x_comment.length >= 1 && (jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").prepend(html_button_note), $note = jQ224("[data-poptin-id=" + i.poptin_id + "] .close-button-note"), $note.text(i.design_properties.poptin_design_show_x_comment), (i.design_properties.poptin_location.indexOf("right") > -1 || "bar" == i.poptin_type) && jQ224("[data-poptin-id=" + i.poptin_id + "] .close-button-note").css("right", "0px"), i.design_properties.poptin_location.indexOf("top") > -1 ? jQ224("[data-poptin-id=" + i.poptin_id + "] .close-button-note").css("top", "0px") : setTimeout(function() {
$margin = -1 * parseInt($note.css("top")) >= $note.height() ? $note.css("top") : "-" + ($note.height() + -1 * parseInt($note.css("top")) / 1.5) + "px", $note.css("top", "-65px")
}, 100), initializeCloseButtonNote(i)))) : "closing_options-button" == i.design_properties.poptin_design_close_options_type && (null != i.design_properties.poptin_design_show_x_comment ? jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").prepend('<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="width: initial;text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;padding: 5px;cursor: pointer;background: 0 0;border: 0;float: right;font-size: 25px;line-height: 0.5;color: #000;text-shadow: 0 1px 0 #fff;filter: alpha(opacity=20);opacity: 0.7;text-transform: none;overflow: visible;font-family: inherit;margin: 0;font: inherit;align-items: flex-start;text-align: center;text-indent: 0px;letter-spacing: normal;word-spacing: normal;text-rendering: auto;webkit-writing-mode: horizontal-tb;font-weight:bold;z-index: 9999;position: relative;">' + (i.design_properties.poptin_design_show_x_comment || ("en" == user_lang ? skip_en : skip_he)) + "</button>") : jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").prepend(html_poptin_skip_button)), null != i.design_properties.poptin_design_show_x_after_sec)
if ("closing_options-button" == i.design_properties.poptin_design_close_options_type) {
jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").remove(), poptins[i.poptin_id].poptin_trigger.skip_button_sec_counter = parseInt(i.design_properties.poptin_design_show_x_after_sec), jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").prepend('<button type="button" id="closeXButton" onclick="closePoptinOnXclick(this);" class="close-x-button" style="width: initial;text-align: right;display:none; margin-top: -2px;-webkit-appearance: none;padding: 5px;cursor: pointer;background: 0 0;border: 0;float: right;font-size: 25px;line-height: 0.5;color: #000;text-shadow: 0 1px 0 #fff;filter: alpha(opacity=20);opacity: 0.7;text-transform: none;overflow: visible;font-family: inherit;margin: 0;font: inherit;align-items: flex-start;text-align: center;text-indent: 0px;letter-spacing: normal;word-spacing: normal;text-rendering: auto;webkit-writing-mode: horizontal-tb;font-weight:bold;z-index: 9999;position: relative;">(' + poptins[i.poptin_id].poptin_trigger.skip_button_sec_counter + ") " + (i.design_properties.poptin_design_show_x_comment || ("en" == user_lang ? skip_en : skip_he)) + "</button>"), jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").css({
display: "block",
opacity: "0.5",
cursor: "not-allowed"
}).prop("disabled", !0);
var o = setInterval(function() {
poptins[i.poptin_id].poptin_trigger.skip_button_sec_counter--, jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").text("(" + poptins[i.poptin_id].poptin_trigger.skip_button_sec_counter + ") " + i.design_properties.poptin_design_show_x_comment), 0 == poptins[i.poptin_id].poptin_trigger.skip_button_sec_counter && (clearInterval(o), jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").text(i.design_properties.poptin_design_show_x_comment).css({
opacity: "1",
cursor: "pointer"
}).prop("disabled", !1))
}, 1e3)
} else setTimeout(function() {
showLog("show poptin x button after " + i.design_properties.poptin_design_show_x_after_sec + " seconds"), jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").show(100)
}, 1e3 * parseInt(i.design_properties.poptin_design_show_x_after_sec));
else jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").show(100);
if (poptin_animation_speed = 300, _this = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]"), "lightbox" == i.poptin_type) "format_3" == i.poptin_format && jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").css({
"box-shadow": "none"
}), "format_6" == i.poptin_format && (_this.find("#poptin" + _this.data("source")).attr("src", _this.data("url")).parent().css("display", "block"), _this.find(".image-change-img").parent().css("display", "none")), _this.css({
top: poptin_position_center_up + "px",
margin: "0 auto"
});
else if ("bar" == i.poptin_type) switch (i.design_properties.poptin_location) {
case "center-top":
_this.css({
top: "0px",
bottom: ""
});
break;
default:
_this.css({
top: "",
bottom: "0px"
})
} else if ("sside" == i.poptin_type || "social" == i.poptin_type) {
switch (i.design_properties.poptin_location) {
case "left-top":
_this.css({
left: "0px",
right: "",
margin: "0px",
top: "0px"
});
break;
case "left-midlle":
_this.css({
left: "0px",
right: "",
margin: "0px",
top: (window.innerHeight - poptin_height) / 2 + "px"
});
break;
case "left-bottom":
_this.css({
left: "0px",
right: "",
margin: "0px",
top: window.innerHeight - poptin_height - (i.poptin_type + "_" + i.poptin_format == "social_format_2" ? 40 : 0) + "px"
});
break;
case "center-top":
_this.css({
left: (window.innerWidth - poptin_width) / 2,
right: "",
margin: "0px",
top: "0px"
});
break;
case "center-midlle":
_this.css({
left: (window.innerWidth - poptin_width) / 2,
right: "",
margin: "0px",
top: (window.innerHeight - poptin_height) / 2 + "px"
});
break;
case "center-bottom":
_this.css({
left: (window.innerWidth - poptin_width) / 2,
right: "",
margin: "0px",
top: window.innerHeight - poptin_height - (i.poptin_type + "_" + i.poptin_format == "social_format_2" ? 40 : 0) + "px"
});
break;
case "right-top":
_this.css({
left: "",
right: "0px",
margin: "0px",
top: "0px"
});
break;
case "right-midlle":
_this.css({
left: "",
right: "0px",
margin: "0px",
top: (window.innerHeight - poptin_height) / 2 + "px"
});
break;
case "right-bottom":
_this.css({
left: "",
right: "0px",
top: window.innerHeight - poptin_height - (i.poptin_type + "_" + i.poptin_format == "social_format_2" ? 40 : 0) + "px"
})
}
"social" == i.poptin_type && ("format_1" == i.poptin_format ? _this.find(".close-x-button").css({
position: "absolute",
top: "0px",
right: "0px",
"z-index": "1",
"line-height": "26px"
}) : "format_3" == i.poptin_format && (_this.css({
"box-shadow": "none !important",
opacity: "0",
visability: "hidden"
}), _this.find("img").first().remove()))
} else if ("bside" == i.poptin_type) "left" !== i.design_properties.poptin_location ? _this.css({
left: "",
top: "",
right: "0px",
bottom: "0px"
}) : _this.css({
right: "",
top: "",
left: "0px",
bottom: "0px"
});
else if ("browsing" == i.poptin_type || "fullpage" == i.poptin_type || "mobile" == i.poptin_type)
if (_this.css({
bottom: "",
right: ""
}), "mobile" == i.poptin_type && "format_3" == i.poptin_format && (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").css({
"box-shadow": "none"
}), _this.css({
bottom: "0px",
right: "0px"
})), "fullpage" == i.poptin_type && (ifScrollVisible() && jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").css({
"padding-right": "25px"
}), "format_3" == i.poptin_format && jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #poptinDraggableContainer").css({
"background-image": ""
})), "browsing" == i.poptin_type && (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").css({
"padding-right": "15px"
}), "right-top" == i.design_properties.poptin_location && (_this.css({
left: "",
right: "0px",
"-moz-transform": "scaleX(-1)",
"-o-transform": "scaleX(-1)",
"-webkit-transform": "scaleX(-1)",
transform: "scaleX(-1)",
filter: "FlipH",
"-ms-filter": "FlipH"
}), _this.find("p").css({
"-moz-transform": "scaleX(-1)",
"-o-transform": "scaleX(-1)",
"-webkit-transform": "scaleX(-1)",
transform: "scaleX(-1)",
filter: "FlipH",
"-ms-filter": "FlipH"
}), setTimeout(function() {
_this.find(".poptin-credit").css("transform", "scaleX(-1)")
}, 300))), "mobile" == i.poptin_type) switch (i.design_properties.poptin_location) {
case "center-top":
_this.css({
top: "0px"
});
break;
case "center-midlle":
_this.css({
top: (window.innerHeight - poptin_height) / 2 + "px"
});
break;
case "center-bottom":
_this.css({
top: window.innerHeight - poptin_height + "px"
})
} else _this.css({
top: "0px"
});
showPoptin(i, t), resize_delay = 100, "fullpage" == i.poptin_type && (resize_delay = 250), setTimeout(function() {
doResize(i, t), setAccessibility(i)
}, resize_delay), resetReleventCookie(i)
}
function ifUserlangIsHe() {
return "he" == user_lang
}
function setTelForMobile(i) {
ifMobile && (showLog("setTelForMobile"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #poptinDesignInputTextFieldPhone").attr("type", "tel"))
}
function setAccessibility(i) {
if (ifUserlangIsHe()) {
showLog("setAccessibility poptinid: " + i.poptin_id);
var t = 1;
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] form").append('<div id="tabindexLast" style="height:0px;width:0px;"></div>'), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] form").attr({
tabindex: t++,
role: "form"
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").attr({
role: "dialog",
"aria-labelledby": "dialog1Title",
"aria-describedby": "dialog1Desc"
});
try {
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] form").find("p").first().attr("id", "dialog1Title").next().attr("id", "dialog1Desc")
} catch (i) {
showLog(i)
}
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").each(function(i) {
2 == t && jQ224(this).prop("autofocus", !0), placeholder_text = jQ224(this).attr("placeholder"), "he" == user_lang ? placeholder_text = "*" + placeholder_text : placeholder_text += "*", jQ224(this).prop("required") && jQ224(this).attr({
"aria-required": !0,
placeholder: placeholder_text
}), jQ224(this).attr({
tabindex: t++,
"aria-label": jQ224(this).attr("placeholder")
})
}), 1 != jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").length || jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().prop("required") || (placeholder_text = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().attr("placeholder"), "he" == user_lang ? placeholder_text = "*" + placeholder_text : placeholder_text += "*", jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().attr({
"aria-required": !0,
placeholder: placeholder_text
})), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmitButton").attr({
tabindex: t++,
role: "button"
});
var p = "he" == user_lang ? "סגור פופאפ" : "Close popup";
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").each(function(i) {
jQ224(this).attr({
tabindex: t++
}), jQ224(this).wrapInner("<span aria-hidden=”true”></span>"), jQ224(this).append('<span class="screen-reader-text">' + p + "</span>")
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #tabindexLast").attr("tabindex", t++), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #tabindexLast").on("focus", function() {
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().focus()
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] form").on("focus", function() {
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmitButton").focus()
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().focus(), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] div").attr({
lang: user_lang,
dir: "he" == user_lang ? "rtl" : "ltr"
}), outline_style = '<style type="text/css"> .poptin-popup .draggable-container input:focus{outline-width: 2px;outline-style: solid;outline-color: rgba(0, 126, 255, 0.73);}.screen-reader-text {clip: rect(1px, 1px, 1px, 1px);position: absolute !important;height: 1px;width: 1px;overflow: hidden;}.screen-reader-text:focus {background-color: #f1f1f1;border-radius: 3px;box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);clip: auto !important;color: #21759b;display: block;font-size: 14px;font-size: 0.875rem;font-weight: bold;height: auto;left: 5px;line-height: normal;padding: 15px 23px 14px;text-decoration: none;top: 5px;width: auto;z-index: 100000;} </style>', jQ224("body").append(outline_style), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] form").find("a").each(function(i) {
void 0 !== jQ224(this).attr("target") && "_blank" == jQ224(this).attr("target").toLowerCase() && 0 == jQ224(this).parents(".poptin-credit").length && jQ224(this).wrapInner('<span class="screen-reader-text"></span>')
})
} else jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").each(function(i) {
2 == t && jQ224(this).prop("autofocus", !0), placeholder_text = jQ224(this).attr("placeholder"), "he" == user_lang ? placeholder_text = "*" + placeholder_text : placeholder_text += "*", jQ224(this).prop("required") && jQ224(this).attr({
"aria-required": !0,
placeholder: placeholder_text
}), jQ224(this).attr({
tabindex: t++,
"aria-label": jQ224(this).attr("placeholder")
})
}), 1 != jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").length || jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().prop("required") || (placeholder_text = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().attr("placeholder"), "he" == user_lang ? placeholder_text = "*" + placeholder_text : placeholder_text += "*", jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().attr({
"aria-required": !0,
placeholder: placeholder_text
}))
}
function setAccessibilityThankAfterSubmit(i) {
message = "× ×©×œ×— בהצלחה!", ifUserlangIsHe() && "lead" == i.poptin_target && ifHebrow() && ($div = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]"), $div.find("#poptinFormSubmitText").text("").append('<p role=”alert” style="font-weight:normal;color: white;">' + message + "</p>"), $div.find("#poptinFormSubmitButton").hide())
}
function ifHebrow() {
var i = "א".search(/[\u0590-\u05FF]/);
return x = document.querySelector('meta[http-equiv="Content-Type"]'), i >= 0 && (x = document.querySelector('meta[http-equiv="Content-Type"]'), null == x || x.content.toLowerCase().indexOf("utf-8") > 0)
}
function ifScrollVisible() {
return jQ224("body").get(0).scrollHeight > jQ224(window).height()
}
function initializeCloseButtonNote(i) {
jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").on("mouseover", function() {
jQ224("[data-poptin-id=" + i.poptin_id + "] .close-button-note").css("display", "block")
}).on("mouseout", function() {
jQ224("[data-poptin-id=" + i.poptin_id + "] .close-button-note").css("display", "none")
})
}
function setAutoPilot(i, t) {
try {
"undefined" != typeof Storage ? void 0 !== i && (showLog("setAutoPilot2"), void 0 === i.auto_pilot_trigger || null != window.sessionStorage.getItem("apt_" + i.poptin_id) && null != window.sessionStorage.getItem("apt_" + i.poptin_id) || (showLog(i.auto_pilot_trigger), window.sessionStorage.setItem("apt_" + i.poptin_id, i.auto_pilot_trigger))) : showLog("Sorry! No Web Storage support..")
} catch (i) {
showLog(i)
}
}
function setPoptinSize(i, t) {
showLog("getPoptinSize2 poptinid: " + i.poptin_id), void 0 !== i && ("lightbox" == i.poptin_type ? (this_poptin_width = jQ224(i.poptin).find(".draggable-container").attr("data-width"), this_poptin_height = jQ224(i.poptin).find(".draggable-container").attr("data-height"), null == t && (poptins[i.poptin_id].poptin_size.height = this_poptin_height, poptins[i.poptin_id].poptin_size.width = this_poptin_width), null != this_poptin_width && "" != this_poptin_width && "undefined" != this_poptin_width && (litghtbox_poptin_width = this_poptin_width), null != this_poptin_height && "" != this_poptin_height && "undefined" != this_poptin_height && (litghtbox_poptin_height = this_poptin_height, "format_3" == i.poptin_format && (litghtbox_poptin_width = litghtbox_poptin_height)), null == t && (poptins[i.poptin_id].poptin_size = {
width: litghtbox_poptin_width,
height: litghtbox_poptin_height
}), poptin_size.width = litghtbox_poptin_width, poptin_size.height = litghtbox_poptin_height) : "bar" == i.poptin_type ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: bar_poptin_width,
height: bar_poptin_height
}), poptin_size.width = bar_poptin_width, poptin_size.height = bar_poptin_height, "format_1" == i.poptin_format || "format_5" == i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: bar_poptin_width,
height: bar_poptin_height
}), poptin_size.height = bar_poptin_height) : "format_2" == i.poptin_format || "format_3" == i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: bar_poptin_width,
height: bar_poptin_height_2
}), poptin_size.height = bar_poptin_height_2) : "format_4" == i.poptin_format && (null == t && (poptins[i.poptin_id].poptin_size = {
width: bar_poptin_width,
height: bar_poptin_height_4
}), poptin_size.height = bar_poptin_height_4)) : "sside" == i.poptin_type ? "format_1" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: sside_poptin_width_2,
height: sside_poptin_height
}), poptin_size.width = sside_poptin_width_2, poptin_size.height = sside_poptin_height) : "format_4" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: sside_poptin_width_4,
height: sside_poptin_height_4
}), poptin_size.width = sside_poptin_width_4, poptin_size.height = sside_poptin_height_4) : (null == t && (poptins[i.poptin_id].poptin_size = {
width: sside_poptin_width,
height: sside_poptin_height
}), poptin_size.width = sside_poptin_width, poptin_size.height = sside_poptin_height) : "bside" == i.poptin_type ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: bside_poptin_width,
height: bside_poptin_height
}), poptin_size.width = bside_poptin_width, poptin_size.height = bside_poptin_height) : "browsing" == i.poptin_type ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: browsing_poptin_width,
height: browsing_poptin_height
}), poptin_size.width = browsing_poptin_width, poptin_size.height = browsing_poptin_height) : "fullpage" == i.poptin_type ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: fullpage_poptin_width,
height: fullpage_poptin_height
}), poptin_size.width = "100%", poptin_size.height = "100%", "format_4" === i.poptin_format && (null == t && (poptins[i.poptin_id].poptin_size = {
width: fullpage_poptin_width_2,
height: fullpage_poptin_height_2
}), poptin_size.width = fullpage_poptin_width_2, poptin_size.height = fullpage_poptin_height_2)) : "content" == i.poptin_type ? null == t && (poptins[i.poptin_id].poptin_size = {
width: fullpage_poptin_width,
height: fullpage_poptin_height
}) : "social" == i.poptin_type ? "format_1" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: social_poptin_width,
height: social_poptin_height
}), poptin_size.width = social_poptin_width, poptin_size.height = social_poptin_height) : "format_2" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: social_poptin_width_2,
height: social_poptin_height_2
}), poptin_size.width = social_poptin_width_2, poptin_size.height = social_poptin_height_2) : "format_4" === i.poptin_format && (null == t && (poptins[i.poptin_id].poptin_size = {
width: social_poptin_width_4,
height: social_poptin_height_4
}), poptin_size.width = social_poptin_width_4, poptin_size.height = social_poptin_height_4) : "mobile" == i.poptin_type && (null == t && (poptins[i.poptin_id].poptin_size = {
width: mobile_poptin_width,
height: mobile_poptin_height
}), poptin_size.width = mobile_poptin_width, poptin_size.height = mobile_poptin_height, "format_3" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: mobile_poptin_width_2,
height: mobile_poptin_height_2
}), poptin_size.width = mobile_poptin_width_2, poptin_size.height = mobile_poptin_height_2) : "format_4" === i.poptin_format ? (null == t && (poptins[i.poptin_id].poptin_size = {
width: mobile_poptin_width,
height: mobile_poptin_height_4
}), poptin_size.height = mobile_poptin_height_4) : "format_5" === i.poptin_format && (null == t && (poptins[i.poptin_id].poptin_size = {
width: mobile_poptin_width,
height: mobile_poptin_height_5
}), poptin_size.height = mobile_poptin_height_5)))
}
function setPoptinsArray(i) {
poptins[i] = {
poptin_size: {},
poptin_trigger: {},
poptin_center: {}
}
}
function setPoptinsOnClickArray(i) {
poptins[i] = {
poptin_size: {},
poptin_trigger: {},
poptin_center: {}
}
}
function ifAndroidKeyborad(i, t) {
var p = !1,
o = (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css("top"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css("bottom")),
e = {
lightbox: "10px",
mobile: "10px",
sside: "0px"
};
if (ifAndroid && jQ224.inArray(i.poptin_type, ["lightbox", "mobile", "sside"]) > -1) {
try {
jQ224("[data-poptin-id=" + i.poptin_id + "] .inputs-container input").unbind("click"), jQ224(window).unbind("click")
} catch (i) {
showLog(i)
}
jQ224("[data-poptin-id=" + i.poptin_id + "] .inputs-container input").on("click", function(t) {
p || ("sside" == i.poptin_type && "format_4" == i.poptin_format ? jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").animate({
top: "-100px"
}, 300) : -1 == i.design_properties.poptin_location.indexOf("top") && (i.design_properties.poptin_location.indexOf("bottom") > -1 ? jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").animate({
top: e[i.poptin_type]
}, 300) : jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").animate({
top: parseInt(jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css("top")) - 100 + "px"
}, 300)), p = !0)
}), jQ224(window).on("click", function(t) {
0 == jQ224(t.target).parents(".inputs-container").length && p && ((-1 == i.design_properties.poptin_location.indexOf("top") || "sside" == i.poptin_type && "format_4" == i.poptin_format) && (i.design_properties.poptin_location.indexOf("bottom") > -1 ? (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css("top", ""), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").animate({
bottom: o
}, 300)) : jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").animate({
top: parseInt(jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css("top")) + 100 + "px"
}, 300)), p = !1)
})
}
}
function clearPoptinCredit(i) {
i.if_poptin_credit ? insertPoptinCredit(i) : (jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin-credit").remove(), showLog("clearPoptinCredit1"))
}
function insertPoptinCredit(i) {
showLog("insertPoptinCredit"), jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin-credit").remove(), jQ224("[data-poptin-id=" + i.poptin_id + "]").children().append(html_credit), jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin-credit a").attr("href", ("en" == user_lang ? poptin_com_url : poptin_il_url) + "?src=" + window.location.host)
}
function fixHtmlPadding() {
if_html_pad && jQ224("html").animate({
"padding-top": "0px"
}, 500)
}
function getFont(i) {
split = i.split("font-family")[1].split(";")[0], -1 == split.indexOf("Open Sans") && (_font = split.replace("!important", "").replace(":", "").replace(/\s/g, ""), jQ224("head").append('<link href="https://fonts.googleapis.com/css?family=' + _font + '" rel="stylesheet" tyle="text/css">'))
}
function showPoptin(i, t) {
poptinTimer(i) && (showLog("showPoptin: " + i.poptin_id), setJqueryUiShakeAnimation(), cssFix(i), clearPoptinCredit(i), "social_proof" == i.poptin_target ? setSocialProofBehaverInterval(i, t) : showEffect(i), pushHtmlDown(i), paddingXButton(i), poptinFormClickSubmit(i, t), poptinViewed(i), injectFacebookChat(i))
}
function injectFacebookChat(i) {
i.poptin_type + "_" + i.poptin_format == "social_format_3" && (showLog("ingectFacebookChat"), jQ224("body").append(jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .facebook-plugin").attr("data-facebook-chat-plugin")))
}
function pushHtmlDown(i) {
showLog("pushHtmlDown"), ("bar" == i.poptin_type && "center-top" == i.design_properties.poptin_location || "1" == jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").attr("data-wellcome-screen")) && (jQ224("html").animate({
"padding-top": jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]")[0].getBoundingClientRect().height + "px"
}, 300), if_html_pad = !0)
}
function paddingXButton(i) {
ifScrollVisible() && ("bar" != i.poptin_type && "fullpage" != i.poptin_type || setTimeout(function() {
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").css("padding-right", 1920 == screen.width ? "46px" : "20px")
}, 300))
}
function cssFix(i) {
jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").find("p, input, a, span, div, button").each(function(i) {
jQ224(this).is("a") && jQ224(this).css("cursor", "pointer"), this_width = jQ224(this).get(0).style.width, is_close_button = "closeXButton" == jQ224(this).attr("id"), "" == this_width || is_close_button || jQ224(this).css({
"max-width": this_width
}), css_string = "", jQ224.each(this.attributes, function(i) {
if (this.specified && -1 !== this.name.indexOf("style") && (css_string = this.value, css_string = css_string.replace(/ ?!important/g, ""), css_string = css_string.replace(/\;base64/g, ":base64"), css_string = css_string.replace(/\;/g, " !important;"), css_string = css_string.replace(/\:base64/g, ";base64"), -1 !== this.value.indexOf("font-family"))) try {
getFont(this.value)
} catch (i) {
showLog(i)
}
}), jQ224(this).attr("style", css_string)
})
}
function setJqueryUiShakeAnimation() {
jQ224.fn.shake = function(i, t, p, o) {
return this.each(function() {
for (var e = 1; e <= i; e++) jQ224(this).animate({
left: 2 * o + -1 * t
}, p / i / 4).animate({
left: t
}, p / i / 2).animate({
left: o
}, p / i / 4)
}), this
}
}
function poptinTimer(i) {
if (i.poptin_type + "_" + i.poptin_format == "lightbox_format_5" || i.poptin_type + "_" + i.poptin_format == "bar_format_5") {
var t = i.design_properties.timer.split("@"),
p = t[1].split("|");
if ("timerTime" == t[0]) {
var o = 60 * parseInt(p[0]) + parseInt(p[1]),
e = new Date(Date.parse(new Date) + 1e3 * o);
initializeClock(i.poptin_id, e)
} else {
if (!checkIfTimer(i, e = new Date(p[0] + " " + p[1] + " GMT" + p[2]))) return !1;
initializeClock(i.poptin_id, e)
}
}
return !0
}
function initializeClock(i, t) {
showLog("initializeClock() | endtime: " + t + ", poptin_id: " + i);
var p = jQ224(".poptin-popup[data-poptin-id=" + i + "] .timer-container");
function o() {
var o = getTimeRemaining(t),
n = ("0" + o.days).slice(-2),
s = ("0" + o.hours).slice(-2),
r = ("0" + o.minutes).slice(-2),
_ = ("0" + o.seconds).slice(-2);
p.find("#timerDays .first").text(n[0]), p.find("#timerDays .second").text(n[1]), p.find("#timerHours .first").text(s[0]), p.find("#timerHours .second").text(s[1]), p.find("#timerMinutes .first").text(r[0]), p.find("#timerMinutes .second").text(r[1]), p.find("#timerSeconds .first").text(_[0]), p.find("#timerSeconds .second").text(_[1]), o.total <= 0 && (poptins[i].poptin_trigger.close_trigger = "timer", closePoptin(i), clearInterval(e))
}
o();
var e = setInterval(o, 1e3)
}
function getTimeRemaining(i) {
var t = Date.parse(i) - Date.parse(new Date);
return {
total: t,
days: Math.floor(t / 864e5),
hours: Math.floor(t / 36e5 % 24),
minutes: Math.floor(t / 1e3 / 60 % 60),
seconds: Math.floor(t / 1e3 % 60)
}
}
function checkIfTimer(i, t) {
return !(Date.parse(t) - Date.parse(new Date) <= 0 || "Invalid Date" == t)
}
function poptinFormClickSubmit(i, t) {
try {
jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).unbind("click")
} catch (i) {
showLog(i)
}
jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).on("mouseenter", function(t) {
(jQ224(t.target).hasClass("poptin-form-submit-button") || jQ224(t.target).parents(".poptin-form-submit-button").length > 0) && jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin-form-submit-button").css("cursor", "pointer").children().css("cursor", "pointer")
}).on("mouseout", function(i) {
jQ224(i.target).hasClass("poptin-form-submit-button") || jQ224(i.target).parents(".poptin-form-submit-button").length > 0 || jQ224(jQ224.target).css("cursor", "auto").children().css("cursor", "auto")
}), jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).on("click", function(p) {
try {
jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).unbind("submit")
} catch (i) {
showLog(i)
}
if (jQ224(p.target).hasClass("poptin-form-submit-button") || jQ224(p.target).parents(".poptin-form-submit-button").length > 0)
if ("P" == jQ224(p.target).prop("tagName") || "P" == jQ224(p.target).parents(".poptin-form-submit-button").prop("tagName") || "IMG" == jQ224(p.target).prop("tagName")) {
p.preventDefault(), jQ224("[data-poptin-id=" + i.poptin_id + '] input[type="submit"]').trigger("click");
try {
"mobile" == i.poptin_type && "format_1" == i.poptin_format && jQ224("[data-poptin-id=" + i.poptin_id + "] a.fa-phone-square").attr("href").indexOf("tel:") > -1 && (redirect[i.poptin_id] = jQ224("[data-poptin-id=" + i.poptin_id + "] a.fa-phone-square").attr("href"))
} catch (t) {
monitorError("poptinConversion()->call to mobile", t, "OK", !1, i)
}
} else jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).on("submit", function(p) {
return p.preventDefault(), showLog("poptinFormClickSubmit" + i.poptin_id + " submit"), submitPoptin(i, t), !1
})
})
}
function ifLinkConversion(i) {
showLog("ifLinkConversion"), jQ224("[data-poptin-id=" + i.poptin_id + "]").find("#redirectBlank").length > 0 ? (showLog("ifLinkConversion1"), jQ224("[data-poptin-id=" + i.poptin_id + "]").find("#redirectBlank")[0].click(), redirect_flag = !0) : jQ224("[data-poptin-id=" + i.poptin_id + "]").find(".redirect-url-blank").length > 0 && (showLog("ifLinkConversio2"), jQ224("[data-poptin-id=" + i.poptin_id + "]").find(".redirect-url-blank")[0].click(), redirect_flag = !0)
}
function ifSubmitEmptyForm(i, t) {
return empty_flag = !1, jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .poptin-design-fields-form").length > 0 ? jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .poptin-design-fields-form").each(function(i) {
"" !== this.value && (empty_flag = !0)
}) : empty_flag = !0, empty_flag
}
function onInputKeyDown(i) {
try {
jQ224("[data-poptin-id=" + i.poptin_id + "] .inputs-container input").unbind("keyup")
} catch (i) {
showLog(i)
}
jQ224("[data-poptin-id=" + i.poptin_id + "] .inputs-container input").on("keyup", function(i) {
jQ224(this).hasClass("empty-field") && jQ224(this).removeClass("empty-field")
})
}
function submitPoptin(i, t) {
var p = jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .inputs-container");
if (!ifSubmitEmptyForm(i, t)) {
try {
ifMobile ? p.shake(4, 25, 500, parseInt(jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .inputs-container").css("left"))) : p.effect("shake")
} catch (t) {
ifMobile || (void 0 !== window.$ && void 0 !== window.$.ui ? $("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .inputs-container").effect("shake") : void 0 !== window.jQuery && void 0 !== window.jQuery.ui ? jQuery("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .inputs-container").effect("shake") : p.shake(4, 25, 500, parseInt(jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .inputs-container").css("left"))))
}
return 1 == jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinDesignInputTextFieldEmail").length ? jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinDesignInputTextFieldEmail").css("border", "none").addClass("empty-field") : jQ224("[data-poptin-id=" + i.poptin_id + "] .inputs-container input").first().css("border", "none").addClass("empty-field"), onInputKeyDown(i), !1
}
showLog("submitPoptin: " + i.poptin_id), i.poptin_type + "_" + i.poptin_format != "social_format_2" && afterPoptinSubmit(i, t);
try {
poptinConversion(i, t)
} catch (t) {
monitorError("submitPoptin()->poptinConversion()", t, "", "", i), redirectAfterConversion(i)
}
}
function poptinConversion(i, t) {
showLog("poptinConversion: " + i.poptin_id), ifLinkConversion(i), jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .poptin-design-fields-form").each(function(i) {
-1 !== this.id.indexOf("FreeField") && (jQ224(this).css("display", "none"), val = jQ224(this).val(), placeolder = jQ224(this).attr("placeholder"), jQ224(this).val("a:" + placeolder + "=&=b:" + val))
}), trigger = null == i.auto_pilot_trigger ? "false" : i.auto_pilot_trigger, poptin_params = {
url: window.location.href,
p_target: i.poptin_target,
referrer: getReferrer(),
trigger: trigger,
poptin_id: i.poptin_id,
title: document.title,
client_id: getClientId()
}, jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id + " .poptin-design-fields-form").each(function() {
showLog(this.name, this.value), poptin_params[this.name] = null == this.value ? "" : this.value
}), jQ224.ajax({
type: "GET",
async: !0,
cache: !0,
data: poptin_params,
url: api_link + "/APIRequest/conversion/" + i.viewer_id,
success: function(t) {
if (showLog("poptinConversion()->success()"), t.success) try {
handleConversionSuccess(i, t)
} catch (p) {
monitorError("poptinConversion()->handleConversionSuccess", p, "OK", t, i)
}
},
error: function(t, p, o) {
monitorError("poptinConversion()->error()", o, p, t.responseText, i)
},
complete: function(t) {
showLog("poptinConversion()>complete()"), redirectAfterConversion(i)
}
}, "JSON")
}
function closePoptin(i) {
jQ224(".poptin-popup[data-poptin-id=" + i + "], .poptin-popup-background[data-poptin-id=" + i + "]").fadeOut("fast"), fixHtmlPadding(), setTimeout(function() {
jQ224(".poptin-popup[data-poptin-id=" + i + "], .poptin-popup-background[data-poptin-id=" + i + "]").remove()
}, 600)
}
function redirectAfterConversion(i) {
redirect_flag || setTimeout(function() {
void 0 === redirect[i.poptin_id] || redirect_flag || (window.location.href = redirect[i.poptin_id])
}, 50)
}
function afterPoptinSubmit(i, t) {
null != i.design_properties.poptin_design_redirect && ("mobile" == i.poptin_type && /^\d+$/.test(i.design_properties.poptin_design_redirect_url) ? (redirect_phone = i.design_properties.poptin_design_redirect_url, redirect[i.poptin_id] = redirect_phone.match("^tel:") ? redirect_phone : "tel:" + redirect_phone) : i.poptin_type + "_" + i.poptin_format != "social_format_2" && (redirect_url = i.design_properties.poptin_design_redirect_url, redirect_url.match("^tel:") ? redirect[i.poptin_id] = redirect_url : redirect[i.poptin_id] = /^https?:\/\//i.test(redirect_url) ? redirect_url : "http://" + redirect_url), redirectToPoptin(i)), null != i.design_properties.poptin_design_thank_screen ? (null != i.design_properties.poptin_design_thank_screen_auto_close ? null == t ? poptins[i.poptin_id].poptin_trigger.close_thank_screen_sec = null != i.design_properties.poptin_design_thank_screen_auto_close_sec ? parseInt(i.design_properties.poptin_design_thank_screen_auto_close_sec) : 5 : closeThankScreenSec = null != i.design_properties.poptin_design_thank_screen_auto_close_sec ? parseInt(i.design_properties.poptin_design_thank_screen_auto_close_sec) : 5 : null == t ? poptins[i.poptin_id].poptin_trigger.close_thank_screen_sec = 60 : closeThankScreenSec = 600, jQ224("[data-poptin-id=" + i.poptin_id + "] .draggable-container").css("display", "none").find(".image-change-video").remove(), jQ224("[data-poptin-id=" + i.poptin_id + "]").css("box-shadow", ""), jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin_thank_you_screen").fadeIn("fast"), jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin_thank_you_screen").prepend(html_poptin_x_button), jQ224("[data-poptin-id=" + i.poptin_id + "] .close-x-button").show(100), "fullpage" == i.poptin_type && ifScrollVisible() && jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").css({
"padding-right": "25px"
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").on("mouseenter", function(p) {
null == t ? poptins[i.poptin_id].poptin_trigger.poptin_area_flag_submit = !0 : poptin_area_flag_submit = !0
}).on("mouseleave", function(p) {
null == t ? poptins[i.poptin_id].poptin_trigger.poptin_area_flag_submit = !1 : poptin_area_flag_submit = !1
}), "lightbox" == i.poptin_type && jQ224(document).click(function(p) {
jQ224(p.target).closest(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").length || (null == t ? poptins[i.poptin_id].poptin_trigger.poptin_area_flag_submit : poptin_area_flag_submit) || jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").is(":visible") && (showLog("close poptin" + i.poptin_id + " poptin_design_close_on_screen_click"), poptins[poptin_id].poptin_trigger.close_trigger = "bg_click", closePoptin(i.poptin_id))
})) : (setAccessibilityThankAfterSubmit(i), null == t ? poptins[i.poptin_id].poptin_trigger.close_thank_screen_sec = ifUserlangIsHe() ? 2 : .1 : closeThankScreenSec = ifUserlangIsHe() ? 2 : .1), setTimeout(function() {
poptins[i.poptin_id].poptin_trigger.close_trigger = "submit", closePoptin(i.poptin_id)
}, 1e3 * (null == t ? poptins[i.poptin_id].poptin_trigger.close_thank_screen_sec : closeThankScreenSec))
}
function redirectToPoptin(i) {
showLog("redirectToPoptin");
var t = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]");
"true" == t.attr("data-redirect-poptin") && 13 == t.attr("data-redirect-poptin-id").length && (redirect_flag = !0, $href = api_link + "/APIRequest/click/" + t.attr("data-redirect-poptin-id"), initiatePullPoptinsRequestOnClick($href))
}
function handleConversionSuccess(i, t) {
i.poptin_type + "_" + i.poptin_format != "social_format_2" && (conversion_id = t.conversion_id, poptinSetCookie("poptin_conversion_" + i.poptin_id, conversion_id, 365)), void 0 !== t.integration.conversion_code && jQ224(t.integration.conversion_code).each(function(i, t) {
jQ224("head").append(t)
})
}
function poptinViewed(i) {
setOnceADayCookie(i), setOnceAVisit(i), trigger = null == i.auto_pilot_trigger ? "false" : i.auto_pilot_trigger, jQ224.ajax({
url: api_link + "/APIRequest/viewed/" + i.poptin_id + "?viewer_id=" + i.viewer_id + "&trigger=" + trigger,
async: !0,
cache: !0,
dataType: "json",
type: "get"
}, "json").done(function(i) {
showLog(i)
}).fail(function(i, t, p) {})
}
function getPoptinPosition(i, t) {
"lightbox" == i.poptin_type ? (this_poptin_width = jQ224(i.poptin).find(".draggable-container").attr("data-width"), this_poptin_height = jQ224(i.poptin).find(".draggable-container").attr("data-height"), null == t && (poptins[i.poptin_id].poptin_size.height = this_poptin_height, poptins[i.poptin_id].poptin_size.width = this_poptin_width), null != this_poptin_width && "" != this_poptin_width && "undefined" != this_poptin_width ? this_litghtbox_poptin_width = this_poptin_width : this_litghtbox_poptin_width = litghtbox_poptin_width, null != this_poptin_height && "" != this_poptin_height && "undefined" != this_poptin_height ? (this_litghtbox_poptin_height = this_poptin_height, "format_3" == i.poptin_format && (this_litghtbox_poptin_width = this_litghtbox_poptin_height)) : this_litghtbox_poptin_height = litghtbox_poptin_height, null == t && (poptins[i.poptin_id].position_center = {
left: (screen_width - this_litghtbox_poptin_width) / 2,
up: (screen_height - this_litghtbox_poptin_height) / 2
}), poptin_position = {
left: (screen_width - this_litghtbox_poptin_width) / 2,
up: (screen_height - this_litghtbox_poptin_height) / 2
}) : "bar" == i.poptin_type ? (null == t && (poptins[i.poptin_id].position_center = {
left: (screen_width - 1920) / 2,
up: (screen_height - 100) / 2
}), poptin_position = {
left: (screen_width - 1920) / 2,
up: (screen_height - 100) / 2
}) : "mobile" == i.poptin_type && "format_3" == i.poptin_format && (null == t && (poptins[i.poptin_id].position_center = {
left: (screen_width - 390) / 2,
up: (screen_height - 242) / 2
}), poptin_position = {
left: (screen_width - 390) / 2,
up: (screen_height - 242) / 2
})
}
function windowResize(i, t) {
try {
jQ224(window).unbind("resize")
} catch (i) {
showLog(i)
}
jQ224(window).resize(function() {
doResize(i, t)
})
}
function doResize(i, t) {
if_responsice_flag = !1;
var p = jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]");
if (poptin_size_width = poptin_size.width, poptin_size_height = poptin_size.height, null == t && (poptin_size_width = poptins[i.poptin_id].poptin_size.width, poptin_size_height = poptins[i.poptin_id].poptin_size.height), jQ224(window).width() < poptin_size_width && "fullpage" != i.poptin_type) {
var o = 1,
e = Math.min(jQ224(window).width() / poptin_size_width, o),
n = Math.min(window.innerHeight / poptin_size_height, o),
s = poptin_size_width / jQ224(window).width(),
r = poptin_size_height / window.innerHeight;
if (s *= 100, r *= 100, p.css({
transform: "mobile" == i.poptin_type ? "scale(" + e + ",1)" : "scale(" + e + ")"
}), p.css({
width: s + "%"
}), ifScrollVisible() && jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .close-x-button").css({
"padding-right": "10px"
}), "lightbox" == i.poptin_type) this_comparable_width = jQ224(window).width(), this_comparable_width < poptin_size_width && (this_comparable_width *= .9), p.css({
left: "-" + (poptin_size_width - this_comparable_width) / 2 + "px"
}), p.css("right", "");
else if ("bar" == i.poptin_type) p.css({
left: "-" + (poptin_size_width - jQ224(window).width()) / 2 + "px"
}), "center-top" == i.design_properties.poptin_location ? (p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
}), barHtmlPadding(i)) : "center-bottom" == i.design_properties.poptin_location ? p.css({
top: "auto"
}) : p.css({
top: window.innerHeight - (e * poptin_size_height + (1 - e) * poptin_size_height / 2) + "px"
}), p.css("right", "");
else if ("bside" == i.poptin_type) "left" !== i.design_properties.poptin_location ? p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}) : p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
else if ("mobile" == i.poptin_type) "100%" !== jQ224("html").css("min-width") && p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css("right", "");
else if ("sside" == i.poptin_type || "social" == i.poptin_type)
if (i.poptin_type + "_" + i.poptin_format != "social_format_2") switch (i.design_properties.poptin_location) {
case "left-top":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "left-midlle":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
});
break;
case "left-bottom":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.animate({
top: window.innerHeight - poptin_height + "px"
}, poptin_animation_speed);
break;
case "center-top":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "center-midlle":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
});
case "center-bottom":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
}), p.css({
top: window.innerHeight - (e * poptin_size_height + (1 - e) * poptin_size_height / 2) + "px"
});
break;
case "right-top":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "right-midlle":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
});
break;
case "right-bottom":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: window.innerHeight - (e * poptin_size_height + (1 - e) * poptin_size_height / 2) + "px"
})
} else if (i.poptin_type + "_" + i.poptin_format == "social_format_2") switch (i.design_properties.poptin_location) {
case "left-top":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "left-midlle":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
});
break;
case "left-bottom":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: window.innerHeight - poptin_height - 40 + "px"
});
break;
case "center-top":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "center-midlle":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
});
case "center-bottom":
p.css({
left: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px",
right: "",
margin: "0px"
}), p.css({
top: window.innerHeight - 40 - (e * poptin_size_height + (1 - e) * poptin_size_height / 2) + "px"
});
break;
case "right-top":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: "-" + (poptin_size_height - e * poptin_size_height) / 2 + "px"
});
break;
case "right-midlle":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
});
break;
case "right-bottom":
p.css({
right: "-" + (poptin_size_width - e * poptin_size_width) / 2 + "px"
}), p.css({
top: window.innerHeight - 40 - (e * poptin_size_height + (1 - e) * poptin_size_height / 2) + "px"
})
}
}
if (window.innerHeight < poptin_size_height && "fullpage" != i.poptin_type && "lightbox" != i.poptin_type) {
o = 1;
comparable_width = window.innerWidth, comparable_height = window.innerHeight;
e = Math.min(comparable_width / poptin_size_width, o), n = Math.min(comparable_height / poptin_size_height, o), s = poptin_size_width / window.innerWidth, r = poptin_size_height / window.innerHeight;
s *= 100, r *= 100, p.css({
transform: "scale(" + n + ")"
}), p.css({
width: s + "%",
height: r + "%"
}), "bside" == i.poptin_type && ("left" !== i.design_properties.poptin_location ? p.css({
right: "-" + (poptin_size_width - n * poptin_size_width) / 2 + "px"
}) : p.css({
left: "-" + (poptin_size_width - n * poptin_size_width) / 2 + "px"
}), p.css({
top: "-" + (poptin_size_height - n * poptin_size_height) / 2 + "px"
}))
}
if ("lightbox" == i.poptin_type) {
o = 1;
comparable_width = window.innerWidth, comparable_height = window.innerHeight, comparable_width < poptin_size_width && (comparable_width *= .8);
e = Math.min(comparable_width / poptin_size_width, o), n = Math.min(comparable_height / poptin_size_height, o);
new_scale = Math.min(e, n), p.css({
transform: "scale(" + new_scale + ")"
}), p.css({
width: poptin_size_width,
height: poptin_size_height
})
}
if (window.innerWidth > poptin_size_width && "mobile" == i.poptin_type && jQ224.inArray(i.poptin_format, ["format_1", "format_2", "format_4"]) > -1 && p.css({
width: jQ224(window).width() + "px",
"max-width": jQ224(window).width() + "px"
}), "fullpage" == i.poptin_type) {
ieVersion = GetIEVersion(), p.addClass("ie" + ieVersion), jQ224(window).width() < poptin_size_width ? p.css({
width: "100%"
}) : window.innerWidth > poptin_size_width && p.css({
width: "100%",
"max-width": "100%"
}), window.innerHeight > poptin_size_height && (p.css({
height: "100%"
}), p.find(".draggable-container").first().css({
height: "100%",
"max-height": "100%"
})), window.innerHeight < poptin_size_height && p.css({
height: window.innerHeight + "px"
});
var _ = null,
a = null,
d = null,
l = null;
if (jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).children().each(function(i) {
if (!jQ224(this).is(".draggable, .inputs-container")) return jQ224(this).remove(), !1;
this_left = jQ224(this).position().left, this_top = jQ224(this).position().top, this_right = this_left + jQ224(this).width(), this_bottom = this_top + jQ224(this).height(), _ = null != _ ? Math.min(_, this_left) : this_left, d = null != d ? Math.min(d, this_top) : this_top, a = null != a ? Math.max(a, this_right) : this_right, l = null != l ? Math.max(l, this_bottom) : this_bottom
}), ifMobile && (_ -= jQ224(window).width() / 10, a += jQ224(window).width() / 10), jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).children().each(function(i) {
this_left = jQ224(this).position().left, jQ224(this).css({
left: this_left - _ + "px"
})
}), "1" == i.design_properties.poptin_design_thank_screen && jQ224("[data-poptin-id=" + i.poptin_id + "] .poptin_thank_you_screen p").each(function(t) {
"format_3" !== i.poptin_format && "format_4" !== i.poptin_format ? (new_left = jQ224(window).width() / 2 - parseInt(jQ224(this).css("width")) / 2, new_top = jQ224(window).width() / 2 - parseInt(jQ224(this).css("height")) / 2, jQ224(this).css({
left: new_left + "px"
})) : jQ224(window).width() < poptin_size_height ? responsive_fullpage_width || (new_left = parseInt(jQ224(this).css("left")) - (1920 - jQ224(window).width()) / 2, jQ224(this).css({
left: new_left + "px"
})) : responsive_fullpage_width || (new_left = parseInt(jQ224(this).css("left")) + (jQ224(window).width() - 1920) / 2, jQ224(this).css({
left: new_left + "px"
}))
}), "format_3" != i.poptin_format && "format_4" != i.poptin_format || (responsive_fullpage_width = !0), responsive_fullpage_height = !0, ifMobile) const_width = a - _, c = l - d;
else if ("format_1" == i.poptin_format) {
const_width = 600;
var c = 950
} else if ("format_2" == i.poptin_format) {
const_width = 900;
c = 950
} else if ("format_3" == i.poptin_format) {
const_width = 1130;
c = 1e3
} else if ("format_4" == i.poptin_format) {
const_width = 1130;
c = 1e3
}
o = 1, e = 1, n = 1;
jQ224(window).width() < const_width && (e = Math.min(jQ224(window).width() / const_width, o)), window.innerHeight < c && (n = Math.min(window.innerHeight / c, o));
var h = p.find("#poptinDraggableContainer"),
g = p.find("#poptinThankYouScreen");
setTimeout(function() {
container_width = "100%", container_margin = "auto", fullpage_poptin_width < screen_width / window.devicePixelRatio ? (11 == ieVersion && (container_width = fullpage_poptin_width), p.addClass("with-margin")) : p.addClass("full-width"), p.css({
"background-color": h.css("background-color"),
"background-image": h.css("background-image"),
"max-width": "initial",
height: "100%"
}), scale_with = ifMobile ? e : n, container_css = {
width: container_width,
background: "none",
"background-color": "none",
transform: "scale(" + scale_with + "," + scale_with + ")",
margin: container_margin
}, h.css(container_css), g.css(container_css), jQ224(window).width() > 700 && p.find("form").children().css({
transform: "scale(" + e + ")"
}), g.children().css({
transform: "scale(" + n + "," + n + ")"
}), el_width = a - _, drag_cont_width = p.find("#poptinDraggableContainer").width(), el_left = (drag_cont_width - el_width) / 2, jQ224("[data-poptin-id=" + i.poptin_id + "] #poptinFormSubmit" + i.poptin_id).css({
width: el_width + "px",
position: "absolute",
left: el_left + "px"
}), setTimeout(function() {
var i = p.find("#closeXButton").css({
position: "absolute !important",
top: "40px !important",
right: "40px !important"
});
p.find("#closeXButton").remove(), p.prepend(i);
var t = p.find(".poptin-credit");
p.find(".poptin-credit").remove(), p.prepend(t), h.css({
top: "-" + (window.innerHeight - window.innerHeight * n) / 2 + "px"
}), g.css({
top: "-" + (window.innerHeight - window.innerHeight * n) / 2 + "px"
}), p.animate({
opacity: 1
}, 300)
}, 500)
}, 500)
}
}
function barHtmlPadding(i) {
setTimeout(function() {
showLog("barHtmlPadding()"), jQ224("html").animate({
"padding-top": parseInt(jQ224("html").css("padding-top")) - (jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").height() - jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]")[0].getBoundingClientRect().height) + "px"
}, 300)
}, 300)
}
function getReferrer() {
return poptinGetCookie("poptin_referrer") ? -1 !== poptinGetCookie("poptin_referrer").indexOf(window.location.host) ? "" : poptinGetCookie("poptin_referrer") : ""
}
function getReleventCookie() {
cookies = document.cookie.split(";"), relevent_cookie = "";
for (var i = 0; i < cookies.length; i++) - 1 !== cookies[i].split("=")[0].indexOf("poptin") && (relevent_cookie += cookies[i]);
return relevent_cookie
}
function getAutoPilots() {
ap_triggers = "";
try {
"undefined" != typeof Storage ? jQ224.each(window.sessionStorage, function(i, t) {
-1 !== i.indexOf("apt_") && (ap_triggers += i + ":" + t + "|")
}) : showLog("Sorry! No Web Storage support..")
} catch (i) {
showLog(i)
}
return ap_triggers
}
function deafultCookie() {
(all_poptins instanceof Object || all_poptins instanceof Array) && jQ224.each(all_poptins, function(i, t) {
poptinCheckCookie("poptin_d_r_v_" + this.poptin_id) ? window.sessionStorage.getItem("first_visit_" + this.poptin_id) || (value = parseInt(poptinGetCookie("poptin_d_r_v_" + this.poptin_id)) + 1, poptinSetCookie("poptin_d_r_v_" + this.poptin_id, value, 365), window.sessionStorage.setItem("first_visit_" + this.poptin_id, 1)) : (poptinSetCookie("poptin_d_r_v_" + this.poptin_id, 1, 365), window.sessionStorage.setItem("first_visit_" + this.poptin_id, 1)), poptinCheckCookie("poptin_d_a_x_v_" + this.poptin_id) || (value = getCurrentDate(), poptinSetCookie("poptin_d_a_x_v_" + this.poptin_id, value, 365)), window.sessionStorage.getItem("poptin_pageviews_" + this.poptin_id) ? window.sessionStorage.setItem("poptin_pageviews_" + this.poptin_id, parseInt(window.sessionStorage.getItem("poptin_pageviews_" + this.poptin_id)) + 1) : window.sessionStorage.setItem("poptin_pageviews_" + this.poptin_id, 0)
}), poptinCheckCookie("poptin_session") || poptinSetCookie("poptin_session", !0, .02083333333333333), "undefined" != typeof Storage && null == window.sessionStorage.getItem("poptin_every_visit_session") && window.sessionStorage.setItem("poptin_every_visit_session", Date()), setInterval(function() {
poptinSetCookie("poptin_session", !0, .02083333333333333)
}, 6e4)
}
function getEveryVisitSession() {
return "undefined" != typeof Storage ? null == window.sessionStorage.getItem("poptin_every_visit_session") ? "poptin_every_visit_session=false" : "poptin_every_visit_session=true" : "poptin_every_visit_session=false"
}
function setUserId() {
poptinCheckCookie("poptin_user_id") || poptinSetCookie("poptin_user_id", Math.random().toString(36).slice(-16), 365)
}
function getUserId() {
return poptinGetCookie("poptin_user_id") ? poptinGetCookie("poptin_user_id") : ""
}
function getUserCountryCode() {
return !!poptinGetCookie("poptin_user_country_code") && poptinGetCookie("poptin_user_country_code")
}
function getPoptinPageviews(i) {
return null == window.sessionStorage.getItem("poptin_pageviews_" + i) ? "error" : parseInt(window.sessionStorage.getItem("poptin_pageviews_" + i))
}
function setPoptinSession() {
poptinCheckCookie("poptin_user_id") ? (poptinCheckCookie("poptin_old_user") || (setNewUserSession(), setOldUserSession()), getOnceAVisitCookies()) : poptinCheckCookie("poptin_old_user") || (setNewUserSession(), setOldUserSession(), setUserId())
}
function setOldUserSession() {
poptinCheckCookie("poptin_old_user") || (poptinSetCookie("poptin_old_user", !0, 2), setInterval(function() {
poptinSetCookie("poptin_old_user", !0, 2)
}, 6e4))
}
function setNewUserSession() {
poptinCheckCookie("poptin_new_user") || (poptinSetCookie("poptin_new_user", !0, .02083333333333333), setInterval(function() {
poptinSetCookie("poptin_new_user", !0, .02083333333333333)
}, 6e4))
}
function setOnceADayCookie(i) {
if (!poptinCheckCookie("poptin_o_a_d_" + i.poptin_id) && void 0 !== i && i.display && i.cookie != "poptin_o_a_d_" + i.poptin_id) {
var t = i.viewer_id;
poptinSetCookie("poptin_o_a_d_" + i.poptin_id, t, 1)
}
}
function setClosePoptinOnXCookie(i) {
poptinCheckCookie("poptin_c_p_o_x_c_" + i) || void 0 === i || poptinSetCookie("poptin_c_p_o_x_c_" + i, i, 1)
}
function setOnceAVisit(i) {
if (void 0 !== i) {
var t = i.viewer_id;
poptinSetCookie("poptin_o_a_v_" + i.poptin_id, t, .00017361111111111), setInterval(function() {
poptinSetCookie("poptin_o_a_v_" + i.poptin_id, t, .00017361111111111)
}, 5e3)
}
}
function getOnceAVisitCookies() {
cookies = document.cookie.split(";");
for (var i = {}, t = 0; t < cookies.length; t++) - 1 !== cookies[t].split("=")[0].indexOf("poptin_o_a_v_") && (i.poptin_id = cookies[t].split("poptin_o_a_v_")[1].split("=")[0], i.viewer_id = cookies[t].split("=")[1], setOnceAVisit(i))
}
function poptinSetCookie(i, t, p) {
var o = new Date;
o.setTime(o.getTime() + 24 * p * 60 * 60 * 1e3);
var e = "expires=" + o.toUTCString();
document.cookie = i + "=" + t + "; " + e + ";path=/"
}
function poptinGetCookie(i) {
for (var t = i + "=", p = document.cookie.split(";"), o = 0; o < p.length; o++) {
for (var e = p[o];
" " == e.charAt(0);) e = e.substring(1);
if (0 == e.indexOf(t)) return e.substring(t.length, e.length)
}
return ""
}
function resetReleventCookie(i) {
i.cookie == "poptin_d_r_v_" + i.poptin_id && poptinSetCookie("poptin_d_r_v_" + i.poptin_id, 0, 365), i.cookie == "poptin_d_a_x_v_" + i.poptin_id && (value = getCurrentDate(), poptinSetCookie("poptin_d_a_x_v_" + i.poptin_id, value, 365))
}
function poptinCheckCookie(i) {
var t = poptinGetCookie(i);
return "" != t && null !== t
}
function poptinDeleteCookie(i) {
document.cookie = i + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"
}
function getCurrentDate() {
return today = new Date, dd = today.getDate(), mm = today.getMonth() + 1, yyyy = today.getFullYear(), dd < 10 && (dd = "0" + dd), mm < 10 && (mm = "0" + mm), yyyy + "-" + mm + "-" + dd
}
function monitorError(i, t, p, o, e) {
showLog("monitorError:");
try {
jQ224.get(api_link + "/APIRequest/error/" + getClientId(), {
poptin_user_id: poptinGetCookie("poptin_user_id"),
error_step: i,
error_message: t,
call_status: p,
result: o,
poptin: !1 !== e ? e.poptin_id : e
})
} catch (i) {
showLog(i)
}
}
function showEffect(i) {
if (i.poptin_type + "_" + i.poptin_format == "social_format_3") return !1;
var t = i.design_properties.poptin_design_entry_effect.split("-")[1],
p = {};
jQ224(".poptin-popup-background[data-poptin-id=" + i.poptin_id + "]").outerWidth, jQ224(".poptin-popup-background[data-poptin-id=" + i.poptin_id + "]").outerHeight;
switch (t) {
case "scale":
p = {
percent: 10
};
break;
case "size":
p = {
to: {
width: 100,
height: 100
}
};
break;
case "up":
p = {
direction: "up"
}, t = "slide";
break;
case "down":
p = {
direction: "down"
}, t = "slide";
break;
case "left":
p = {
direction: "left"
}, t = "slide";
break;
case "right":
p = {
direction: "right"
}, t = "slide"
}
jQ224(".poptin-popup-background[data-poptin-id=" + i.poptin_id + "]").css("display", "block"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").css({
display: "none"
}), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css({
display: "block"
});
try {
void 0 !== window.$ && void 0 !== window.$.ui ? (showLog("window.$2"), $(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").show(t, p, 500)) : void 0 !== window.jQuery && void 0 !== window.jQuery.ui ? (showLog("window.jQuery2"), jQuery(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").show(t, p, 500)) : void 0 !== jQ224.ui ? (showLog("jQ224.ui3"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").delay(100).show(t, p, 500)) : (showLog("no ui3"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").delay(100).slideDown(500))
} catch (t) {
showLog("jQ224.ui err3"), jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "] .draggable-container").show(500)
}
setTimeout(function() {
jQ224(".poptin-popup[data-poptin-id=" + i.poptin_id + "]").css({
"box-shadow": i.poptin_type + "_" + i.poptin_format == "social_format_2" || "browsing" == i.poptin_type || "lightbox" == i.poptin_type && "format_3" == i.poptin_format || "bar" == i.poptin_type && "center-top" == i.design_properties.poptin_location || i.poptin_type + "_" + i.poptin_format == "mobile_format_3" || i.poptin_type + "_" + i.poptin_format == "lightbox_format_4" || "fullpage" == i.poptin_type ? "" : "0 3px 9px rgba(0,0,0,.5)"
})
}, 600)
}! function() {
console.log("poptin-start");
var i = Array(),
t = "";
if (null == document.getElementById("pixel-script-poptin") || null == document.getElementById("pixel-script-poptin")) {
i = document.getElementsByTagName("script");
for (var p = 0; p < i.length; p++) {
var o = i[p].src;
if (o && -1 !== o.indexOf("popt.in/pixel.js")) {
!0, t = o;
break
}
}
} else t = document.getElementById("pixel-script-poptin").src;
if (t.length > 0) {
if ((t = t.split("?")[1]).indexOf("&") > -1) {
t = t.split("&");
for (p = 0; p < t.length; p++) {
void 0 !== (e = t[p].split("="))[0] && void 0 !== e[1] && (query_string[e[0]] = decodeURIComponent(e[1]))
}
} else {
var e;
void 0 !== (e = t.split("="))[0] && void 0 !== e[1] && (query_string[e[0]] = decodeURIComponent(e[1]))
}
poptinInit()
} else showLog("Poptin pixel Code not exist")
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment