/*================
 Move top slot on mWeb
==================*/
!function(){try{var e="a";Math.random()>0.5&&(e="b");var t,a,n=serverAdsOnPageLite.top.adUnitCode;if(-1==n.indexOf("mweb"))return;a=document.getElementById("top"),-1!=n.indexOf("local_home")&&0==document.getElementsByClassName("minutecast-banner").length&&((t=document.getElementsByClassName("weather-card")[0]).appendChild(a),a.style.padding="0 0 20px 0px"),-1!=n.indexOf("hourly-p")?(t=document.getElementsByClassName("hourly-wrapper")[0]).insertBefore(a,t.firstChild):-1!=n.indexOf("hourly")&&(t=document.getElementsByClassName("hourly-card-top")[0]).parentNode.insertBefore(a,t.nextSibling);var d=function(e,t){e.parentNode.insertBefore(t,e.nextSibling),t.style.background="#ffffff",t.style.margin="0",t.style.padding="0 0 12px 0"};if(-1!=n.indexOf("extended-p"))(t=document.getElementsByClassName("page-content")[0]).insertBefore(a,t.firstChild);else if(-1!=n.indexOf("extended")){d(document.getElementsByClassName("daily-forecast-card")[0],a);for(var l=document.getElementsByClassName("glacier-ad middle"),r=0;r<l.length;r++)d(l[r].previousElementSibling.getElementsByClassName("daily-forecast-card")[0],l[r])}if(-1!=n.indexOf("extended")){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");s.appendChild(i),i.type="text/css",i.appendChild(document.createTextNode(".half-day-card-content{background: hsla(0,0%,100%,.55)} .daily-forecast-card {background: #ffffff}"))}}catch(f){}}();

/*================
 Connatix - 4d1da129cb6a4a748d6e48ade9a68b62df85ee0a-00ac-4645-9bcd-11f400206bc9
==================*/

(function(){
	
	const adUnit = '/6581/web/eur/video_player/news_info/news', ctxDiv = document.getElementById('connatix');
	window.cnx || (window.cnx = {}, window.cnx.cmd = []);
	window.cnxps || (window.cnxps = {}, window.cnxps.cmd = []);
	let ctxLoaded = false, lazyLoad = true, target = false, gptWait = false, isFloating = false, isLive = false;
	
	if (typeof(ctxDiv) == 'undefined' || ctxDiv == null){return;}
	try{
		if (window.adInfo.lang.indexOf('en') == -1){
			ctxDiv.remove();
			return;
		}
	} catch (e){}
	
	const ctxPlayers = {
		us_stories:{
			playerid:'a1269c0e-7ffc-4ea1-8d91-119f7e241a0a',
			scriptid:'05e6421b8f0942c2be851fde8f6af77d',
			token:'a1269c0e-7ffc-4ea1-8d91-119f7e241a0a&cid=1ffde2b1-eb53-11e9-b4d2-06948452ae1a'
		},
		row_stories:{
			playerid:'7867040f-a574-4590-ade1-df06b7a312d9',
			scriptid:'3b31895c79214d278e02f66086b1ff9b',
			token:'7867040f-a574-4590-ade1-df06b7a312d9&cid=1ffde2b1-eb53-11e9-b4d2-06948452ae1a'
		},
		livestream:{
			playerid:'9c7af1f7-9467-4eeb-8867-bbb70c2c99e8',
			scriptid:'d83c097772784202897e70ef6d96950d',
			token:'9c7af1f7-9467-4eeb-8867-bbb70c2c99e8&cid=1ffde2b1-eb53-11e9-b4d2-06948452ae1a'
		},
		us_floating:{
			playerid:'ec448104-7d88-4281-b699-e3cbf1a5a27d',
			scriptid:'dc0012fb11e6489894256fe98e45a938',
			token:'ec448104-7d88-4281-b699-e3cbf1a5a27d&cid=1ffde2b1-eb53-11e9-b4d2-06948452ae1a'
		}
	};
	
	function getPPS(ad){try{let t=ad.iabctax,e=ad.iabatax,i=[],n=[];if(t){t=t.split(",");for(let a=0;a<t.length;a++)-1==t[a].indexOf("IAB")&&i.push(t[a])}if(e){e=e.split(",");for(let l=0;l<e.length;l++)-1==e[l].indexOf("IAB")&&n.push(e[l])}return btoa(JSON.stringify({PublisherProvidedTaxonomySignals:[{taxonomy:"IAB_CONTENT_2_2",values:i},{taxonomy:"IAB_AUDIENCE_1_1",values:n}]}))}catch(o){return"";}};
	function getPPID(pb){try{let e=pb.getConfig().userSync.userIds;for(let r=0,t=e.length;r<t;r++)if("pubProvidedId"==e[r].name)return e[r].params.eids[0].uids[0].id;return""}catch(n){return"";}};
	function getAdUnit(au){let t=au;return(t=t.split("/"))[4]="preroll",t.join("/");};
	function getPlatform(au){return au.split("/")[2];};
	function getGeo(au){try {return au.split("/")[3]} catch (e){return"";}};
	function getPage(au){try {return au.split("/")[6]} catch (e){return"";}};
	function getAdVelvet(ad){try{return ad.advelvet}catch(t){return"";}};
	function getCustomAdUnit(au){try{let e=au;return e=(e=e.replace("/6581/","")).replace("/video_player/","/-/")}catch(t){return"";}};
	function getGDPR(){try{if(window.isUserCountryEEA)return 1;return 0}catch(r){return 0}};
	function getIsLive(au){
		const ET = new Date().toLocaleString("en-US", {timeZone: 'America/New_York'});
		const H = new Date(ET).getHours();
		if (au.indexOf('/web/us/video_player/news_info/country_home') != -1 && H > 5 && H < 11){
			return true;
		}
		if (location.hash.indexOf('livestream') != -1){
			return true;
		} 		
		return false;
		
	};
	//function getAdInfo(ad){try{const p=[];for (const key in ad){p.push(`${encodeURIComponent(key)}%3D${encodeURIComponent(ad[key])}`);}return p.join('%26');} catch (e) {return ""}}
	
	isLive = getIsLive(adUnit);
	let player = ctxPlayers.row_stories;
	try{
		if (window.userData && window.userData.countryCode && window.userData.countryCode.toLowerCase() == 'us'){
			player = ctxPlayers.us_stories;
		}
	} catch (e){}
	const adUnitsParts = adUnit.split('/');
	
	switch (adUnitsParts[6]) {
		case 'country_home':
			if (isLive){
				target = document.getElementsByClassName("base-map-cta")[0];
			} else {
				ctxDiv.remove();
				return;
			}
			break;
		case 'video_wall': 
			ctxDiv.remove();
			return;
		case 'extended': 
			target = document.getElementsByClassName("daily-wrapper")[1];
			break;
		case 'hourly': 
			if (adUnitsParts[2] == 'web'){
				//target = document.getElementsByClassName("accordion-item")[2];
				//isFloating = true;
			}
			break;
		case 'daily': 
			if (adUnitsParts[2] == 'web'){
				//target = document.getElementsByClassName("native")[0];
				//isFloating = true;
			}
			break;
		case 'local_home': 
			target = document.getElementsByClassName("sunrise-sunset")[0];
			break;
	}
	
	switch (adUnitsParts[3]) {
		case 'us':
			lazyLoad = false;
			player = ctxPlayers.us_stories;
			if (isLive){
				isFloating = true;
				player = ctxPlayers.livestream;
			} else if (adUnitsParts[2] == 'web' && adUnitsParts[6] == 'extended') {
				isFloating = true;
				//player = ctxPlayers.us_floating;
			}
			break;
		case 'gb': 
			if (adUnitsParts[2] == 'web' && adUnitsParts[6] == 'extended') {
				lazyLoad = false;
				//isFloating = true;
			}
			break;
		case 'ca': 
			if (adUnitsParts[2] == 'web' && adUnitsParts[6] == 'extended') {
				lazyLoad = false;
				//isFloating = true;
			}
			break;
		case 'in':
		case 'afr': 
		case 'asi':
		case 'mea':
		case 'ant':
		case 'arc':
		case 'cac':
		case 'br':
		case 'ru':
		case 'sam':
			ctxDiv.remove();
			return;
	}
	
	try {
		if (target){
			target.parentNode.insertBefore(ctxDiv, target);
		}
    } catch (e) {}
	
	const floating = {
		mode:2, //Off=0, OnPageLoad=1, AfterInView=2, Always=3
		closeButton:1, //Off=0, AlwaysOn=1, AfterFirstAd=2
		closeButtonLocation:1, //Inside=0, Outside=1
		devices:0, //Desktop=0, Smartphone=1, Tablet=2, Other=3
		fixedPosition:0, //Page=0, Element=1
		floatingPageElement:'',
		floatingAppendLocation:0, //Above = 0, Below = 1, Within = 2
		hasFloatingTransition:true,
		scrollPosition:0, // BottomRight=0, BottomLeft=1, TopRight=2, TopLeft=3
		floatingGutterX:30,
		floatingGutterY:30,
		floatingWidth:400
	}
	
	         
    const settings = {
        queryJsTargeting:{
        	awPlatform:getPlatform(adUnit),
			awGeo:getGeo(adUnit),
			awPage:getPage(adUnit),
			awAdvelvet:getAdVelvet(window.adInfo),
			awFloating:isFloating
        },
		advertising: {
            macros: {
                awIU:getAdUnit(adUnit),
                awPPID:getPPID(window.pbjs),
				awGDPR:getGDPR(),
				//awAdInfo:getAdInfo(window.adInfo),
				awPPS:getPPS(window.adInfo),
                awUPR:2
            }
        },
		customization :{
			floating:{}
		}
    };
	
	if (isLive){
		settings.disableAdvertising = true;
	}
	
	if (isFloating){
		settings.customization.floating = floating;
	}
	
	function loadCtx(){
		if (ctxLoaded){
			return;
		}
		ctxLoaded = true;
		/*const ctxScript = document.getElementById('elements-player-script');
		if (typeof(ctxScript) == 'undefined' || ctxScript == null){
			!function(e) {
			    var t = e.createElement("iframe");
			    t.src = "javascript:false", t.display = "none", t.onload = function() {
			        var e = t.contentWindow.document,
			            n = e.createElement("script");
			        n.src = "//cd.connatix.com/connatix.player.js?cid=1ffde2b1-eb53-11e9-b4d2-06948452ae1a", n.setAttribute("defer", "1"), n.setAttribute("type", "text/javascript"), e.body.appendChild(n)
			    }, e.head.appendChild(t)
			}(document);
		}*/
		
		const s = document.createElement("script");
		s.id = player.scriptid;
		const code = "(new Image()).src = 'https://capi.connatix.com/tr/si?token="+player.token+"'; cnx.cmd.push(function() {cnx({playerId:\""+player.playerid+"\",customParam1:\""+getCustomAdUnit(adUnit)+"\",customParam2:\"\",customParam3:\""+window.adInfo.userid3p+"\",customParam4:\"\",customParam5:\""+window.adInfo.partner+"\",settings:" + JSON.stringify(settings) + "}).render(\""+player.scriptid+"\");});";
	
	    try {
	      s.appendChild(document.createTextNode(code));
	    } catch (e) {
	      s.text = code;
	    }
		ctxDiv.appendChild(s);
	}
	
	if (!('IntersectionObserver' in window) ||
        !('IntersectionObserverEntry' in window) ||
        !('intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
			lazyLoad = false;
    }
	
	if (lazyLoad){
        let ctxObserver = new IntersectionObserver(
            (entries, observer) => {
                entries.forEach(entry => {
                    if (entry.isIntersecting) {
						loadCtx();
                        observer.unobserve(entry.target);
                    }
                });
            },{ rootMargin: "0px 0px 500px 0px"});
        ctxObserver.observe(ctxDiv);
	} else if (gptWait) {
		try{
			window.googletag.cmd.push(() => {
				const onSlotRenderEndedCtx = (event) => {
					window.googletag.pubads().removeEventListener("slotRenderEnded", onSlotRenderEndedCtx);
					loadCtx();
				};
				window.googletag.pubads().addEventListener("slotRenderEnded", onSlotRenderEndedCtx);
			});
		} catch (e){
			loadCtx();
		}
	} else {
		loadCtx();
	}
	
})();


                                                         
/*=========
REVCONTENT
=========*/
                                                         
!function(){let e=["radar","search","country_home","admin_home","world_home","map","air_quality","snow","satellite","weather/lightning","wind"],t={elementId:"rc-widget-50cf01",widgetId:"271054",className:"revcontent content-module"},r="/6581/web/eur/video_player/news_info/news",a={elementId:"rc-widget-50cf01",widgetId:"276997",className:"revcontent content-module"};for(let s=0,i=e.length;s<i;s++)if(-1!=r.indexOf(e[s])){a=t;break}try{let n=r.split("/")[3];"276997"==a.widgetId&&!1==["us","gb","au","ie","za","ca"].includes(n)&&(a.widgetId="277516")}catch(d){}let l=document.createElement("div");l.setAttribute("style","margin:0 auto 20px auto;max-width:900px"),l.setAttribute("class",a.className),l.setAttribute("id",a.elementId),l.setAttribute("data-widget-host","habitat"),l.setAttribute("data-disable-demand","true"),l.setAttribute("data-endpoint","//trends.revcontent.com"),l.setAttribute("data-widget-id",a.widgetId),l.setAttribute("data-rc-widget",""),l.setAttribute("data-image-quality","85");try{document.getElementsByClassName("template-root")[0].insertBefore(l,document.getElementsByClassName("breadcrumbs")[0])}catch(c){if(!document.getElementsByClassName("article-breadcrumbs"))return;document.getElementsByClassName("template-root")[0].insertBefore(l,document.getElementsByClassName("article-breadcrumbs")[0])}function o(){let e=document.querySelector("script#revcontent-delivery");if(!e){let t=document.createElement("script"),r=document.getElementsByTagName("script")[0];t.setAttribute("id","revcontent-delivery"),t.src="https://assets.revcontent.com/master/delivery.js",r.parentNode.insertBefore(t,r)}}if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)try{let m=document.getElementById(a.elementId);new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(t.unobserve(e.target),o())})},{rootMargin:"0px 0px 500px 0px"}).observe(m)}catch(u){}else o()}();

  //remove criteo fast bid
