﻿var ltvjs = { showPopUnderForVisitors: !0, popUnderData: { url: "http://www.latuavacanza.it/exitpopup.aspx", style: "width=800,height=740,location=no,titlebar=no,status=no,toolbar=no,menubar=no,directories=no,resizable=0,scrollbars=1", durationInDays: "1", cookieNameCheck: "ltv_popunder" }, applyBanner: function() { ltvjs.showPopUnderForVisitors && ltvjs.applyPopUnder() }, showPopUnder: function() {
    ltvjs.wasAlreadyDisplayed(ltvjs.popUnderData.cookieNameCheck, ltvjs.popUnderData.durationInDays) || (window.open(ltvjs.popUnderData.url,
"ltv_popup", ltvjs.popUnderData.style).blur(), window.focus())
}, applyPopUnder: function() { if (!ltvjs.checkAlreadyDisplayed(ltvjs.popUnderData.cookieNameCheck, ltvjs.popUnderData.durationInDays, !1)) for (var a = document.getElementsByTagName("a"), b = 0; b < a.length; b++) { var c = a[b]; if (!(null == c || void 0 == c && "object" != typeof c)) { var d = c.getAttribute("onclick"); if ("function" != typeof d) { if (null == d || void 0 == d) d = ""; c.setAttribute("onclick", " ltvjs.showPopUnder();" + d) } else c.onclick = function() { ltvjs.showPopUnder(); d() } } } },
    getCookie: function(a) { var b, c, d, e = document.cookie.split(";"); for (b = 0; b < e.length; b++) if (c = e[b].substr(0, e[b].indexOf("=")), d = e[b].substr(e[b].indexOf("=") + 1), c = c.replace(/^\s+|\s+$/g, ""), c == a) return unescape(d); return "" }, setCookie: function(a, b, c, d, e, g) {
        var f = new Date; f.setTime(f.getTime()); c && (c *= 864E5); f = new Date(f.getTime() + c); document.cookie = a + "=" + escape(b) + (c ? ";expires=" + f.toGMTString() : "") + (d ? ";path=" + d : "") + (e ? ";domain=" + e : "") + (g ? ";secure" : ""); asd = a + "=" + escape(b) + (c ? ";expires=" + f.toGMTString() :
"") + (d ? ";path=" + d : "") + (e ? ";domain=" + e : "") + (g ? ";secure" : "")
    }, isWebsiteOwner: function() { var a = ltvjs.getCookie("ltv_owner_cookie"); return "" != a && 0 <= document.location.href.indexOf(a) ? !0 : !1 }, wasAlreadyDisplayed: function(a, b) { return ltvjs.checkAlreadyDisplayed(a, b, !0) }, checkAlreadyDisplayed: function(a, b, c) { if (null != ltvjs.getCookie(a) && "" != ltvjs.getCookie(a)) return !0; c && ltvjs.setCookie(a, !0, b, "/", null, null); return !1 }, showModal: function(a) {
        ltvjs.getViewPort(); setTimeout("ltvjs.hideModal()", a.timeout); window.onscroll =
function() { } 
    }, hideModal: function() { }, getViewPort: function() {
        var a, b; "undefined" != typeof window.innerWidth ? (a = window.innerWidth, b = window.innerHeight) : "undefined" != typeof document.documentElement && "undefined" != typeof document.documentElement.clientWidth && 0 != document.documentElement.clientWidth ? (a = document.documentElement.clientWidth, b = document.documentElement.clientHeight) : (a = document.getElementsByTagName("body")[0].clientWidth, b = document.getElementsByTagName("body")[0].clientHeight); return { height: b,
            width: a}
        } 
    }; $(function() { ltvjs.applyBanner() });
