const VERSION = "2.3.2" // 21.9.2023 Minor changes const HELPER_INDEX = 999999999 let _et_domain = window.top.location.host let _et_subdomain = _et_domain.split('.')[0] let divsize = 1200 let minsize = '100%' let parallaxclass = '.parallax_wrap' let temp_style = '' let divcont = '' let divcont2 = '' let divcont3 = '' let divclass = '' let divclass2 = '' let divclass_mobile = '' let _et_ourips = '' let mintop = 0; let _et_body_sx = 0; let _et_body_sy = 0; let _et_body_cx = 0; let _et_body_cy = 0; let date = new Date() let scriptid = parseInt(Math.random() * 100000) let _et_log_call_not_found = false; let _et_temp_style = document.createElement('style'); let _et_data = []; let _et_findend_id = []; let _et_desktop_id = []; let _et_desktopCNT = 0 let _et_desktopTimer = 0 let _et_banners = []; let _et_test_banA; let _et_test_banF; let bannerID = []; let mobilBannerID = []; let counterPostMess = []; let counterPost = 0; let noads = '' let fluid_item = [] let debug = [] debug['init_time'] = new Date().getTime() debug['divclass'] = divclass; debug['divcont'] = divcont; debug['divcont2'] = divcont2; debug['divsize'] = divsize; debug['_et_domain'] = _et_domain; debug['ref'] = getParamName('ref'); if (window.location.href.includes('pluska.sk')) { divclass = '#gpt-desktopOnlyLeaderboardTop1_top1'; divclass2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; divcont = '#gpt-desktopOnlyLeaderboardTop1_top1'; divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; // divclass_mobile = '#gpt-mobileOnlySquare_top1'; divclass_mobile = '#gpt-mobileOnlySquare_mid1'; } if (window.location.href.includes('zoznam.sk')) { if ((_et_domain == 'm.dromedar.zoznam.sk') || (_et_domain == 'm.podkapotou.zoznam.sk')) { _et_subdomain = _et_domain.split('.')[1] divclass_mobile = `#m-${_et_subdomain}-clanok-hore`; } else { divclass_mobile = `#m-${_et_subdomain}-clanok-hore`; } } if (window.location.href.includes('m.spuntik')) { _et_subdomain = _et_domain.split('.')[1] divclass_mobile = `#m-${_et_subdomain}-clanok-hore`; } if (window.location.href.includes('m.topky')) { _et_subdomain = _et_domain.split('.')[1] divclass_mobile = `#m-${_et_subdomain}-clanok-hore`; } try { if (window.location.href.includes('HBDEBUG=1') || window.top.navigator.languages.includes('cy')){ _et_ourips = '1' } } catch (e) { console.log(e) } function setCssForPage() { switch (window.top.location.host) { case 'staging.standartnews.com': { divclasss = '.banner'; divclass2 = '.banner'; divcont2 = '.banner'; divcont = '#content-section'; divclass_mobile = '.banner'; if (((document.querySelector('#etarget_branding_A > a')) || (document.querySelector('#etarget_branding_F > a'))) && (document.body.clientWidth<=450)) { document.querySelector('.sidemenu-wrapper').style.transform = 'translateX(-107%)'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } break; case 'standartnews.com': { divclasss = '.banner'; divclass2 = '.banner'; divcont2 = '.banner'; divcont = '.banner'; divclass_mobile = '#content-section'; } break; case 'www1.pluska.sk': { divclass = '#gpt-desktopOnlyPlus1LeaderboardTop1_top1'; divclass2 = '#gpt-desktopOnlyPlus1LeaderboardTop1_top1'; divcont2 = '#gpt-desktopOnlyPlus1LeaderboardTop1_top1'; divcont = '#gpt-desktopOnlyPlus1LeaderboardTop1_top1'; // divclass_mobile = '#gpt-mobileOnlySquare_mid1'; if (((document.querySelector('#etarget_branding_A > a')) || (document.querySelector('#etarget_branding_F > a'))) && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; document.body.style.alignItems = 'unset'; document.querySelector('main').style.marginLeft = '30px'; document.querySelector('#etarget_branding_A > a').style.zIndex = 15; if (document.querySelector('#etarget_branding_F > a')) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; } document.querySelector('body > site-header > a > svg').style.width = '7.625rem'; } } break; case 'plus7dni.pluska.sk': { divclass = '#gpt-desktopOnlyLeaderboardTop1_top1'; divcont = '#gpt-desktopOnlyLeaderboardTop1_top1'; divclass2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; // temp_style = " @media only screen and (max-width: 450px) { #etarget_branding_F a {width:100% !important;left:0px !important} #etarget_branding_F a img {object-fit: cover; object-position: top left;} }"; divclass_mobile = '#gpt-mobileOnlySquare_top1'; mintop = 60 if (document.querySelector('#etarget_branding_A > a') && document.body.clientWidth<=450) { document.body.style.alignItems = 'unset'; document.body.style.display = 'flex'; document.body.style.flexDirection = 'column'; document.body.style.flexWrap = 'wrap'; document.body.style.alignContent = 'center'; document.body.style.justifyContent = 'center'; document.body.style.overflow = 'visible'; document.body.style.position = 'relative'; document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; document.querySelector('body > header').style.zIndex = 210; document.querySelector('#etarget_branding_A > a > div').style.zIndex = 100; document.querySelector('body > div.page__wrapper > main > div.grid-full').style.marginLeft = '15px'; } } break; case 'wanda.pluska.sk': { divcont = '#gpt-desktopOnlyLeaderboardTop1_top1'; if (document.querySelector('#etarget_branding_A > a') && document.body.clientWidth <= 450) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > div.page__wrapper > div').style.marginLeft = '30px'; document.querySelector('body > site-header > div.site-header__nav-container > div.site-header__nav').style.maxWidth = '450px'; if ((screen.width >= 361) && (screen.width <= 390)) { document.querySelector('body > site-header > div.site-header__nav-container > div.site-header__nav > button-menu').style.marginRight = '20px'; } else if ((screen.width >= 391) && (screen.width <= 455)) { document.querySelector('body > site-header > div.site-header__nav-container > div.site-header__nav > button-menu').style.marginRight = '10px'; } else if ((screen.width <= 360)) { document.querySelector('body > site-header > div.site-header__nav-container > div.site-header__nav > button-menu').style.marginRight = '20px'; } } } break; case 'autobild.pluska.sk': { mintop = 60 divcont = '#gpt-desktopOnlyLeaderboardTop1_top1'; if (document.querySelector('#etarget_branding_A > a') && document.body.clientWidth<=450) { document.body.style.position = 'unset'; if (document.querySelector('#etarget_branding_F > a')) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; document.querySelector('#etarget_branding_F > a').style.width = 'unset'; } document.querySelector('body > site-header > div.nav-wrapper > button-toggle-drawer').style.justifySelf = 'center'; document.querySelector('body > site-header > div.drawer > button-toggle-drawer').style.marginRight = '3rem'; document.querySelector('body > site-header > div.nav-wrapper > button-toggle-drawer').style.marginRight = '-4rem'; } } break; case 'zdravie.pluska.sk': { if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth <= 450)) { document.body.style.position = 'unset'; document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; document.querySelector('body > site-header > div.site-header__bottom > div > form-search').style.marginLeft = '15px'; document.querySelector('#etarget_branding_A > a > div').style.zIndex = 50; document.querySelector('body > site-header > div.site-header__top > div > a > svg').style.width = '9.25rem'; } } break; case 'lepsiebyvanie.pluska.sk': { if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth <= 450)) { document.body.style.position = 'unset'; document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; document.querySelector('body > app-header > div.nav-wrapper > button-menu.menu-toggle').style.marginRight = '15px'; } } break; case 'dobrejedlo.pluska.sk': { if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth <= 450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > site-header > div.wrapper > a.logo').style.margin = '0 4rem'; document.querySelector('#main > div.content').style.marginLeft = '30px'; } } break; case 'magazin.pluska.sk': { if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth <= 450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > div.page__wrapper > div').style.marginLeft = '30px'; document.querySelector('body > site-header > div.site-header__controls').style.display = 'flex'; document.querySelector('body > site-header > div.site-header__controls').style.justifyContent = 'flex-start'; document.querySelector('body > site-header > div.site-header__navigation > button-menu > svg').style.margin = 'unset'; document.querySelector('body > site-header > div.site-header__navigation > button-menu > svg').style.position = 'absolute'; if ((screen.width >= 320) && (screen.width <= 390)) { document.querySelector('body > site-header > div.site-header__controls > a.site-logo > svg').style.margin = '0 70px'; document.querySelector('body > site-header > div.site-header__navigation > button-menu > svg').style.left = '65%'; } else if ((screen.width >= 391) && (screen.width <= 455)) { document.querySelector('body > site-header > div.site-header__controls > a.site-logo > svg').style.margin = '0 95px'; document.querySelector('body > site-header > div.site-header__navigation > button-menu > svg').style.left = '80%'; } } } break; case 'zena.pluska.sk': { if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth <= 450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; } } break; case 'casprezeny.pluska.sk': { divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; // temp_style = " @media only screen and (max-width: 450px) { #etarget_branding_F a {width:100% !important;left:0px !important} #etarget_branding_F a img {object-fit: cover; object-position: top left;} }"; divclass_mobile = '#gpt-mobileOnlySquare_top1'; mintop = 70 if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; document.body.style.overflow = 'visible'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; } } break; case 'emma.pluska.sk': { divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > site-header > div > a > svg').style.width = '7.625rem'; document.querySelector('main').style.marginLeft = '30px'; } } break; case 'eva.pluska.sk': { divcont2 = '#gpt-s990x200_leaderboard_d_1'; divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; mintop = 60 if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('main').style.marginLeft = '30px'; } } break; case 'sarm.pluska.sk': { divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; mintop = 70 if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > site-header > div > a > svg').style.width = '7.625rem'; document.querySelector('main').style.marginLeft = '30px'; } } break; case 'sport24.pluska.sk': { divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > site-header > div.site-header__outer-wrapper > a').style.marginLeft = '15px'; document.querySelector('main').style.marginLeft = '30px'; } } break; case 'zivot.pluska.sk': { divclass = '#top1Leaderboard'; divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.body.style.marginLeft = 'unset'; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('body > div.page__wrapper > div').style.marginLeft = '30px'; } } break; case 'plnielanu.zoznam.sk': { divclass = '#Plnielanu-branding'; divcont = '#Plnielanu-branding'; divcont2 = '.header__content'; divclass_mobile = '#m-plnielanu-clanok-hore'; if (window.location.pathname != '/') { divclass_mobile = '#m-plnielanu-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-plnielanu-clanok-topbox1'; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } document.querySelector('#etarget_branding_F > a').style.left = 'unset'; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#_et_branding_helper_div').style.right = '50px'; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'hashtag.zoznam.sk': { divclass = '#Hashtag-desktop-titulka-leaderboard'; divcont = '#Hashtag-branding'; divcont2 = '#Hashtag-branding'; divclass_mobile = '#Hashtag-mobil-titulka-topbox1'; if (window.location.pathname != '/') { divclass_mobile = '#m-hashtag-clanok-hore'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'sportky.zoznam.sk': { divclass = '#Sportky-branding'; divcont = '#Sportky-branding'; divcont2 = '#Sportky-branding'; divclass2 = '#Sportky-branding'; divclass_mobile = '#m-sportky-clanok-topbox1'; if (window.location.pathname != '/') { divclass_mobile = '#m-sportky-clanok-topbox1'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-sportky-clanok-hore'; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#_et_branding_helper_div').style.right = '30px'; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } if (document.querySelector('#etarget_branding_A > a') && document.body.clientWidth<=450) { if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } break; case 'openiazoch.zoznam.sk': { divclass = '#Openiazoch-Branding'; divcont = '#Openiazoch-Branding'; divclass_mobile = '#div-gpt-ad-1497527025152-0'; if (window.location.pathname != '/') { divclass_mobile = '#div-gpt-ad-1444902741090-0'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'feminity.zoznam.sk': { divcont2 = '#Feminity-branding-Adx'; divclass = '#Feminity-branding-Adx'; divcont = '#Feminity-Branding'; divclass_mobile = '#m-feminity-clanok-hore'; if (window.location.pathname != '/') { divclass_mobile = '#m-feminity-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-feminity-clanok-topbox1'; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.querySelector('#menu-toggle').style.left = '2.05rem'; if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'mojdom.zoznam.sk': { divclass = '#Mojdom-branding'; divcont = '#Mojdom-branding'; divclass_mobile = '#m-mojdom-clanok-hore'; if (window.location.pathname != '/') { divclass_mobile = '#m-mojdom-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-mojdom-clanok-topbox1'; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'urobsisam.zoznam.sk': { divclass = '#UrobSiSam-branding-Adx'; divcont = '#UrobSiSam-branding-Adx'; divclass_mobile = '#m-urobsisam-titulka'; if (window.location.pathname != '/') { divclass_mobile = '#m-urobsisam-clanok-hore'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { document.querySelector('#menu-toggle').style.left = '2.05rem'; if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'karierainfo.zoznam.sk': { divclass = '#Karierainfo-Branding'; divcont = '#Karierainfo-Branding'; divclass_mobile = '#m-karierainfo-clanok-hore'; if (window.location.pathname != '/') { divclass_mobile = '#m-karierainfo-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-karierainfo-clanok-topbox1'; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#_et_branding_helper_div').style.right = '30px'; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'podkapotou.zoznam.sk': { divcont2 = '#Podkapotou-Branding'; divclass = '#Podkapotou-Branding'; divcont = '#Podkapotou-Branding'; if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#_et_branding_helper_div').style.right = '100px'; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } else { if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } break; case 'm.podkapotou.zoznam.sk': { divclass_mobile = '#m-podkapotou-clanok-hore'; if (window.location.pathname != '/') { if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#div-gpt-ad-1502890981352-1'; } else { divclass_mobile = '#m-podkapotou-clanok-hore'; } } else { if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#div-gpt-ad-1502890981352-1'; } else { divclass_mobile = '#m-podkapotou-clanok-hore'; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; } } } break; case 'spuntik.zoznam.sk': { divclass = '#Spuntik-Branding'; divcont2 = '#Spuntik-Branding'; divcont = '#Spuntik-Branding'; if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#_et_branding_helper_div').style.right = '100px'; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } else { if (document.querySelector("#etarget_branding_F > a")) { document.querySelector("#etarget_branding_F > a").style.left = "30px"; } } } break; case 'm.spuntik.zoznam.sk': { if (window.location.pathname != '/') { divclass_mobile = '#m-spuntik-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-spuntik-clanok-topbox1'; } } else { divclass_mobile = '#m-spuntik-clanok-hore'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } break; case 'dromedar.zoznam.sk': { divclass = '#Dromedar-branding'; divcont = '#Dromedar-branding'; divcont2 = '#Dromedar-branding'; if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } } break; case 'm.dromedar.zoznam.sk': { if (window.location.pathname != '/') { divclass_mobile = '#div-gpt-ad-1436261138587-0'; } else { divclass_mobile = '#m-dromedar-clanok-hore'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; } } } break; case 'gurman.zoznam.sk': { divclass = '#Gurman-branding'; divcont = '#Gurman-branding'; if (window.location.pathname != '/') { divclass_mobile = '#m-gurman-clanok-hore'; } if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } break; case 'vysetrenie.zoznam.sk': { divclass = '#Vysetrenie-branding'; divcont = '#Vysetrenie-branding'; } break; case 'www.topky.sk': { divclass = '#Topky-Branding-HP'; divcont = 'iframe[id*=Topky-Branding]'; divclass2 = '#Topky-Branding-Spravy'; divcont2 = '#Topky-Branding-Galerie'; divclass_mobile = '#m-topky-titulka'; if (window.innerWidth > 1000) { if (document.querySelector('#etarget_branding_F')) { document.querySelector(divclass).style.width = '1200px'; document.querySelector(divclass).style.margin = '0 auto'; document.querySelector('#_et_branding_helper_div').style.zIndex = 9999; document.querySelector('#etarget_branding_F').style.zIndex = 9999; document.querySelector('#etarget_branding_B').style.zIndex = 9999; document.querySelector('#etarget_branding_A').style.zIndex = 9999; } } if (document.body.clientWidth<=450) { if (window.location.pathname != '/') { divclass_mobile = '#m-topky-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-topky-clanok-topbox1'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#Mobilny-branding-topky-clanok'; } } } else { divclass_mobile = '#m-topky-titulka'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 20; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } } break; case 'm.topky.sk': { if (window.location.pathname != '/') { divclass_mobile = '#m-topky-clanok-hore'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#m-topky-clanok-topbox1'; if (!document.querySelector(divclass_mobile)) { divclass_mobile = '#Mobilny-branding-topky-clanok'; } } } else { divclass_mobile = '#m-topky-clanok-hore'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 20; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } break; case 'www.dnes24.sk': { divclass = '.container.p-0'; divclass_mobile = '#container_5275'; if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 20; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } break; case 'fony.dnes24.sk': { divclass_mobile = '#container_4507'; } break; case 'www.sport7.sk': { divclass_mobile = '#container_4493'; if (window.location.pathname != '/') { divclass_mobile = '#container_4493'; } if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 9999; document.querySelector('#etarget_branding_F > a').style.left = '30px'; } } } break; case 'www.radia.sk': { divclass_mobile = '#container_4937'; } break; case 'www.sdetmi.com': { divclass_mobile = '#container_5308'; } break; case 'www.rodinka.sk': { divclass_mobile = '#container_5290'; } break; case "www.mediaklik.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "www.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "spravy.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "varecha.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "sportweb.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "uzitocna.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "tv.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "flog.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case "koktail.pravda.sk": { divclass2 = ".advert.advert-top"; divclass = "#advert-top-nest"; divcont = "#advert-top-nest"; divclass_mobile = "#div-gpt-ad-1528634504686-625"; } break; case 'www.imeteo.sk': { divclass = '#pageBackdrop'; divcont = '#container_4461'; temp_style = "#etarget_branding_F a {z-index:10} #etarget_branding_A a div {z-index:10}"; divclass_mobile = '#container_4461'; }; break; case 'www.cas.sk': { divclass = '.rs-advertisement-cas-desktop-screen-top'; divcont2 = '#div-gpt-ad-cas-desktop-screen-top'; divcont = '#div-gpt-ad-cas-desktop-screen-top'; divclass2 = '#div-gpt-ad-cas-desktop-screen-top'; divclass_mobile = '#m_mid2'; if (document.querySelector('#etarget_branding_A > a') && (document.body.clientWidth<=450)) { if (document.querySelector('#etarget_branding_F > a') && (document.body.clientWidth<=450)) { document.querySelector('#etarget_branding_F > a').style.zIndex = 20; document.querySelector('#etarget_branding_F > a').style.left = '0px'; } } }; break; case 'ahojmama.pravda.sk': { divclass = '#advert-top-nest'; } break; case 'www.ta3.com': { divclass = '#div-gpt-ad-1621365208291-0'; divcont = '#div-gpt-ad-1621365208291-0'; }; break; case 'www.trend.sk': { divclass = '#gpt-desktopOnlyLeaderboard_top1'; divcont2 = '#gpt-desktopOnlyLeaderboardTop1_top1'; divclass2 = '#gpt-desktopOnlyLeaderboard_top1'; divcont = '#gpt-desktopOnlyLeaderboard_top1'; }; break; case 'www.centrum.sk': { divclass = '#ad-top1-id'; } break; case 'www.etarget.cz': { divclass = '.etarget_branding_wrap'; divcont = '#branding_top'; divclass_mobile = '#mobile_branding_test'; if (document.querySelector('#etarget_branding_A > a') && ((window.location.href.includes('demo')) || (window.location.href.includes('/public_preview')) || (window.location.href.includes('gallery') || window.location.href.includes('gallery/live')) ) ) { if (document.querySelector('#etarget_branding_F > a')) { document.querySelector('#etarget_branding_F > a').style.top = 'unset'; document.querySelector('#etarget_branding_F > a').style.left = '30px'; if(document.querySelector('#mobile_branding_test')){ document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#mobile_branding_test').style.opacity = 0; } else { document.querySelector('#etarget_branding_F > a').style.left = '30px'; let tmpTop = document.querySelector('#centerdiv > div.logo_example.logo_example_mobile').offsetTop + 'px' ; document.querySelector('#etarget_branding_F > a').style.top = tmpTop; document.querySelector('#centerdiv > div.logo_example.logo_example_mobile').style.opacity = 0; } } } } break; case 'www.etarget.sk': { divclass = '.etarget_branding_wrap'; divcont = '#branding_top'; divclass_mobile = '#mobile_branding_test'; if (window.location.href !== 'https://www.etarget.sk/customer/branding_builder.php') { if (document.querySelector('#etarget_branding_A > a') && ((window.location.href.includes('demo')) || (window.location.href.includes('/public_preview')) || (window.location.href.includes('gallery') || window.location.href.includes('gallery/live')) ) ) { if (document.querySelector('#etarget_branding_F > a')) { document.querySelector('#etarget_branding_F > a > div').style.marginLeft = '0px'; document.querySelector('#etarget_branding_F > a').style.left = '30px'; if(document.querySelector('#mobile_branding_test')){ document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#mobile_branding_test').style.opacity = 0; } else { if (window.location.pathname.includes('/public_preview.php')) { if (window.innerWidth > 700) { document.querySelector('#etarget_branding_F > a').style.left = '30px'; document.querySelector('#etarget_branding_F').style.zIndex = 99999; let tmpTop = document.querySelector('#centerdiv > div.logo_example.logo_example_mobile').offsetTop + 'px' ; document.querySelector('#etarget_branding_F > a').style.top = tmpTop; } if (window.innerWidth < 700) { document.querySelector('#centerdiv > div.logo_example.logo_example_mobile').style.opacity = 0; } } } } } } } break; } } setCssForPage() if (getParamName('flexi')) { noads = 'noads'; } debug = JSON.stringify(debug) function getParamName(paramName) { var qs = window.location.search; qs = qs.substring(qs.indexOf("?") + 1) || qs.substring(qs.indexOf("&") + 1); allParams = qs.split("&"); for (var i = 0; i < allParams.length; i++) { keyVal = allParams[i].split("="); if (keyVal[0] == paramName) { return decodeURI(keyVal[1]); } } return ''; } _et_temp_style.innerHTML = temp_style; document.head.appendChild(_et_temp_style); window.addEventListener('mouseover', function (e) { if (_et_body_cx == 0 ||_et_body_sy == 0 || _et_body_cx == 0 || _et_body_cy == 0){ _et_body_sx = e.screenX; _et_body_sy = e.screenY; _et_body_cx = e.clientX; _et_body_cy = e.clientY; } }); function _et_log_call(counter = 0, branding_id = '', page_url = '', w = 0, h = 0, user_agent = '', screen = '', initiator = '', founded = '') { var double = ''; var found = ''; let _et_logo_id = ''; let _et_page = ''; let _et_width = ''; let _et_height = ''; let _et_device = ''; let _et_initiator = ''; let _et_founded = ''; if (counter<0) { if (_et_log_call_not_found) return; _et_log_call_not_found = true; } if ((_et_log_call_not_found) && (counter>0)) double = '&cancelp=1'; if (counter>0) found = '&f=1'; if (counter<0) found = '&f=0'; try{ var etlfound = ''; if (divclass) etlfound = etlfound + (document.querySelector(divclass)?'1':'0'); etlfound = etlfound +','; if (divclass2) etlfound = etlfound + (document.querySelector(divclass2)?'1':'0'); etlfound = etlfound +','; if (divcont) etlfound = etlfound + (document.querySelector(divcont)?'1':'0'); etlfound = etlfound +','; if (divcont2) etlfound = etlfound + (document.querySelector(divcont2)?'1':'0'); etlfound = etlfound +','; if (divclass_mobile) etlfound = etlfound + (document.querySelector(divclass_mobile)?'1':'0'); etlfound = etlfound +','+counter; if (branding_id != '') _et_logo_id = branding_id; if (page_url != '') _et_page = page_url; if (w != 0) _et_width = w; if (h != 0) _et_height = h; if (user_agent != '') _et_user_agent = user_agent; if (screen != '') _et_screen = screen; if (initiator != '') _et_initiator = initiator; if (founded != '') _et_founded = founded; let info = divclass+','+divclass2+','+divcont+','+divcont2+','+divclass_mobile + ' , ' +_et_page; let dimension = _et_width + 'x' +_et_height var etlimg = new Image(); etlimg.crossOrigin = 'Anonymous'; etlimg.src='https://sk.search.etargetnet.com/banner-booster-log.php?ref='+_et_domain+'&elements='+encodeURIComponent(info)+'&found='+encodeURIComponent(etlfound)+double+found + '&banner='+_et_logo_id + '&ua='+_et_user_agent + '&dim=' + dimension + '&screen=' + _et_screen + '&initiator=' + _et_initiator + '&found=' + _et_founded; }catch(e){ if (_et_ourips = '1') console.log(e); } } if(typeof(window._et_brandingFunc)=='undefined'){ window._et_brandingFunc = new Date(); var _et_createMutationObserveCNT = 0; function _et_createMutationObserve(_et_createMutationObserveCNT) { if(divcont3.length>0){ const targetNode = document.querySelector(divcont3); if(targetNode){ const config = { attributes: true, childList: true, subtree: true }; const callback = function(mutationsList, observer) { for(const mutation of mutationsList) { if (mutation.type === 'childList' && mutation.removedNodes.length>0) { _et_removeBranding(); } } }; const observer = new MutationObserver(callback); observer.observe(targetNode, config); }else{ if(_et_createMutationObserveCNT<10){ setTimeout(function(){ _et_createMutationObserve(_et_createMutationObserveCNT++); },1000); } } } } _et_createMutationObserve(_et_createMutationObserveCNT); function _et_removeBranding(){ var bFull = document.getElementById('etarget_branding_F'); var bLeft = document.getElementById('etarget_branding_A'); var bRight = document.getElementById('etarget_branding_B'); var bVideo = document.getElementsByClassName('_et_add_branding_V'); if(bFull){ bFull.parentNode.removeChild(bFull); } if(bLeft){ bLeft.parentNode.removeChild(bLeft); } if(bRight){ bRight.parentNode.removeChild(bRight); } if(bVideo){ if(typeof(bVideo[0])=='object'){ var bv = bVideo[0].parentNode; bv.parentNode.removeChild(bv); } } } if(typeof(noadx)=='undefined'){ var noadx = false; } noadx = 'noads'; var jqcnt = 0; var branddebug = debug; var predebug = branddebug; if (window.location.href.includes('demo')) { window.addEventListener('message', _et_receiveMessage, false); } function _et_brandingCalls(){ try{ top.addEventListener('message', _et_receiveMessage, false); top.addEventListener('load', _et_onResizeChangePosition, false); top.addEventListener('resize', _et_onResizeChangePosition, false); top.addEventListener('scroll', _et_onResizeChangePosition, false); }catch(e){ if (_et_ourips = '1') console.log(e); } } function loadTrack(label){ try{ if(label && scriptid && scriptversion){ var ref = window.location.href; new Image().src='https://sk.search.etargetnet.com/track.php?lb='+label+'&sd='+scriptid+'&sv='+scriptversion+'&rf='+ref; } }catch(e){ if (_et_ourips = '1') console.log(e); } } __etJQCalled = 0; function _et_checkForJquery(){ if(typeof(eQuery)=='undefined' || typeof(e$)=='undefined'){ if(__etJQCalled===0){ __etJQCalled++; var scrpt = document.createElement('script'); scrpt.src = 'https://etargetcdn.com/embed/player/jquery.egqp.min.js'; scrpt.type = 'application/javascript'; scrpt.async = true; document.head.appendChild(scrpt); } setTimeout(function(){ _et_checkForJquery(); },100*(__etJQCalled+1)); }else{ if(typeof(document.body)=='undefined' || document.body===null){ setTimeout(function(){ _et_checkForJquery(); },100*(__etJQCalled+1)); }else{ _et_brandingCalls(); tryInit(); } } } var initcnt = 0; var __etTPCalled = 0; function tryInit(){ if(typeof(eQuery)=='function' || typeof(eQuery)=='object'){ _et_onResizeChangePosition(); }else{ if(initcnt<50){ setTimeout(function(){ initcnt++; tryInit(); },100); } } e$(document).ready(function () { e$(document).on('click','#__et_branding_icon',function(){ if(document.body.clientWidth<=450){ let _et_iframe = document.createElement('iframe') let _et_wrap_iframe = document.createElement('div') _et_iframe.src = 'https://sk.search.etargetnet.com/frontend/logos/sk/14286/670/index.html' _et_iframe.id = '_et_testerMobile' _et_iframe.width = '300' _et_iframe.height = '0' _et_iframe.style.zIndex = '1000' _et_wrap_iframe.id = '_et_wrap_iframe' _et_wrap_iframe.width = '300'; _et_wrap_iframe.height = '0'; let _et_help_div = e$(document).find('#_et_branding_helper_div') _et_help_div.parent().append(_et_wrap_iframe) let _et_wrap_tmp = e$(document).find('#_et_wrap_iframe') _et_wrap_tmp.append(_et_iframe) } else { var bprev = document.createElement('script'); bprev.src = 'https://sk.search.etargetnet.com/ajax/branding-preview.js'; document.body.appendChild(bprev); } }); if (window.location.href == 'https://www.etarget.sk/customer/branding_builder.php') { var bprev = document.createElement('script'); bprev.src = 'https://sk.search.etargetnet.com/ajax/branding-preview.js'; document.body.appendChild(bprev); } }) } var shownData = []; var dataReceived = []; function _et_receiveMessage(e, m) { if(typeof(eQuery)=='function' && typeof(e$)=='function'){ if(e){ if(typeof(e.data)=='string'){ if(e.data.indexOf('etargetnet.com')>0 || e.data.indexOf('etarget.sk')>0 || e.data.indexOf('etarget.cz')>0){ _et_show_helper(1); if(e.data.indexOf('parallax')>=0){ var _et_parallax_box = e$(document).find('#_et_parallax_box'); if(_et_parallax_box.length==0){ _et_createParallaxAtPosition(e.data); } } if(e.data.indexOf('__et_build_expand')>=0){ var _et_expand_box = e$(document).find('._et_exp_wrap'); if(_et_expand_box.length==0){ _et_createExpandAtPosition(e.data); } } if(e.data.indexOf('_et_add_branding_A')>=0) { var _et_left_box = e$(document).find('#etarget_branding_A'); if(_et_left_box.length==0) { _et_createStyleCommon(); if(e.data.indexOf('33514/361/image_left.')>=0) { _et_createBoxAtPosition('left',e.data.replace('image_left.','image_left.jpg'),e); } else { _et_createBoxAtPosition('left',e.data,e); } branddebug.uchoa = e.data; branddebug.screen = window.screen; branddebug.size = e$(document).width()+'x'+e$(document).height(); var basedebug = btoa(JSON.stringify(branddebug)); new Image().src='https://sk.search.etargetnet.com/branding-common-debug.php?pid=2&data='+encodeURIComponent(basedebug); }else{ _et_show_helper(3); } } if(e.data.indexOf('_et_add_branding_B')>=0){ var _et_right_box = e$(document).find('#etarget_branding_B'); if(_et_right_box.length==0){ _et_createBoxAtPosition('right',e.data,e); } } if(e.data.indexOf('_et_add_branding_F')>=0){ var _et_full_box = e$(document).find('#etarget_branding_F'); if(_et_full_box.length==0){ _et_createBoxAtPosition('full',e.data,e); } } if(e.data.indexOf('_et_add_branding_V')>=0){ var _et_right_box = e$(document).find('#etarget_branding_V'); if(_et_right_box.length==0){ _et_createViedoAtPosition('video',e.data); } } if(e.data.indexOf('_et_inject_above')>=0){ var edata = JSON.parse(e.data); if(typeof(edata.replaceWhat)=='string' && typeof(edata.replaceWith)=='string'){ if(edata.replaceWhat && edata.replaceWith && edata.replaceType){ var src = edata.replaceWith; var type = edata.replaceType; if(src.length>0 && type.length>0){ src = src.replace('http://','https://'); if(src.indexOf('?')==-1){ src = src+'?popup=1'; }else{ src = src+'&popup=1'; } src = src+'&clickTag='+encodeURIComponent(edata.clickTag); switch(type){ case 'expand-banner-900x250': var cont = document.createElement('div'); cont.className = '_et_popup_cont'; var script = document.createElement('script'); script.src = src; script.type = 'text/javascript'; cont.appendChild(script); var wrap = document.createElement('div'); wrap.className = '_et_popup_wrap'; wrap.style.cssText = 'display:none;'; wrap.appendChild(cont); var ww = e$(window).width(); var wh = e$(window).height(); if(ww>=900 && wh>=500){ var dw = Math.round((ww-900)/2); var dh = Math.round((wh-500)/2); var style = document.createElement('style'); style.innerHTML = style.innerHTML+'._et_popup_wrap{width:100%; height:100%; top:0px; left:0px; position:fixed; z-index:9; background-color:rgba(0,0,0,0.6)}'; style.innerHTML = style.innerHTML+'._et_popup_cont{width:900px; height:500px; position:fixed; left:'+dw+'px; top:'+dh+'px}'; style.innerHTML = style.innerHTML+'._et_popup_crea{width:300px; height:250px; position:relative; top:0px; left:0px;}'; document.head.appendChild(style); document.body.appendChild(wrap); e$(wrap).fadeIn(); setTimeout(function(){ var clen = e$(document).find('._et_popup_wrap ._et_exp_wrap').html(); if(!clen){ e$(wrap).fadeOut(); }else if(clen){ if(clen.length<1000){ e$(wrap).fadeOut(); } } },1000); } break; } } } } } } }else{ if (typeof (e.data) == 'object') { if(typeof(e.data.banner)!='undefined'){ var banner = e.data.banner; var side = ''; var sign = ''; var _et_box = false; if(banner.length>10){ if(banner.indexOf('_mobile')>0){ if(banner.indexOf('_et_add_branding_A')>0){ side = 'left_mobile'; sign = 'A'; } if(banner.indexOf('_et_add_branding_F')>0){ side = 'top_mobile'; sign = 'F'; } if(side.length>0 && sign.length>0){ var hash = window.btoa(banner); if(!dataReceived[hash]){ _et_createMobileBoxAtPosition(sign,banner,e); dataReceived[hash] = 1; } } } else { _et_createStyleCommon(); if(banner.indexOf('_et_add_branding_A')>0){ side = 'left'; sign = 'A'; } if(banner.indexOf('_et_add_branding_B')>0){ side = 'right'; sign = 'B'; } if(banner.indexOf('_et_add_branding_F')>0){ side = 'full'; sign = 'F'; } if(banner.indexOf('_et_add_branding_V')>0 && banner.indexOf('video')>0 && banner.indexOf('source')>0){ side = 'video'; sign = 'V'; } if(side.length>0 && sign.length>0){ _et_show_helper(2); _et_box = e$(document).find('#etarget_branding_'+sign); if(_et_box.length==0){ if(side=='video'){ _et_createViedoAtPosition(side,banner); }else{ _et_createBoxAtPosition(side,banner,e); } _et_box = e$(document).find('#etarget_branding_'+sign); if(typeof(e.data.pixels)=='object' && _et_box.length>0){ for(var k in e.data.pixels){ var pixel = e.data.pixels[k]; if(typeof(pixel)=='object'){ var ptype = pixel.type; var pval = pixel.val; if(ptype.length>0 && pval.length>0){ switch(ptype){ case 'url-js': case 'code-js':{ var pscrpt = document.createElement('script'); if(ptype=='url-js'){ pscrpt.type='text/javascript'; pscrpt.src = pval; } if(ptype=='code-js'){ pscrpt.innerHTML = pval; } setTimeout(function(){ document.getElementById('etarget_branding_'+sign).appendChild(pscrpt); },500); }; break; case 'url-img':{ var pimg = document.createElement('img'); pimg.width = 1; pimg.height = 1; pimg.src = pval; setTimeout(function(){ document.getElementById('etarget_branding_'+sign).appendChild(pimg); },500); }; break; } } } } } } } if(banner.indexOf('_et_parallax_box')>0){ var parent = document.querySelector('.parallax_wrap'); var pframe = parent.getElementsByTagName('iframe'); if(parent && pframe.length>0){ pframe[0].parentNode.appendChild(banner); pframe[0].style.display = 'none'; } } } } } if(typeof(e.data.params)!='undefined'){ window._et_receiveMessageParams = e.data.params; } if(typeof(e.data.url)!='undefined'){ let _et_page = window.location.href let _et_desktop_w = window.innerWidth let _et_desktop_h = window.innerHeight let _et_found = 1; let banner_id = ''; let _et_device = navigator.userAgent.split(' ') _et_device = _et_device[0] + ' ' + _et_device[1] + _et_device[2] + ' ' + _et_device[_et_device.length - 2] + ' ' + _et_device[_et_device.length - 1] if(e.data.url.length>10 && e.data.url.indexOf('etarget')>0){ if(e.data.url.indexOf('.js')>0){ var sh64 = window.btoa(e.data.url); if(shownData.indexOf(sh64)==-1){ shownData.push(sh64); var postScript = document.createElement('script'); banner_id = e.data.url; postScript.src = e.data.url; document.body.appendChild(postScript); if(typeof(e.data.clean) && e.data.clean>0){ setTimeout(function(){ if(shownData.indexOf(sh64)!=-1){ shownData.splice(shownData.indexOf(sh64),1); } },e.data.clean*1000); } } } _et_log_call(1, banner_id, _et_page, _et_desktop_w, _et_desktop_h, _et_device, 'action', 'postmessage', _et_found) } } if (((e.data.tp !== "undefined") || (e.data.tp !== undefined)) && (typeof (e.data.tp) == "string")) { if (e.data.tp.indexOf('.') != -1) { var _et_expandedImg = new Image(); _et_expandedImg.crossOrigin = "Anonymous"; _et_expandedImg.src = e.data.tp; } } } } } }else{ if (_et_ourips = '1') console.log('noJquery'); } setCssForPage() if (window.innerWidth > 1000) { if (e.data) { if (typeof(e.data.banner) == 'string') { if (e.data.banner.includes('image_right.jpg')) { counterPost += 1 let bannerData = e.data.banner.split(' ') let bannerSrc = bannerData.filter(item => item.includes('src')) bannerID.push(bannerSrc[0].split('frontend/logos/')[1].split('/image_right.jpg')[0]) if (bannerID.length == 4) { let _et_found; if (document.querySelector('#etarget_branding_B > a')) { banner_id = document.querySelector('#etarget_branding_B > a > div > img').src banner_id = banner_id.split('logos/')[1].split('/image_right.jpg')[0] _et_found = 1 } else { let tmp_banner_id = bannerID[0].split('sk/')[1].split('/') banner_id = 'sk/' + '-' + tmp_banner_id[0] + '/' + '-' + tmp_banner_id[1] _et_found = 0 } let _et_page = window.location.href let _et_desktop_w = window.innerWidth let _et_desktop_h = window.innerHeight let _et_device = navigator.userAgent.split(' ') _et_device = _et_device[0] + ' ' + _et_device[1] + _et_device[2] + ' ' + _et_device[_et_device.length - 2] + ' ' + _et_device[_et_device.length - 1] _et_log_call(1, banner_id, _et_page, _et_desktop_w, _et_desktop_h, _et_device, 'desktop', 'postmessage', _et_found) } } } } } if (window.innerWidth < 600) { if (e.data) { if (typeof(e.data.banner) == 'string') { if (e.data.banner.includes('image_left_mobile')) { let bannerData = e.data.banner.split(' ') let bannerSrc; if (!window.location.href.includes('www.etarget.sk')) { bannerSrc = bannerData.filter(item => item.includes('frontend/logos/')) mobilBannerID.push(bannerSrc[0].split('frontend/logos/')[1].split('/image_left_mobile')[0]) } if (mobilBannerID.length == 2) { let banner_id; let _et_found; setTimeout(()=>{ if (document.querySelector('#etarget_branding_A > a')) { if (document.querySelector('#etarget_branding_F > a')) { banner_id = document.querySelector('#etarget_branding_F > a > div > img').src banner_id = banner_id.split('logos/')[1].split('/image_top_mobile')[0] } else { banner_id = document.querySelector('#etarget_branding_A > a > div').style.backgroundImage.split('logos/')[1].split('/image_left_mobile')[0] } _et_found = 1 } else { let tmp_banner_id = mobilBannerID[0].split('sk/')[1].split('/') banner_id = 'sk/' + '-' + tmp_banner_id[0] + '/' + '-' + tmp_banner_id[1] _et_found = 0 } let _et_page = window.location.href let _et_desktop_w = window.innerWidth let _et_desktop_h = window.innerHeight let _et_device = navigator.userAgent.split(' ') _et_device = _et_device[0] + ' ' + _et_device[1] + _et_device[2] + ' ' + _et_device[_et_device.length - 2] + ' ' + _et_device[_et_device.length - 1] _et_log_call(1, banner_id, _et_page, _et_desktop_w, _et_desktop_h, _et_device, 'mobile', 'postmessage', _et_found) },5000) } } } } } } function _et_calc_scale_factor(width, screen) { return +(screen / width).toFixed(2) } function _et_calc_margin(height, scale_v) { return ((height*scale_v)-height) } function _et_checkWidth(div,obj){ var width = (obj.find('img'))[0].naturalWidth; if(width>0){ div.css({width:width}); _et_onResizeChangePosition(); } } var _et_createViedoAtPositionInserted = false; var _et_createViedoAtPositionInsertedCNT = 0; var _et_playerOW = ''; function _et_createViedoAtPosition(p,d,inside){ if(!_et_createViedoAtPositionInserted || !!inside){ _et_createViedoAtPositionInserted = true; var obj = e$(d); var topcont = _et_findTop(); if(!topcont){ _et_createViedoAtPositionInsertedCNT++; if(_et_createViedoAtPositionInsertedCNT<10){ setTimeout(function(){ _et_createViedoAtPosition(p,d,true); },500); } } else { var parent = topcont; var ph = 160; var pw = parseInt((ph/9)*16); _et_playerOW = pw; if (window.location.href.includes('www1.pluska.sk')) { if (document.querySelector('#etarget_branding_F')) { var _et_edit_with = document.querySelector('#etarget_branding_F').clientWidth var _et_value = ph / (1200 / _et_edit_with) obj.css({top:20,left:30}); obj.find('#branding_video').css({width:pw+'px',height:_et_value+'px',backgroundColor:'transparent'}); } } else { obj.css({top:20,left:30}); obj.find('#branding_video').css({width:pw+'px',height:ph+'px',backgroundColor:'transparent'}); } setTimeout(function(){ obj.find('._et_add_branding_V').fadeIn(300); },1000); parent.append(obj); if(typeof(parent[0])!='undefined'){ parent[0].addEventListener('mouseover', _et_videoOver, false); parent[0].addEventListener('mouseout', _et_videoOut, false); parent.find('.branding_video_mute')[0].addEventListener('click', _et_videoMute, false); } _et_videoMute(true); setTimeout(function(){ _et_videoPlay(); if (window.location.href.includes('www1.pluska.sk')) { if (document.querySelector('#etarget_branding_F')) { document.querySelector('#etarget_branding_F > a:nth-child(2) > div > div').style.right = '20px'; } } },200); } } } var _et_playerScaled = false; var _et_wontOut = false; function _et_videoOver(){ _et_wontOut = false; if(!_et_playerScaled){ _et_playerScaled = true; var player = e$(document).find('#branding_video'); var pw = player.width(); var nw = pw*2; var nh = parseInt((nw / 16) * 9); if (window.location.href.includes('www1.pluska.sk')) { if (document.querySelector('#etarget_branding_F')) { var _et_edit_with = document.querySelector('#etarget_branding_F').clientWidth var _et_value = nh / (1200 / _et_edit_with) player.stop().animate({ width: nw, height: _et_value + 'px' }, 500); document.querySelector('#etarget_branding_F > a:nth-child(2) > div > div').style.right = '20px'; } } else { player.stop().animate({width:nw,height:nh},500); } } } function _et_videoOut(){ _et_wontOut = true; setTimeout(function(){ if(_et_playerScaled && _et_wontOut){ var player = e$(document).find('#branding_video'); var nw = _et_playerOW; var nh = parseInt((nw / 16) * 9); if (window.location.href.includes('www1.pluska.sk')) { if (document.querySelector('#etarget_branding_F')) { var _et_edit_with = document.querySelector('#etarget_branding_F').clientWidth var _et_value = nh / (1200 / _et_edit_with) player.stop().animate({width:nw,height:_et_value + 'px' },200,function(){ _et_playerScaled = false; }); document.querySelector('#etarget_branding_F > a:nth-child(2) > div > div').style.right = '20px'; } } else { player.stop().animate({width:nw,height:nh},200,function(){ _et_playerScaled = false; }); } } },200); } function _et_videoPlay(){ var player = e$(document).find('#branding_video')[0]; if(typeof(player)=='object' && player!=null){ player.play(); } } function _et_videoMute(mute){ var player = e$(document).find('#branding_video')[0]; if(typeof(player)=='object' && player!=null && mute){ player.muted = true; } if(mute!==true){ var muteObj = e$(player).parent().find('.branding_video_mute'); var muted = muteObj.hasClass('muted'); if(muted){ muteObj.css({backgroundPosition:'top center'}); muteObj.removeClass('muted'); player.muted = false; }else{ muteObj.css({backgroundPosition:'bottom center'}); muteObj.addClass('muted'); player.muted = true; } return false; } } function _et_addBoxpixel(side,banner,e){ _et_box = e$(document).find('#etarget_branding_'+sign); if(typeof(e.data.pixels)=='object' && _et_box.length>0){ for(var k in e.data.pixels){ var pixel = e.data.pixels[k]; if(typeof(pixel)=='object'){ var ptype = pixel.type; var pval = pixel.val; if(ptype.length>0 && pval.length>0){ switch(ptype){ case 'url-js': case 'code-js':{ var pscrpt = document.createElement('script'); if(ptype=='url-js'){ pscrpt.type='text/javascript'; pscrpt.src = pval; } if(ptype=='code-js'){ pscrpt.innerHTML = pval; } setTimeout(function(){ document.getElementById('etarget_branding_'+sign).appendChild(pscrpt); },500); }; break; case 'url-img':{ var pimg = document.createElement('img'); pimg.width = 1; pimg.height = 1; pimg.src = pval; setTimeout(function(){ document.getElementById('etarget_branding_'+sign).appendChild(pimg); },500); }; break; } } } } } } function _et_createMobileBoxHelpFunc(frame, side, banner, doc, wrap){ wrap.id = 'etarget_branding_'+side; if(frame != null){ if(side=='A'){ var vstrip = e$(banner); vstrip.find('._et_add_branding_A').css({height:'900px'}); e$(wrap).append(vstrip); e$(doc).ready(function(){ e$(doc).find('body').css({'margin-left':'30px'}); e$(doc).find('body').append(e$(wrap)); }); } if(side=='F'){ e$(doc).ready(function(){ setTimeout(function(){ var top; if (window.location.href.includes('gallery/?demo') || window.location.pathname.includes('/public_preview.php')){ top = e$(frame).parent().offset(); } else { top = e$(frame).offset(); } _et_show_helper(5); e$(frame).parent().css({minHeight:'250px',display:'flex',flexDirection:'column'}); var fbanner = e$(banner); e$(wrap).append(fbanner); e$(doc).find('body').append(e$(wrap)); e$(fbanner).css({top:top.top,display:'flex'}); e$(fbanner).animate({opacity:1},200); },200); e$(window).on('resize',function(){ _et_show_helper(6); _et_placeMobileTopBranding(); _et_placeMobileLeftBranding(); }); e$(doc).on('scroll',function(){ _et_show_helper(7); _et_placeMobileTopBranding(); _et_placeMobileLeftBranding(); }); }); } } else { setTimeout(function(){ if (_et_ourips == '1') { console.log('volam timeout function') } if (window.location.pathname.includes('/gallery') || window.location.pathname.includes('/gallery/live')) { frame = document.querySelector('#gallery_wrap_iframe').contentDocument.querySelector('#_et_branding_helper_div') if (frame != null) { _et_createMobileBoxHelpFunc(frame, side, banner, doc, wrap) } else { _et_createMobileBoxAtPosition(side,banner) } } else { frame = document.querySelector('#_et_branding_helper_div') if (frame != null) { _et_createMobileBoxHelpFunc(frame, side, banner, doc, wrap) } else { _et_createMobileBoxAtPosition(side,banner) } } },200); } } function _et_createMobileBoxAtPosition(side,banner){ try { if (window.location.hostname == 'www.etarget.sk') { if (window.location.pathname.includes('/public_preview.php')){ let document2 = window.top.document.querySelector('#mobile_branding_iframe').contentWindow.document let frame = document.querySelector('#_et_branding_helper_div'); let wrap = window.top.document.createElement('div'); _et_createMobileBoxHelpFunc(frame, side, banner, document2, wrap) } if (window.location.pathname.includes('/gallery') || window.location.pathname.includes('/gallery/live')) { if (document.querySelector('#gallery_wrap_iframe')) { let doc = document.querySelector('#gallery_wrap_iframe'); let frame = document.querySelector('#gallery_wrap_iframe').contentDocument.querySelector('#_et_branding_helper_div') let document2 = doc.contentWindow.document; let wrap = doc.contentWindow.document.createElement('div') if (frame == null) { const iframe_test = document.querySelector('#gallery_wrap_iframe'); iframe_test.addEventListener('load', function () { const contentDoc = iframe_test.contentDocument; frame = contentDoc.querySelector('#_et_branding_helper_div'); }); } _et_createMobileBoxHelpFunc(frame, side, banner, document2, wrap) } } } else { if(e$(document).find('#etarget_branding_'+side).length>0){ return false; } _et_show_helper(4); let frame = document.getElementById('_et_branding_helper_div'); let wrap = document.createElement('div'); _et_createMobileBoxHelpFunc(frame, side, banner, document, wrap) } } catch(e) { if (_et_ourips == '1') console.log(e) } } function _et_placeMobileLeftHelp(rect, doc) { let top = Math.round(parseFloat(rect.y)); let diff = 900-top + 5; if(top>=0){ if(top>900){ diff = 0; } e$(doc).find('._et_add_branding_A').css({'background-position':'left 0px top -'+diff+'px'}); }else{ e$(doc).find('._et_add_branding_A').css({'background-position':'left 0px top 0px'}); } } function _et_placeMobileLeftBranding(){ try{ if (window.location.hostname == 'www.etarget.sk'){ if (window.location.pathname.includes('gallery/live')) { let tmp_frame = document.querySelector('iframe'); let rect = e$(tmp_frame.contentWindow.document).find('#_et_branding_helper_div')[0].getBoundingClientRect(); _et_placeMobileLeftHelp(rect, tmp_frame.contentWindow.document) } else if (window.location.pathname.includes('/gallery')) { let tmp_frame = document.querySelector('iframe'); let rect = tmp_frame.contentWindow.document.querySelector('#_et_branding_helper_div').parentNode.getBoundingClientRect(); _et_placeMobileLeftHelp(rect, tmp_frame.contentWindow.document) } if (window.location.pathname.includes('/public_preview.php')){ let frame = document.querySelector('#_et_branding_helper_div'); let rect = frame.getBoundingClientRect(); _et_placeMobileLeftHelp(rect, document) } } else { let frame = e$(document).find('#_et_branding_helper_div')[0]; let rect = frame.getBoundingClientRect(); _et_placeMobileLeftHelp(rect, document) } }catch(e){ if (_et_ourips == '1') console.log(e); } } function _et_placeMobileTopBranding(){ try{ var top; var frame; if (window.location.href.includes('demo') == false) { frame = e$(document).find('#_et_branding_helper_div'); if (frame.parent().offset()) { top = frame.parent().offset() } else { top = frame.offset() } } if (window.location.hostname == 'www.etarget.sk'){ if (window.location.pathname == '/public_preview.php') { e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if (window.location.pathname.includes('gallery/live')) { let tmp = document.querySelector('iframe'); top = e$(tmp.contentWindow.document).find('#_et_branding_helper_div').offset() top.top = top.top - 5 e$(tmp.contentWindow.document).find('._et_add_branding_F').parent().css({top:top.top}); if(window.location.href.includes('mobile_preview')) { e$(tmp.contentWindow.document).find('iframe').css({display:'none'}) } } else if (window.location.pathname.includes('/gallery')) { let tmp = document.querySelector('iframe'); top = e$(tmp.contentWindow.document).find('#_et_branding_helper_div').parent().offset() top.top = top.top - 5 e$(tmp.contentWindow.document).find('._et_add_branding_F').parent().css({top:top.top}); } else { top.top = top.top + 5 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } } else { if (window.location.hostname.includes('dnes24.sk')) { top.top = top.top - 7 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } if (window.location.hostname.includes('imeteo.sk')) { top.top = top.top - 5 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } if (window.location.hostname == 'magazin.pluska.sk') { top.top = top.top - 70 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if (window.location.hostname == 'wanda.pluska.sk') { top.top = top.top - 50 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if (window.location.hostname == 'dobrejedlo.pluska.sk'){ top.top = top.top - 50 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if (window.location.hostname == 'zena.pluska.sk'){ top.top = top.top - 120 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if (window.location.hostname.includes('zoznam.sk')) { top.top = top.top - 6 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else if( window.location.hostname.includes('cas.sk')) { top.top = top.top + 7 e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } else { e$(document).find('._et_add_branding_F').parent().css({top:top.top}); } } }catch(e){ if (_et_ourips == '1') {console.log(e)}; } } var checkWidthInterval = false; function _et_createBoxAtPosition(p,d,e){ var obj = e$(d); var prnt = _et_findWrap(); var div = e$('
'); div.append(obj); var sign = 'B'; if(p=='left'){ sign = 'A'; } if(!prnt){ if(sign=='A'){ _et_pripomienka('ucho'); } return; } if(p=='full'){ sign = 'F'; var iframe; if (window.location.href.includes('gallery/live')) { iframe = e$(document).find('#_etarget_desktop_live') } else { iframe = e$(document).find('#hbBrandingTopFrame'); } var pobj = prnt; if(iframe.length==0 && typeof(pobj)=='object' && pobj!=null){ iframe = e$(document).find('.html5frame'); if(pobj.attr('id') && iframe){ if(pobj.attr('id').indexOf('logo_example')>-1){ var iwidthmax = pobj.width(); if(iwidthmax==970){ pobj.css({width:1200,textAlign:'center'}); } } } } if(iframe.length==0 && typeof(pobj)=='object' && pobj!=null && (divcont.length>0 || divcont2.length>0)){ iframe = _et_divcont(); } if(typeof(iframe)=='object' && iframe!=null && iframe.length>0){ var ipos = iframe.position(); var iwidth = iframe.width(); var iheight = iframe.height(); if(typeof(pobj)=='object' && pobj!=null){ var iwidthmax = pobj.width(); var iheightmax = pobj.height(); var ileft = (iwidthmax-iwidth)/2; var src = d.match(/= 1200) { _et_createStyle(iwidth,iwidthmax,iheight,iheightmax,ileft); }else{ return; } } } }else{ _et_pripomienka('top'); return; } } div.attr('id','etarget_branding_'+sign).addClass('brand_'+p); div.attr('aria-label',VERSION); if(sign=='F'){ div.css({'opacity':1}); prnt.append(div); setTimeout(function(){ if(typeof(e.source)=='object'){ _et_send_branding('_et_branding_in_fullscreen',e.source); } div.addClass('fullscreen'); },300); return; } if(sign=='A'){ div.css({left:-420}); if(typeof(branddebug)=='object'){ branddebug.uchoa = obj; branddebug.screen = window.screen; branddebug.size = e$(document).width()+'x'+e$(document).height(); var basedebug = btoa(JSON.stringify(branddebug)); new Image().src='https://sk.search.etargetnet.com/branding-common-debug.php?pid=2&data='+encodeURIComponent(basedebug); } } if(sign=='B'){ var dw = e$(document).width(); div.css({left:dw+420}); } div.css({position:'fixed'}); e$(document.body).append(div); _et_onResizeChangePosition(); setTimeout(function(){ _et_checkWidth(div,obj); },500); } function _et_divcont(){ var iframe = e$(document).find(divcont); if(iframe.length===0){ iframe = e$(document).find(divcont2); } return iframe; } function _et_createParallaxAtPosition(data){ if(parallaxclass.length>0){ var wrap = e$(document).find(parallaxclass); if(wrap.length>0){ wrap.html(data); } } } function _et_createExpandAtPosition(data){ var scrpt = document.createElement('script'); var sonload = e$(data)[0].getAttribute('onload'); var tmt = parseInt(e$(data)[0].getAttribute('posttimeout')); sonload = sonload.replace('#TMT#',tmt) scrpt.src = e$(data)[0].src; scrpt.setAttribute('onload',sonload); document.body.appendChild(scrpt); } function _et_send_branding(ban,source){ if(source){ try{ source.postMessage(ban,'*'); }catch(e){ if (_et_ourips = '1') console.log(e); } }else{ try{ window.postMessage(ban,'*'); }catch(e){ if (_et_ourips = '1') console.log(e); } try{ parent.postMessage(ban,'*'); }catch(e){ if (_et_ourips = '1') console.log(e); } try{ top.postMessage(ban,'*'); }catch(e){ if (_et_ourips = '1') console.log(e); } } } function getMeta(url,iwidth,pwidth,iheight,pheight){ e$('',{ load : function(){ var ewidth = this.width; var eheight = this.height; if(ewidth>=iwidth && pwidth>=iwidth && (eheight<=pheight || pheight==0)){ var eleft = (ewidth-pwidth)/2; var ileft = (pwidth-iwidth)/2; if(pwidth>ewidth){ eleft = (pwidth-ewidth)/2; } var uwidth = Math.round(pwidth/ewidth*100); if(uwidth<100){ ewidth = pwidth; } else { _et_createStyle(iwidth,ewidth,iheight,eheight,ileft,eleft,uwidth); } }else{ if(document.location.href.indexOf('public_preview.php')>0){ e$(document).find('#_et_branding_helper_div').css({width:iwidth+'px'}); e$(document).find('.logo_example').css({width:iwidth+'px'}); } _et_createStyle(iwidth,ewidth,iheight,eheight,ileft,eleft,uwidth); } }, src : url }); } function _et_createStyleCommon(){ var style = e$('