try{localStorage.removeItem('criteo_fast_bid');localStorage.removeItem('criteo_fast_bid_expires');} catch (e){}
  
//Tracker
(function(){try { if ('No' == 'Yes'){ const t=new Image();t.src='https://pagead2.googlesyndication.com/pcs/view?xai=AKAOjstuP_4wwzeUrXjISIEnBE-4J18ckZK_kXRkXEFFPb34g6qXQkYvJfCL0TE9jB6k4jFiJAiU0fi5hNi5twwo0PJ3dlZDoDCdYwPR35i349oCIbVW0HnETUubi4Xbmwue0kWFvfTvBTaBzNTrDEyz13QwaXchCE0ZI5rrMsSHYBAZYLYSonJT6H2xsgApLHIpBK-_CnjFNGHzse2qHE4D9MGZjBu61nv2eDvdf7bV4z7R-MYRxlKxRaY1P5vWPl-9oZkiEi3yEgEukGeVbkaWfneMcoApvtxKrM1xag27QsDn3bEnMEfMjMVdL1BOgpAo3ZjcRdPcjsDFNZNiIObwa6vjcojMSlfWbBj1pWpfmcyl_IKaiLAGJq9lxMoXf3owJ2K2OQI&sig=Cg0ArKJSzAVlId6pQAXQEAE&uach_m=%5BUACH%5D&urlfix=1&adurl=';}} catch (e){}})();