var ltv_red_anly_loaded=1;document.addEventListener('DOMContentLoaded',function(){document.addEventListener('click',function(e){if(e.target.tagName==='A'||e.target.parentElement&&e.target.parentElement.tagName==='A'){var target=e.target.tagName==='A'?e.target:e.target.parentElement;if(target.href.startsWith(window.location.origin+'/go/')||target.href.startsWith(window.location.origin+ltv_red_anly.lang+'/go/')||target.href.startsWith('https://bestgmblchoice.com/')){console.log('Click on the partner link detected');if(typeof ltv_check_ab_popup==='function'&&ltv_check_ab_popup(target.href)){return;}
if(typeof gtag!=='undefined'){e.preventDefault();console.log('Preventing default actions...');var url=new URL(target.href),params=new URLSearchParams(url.search),gtag_exec=false;gtag('get',ltv_red_anly.g_id,'client_id',function(cid){gtag_exec=true;console.log('Executing a GTAG event...');params.append('cid',cid);params.append('source',window.location.href);url.search=params.toString();console.log('Opening url');if(target.target=='_blank'){if(typeof ltv_adblock_detect_js==='function'){ltv_adblock_detect_js(e,url.href);}else{window.open(url.href,'_blank');}}else{window.open(url.href);}});setTimeout(function(){if(!gtag_exec){console.log('GTAG event was not executed, opening origin url');if(target.target=='_blank'){if(typeof ltv_adblock_detect_js==='function'){ltv_adblock_detect_js(e,url.href);}else{window.open(url.href,'_blank');}}else{window.open(url.href);}}},200);}}}});});
var ab_used='no';function slideUp(element,duration,removeAttr){var start=performance.now();var initialHeight=element.offsetHeight;var targetHeight=0;function animate(time){var currentTime=time-start;var progress=currentTime/duration;var height=initialHeight*(1-progress);if(height<=targetHeight){element.style.height=targetHeight+'px';element.style.display='none';element.style.overflow=null;if(removeAttr){element.removeAttribute('style');}
return;}
element.style.height=height+'px';requestAnimationFrame(animate);}
element.style.display='block';element.style.overflow='hidden';requestAnimationFrame(animate);}
function slideDown(element,duration,removeAttr){var start=performance.now();var targetHeight=element.scrollHeight;var initialHeight=0;function animate(time){var currentTime=time-start;var progress=currentTime/duration;var height=targetHeight*progress;if(height>=targetHeight){element.style.height=null;element.style.overflow=null;if(removeAttr){element.removeAttribute('style');}
return;}
element.style.height=height+'px';requestAnimationFrame(animate);}
element.style.display='block';element.style.overflow='hidden';element.style.height=initialHeight+'px';requestAnimationFrame(animate);}
function fadeOut(el,removeAttr){el.style.opacity=1;(function fade(){el.style.display="block";if((el.style.opacity-=.1)<=0){el.style.display="none";if(removeAttr){el.removeAttribute('style');}}else{requestAnimationFrame(fade);}})();};function fadeIn(el,removeAttr){el.style.opacity=0;el.style.display="block";(function fade(){var val=parseFloat(el.style.opacity);if(!((val+=.1)>1)){el.style.opacity=val;requestAnimationFrame(fade);}else if(removeAttr){el.removeAttribute('style');}})();};function encodeDataAB(data){return Object.keys(data).map(function(key){return[key,data[key]].map(encodeURIComponent).join("=");}).join("&");}
function ltv_perfmon_log_adblock(status,url=''){if(url===''){url=window.location.pathname}
var data={'action':'ltv_perfmon_adblock_ajax','url':url,'status':status,};var XHRAdBlockLog=new XMLHttpRequest();XHRAdBlockLog.open('POST',ezf_var.ajaxurl,true);XHRAdBlockLog.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');XHRAdBlockLog.send(encodeDataAB(data));}
function ltv_adblock_detect_js(e,url=''){var tOut=800;given_url=url?url:e.target.href;if(given_url.includes('target=proxy')){tOut=4000;}
var tab=window.open(given_url,'_blank');setTimeout(function(){if(tab.closed){var the_url=new URL(given_url).pathname+new URL(given_url).search;if(tab.window&&tab.was_redirected){console.log('Redirect was blocked by an ad blocker.');ltv_perfmon_log_adblock(1,the_url);}else if(tab.window&&typeof tab.was_redirected==='undefined'){console.log('The link was likely blocked by an ad blocker.');ltv_perfmon_log_adblock(1,the_url);}}},tOut);}
function ltv_check_ab_popup(url=''){if(typeof ltv_ab_pop_vars=='undefined'){return false;}
if(typeof ab_popup_load!=='undefined'&&ab_used==='yes'&&url.includes('target=proxy')){if(ltv_ab_pop_vars.blist.some(function(str){return url.includes(str);})){return true;}}
return false;}
document.addEventListener('DOMContentLoaded',function(){var $body=document.body,$headerArea=$body.querySelector('.ltv-header-main'),$headerSpacing=$body.querySelector('.ltv-header-spacing'),$searchFrm=document.getElementById('h-search-frm'),$searchBtn=$headerArea.querySelector('.h-search-btn'),$searchInput=$headerArea.querySelector('.h-search-input'),$searchInputTxt=document.getElementById('search-input-txt'),$mainNav=$headerArea.querySelector('.ltv-nav-main'),$langSwitcherDesk=$headerArea.querySelector('.ltv-lang-switcher.desk'),$langSwitcherMob=$headerArea.querySelector('.ltv-lang-switcher.mob'),$navOverlay=$body.querySelector('.ltv-nav-overlay'),$navMainOverlay=$body.querySelector('.ltv-nav-main-overlay'),$searchCloseBtn=$headerArea.querySelector('.h-search-close-btn'),$mobileMenuBtn=$headerArea.querySelector('.h-mobile-nav-btn'),$mobileMenuBtnClickable=$mobileMenuBtn.querySelector('button'),$ScrollTop=$body.querySelector('.ltv-scroll-top'),$SecMenuBtn=$headerArea.querySelector('.ltv-sm-ham'),$SecMenuMob=$headerArea.querySelector('.ltv-sm-menu.mob'),$SecMenu=$body.querySelector('.ltv-secondary-menu'),$HeaderBonus=$headerArea.querySelector('.h-bonus');$body.addEventListener('click',function(e){if(e.target.tagName==='A'||e.target.parentElement&&e.target.parentElement.tagName==='A'){var target=e.target.tagName==='A'?e.target:e.target.parentElement;if(target.target=='_blank'&&target.href.includes('/go/')){if(ltv_check_ab_popup(target.href)){e.preventDefault();document.querySelector('html').classList.add('ltv_adblock_pop_active');ab_popup_last_link=target.href;if(typeof gtag!=='undefined'){gtag('event','Viewed',{'event_category':'AdBlock Popup'});}}else{if(typeof ltv_red_anly_loaded=='undefined'){e.preventDefault();ltv_adblock_detect_js(e,target.href);}}}}});var $splitView=$body.querySelector('.ltv-split-view'),$sideContainer=$body.querySelector('.side-container');function get_height(el){if(el){return parseFloat(getComputedStyle(el,null).height.replace('px',''));}else{return 0;}}
function ltv_search_action(){if($searchInputTxt.value!==''&&$searchInputTxt.value.length>=3){location.replace(LTV.search_link+encodeURI($searchInputTxt.value.toLowerCase())+'/');}else{$searchInputTxt.focus();}}
function check_ltv_scroll_top(){if(window.scrollY>200){$ScrollTop.classList.add('show');}else{$ScrollTop.classList.remove('show');}}
function ltv_reposition(){var sec_menu=$body.querySelector('.ltv-secondary-menu'),Head_banner=$body.querySelector('.ltv-head-banner.mode-sticky'),Main_nav_inner=$mainNav.querySelector('.ltv-nav-main-inner');if(window.scrollY>1){var do_scroll=false;$headerArea.classList.add('sticky');var head_h=70;if(sec_menu){sec_menu.classList.add('sticky');if($SecMenuBtn.classList.contains('cross')){head_h+=40;}}
if(Head_banner&&screen.height>=500){var head_banner_height=parseInt(get_height(Head_banner));if($body.classList.contains('admin-bar')&&!Head_banner.classList.contains('sticky')){if(sec_menu&&window.innerWidth>600){head_banner_height+=32;}}
if(!Head_banner.classList.contains('sticky')){if(window.scrollY<10){do_scroll=true;}
Head_banner.classList.add('sticky');}
head_h+=head_banner_height;$headerArea.style.top=head_banner_height+'px';if(window.innerWidth>=1200){if(sec_menu){sec_menu.style.top=head_banner_height+70+'px';}
$mainNav.removeAttribute('style');Main_nav_inner.removeAttribute('style');}else{$mainNav.style.top=head_banner_height+70+'px';Main_nav_inner.style.paddingBottom=head_banner_height+70+'px';}
if($body.classList.contains('admin-bar')){head_h-=32;}}else if(Head_banner){Head_banner.classList.remove('sticky');$headerArea.removeAttribute('style');$mainNav.removeAttribute('style');Main_nav_inner.removeAttribute('style');}
$headerSpacing.style.height=head_h+'px';if(do_scroll){document.scrollingElement.scrollTop=2;}}else{$headerArea.classList.remove('sticky');$headerSpacing.removeAttribute('style');if(sec_menu){sec_menu.classList.remove('sticky');}
if(Head_banner){Head_banner.classList.remove('sticky');$headerArea.removeAttribute('style');$mainNav.removeAttribute('style');Main_nav_inner.removeAttribute('style');}}}
function outerHeight(el){var height=el.offsetHeight;var style=getComputedStyle(el);height+=parseFloat(style.marginTop)+parseFloat(style.marginBottom);return height;}
function ltv_maybe_close_mobile_menu(){if(window.innerWidth>1199){if($mobileMenuBtn.classList.contains('opened')){$mobileMenuBtnClickable.click();}}else{if($SecMenuBtn&&$SecMenuBtn.classList.contains('cross')){$SecMenuBtn.classList.remove('cross');var sec_menu=$body.querySelector('.ltv-secondary-menu');if(sec_menu){sec_menu.style.display='none';}}}
if(window.innerWidth>767&&$langSwitcherDesk){if($langSwitcherDesk.classList.contains('hidden')&&!$searchFrm.classList.contains('expanded')){$langSwitcherDesk.classList.remove('hidden')
$langSwitcherDesk.removeAttribute('style');}}}
function ltv_check_side_container(){if(window.innerWidth>1199&&$splitView){var side_wrap=$splitView.querySelector('.side-container .wrap');if(side_wrap){var totalHeight=get_height(side_wrap);if(totalHeight==0){child_el=side_wrap.children;Array.prototype.forEach.call(child_el,function(el,i){totalHeight=totalHeight+outerHeight(el);});}else{totalHeight=totalHeight+parseInt(getComputedStyle($splitView.querySelector('.side-container'))['top'],10);}
if(totalHeight>get_height($splitView)){$splitView.style.minHeight=totalHeight+parseInt(getComputedStyle($splitView.querySelector('.side-container'))['top'],10)+55+'px';}}}}
function scrollToTop(duration){if(document.scrollingElement.scrollTop===0)return;const cosParameter=document.scrollingElement.scrollTop/2;let scrollCount=0,oldTimestamp=null;function step(newTimestamp){if(oldTimestamp!==null){scrollCount+=Math.PI*(newTimestamp-oldTimestamp)/duration;if(scrollCount>=Math.PI)return document.scrollingElement.scrollTop=0;document.scrollingElement.scrollTop=cosParameter+cosParameter*Math.cos(scrollCount);}
oldTimestamp=newTimestamp;window.requestAnimationFrame(step);}
window.requestAnimationFrame(step);}
if($splitView&&$sideContainer){var $sideContainerWrap=$sideContainer.querySelector('.wrap .ltv-floating-partners'),$sideContainerParentWrap=$splitView.querySelector('.fp-parent'),sideContainerTopOffset=getComputedStyle($sideContainer)['top']?parseInt(getComputedStyle($sideContainer)['top']):0;if((get_height($sideContainerWrap)+sideContainerTopOffset+get_height($sideContainerParentWrap)+40)>get_height($splitView)){$splitView.style.minHeight=(get_height($sideContainerWrap)+get_height($sideContainerParentWrap)+110)+'px';}}
$mobileMenuBtnClickable.addEventListener('click',function(e){e.preventDefault();var Head_banner=$body.querySelector('.ltv-head-banner.mode-sticky');if($mobileMenuBtn.classList.contains('opened')){$mobileMenuBtn.classList.remove('opened');$mainNav.classList.remove('opened');var openend_menus=$mainNav.querySelectorAll('.submenu-opened');if(openend_menus){openend_menus.forEach((item)=>{item.classList.remove('submenu-opened');});}
$body.classList.remove('mobile-nav-opened');fadeOut($navOverlay,true);$navOverlay.classList.remove('visible');if(Head_banner){ltv_reposition();}}else{$mobileMenuBtn.classList.add('opened');$mainNav.classList.add('opened');$body.classList.add('mobile-nav-opened');fadeIn($navOverlay,true);$navOverlay.classList.add('visible');if(Head_banner){ltv_reposition();}}
if($langSwitcherMob&&$langSwitcherMob.classList.contains('opened')){$langSwitcherMob.classList.remove('opened');}
$headerArea.classList.remove('lang-sw-mob-opened');});if($langSwitcherMob){var reg_switcher=$langSwitcherMob.querySelector('.ltv-ls-switch');if(reg_switcher){reg_switcher.addEventListener('click',function(e){e.preventDefault();if($langSwitcherMob.classList.contains('opened')){$langSwitcherMob.classList.remove('opened');$headerArea.classList.remove('lang-sw-mob-opened');}else{$langSwitcherMob.classList.add('opened');$headerArea.classList.add('lang-sw-mob-opened');$mainNav.scroll({top:0,left:0,behavior:'smooth'});}});}
$langSwitcherMob.querySelector('.back').addEventListener('click',function(e){e.preventDefault();if($langSwitcherMob.classList.contains('opened')){$langSwitcherMob.classList.remove('opened');$headerArea.classList.remove('lang-sw-mob-opened');}});}
function ltv_submenu_expand(e){if(window.innerWidth<1200){if(e.target.classList.contains('ltv-submenu-expand-btn')||e.target.classList.contains('ltv-menu-link')){var $thisBtn=e.target,$navItem=$thisBtn.parentNode.parentNode;if($thisBtn.getAttribute('href')=='javascript:'){e.preventDefault();if($navItem.classList.contains('submenu-opened')){slideUp($navItem.querySelector('.sub-menu'),300,true);$navItem.classList.remove('submenu-opened');var child_sub_menu=$navItem.querySelector('.submenu-opened');if(child_sub_menu){child_sub_menu.classList.remove('submenu-opened');}}else{$navItem.classList.add('submenu-opened');slideDown($navItem.querySelector('.sub-menu'),300,true);}}}}}
$mainNav.querySelector('div > ul').addEventListener('click',ltv_submenu_expand);if($SecMenuMob)$SecMenuMob.querySelector('div > ul').addEventListener('click',ltv_submenu_expand);$searchBtn.addEventListener('click',function(e){e.preventDefault();$mainNav.removeAttribute('style');if($searchInput.classList.contains('hidden')){if($HeaderBonus&&$HeaderBonus.classList.contains('active')){var HeaderBannerClose_x=$HeaderBonus.querySelector('.close-x');if(HeaderBannerClose_x){HeaderBannerClose_x.click();}}
$searchFrm.classList.add('expanded');$searchBtn.classList.add('opened');$searchInput.classList.remove('hidden');if(window.innerWidth>1199){fadeOut($mainNav,true);}
$mainNav.classList.add('hidden');if($langSwitcherDesk){$langSwitcherDesk.classList.add('hidden');if(window.innerWidth>767){fadeOut($langSwitcherDesk,true);}}
if(navigator.userAgent.indexOf('iPhone')>-1){$searchInputTxt.classList.add('large');}
$searchInputTxt.focus();$searchInputTxt.setAttribute('value','');}else{$searchFrm.requestSubmit();}});$navMainOverlay.addEventListener('click',function(e){if($mobileMenuBtn.classList.contains('opened')){$mobileMenuBtnClickable.click();}});$searchFrm.addEventListener('submit',function(e){e.preventDefault();ltv_search_action();});function Search_input_validate(e){e.target.setCustomValidity('');if($searchInputTxt.value!==''&&$searchInputTxt.value.length<3){$searchInputTxt.setCustomValidity(LTV.search_too_short.replace('%s',3));}}
$searchInputTxt.addEventListener('invalid',function(e){Search_input_validate(e);});$searchInputTxt.addEventListener('input',function(e){Search_input_validate(e);});$searchCloseBtn.addEventListener('click',function(e){$mainNav.removeAttribute('style');if(!$searchInput.classList.contains('hidden')){$searchInput.classList.add('hidden');$searchBtn.classList.remove('opened');$searchFrm.classList.remove('expanded');if(window.innerWidth>1199){fadeIn($mainNav,true);}
$mainNav.classList.remove('hidden');if($langSwitcherDesk&&window.innerWidth>767){$langSwitcherDesk.classList.remove('hidden');fadeIn($langSwitcherDesk,true);}
$searchInputTxt.value='';}});if(window.scrollY>1){ltv_reposition();$headerArea.classList.add('sticky');if($SecMenu){$SecMenu.classList.add('sticky');}}else{$headerArea.classList.remove('sticky');if($SecMenu){$SecMenu.classList.remove('sticky');}}
check_ltv_scroll_top();$ScrollTop.addEventListener('click',function(e){e.preventDefault();scrollToTop(500);});var waitForFinalEvent=(function(){var timers={};return function(callback,ms,uniqueId){if(!uniqueId){uniqueId="Don't call this twice without a uniqueId";}
if(timers[uniqueId]){clearTimeout(timers[uniqueId]);}
timers[uniqueId]=setTimeout(callback,ms);};})();if($SecMenuBtn){$SecMenuBtn.addEventListener('click',function(e){var sec_menu=$body.querySelector('.ltv-secondary-menu');if(this.classList.contains('cross')&&sec_menu.style.overflow!=='hidden'){this.classList.remove('cross');slideUp(sec_menu,200);}else if(sec_menu.style.display==='none'||sec_menu.style.display===''){this.classList.add('cross');var Head_banner=$body.querySelector('.ltv-head-banner');if(Head_banner&&Head_banner.classList.contains('sticky')){var head_banner_height=parseInt(get_height(Head_banner));sec_menu.style.top=head_banner_height+70+'px';}else{sec_menu.style.top='';}
sec_menu.style.display='block';slideDown(sec_menu,200);}});}
ltv_check_side_container();var yt_vid_wrappers=$body.querySelectorAll('.ltv-video-wrapper.yt');if(yt_vid_wrappers){yt_vid_wrappers.forEach((vid)=>{var a_tag=vid.querySelector('A'),img=document.createElement('img');img.alt='';img.src='https://img.youtube.com/vi/'+a_tag.getAttribute('data-ytid')+'/maxresdefault.jpg';img.width='1280';img.height='720';a_tag.appendChild(img);img.addEventListener('load',function(){if(img.naturalWidth===120&&img.naturalHeight===90){img.src='https://img.youtube.com/vi/'+a_tag.getAttribute('data-ytid')+'/mqdefault.jpg';img.width='320';img.height='180';}});vid.addEventListener('click',function(e){e.preventDefault();var frame=vid.querySelector('iframe');frame.setAttribute('src',frame.getAttribute('data-ytsrc'));a_tag.remove();});});}
var ltv_third_party_allowed=null;function ltv_check_third_party_cookie(){function wb_check_destroy(){ltv_lazy_load_iframe();document.getElementById('wb_set_cookie').remove();document.getElementById('wb_check_cookie').remove();clearInterval(window.cookie_check_interval);}
function ltv_check_cookies(){WIMB.detect.cookies_third_party.trigger_set_cookie();window.cookie_check_interval=setInterval(function(){if(WIMB.detect.cookies_third_party.enabled()==true){ltv_third_party_allowed=true;wb_check_destroy();}
else if(WIMB.detect.cookies_third_party.enabled()==false){ltv_third_party_allowed=false;wb_check_destroy();}},50);setTimeout(function(){if(ltv_third_party_allowed===2){ltv_third_party_allowed=false;}
clearInterval(window.cookie_check_interval);},5000);}
if(ltv_third_party_allowed===null){ltv_third_party_allowed=2;var js=document.createElement('script');js.type='text/javascript';js.src=window.location.origin+'/wp-content/themes/ltv/assets/lib/whatismybrowser/whatismybrowser.js';js.onload=ltv_check_cookies;$body.appendChild(js);}}
function ltv_lazy_load_iframe(){ltv_iframes.forEach((frame)=>{if(!frame.classList.contains('lazyloaded')&&frame.getAttribute('data-src')){var position=frame.getBoundingClientRect();if(position.top-100<window.innerHeight&&position.bottom+100>=0){if(frame.getAttribute('data-src').startsWith('https://www.sofascore')){if(ltv_third_party_allowed===null){ltv_check_third_party_cookie();return;}else if(ltv_third_party_allowed===false){frame.remove();return;}else if(ltv_third_party_allowed!==true){return;}}
frame.setAttribute('src',frame.getAttribute('data-src'));frame.removeAttribute('data-src');frame.classList.add('lazyloaded');}}});}
var ltv_iframes=$body.querySelectorAll('iframe');if(ltv_iframes.length>0){ltv_lazy_load_iframe();}
if(document.getElementById('URWvqovRQVAi8')){}else{ab_used='yes';ltv_perfmon_log_adblock(1);}
if(typeof gtag!=='undefined'){gtag('event','Blocking Ads',{'event_category':'Blocking Ads','event_label':ab_used});}
window.addEventListener('scroll',function(){ltv_reposition();check_ltv_scroll_top();if(ltv_iframes.length>0){ltv_lazy_load_iframe();}});window.addEventListener('resize',function(){ltv_reposition();check_ltv_scroll_top();waitForFinalEvent(function(){ltv_maybe_close_mobile_menu();ltv_check_side_container();},50,"ltv-after-resize");if(ltv_iframes.length>0){ltv_lazy_load_iframe();}});});if(LTV&&LTV.sw&&LTV.sw==='1'){if('serviceWorker'in navigator&&'PushManager'in window){navigator.serviceWorker.register('/sw.js').then(function(swReg){swRegistration=swReg;}).catch(function(error){console.error('Service Worker Error',error);});}else{console.warn('Push messaging is not supported');}};
document.addEventListener('DOMContentLoaded',function(){var ltv_cookie_pop=document.getElementById('ltv-pop-cookie');function set_ltv_cookie_pop_cookie(value){var d=new Date;d.setTime(d.getTime()+24*60*60*1000*ltv_cookie_pop_vars.cookie_time);document.cookie="ltv_pop_cookie_notice"+"="+value+";path=/;expires="+d.toGMTString();}
function get_ltv_cookie_pop_cookie(){var v=document.cookie.match('(^|;) ?'+"ltv_pop_cookie_notice"+'=([^;]*)(;|$)');return v?v[2]:null;}
function ltv_cookie_grant_set(value){var d=new Date;d.setTime(d.getTime()+24*60*60*1000*ltv_cookie_pop_vars.cookie_time);value=JSON.stringify(value);document.cookie="cookie_consentGranted"+"="+value+";path=/;expires="+d.toGMTString();}
if(!get_ltv_cookie_pop_cookie()){ltv_cookie_pop.classList.add('active');document.body.classList.add('ltv-pop-cookie-active');if(typeof gtag!=='undefined'){gtag('event','Viewed',{'event_category':'Cookies Notice'});}
ltv_cookie_pop.querySelector('.accept').addEventListener('click',function(){set_ltv_cookie_pop_cookie(true);ltv_cookie_pop.classList.remove('active');document.body.classList.remove('ltv-pop-cookie-active');var grants={'security_storage':'granted','ad_user_data':'granted','ad_personalization':'granted','ad_storage':'granted','analytics_storage':'granted','functionality_storage':'granted','personalization_storage':'granted',};ltv_cookie_grant_set(grants);if(typeof gtag!=='undefined'){gtag('consent','update',grants);gtag('event','Accepted',{'event_category':'Cookies Notice'});}
if(typeof Position_Footer_Banner==='function'){Position_Footer_Banner(0);}},false);var more_btn=ltv_cookie_pop.querySelector('.more');if(more_btn){more_btn.addEventListener('click',function(){if(typeof gtag!=='undefined'){gtag('event','Read more',{'event_category':'Cookies Notice'});}},false);}
ltv_cookie_pop.querySelector('.close').addEventListener('click',function(){set_ltv_cookie_pop_cookie(true);ltv_cookie_pop.classList.remove('active');document.body.classList.remove('ltv-pop-cookie-active');if(typeof gtag!=='undefined'){gtag('event','Closed',{'event_category':'Cookies Notice'});}
if(typeof Position_Footer_Banner==='function'){Position_Footer_Banner(0);}},false);}},false);
document.addEventListener('DOMContentLoaded',function(){var age_check_pop=document.querySelector('.ltv_pop_age_check');function set_ltv_entry_pop_cookie(value){var d=new Date;d.setTime(d.getTime()+24*60*60*1000*ltv_entry_pop_vars.cookie_time);document.cookie="ltv_pop_site_entry_"+ltv_entry_pop_vars.last_mod+"="+value+";path=/;expires="+d.toGMTString();}
function get_ltv_pop_cookie(name){var v=document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');return v?v[2]:null;}
function ltv_site_entry_close(html_tag,type){html_tag.classList.remove('ltv-pop-entry-active');set_ltv_entry_pop_cookie(type);if(typeof gtag!=='undefined'){gtag('event','Closed',{'event_category':'Entry Popup'});}}
if(!age_check_pop||(age_check_pop&&(get_ltv_pop_cookie('ltv_pop_age_check')&&get_ltv_pop_cookie('ltv_pop_age_check')!=='no'))){if(document.getElementById('ltv-cookie-banner')&&!get_ltv_pop_cookie('cookie_consentGranted')){return;}
if(!get_ltv_pop_cookie('ltv_pop_site_entry_'+ltv_entry_pop_vars.last_mod)){var LTVSite_entry_auto_opened=false;['click','scroll','mousemove','touchstart'].forEach(function(e){window.addEventListener(e,function(){if(!LTVSite_entry_auto_opened){LTVSite_entry_auto_opened=true;setTimeout(function(){var html_tag=document.querySelector('html');if(html_tag.classList.contains('ltv_adblock_pop_active')){LTVSite_entry_auto_opened=false;return;}
document.querySelector('.ltv_pop_site_entry .close-x').addEventListener('click',function(){ltv_site_entry_close(html_tag,'closed-x');},false);document.querySelector('.ltv_pop_site_entry_overlay').addEventListener('click',function(e){if(e.target.classList.contains('ltv_pop_site_entry_overlay')){ltv_site_entry_close(html_tag,'closed-overlay');}},false);document.querySelector('.ltv_pop_site_entry_overlay').addEventListener('touchend',function(e){if(e.target.classList.contains('ltv_pop_site_entry_overlay')){ltv_site_entry_close(html_tag,'closed-overlay-swiped');}},false);Array.prototype.forEach.call(document.querySelectorAll('.ltv_pop_site_entry a'),function(item){item.addEventListener('click',function(){set_ltv_entry_pop_cookie('clicked-link');if(typeof gtag!=='undefined'){gtag('event','Affiliate Click',{'event_category':'Entry Popup'});}},false);});html_tag.classList.add('ltv-pop-entry-active');document.activeElement.blur();if(typeof gtag!=='undefined'){gtag('event','Viewed',{'event_category':'Entry Popup'});}},ltv_entry_pop_vars.seconds*1000);}},{once:true});});}}},false);
document.addEventListener('DOMContentLoaded',function(){var h_bonus_main=document.querySelector('.h-bonus'),h_bonus_i=h_bonus_main.querySelector('.h-bonus > button'),h_pop_cont=h_bonus_main.querySelector('.h-bonus-popup'),h_bonus_cross=h_pop_cont.querySelector('.close-x'),h_bonus_aut_opened=0,event_cat_mod='',h_bonus_active=0;if(h_bonus_main.dataset.auto){event_cat_mod=' - Auto Open';}
function set_ltv_h_bonus_pop_cookie(value){var d=new Date;d.setTime(d.getTime()+24*60*60*1000*1);document.cookie="ltv_pop_h_bonus"+"="+value+";path=/;expires="+d.toGMTString();}
function get_ltv_pop_cookie(name){var v=document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');return v?v[2]:null;}
function h_bonus_close(){h_bonus_main.classList.remove('active');h_bonus_active=0;if(typeof gtag!=='undefined'){gtag('event','Closed',{'event_category':'Gift Icon'+event_cat_mod,'event_label':h_bonus_main.dataset.label});}}
function h_bonus_opener(){if(typeof gtag!=='undefined'){gtag('event','Click',{'event_category':'Gift Icon'+event_cat_mod,'event_label':h_bonus_main.dataset.label});}
if(h_bonus_active){h_bonus_close();}else{h_bonus_main.classList.add('active');h_bonus_main.classList.remove('anim');h_bonus_active=1;if(typeof gtag!=='undefined'){gtag('event','Viewed',{'event_category':'Gift Icon'+event_cat_mod,'event_label':h_bonus_main.dataset.label});}}}
h_pop_cont.addEventListener('click',function(e){if(e.target.tagName==='A'&&typeof gtag!=='undefined'){gtag('event','Affiliate Click',{'event_category':'Gift Icon'+event_cat_mod,'event_label':h_bonus_main.dataset.label});}});h_bonus_main.addEventListener('click',function(e){if(e.target!==this)return;h_bonus_opener();});h_bonus_i.addEventListener('click',function(){h_bonus_opener();});h_bonus_cross.addEventListener('click',function(){set_ltv_h_bonus_pop_cookie(true);h_bonus_close();});var h_bonus_cookie=get_ltv_pop_cookie('ltv_pop_h_bonus');if((!h_bonus_cookie||h_bonus_cookie==0)){h_bonus_main.classList.add('anim');if(h_bonus_main.dataset.auto){var go_on=true;if(document.querySelector('.ltv_pop_age_check')&&get_ltv_pop_cookie('ltv_pop_age_check')!=='yes'){go_on=false;}
if(document.getElementById('ltv-cookie-banner')&&!get_ltv_pop_cookie('cookie_consentGranted')){go_on=false;}
if(typeof ltv_entry_pop_vars!=='undefined'&&!get_ltv_pop_cookie('ltv_pop_site_entry_'+ltv_entry_pop_vars.last_mod)){go_on=false;}
if(h_bonus_main.dataset.auto==2){if(h_bonus_cookie===null){go_on=false;set_ltv_h_bonus_pop_cookie(0);}}
if(go_on){var LTVGift_auto_opened=false;['click','scroll','mousemove','touchstart'].forEach(function(e){window.addEventListener(e,function(){if(!LTVGift_auto_opened){LTVGift_auto_opened=true;setTimeout(function(){var HeaderSearchBtn=document.body.querySelector('.ltv-header-main .h-search-btn');if(HeaderSearchBtn&&HeaderSearchBtn.classList.contains('opened')){return;}
if(!h_bonus_active){h_bonus_main.classList.add('active');h_bonus_main.classList.remove('anim');h_bonus_active=1;h_bonus_aut_opened=1;if(typeof gtag!=='undefined'){gtag('event','Viewed',{'event_category':'Gift Icon'+event_cat_mod,'event_label':h_bonus_main.dataset.label});}}},1*1000);}},{once:true});});}}}});