(function(URL, TYPE, ISMOBILE, LANG, WLLOGO, LOGOBKG, HOMEPAGEURL, FREQUENCY, PHRASES, IS_PREVIEW){ URL = URL || '#'; HOMEPAGEURL = HOMEPAGEURL || '#'; TYPE = TYPE || 'full'; WLLOGO = WLLOGO || false; LOGOBKG = LOGOBKG || false; FREQUENCY = FREQUENCY || 24*60*60*1000; PHRASES = PHRASES || { 'continue': 'Continue to %_site_%', 'close': 'Close ad' }; ISMOBILE = ISMOBILE || false; IS_PREVIEW = IS_PREVIEW || false; var cn = 'bcpsttl_' + TYPE; var el; var frameEl; var wlLogoStyle = ''; var wlLogoImg = ''; var wlBkgStyle = ''; var userDevice = 'desktop'; var mobileInterval; var close_footer; if (WLLOGO) { wlLogoImg = 'background-image: url(' + WLLOGO + ');'; } if (LOGOBKG) { wlBkgStyle = 'background-color: ' + LOGOBKG + ';'; } if (WLLOGO || LOGOBKG) { wlLogoStyle = 'style="' + wlLogoImg + ' ' + wlBkgStyle + '"' } if (ISMOBILE) { userDevice = 'mobile'; close_footer = '' + '' + '' + PHRASES['continue'].replace('%_site_%', location.hostname).replace('%s%', '>') + '' + '' + '' + ''; } else { close_footer = '' + '' + '' + PHRASES['continue'].replace('%_site_%', location.hostname).replace('%s%', '>') + '' + '' + '' + ''; } if (!IS_PREVIEW) { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { if (!IS_PREVIEW && getC(cn)) { return; } el = document.createElement('div'); el.id = 'bcpsttl_main'; el.style.display = 'none'; el.innerHTML = '' + '
' + '' + '' + '' + '' + '' + PHRASES['close'] + '' + '' + close_footer; document.body.appendChild(el); frameEl = document.getElementById('bcpsttl_iframe'); if (!IS_PREVIEW) { document.addEventListener('click', onClick, false); } else { show(); } window.addEventListener('message', onReceiveMessage); // css variable, for mobile chrome var vh = window.innerHeight * 0.01; document.documentElement.style.setProperty('--vh', vh+'px'); window.addEventListener('resize', resizeHandler, false); } function onClick(e) { if (!getC(cn) && isLink(e.target)) { e.preventDefault(); e.stopImmediatePropagation(); show(); } } function onCloseClick(e) { if (!el) { return; } e.preventDefault(); e.stopImmediatePropagation(); el.style.display = 'none'; detachHandlers(); } function attachHandlers() { document.getElementById(cn + '_continue').addEventListener('click', onCloseClick, false); document.getElementById(cn + '_close').addEventListener('click', onCloseClick, false); resizeHandler(); if (ISMOBILE) { mobileInterval = setInterval(function () { onResize(); }, 500); } document.addEventListener('touchmove', blockTouchMove, { passive: false }); } function detachHandlers() { document.getElementById(cn + '_continue').removeEventListener('click', onCloseClick, false); document.getElementById(cn + '_close').removeEventListener('click', onCloseClick, false); clearInterval(mobileInterval); document.removeEventListener('touchmove', blockTouchMove); } function blockTouchMove(e) { // IOS bg scroll fix e.preventDefault(); return false; } function resizeHandler() { onResize(); } function onResize() { var vh = window.innerHeight * 0.01; document.documentElement.style.setProperty('--vh', vh+'px'); fitTextFontSize('.bcpsttl_footer_holder'); var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var height = window.innerHeight|| document.documentElement.clientHeight|| document.body.clientHeight; var isLandscape = width > height; function gcd (a, b) { return (b == 0) ? a : gcd (b, a%b); } var divisor = gcd (width, height); var ratio = (width/divisor)/(height/divisor); var queryRatio = 1.333; // 4/3 if (ISMOBILE) { setClass(isLandscape ? 'bcpsttl_land' : 'bcpsttl_port'); } else { if (TYPE === 'full') { if (height <= 600 || width <= 800) { setClass(width <= 500 ? 'desktop_small __min' : 'desktop_small'); } else { setClass('empty'); } } else { if (isLandscape) { setClass(height <= 750 && ratio >= queryRatio ? 'bcpsttl_land' : 'empty'); } else { setClass(width <= 750 && ratio <= queryRatio ? 'bcpsttl_port' : 'empty'); } } } } function setClass(className) { className = (className || '') + ' ' + userDevice; if (!frameEl || !frameEl.contentWindow) { return; } if (LANG === 'ar' || LANG === 'il') { className = className + ' ' + 'bcpsttl_rtl' } el.className = className; frameEl.contentWindow.postMessage({className: className}, '*'); } function show() { if (!el) { return; } if (!IS_PREVIEW) { setC(cn, 1, FREQUENCY); } el.style.display = ''; attachHandlers(); } function isLink(el) { var p = null; if (!!el && el !== document.body) { try { p = el.tagName.toLowerCase() === 'a' && el.hasAttribute('href') ? el : isLink(el.parentNode); } catch (e) { } } return p; } function setC(n, v, t) { var e = new Date(); e.setTime(e.getTime() + t); document.cookie = n + '=' + v + '; path=/; expires=' + e.toGMTString(); } function getC(n) { var cs = ('' + document.cookie).split('; '); for (var i = 0; i < cs.length; i++) { var cookie = cs[i].split('='); if (cookie[0] === n) return cookie[1]; } return null; } function onReceiveMessage(e) { if (!e || !e.data) { return; } if (e.data.getClass) { onResize(); return; } var height = e.data.gridHeight; document.getElementById('js-iframe-wrp').style.height = height ? height + 1 + 'px' : ''; } function fitTextFontSize(selector, parent, options) { function isFit(el) { return el.scrollWidth <= el.offsetWidth && el.scrollHeight <= el.offsetHeight; } function dichotomy(min, max, el) { if (max - min < 1) { el.style.fontSize = min + 'px'; return min; } else { const mid = (max + min) / 2; el.style.fontSize = mid + 'px'; if (isFit(el)) { return dichotomy(mid, max, el); } else { return dichotomy(min, mid, el); } } } parent = parent ? parent : document.body; options = options ? options : {}; var commonMinFS = Infinity; var elements = parent.querySelectorAll(selector); var i; for (i = 0; i < elements.length; i++) { var el = elements[i]; el.style.fontSize = ''; var fsize = parseInt(window.getComputedStyle(el)['font-size'], 10); commonMinFS = Math.min(commonMinFS, isFit(el) ? fsize : dichotomy(1, fsize, el)); } if (options.syncSize) { for (i = 0; i < elements.length; i++) { elements[i].style.fontSize = commonMinFS + 'px'; } } } var outerStyles = "#bcpsttl_main { position: fixed; z-index: 9999999; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.75); text-align: center; box-sizing: unset;}#bcpsttl_main:before { height: 100%; display: inline-block; vertical-align: middle; content: '';}#bcpsttl_main * { margin: 0; padding: 0; border: 0; background: none; font-size: 14px; line-height: 14px; outline: none; box-sizing: unset;}#bcpsttl_main *:before,#bcpsttl_main *:after { box-sizing: content-box;}#bcpsttl_main .bcpsttl_wrp { max-width: 74.063vw; max-height: 82vh; position: relative; width: calc(82vh * 1.6232); display: inline-block; white-space: normal; vertical-align: middle;}#bcpsttl_main .bcpsttl_wrp:before { content: ''; display: block; padding-top: 61.604%;}#bcpsttl_main .bcpsttl_iframe { width: 100%; height: 100%; position: absolute; top: 0; z-index: 2; left: 0;}#bcpsttl_main .bcpsttl_cls_holder { position: absolute; text-decoration: none; padding: 0 15px; height: 30px; min-width: 100px; box-sizing: border-box; top: -6vh; right: -6vw; background-color: rgba(255, 255, 255, 0.2); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);}#bcpsttl_main .bcpsttl_footer { text-align: center; width: 100%; margin-top: 4.5vh; position: absolute; left: 0;}#bcpsttl_main .bcpsttl_footer_text { font-family: 'Open Sans', Arial, sans-serif; font-weight: 700; color: #fff; text-transform: uppercase; text-decoration: none;}#bcpsttl_main .bcpsttl_footer_text .bcpsttl_footer_text_inner { vertical-align: middle; font-size: 18px;}#bcpsttl_main .bcpsttl_footer_text .icon_arrow { background-image: url('https://i.bongacash.com/postitial/assets/images/outer_arrow.svg'); background-repeat: no-repeat; display: inline-block; height: 8px; width: 5px; vertical-align: middle; margin-left: 7px;}#bcpsttl_main .bcpsttl_cls_cross { background-image: url('https://i.bongacash.com/postitial/assets/images/outer_close.svg'); background-repeat: no-repeat; display: inline-block; height: 9px; width: 9px; margin-right: 5px; opacity: 0.63; position: relative;}#bcpsttl_main .bcpsttl_cls_txt { font-family: 'Open Sans', Arial, sans-serif; font-size: 14px; font-weight: 700; color: #fff; line-height: 30px; opacity: 0.63;}#bcpsttl_main .bcpsttl_logo { position: absolute; background-image: url('https://i.bongacash.com/postitial/assets/images/outer_logo.svg'); background-repeat: no-repeat; background-position: center; background-color: #8d0028;}/*@media (max-width: 750px) and (max-aspect-ratio: 4/3)*/#bcpsttl_main.bcpsttl_port .bcpsttl_wrp.bcpsttl_light { width: 100%; max-width: calc(94vw - 3.12vw - 25px); /* 3.12vw padding area, 25 empty space*/ top: 3vh; max-height: 72vh; max-height: calc((var(--vh, 1vh) * 75) - 25px);}#bcpsttl_main.bcpsttl_port .bcpsttl_wrp.bcpsttl_light:before { padding-top: 113.412%;}#bcpsttl_main.bcpsttl_port .bcpsttl_wrp.bcpsttl_light:after { content: ''; position: absolute; top: -3.12vw; left: -3.12vw; width: 100%; height: 100%; padding: 3.12vw; background: rgba(141, 0, 40, 0.6); border: 1px solid #8d0028; opacity: 0.5; z-index: 1; border-radius: 6px;}#bcpsttl_main.bcpsttl_port .bcpsttl_light .bcpsttl_logo { border-radius: 8px; top: -16vh; top: calc(var(--vh, 1vh) * -16); left: -3.12vw; height: 9vh; height: calc(var(--vh, 1vh) * 9); width: 28vh; width: calc(var(--vh, 1vh) * 28); background-size: 20vh; background-size: calc(var(--vh, 1vh) * 20);}#bcpsttl_main.bcpsttl_port .bcpsttl_light .bcpsttl_cls_holder { padding: 0; width: 5.5vh; width: calc(var(--vh, 1vh) * 5.5); height: 5.5vh; height: calc(var(--vh, 1vh) * 5.5); min-width: 0; top: -16vh; top: calc(var(--vh, 1vh) * -16); right: -3.12vw; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(201,19,70, 0.3); background-color: rgba(141, 0, 40, 0.4);}#bcpsttl_main.bcpsttl_port .bcpsttl_light .bcpsttl_cls_txt { display: none;}#bcpsttl_main.bcpsttl_port .bcpsttl_light .bcpsttl_cls_cross { width: 2vh; width: calc(var(--vh, 1vh) * 2); height: 2vh; height: calc(var(--vh, 1vh) * 2); opacity: 1; margin: 1.8vh; margin: calc(var(--vh, 1vh) * 1.8);}#bcpsttl_main.bcpsttl_port .bcpsttl_light .bcpsttl_footer,#bcpsttl_main.bcpsttl_port .bcpsttl_light + .bcpsttl_footer { display: none;}/*@media (max-height: 750px) and (min-aspect-ratio: 4/3) {*/#bcpsttl_main.bcpsttl_land .bcpsttl_light .bcpsttl_logo { display: none;}#bcpsttl_main.bcpsttl_land .bcpsttl_wrp.bcpsttl_light { height: auto; max-height: calc((var(--vh, 1vh) * 95.528) - 25px); width: calc(((var(--vh, 1vh) * 95.528) - 25px) * 1.777777); max-width: 95.36vw;}#bcpsttl_main.bcpsttl_land .bcpsttl_wrp.bcpsttl_light:before { padding-top: 56.25%;}#bcpsttl_main.bcpsttl_land .bcpsttl_wrp.bcpsttl_light:after { content: ''; position: absolute; top: -1.49925vw; left: -1.49925vw; width: 100%; height: 100%; padding: 1.49925vw; background: rgba(141, 0, 40, 0.6); border: 1px solid #8d0028; opacity: 0.5; z-index: 1; border-radius: 6px;}#bcpsttl_main.bcpsttl_land .bcpsttl_light .bcpsttl_cls_holder { padding: 0; width: 9.614vh; height: 9.614vh; min-width: 0; top: 30px; right: 30px; border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(201,19,70, 0.3); background-color: rgba(141, 0, 40, 0.4); z-index: 3;}#bcpsttl_main.bcpsttl_land .bcpsttl_light .bcpsttl_cls_txt { display: none;}#bcpsttl_main.bcpsttl_land .bcpsttl_light .bcpsttl_cls_cross { width: 3.8vh; height: 3.8vh; margin: 3vh; opacity: 1;}#bcpsttl_main.bcpsttl_land .bcpsttl_light .bcpsttl_footer { display: none;}#bcpsttl_main .bcpsttl_wrp.bcpsttl_light { width: calc(66.667vh * 1.777777);}#bcpsttl_main .bcpsttl_wrp.bcpsttl_light:before { padding-top: 56.25%;}#bcpsttl_main .bcpsttl_wrp.bcpsttl_light:after { content: ''; position: absolute; top: -0.7vw; left: -0.7vw; width: 100%; height: 100%; padding: 0.7vw; background: rgba(141, 0, 40, 0.6); border: 1px solid #8d0028; opacity: 0.5; z-index: 1; border-radius: 6px;}#bcpsttl_main .bcpsttl_light .bcpsttl_footer { margin-top: 1.5vw;}#bcpsttl_main .bcpsttl_light .bcpsttl_cls_holder { padding: 0; width: 40px; height: 40px; min-width: 0; top: calc(-40px - 1vw); right: calc(-40px - 1vw); border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(201,19,70, 0.3); background-color: rgba(141, 0, 40, 0.4);}#bcpsttl_main .bcpsttl_light .bcpsttl_cls_txt { display: none;}#bcpsttl_main .bcpsttl_light .bcpsttl_cls_cross { width: 15px; height: 15px; opacity: 1; margin: 13px;}#bcpsttl_main.desktop.desktop_small .bcpsttl_wrp { max-width: calc(100% - 74px); /* 45px each side */ max-height: calc(100% - 90px); /* 45px each side */ width: 100%; height: 100%;}#bcpsttl_main.desktop.desktop_small .bcpsttl_footer { bottom: -30px; margin-top: auto;}#bcpsttl_main.desktop.desktop_small .bcpsttl_cls_holder { top: -38px; right: 8px;}#bcpsttl_main.desktop.desktop_small .bcpsttl_logo { display: none;}#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_wrp { max-width: 94vw; max-height: calc(100vh - 98px); /* 30px close btn + 48px top\bottom space + 20 bottom text*/}#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_wrp:before { padding-top: 113.412%;}#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_footer_holder { width: 90%; left: 5%; right: 5%; height: 20px; position: absolute;}#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_full .bcpsttl_footer { bottom: -10px;}#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_full .bcpsttl_footer .bcpsttl_footer_text_inner,#bcpsttl_main.desktop.desktop_small.__min .bcpsttl_full .bcpsttl_footer_text .icon_arrow { font-size: inherit; line-height: inherit;}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_footer.__mobile { display: block;}#bcpsttl_main.mobile .bcpsttl_full.bcpsttl_wrp { position: absolute; top: 0; left: 0; overflow-y: scroll; -webkit-overflow-scrolling: touch; max-width: 100%; max-height: calc(100% - 10vh); max-height: calc(100% - var(--vh, 1vh) * 10); //min-height: 100%; /* Safari mobile scroll fix */ height: 100%; width: 100%;}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_iframe { height: inherit; margin-top: 10vh; margin-top: calc(var(--vh, 1vh) * 10);}#bcpsttl_main.mobile .bcpsttl_full + .bcpsttl_footer { position: fixed; z-index: 1000; box-sizing: border-box; height: 10vh; height: calc(var(--vh, 1vh) * 10); bottom: -1px; /* iPad fix */ margin-top: 0; padding: 5px 0;}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_footer .bcpsttl_footer_text_inner { font-size: 14px;}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_logo { width: 100%; height: 10vh; height: calc(var(--vh, 1vh) * 10); top: 0; left: 0; background-position: 5vw center; background-size: 25vh; background-size: calc(var(--vh, 1vh) * 25);}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_cls_holder { top: 0; right: 0; background: url('https://i.bongacash.com/postitial/assets/images/full_mobile_close2.svg') center center no-repeat; box-shadow: none; border-radius: 0; height: 10vh; height: calc(var(--vh, 1vh) * 10); width: 10vh; width: calc(var(--vh, 1vh) * 10); background-size: 4vh; background-size: calc(var(--vh, 1vh) * 4); padding: 0;}#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_cls_txt,#bcpsttl_main.mobile .bcpsttl_full .bcpsttl_cls_cross { display: none;}#bcpsttl_main.mobile .bcpsttl_footer.__mobile .bcpsttl_footer_holder { display: block; height: calc(100% - 10px); width: 90%; font-size: 30px; margin: 0 auto; position: absolute; left: 5%; right: 5%; line-height: calc(10vh - 10px); line-height: calc(var(--vh, 1vh) * 10 - 10px);}#bcpsttl_main.mobile .bcpsttl_footer.__mobile .bcpsttl_footer_text_inner { font-size: inherit; line-height: inherit;}#bcpsttl_main.mobile .bcpsttl_footer.__mobile .bcpsttl_footer_text .icon_arrow { background-position: left center; background-size: contain; max-width: 14px; height: 0.6em; width: 0.6em; font-size: inherit;}#bcpsttl_main.bcpsttl_rtl .bcpsttl_footer { direction: rtl;}#bcpsttl_main.bcpsttl_rtl .bcpsttl_footer_text .icon_arrow { margin-left: 0; margin-right: 7px; background-image: url('https://i.bongacash.com/postitial/assets/images/outer_arrow_ar.svg');}#bcpsttl_main.bcpsttl_rtl .bcpsttl_cls_holder { direction: rtl;}#bcpsttl_main.bcpsttl_rtl .bcpsttl_full .bcpsttl_cls_cross { margin-left: 5px; margin-right: 0;}/* iPad mobile footer size fix */@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { #bcpsttl_main.mobile .bcpsttl_full.bcpsttl_wrp { max-height: calc(100% - 10vh); } #bcpsttl_main.mobile .bcpsttl_full + .bcpsttl_footer { height: 10vh; } #bcpsttl_main.mobile .bcpsttl_footer.__mobile .bcpsttl_footer_holder { line-height: calc(10vh - 10px); }}" var headStyle = document.createElement('style'); headStyle.setAttribute("type", "text/css"); headStyle.innerHTML = outerStyles; document.getElementsByTagName("head")[0].appendChild(headStyle); })( '//promo-bc.com//promo.php?c=666885&type=postitial&p%5Bnon_adult%5D=0&p%5Bfrequency%5D=43200&p%5Bfull%5D=1&p%5Bframe%5D=1', 'full', '', 'pt', '', '', 'https://bongacams.com/track?c=662059&csurl=https://bongacams.com/', 43200 * 1000, { 'continue': 'Continuar para %_site_%', 'close': 'Fechar anĂșncio' }, '' );