/* Script:New%20Sites%20Test - ScriptInstance:5e908039ceed454eab774504a10e5721 - CompiledAt:2021-01-14 18:00:46 */

(function(){console.log("! 5.53");window.NATIVEADS=window.NATIVEADS||{};window.NATIVEADS.injectedAt=(new Date).getTime();window.NATIVEADS.onReady=function(ads){try{window.NATIVEADS.customData=window.NATIVEADS.customData||{};window.NATIVEADS.customData.jQuery=ads.$}catch(e){console.log("! onReady error: ",e)}};window.NATIVEADS_QUEUE=window.NATIVEADS_QUEUE||[];var q=function(){return window.NATIVEADS_QUEUE};q().push(["setPropertyID","NA-NEWSITEREDESITEST-11239774"]);q().push(["setSecondaryPageURL","/sponsored"]);q().push(["injectCSS","","head"]);q().push(["configureSecondaryPage",{binding:{sponsor:{link:"#native-content-sponsor-link",logo:"#native-content-sponsor-logo",name:"#native-content-sponsor-name"},title:"#native-content-title",summary:"#native-content-summary",content:"#native-content-content",author:"#native-content-author",pubDate:"#native-content-pub-date",image:{href:"#native-content-media",caption:"#native-content-media-caption",credits:"#native-content-media-credits"}},onFill:function(data){if(data.sponsor.name){data.sponsor.name=data.sponsor.name.trim()}try{var publishedDate=new Date(data.pubDate);var hours=publishedDate.getHours(),minutes=publishedDate.getMinutes();if(minutes<10){minutes="0"+minutes}var time=hours+":"+minutes;window.NATIVEADS.customData.time=time;var monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];var weekDaysNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var dayOfWeek=weekDaysNames[publishedDate.getDay()];var dayOfMonth=publishedDate.getDate();var month=monthNames[publishedDate.getMonth()];var year=publishedDate.getFullYear();data.pubDate=dayOfWeek+" "+dayOfMonth+" "+month+" "+year;if(data.sponsor.logo!=undefined){data.sponsor.logo.adjustedHeight="auto";if(parseInt(data.sponsor.logo.adjustedWidth)>140){var str=data.sponsor.logo.href;data.sponsor.logo.href=str.replace(/&w=[0-9]+/i,"&w=140")}}if(data.hasOwnProperty("sponsor")){window.NATIVEADS.customData.sponsor=data.sponsor;if(data.sponsor.hasOwnProperty("name")){window.NATIVEADS.customData.sponsorName=data.sponsor.name}else{window.NATIVEADS.customData.sponsorName=null}if(data.sponsor.hasOwnProperty("logo")){window.NATIVEADS.customData.sponsorLogo=data.sponsor.logo;if(data.sponsor.logo.hasOwnProperty("href")){window.NATIVEADS.customData.sponsorLogoHref=data.sponsor.logo.href}else{window.NATIVEADS.customData.sponsorLogoHref=null}}else{window.NATIVEADS.customData.sponsorLogo=null}}else{window.NATIVEADS.customData.sponsor=null}}catch(e){console.log("! fill error: ",e)}},onRender:function(){try{var imageWidth=600;var css="#polar-outer-div iframe { max-width: "+imageWidth+"px !important; }",head=document.head||document.getElementsByTagName("head")[0],style=document.createElement("style");head.appendChild(style);style.type="text/css";if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}var $=jQuery=window.NATIVEADS.customData.jQuery;if(jQuery(".byline.article__byline").length&&jQuery(".byline.article__byline").eq(0).text()===""){jQuery(".byline.article__byline").eq(0).css("display","none")}if(jQuery(".timestamp__time").length){jQuery(".timestamp__time").html(window.NATIVEADS.customData.time)}if(jQuery("#native-content-media-credits").length){jQuery("#native-content-media-credits").hide()}jQuery("#loading-screen").hide();jQuery("#native-content-media").show();jQuery("#native-content-sponsor-logo > div > a").attr("rel","nofollow");jQuery(".phoenix-inline-image > div > img").each(function(index){$img=jQuery(this);$img.attr("src",$img.attr("src").split("?")[0]);$img.prop("width",imageWidth)});if(jQuery("#nativeShareTools").length!=0){console.log("!! am I calling shareToolsInit()");shareToolsInit()}jQuery("#polar-outer-div").css("width","100%").css("padding-bottom","73%").css("position","relative");jQuery("#native-content-media").css("max-width",imageWidth);jQuery("#native-content-media").attr("src",jQuery("#native-content-media").attr("src").split("?")[0]);jQuery("#native-content-media").prop("width",imageWidth);var isSponsorHavingAnImage=window.NATIVEADS.customData.sponsor&&window.NATIVEADS.customData.sponsorLogo&&window.NATIVEADS.customData.sponsorLogoHref;if(window.NATIVEADS.customData.sponsorName===""&&!isSponsorHavingAnImage||window.NATIVEADS.customData.sponsorName===""&&isSponsorHavingAnImage){if(jQuery("#native-content-sponsor-promotedcontent").length){jQuery("#native-content-sponsor-promotedcontent").show()}if(jQuery(".native-content-sponsor-logo").length){jQuery(".native-content-sponsor-logo").hide()}}else{if(jQuery("#native-content-sponsor-by-name").length){jQuery("#native-content-sponsor-by-name").show()}}}catch(err){console.log("! onRender error: ",err)}},onError:function(error){},track:function(){}}])})();(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=d.location.protocol;if(d.getElementById(id)){return}js=d.createElement(s);js.id=id;js.type="text/javascript";js.async=true;js.src=(p=="https:"?p:"http:")+"//plugin.mediavoice.com/plugin.js";fjs.parentNode.insertBefore(js,fjs)})(document,"script","nativeads-plugin");
