/*(c)2016 sovrn Holdings, Inc. All Rights Reserved 1480542285197*/ window.sovrn=window.sovrn||{};var lwp_ad_zoneid=null;Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length>>>0,c=Number(arguments[1])||0;for(c=0>c?Math.ceil(c):Math.floor(c),0>c&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1});var LJT_executeCB=function(){return sovrn.ads.doPassback()};sovrn.ads={ad_url_regxs:[{dmn:"?(apr|ap|www)?\\.lijit\\.(com|dev)",pat:'.*(\\?|&)(loc)=([^"&;, ]+)'},{dmn:"?googleusercontent\\.com",pat:'.*?u=([^"&;, ]+)'},{dmn:"webcache.googleusercontent.com/search",pat:'\\?q=cache:[^:]+:([^"&;, \\+]+)'},{dmn:"?doubleclick.*?",pat:'(url|admu|click|dc_ref)=([^"&;, ]+)'},{dmn:"?yieldmanager\\.com",pat:".*?==,,([^,]+)"},{dmn:"?yieldmanager\\.com",pat:'.*?pub_url=(\\$)?([^"&;, ]+)'},{dmn:"?openx.*",pat:'(\\?|&)loc=([^"&;, ]+)'},{dmn:"?admeld.com.*",pat:'?url=([^"&;, ]+)'},{dmn:"?adnxs.com.*",pat:'?referrer=([^"&;, ]+)'},{dmn:"?ro2\\.biz.*",pat:'?rf=([^"&;, ]+)'},{dmn:"?ads.micklemedia\\.com",pat:'.*?&r=([^"&;, ]+)'},{dmn:"?c\\.lqw\\.me.*?",pat:'"url":"([^"& ]+)'},{dmn:"?mb\\.zam\\.com",pat:'.*?tr=([^"&;, ]+)'},{dmn:"?rubiconproject\\.com",pat:'.*?rf=([^"&;, ]+)'},{dmn:"?moocowads\\.com",pat:'.*?url=([^"&;, ]+)'},{dmn:"?pubmatic\\.com",pat:'.*?(\\?|&)(refurl|kadpageurl)=([^"&;, ]+)'},{dmn:"?tagcade\\.com",pat:'.*?(\\?|&)src=([^"&;, ]+)'},{dmn:"?burstdirectads\\.com",pat:'.*?(\\?|&)(pub_url|src)=([^"&;, ]+)'},{dmn:"?localpages\\.com",pat:'.*?(\\?|&)(pageUrl)=([^"&;, ]+)'},{dmn:"?888media\\.net",pat:'.*?(\\?|&)(page_address|uadr)=([^"&;, ]+)'},{dmn:"",pat:"^javascript:.*http://www.googletagservices.com/tag/js/gpt.js.*page_url','([^'\"&;, ]+)"}],http_rgx:"^http(s)?:\\/\\/.*",other_url_regxs:[{dmn:"",pat:"^{(.*)}$"},{dmn:"",pat:'#\\(parent_location\\)\\[([^\\]"&;, ]+)'}],buildConfig:{},appendCSS:function(){var a,b,c,d,e,f,g,h,i,j,k,l=this;return a=l.getConfig(),b=a.css_class,j=l.dbgEnabled(),document.getElementById("css_"+b)?!1:(g=j?"border: solid #F2CB14 4px;":"",h=j?'.sovrn_ad_unit:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;opacity:0.3;border:solid #F2CB14 5px;}':"",k=j?".sovrn_div_overlay{font-size:12 px;font-family:Sans-Serif;text-align:right;position:absolute;right:0;bottom:0;opacity:0.6;background-color:#F2CB14;z-index:999999}":"",i=".sovrn_banner_ins{display:none;border:none;margin:0;padding:0;position:relative;visibility:visible;text-decoration:none;background-color:transparent;}",d="",l.isInIframe()&&document.body.clientHeight===a.zone.h&&document.body.clientWidth===a.zone.w&&(d="body{margin:0 !important;padding:0 !important;}"),c=d+"."+b+"{display:inline-block !important;visibility:visible !important;opacity:1 !important;vertical-align:top;position:relative;width:"+a.zone.w+"px !important;height:"+a.zone.h+"px !important;z-index:999999 !important;"+g+" overflow:hidden}"+h+i+k,e=document.createElement("style"),e.setAttribute("type","text/css"),e.setAttribute("id","css_"+b),e.styleSheet?e.styleSheet.cssText=c:e.appendChild(document.createTextNode(c)),f=document.head||document.body,f.appendChild(e),!0)},asyncLevelUp:function(a){var b=this.getConfig(a),c=parent.window,d=c.sovrn;a=a||b.tid;try{return d=d||sovrn,d.config=d.config||sovrn.config,d.config.ads=d.config.ads||sovrn.config.ads,"undefined"==typeof d.config.ads.instances[a]&&(d.config.ads.instances[a]=b),d.config.ct=d.config.ct||sovrn.config.ct,"undefined"==typeof d.config.ct.instances[a]&&sovrn.ct.getConfig&&(d.config.ct.instances[a]=sovrn.ct.getConfig(a)),c.LJT_Ads=d.ads=d.ads||sovrn.ads,d.ct=d.containerTag=d.containerTag||sovrn.containerTag,this.log("Async Level UP ("+b.zone_id+" / "+a+")"),!0}catch(e){return this.dbg(e),!1}},atf:function(a){var b,c,d,e,f=this;if(f.isAsync())return f.getAsyncConfig("atf")||!1;try{a=a||f.getConfig().ad_unit_id,c=document.getElementById(a),c||f.reportError("ATF: Elem ID "+a+" not found",new Error),d=c.getClientRects()[0],e=self.document.documentElement,b=d.right>0&&d.left=0}catch(g){b=!1}return b+""},beaconShouldFire:function(){var a=this.getBeaconTID();return null===a||a===this.getTID()},buildQS:function(a,b){var c,d=encodeURIComponent,e=b?"&":"&",f=[];for(c in a)a.hasOwnProperty(c)&&""!==c&&""!==a[c]&&f.push(d(c)+"="+d(a[c]));return f.join(e)},callAdServer:function(){var a,b,c,d,e,f=this,g=f.getConfig();if(g.called_ad_server)return f.log("DUPLICATE AD DELIVERY CALL ABORTED ("+g.zone_id+" / "+g.tid+")"),!1;g.called_ad_server=!0,a=document.createElement("div"),d={id:g.ad_unit_id,"data-tid":g.tid,"data-zid":g.zone_id};for(e in d)d.hasOwnProperty(e)&&a.setAttribute(e,d[e]);return f.isAsync()?(a.setAttribute("style","display:none"),f.docWrite(a.outerHTML)):(a.setAttribute("class",g.css_class+" sovrn_ad_unit"),f.docWrite(a.outerHTML.replace(/<\/div>/i,""))),b=f.createScript(f.buildConfig.adserver_url+"?"+f.getASParams()+f.getMoreParams()),c=f.isAsync()?"":"",f.docWrite(b.outerHTML+c),f.log("*addelivery ("+g.zone_id+" / "+g.tid+")"),f.recordEvent("addelivery"),!0},chainCleanup:function(){var a,b,c,d,e,f,g,h=this,i=h.isOldIE()&&!h.isAsync(),j=h.getGlobalConfig();if(i&&!j.ie_cleanup_flag)return!1;for(j.ie_cleanup_flag=!1,d=h.getConfig(),g=i?j.tids.length:1,e=0;g>e;e++)f=i?j.tids[e]:d.tid,a=document.querySelectorAll("ins.sovrn_banner_ins._"+f),a&&0!==a.length?(b=a[a.length-1],b.style.display="block",c=h.getContainer(a[0],f),b&&b.parentNode!==c&&c.appendChild(b),h.log("Chain Cleanup ("+f+")")):h.reportError("Could not find ins tags for tid: "+f,new Error);return b&&(h.unhideElem(b,d.zone.w,d.zone.h),h.insCleanup(b)),!0},chainLG:function(a){var b,c,d,e,f=sovrn.ads,g=f.getGlobalConfig();a||f.chainCleanup();try{for("undefined"!=typeof Array.prototype.filter&&(g.lgq=g.lgq.filter(function(a,b,c){return sovrn.ads.utils.arrayIndexOf(c,a)>=b})),e=0;e1?!1:this.isAsync()?this.inFriendlyIframe():0===a},docWrite:function(a){try{document.writeln(a)}catch(b){this.reportError("docWrite Error",b)}},doFixBeacons:function(a){var b,c;if(a=a||document.body,b=a.childNodes,sovrn.ads.isTracker(a)&&(a.style.display="none",a.setAttribute("x-beacon","1")),a.hasChildNodes())for(c=0;c0&&document.writeln(""),d=b.index++,f=b.ads[d],g=0===d?"Start Chain":"Passback",k.log(g+" ("+h.zone_id+" / "+j+")"),1===b.ads.length&&document.write("\n\n"),d>=b.ads.length)return document.write("\n\n"),k.reportError("Chain Pointer Exception",new Error),!1;b.data=JSON.parse(JSON.stringify(f.data)),b.data.tid=j,b.data.zoneid=h.zone_id,c={cids:f.data.campaignid,bids:f.data.bannerid,tss:new Date-b.start_time};for(e in c)c.hasOwnProperty(e)&&(b.history[e].push(c[e]),b.data[e]=b.history[e].join(","));return 232===f.campaignid&&(i.lgq.push(j),k.chainLG()),a||document.writeln(""),document.writeln(''),k.docWrite(decodeURIComponent(f.html)),k.log("Rendered Ad ("+h.zone_id+" / "+j+" / "+f.data.bannerid+" / "+f.data.campaignid+")"),b.banner_id=parseInt(f.data.bannerid,10),b.campaign_id=parseInt(f.data.campaignid,10),232!==f.campaignid&&0===d&&(i.lgq.push(j),l=k.isOldIE()||b.pbi?'':'',document.writeln(l)),h.chain_finished||(h.chain_finished=!0,document.writeln("")),k.setDataAttribs(f,b,j),!0}catch(m){return k.reportError("Failed to Serve Chain Ad",m),b.data=b.data||{},b.data.campaignid=0,b.data.bannerid=0,b.data.tid=j,i.lgq.push(j),k.chainLG(),!1}},extractLoc:function(a){var b,c,d,e,f,g,h,i,j,k=decodeURIComponent,l=this,m="";if(!a)return"";i=/^http(s)?%/i,j=[l.ad_url_regxs,l.other_url_regxs];try{try{for(b=["/^http(s)?://.*?adnxs.com/bounce.*referrer.*/"],e=0;e=1){m=k(f[f.length-1]);break}}catch(p){l.dbg(p)}return g=l.extractLoc(m),l.urlCheck(g)?g:a},finale:function(){var a,b=this,c=b.getConfig(),d=b.getGlobalConfig();b.log("Finale ("+c.zone_id+" / "+c.tid+")");var e=sovrn.ads.doNotTrack();if(0==e&&b.sendBeacon(),c.chain&&c.chain.pbi===!1&&0==e&&b.fireContainerTag(),0==e&&b.fixBeacons(),b.dbgEnabled())if(!b.isAsync()&&b.isOldIE())for(a=0;a1},getFlashVersion:function(){function a(a){return a=a.match(/[\d]+/g),a.length=3,a.join(".")}var b,c,d;if(c=!1,d="",navigator.plugins&&navigator.plugins.length)b=navigator.plugins["Shockwave Flash"],b&&(c=!0,b.description&&(d=a(b.description))),navigator.plugins["Shockwave Flash 2.0"]&&(c=!0,d="2.0.0.11");else if(navigator.mimeTypes&&navigator.mimeTypes.length)(c=(b=navigator.mimeTypes["application/x-shockwave-flash"])&&b.enabledPlugin)&&(d=a(b.enabledPlugin.description));else try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),c=!0,d=a(b.GetVariable("$version"))}catch(e){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),c=!0,d="6.0.21"}catch(f){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),c=!0,d=a(b.GetVariable("$version"))}catch(g){}}}return c?d:"0.0.0"},getFrameDepth:function(a){return a=a||self,a===top?0:1+this.getFrameDepth(a.parent)},getFriendlyIframe:function(){var a,b;return this.inFriendlyIframe()?(a=this.getAsyncConfig("id"),b=self.parent.document.getElementById(a)):null},getGlobalConfig:function(a){return a=a||window,a.sovrn.config.ads.globals},getGUID:function(){function a(b){return b?(b^16*Math.random()>>b/4).toString(16):([1e7]+1e3+4e3+8e3+1e19).replace(/[018]/g,a)}return a()},getOriginalLoc:function(){var a,b=document.location.href,c=this;try{this.isAsync()&&("1"===c.getAsyncConfig("ifr")&&c.getAsyncConfig("ref")?a=c.getAsyncConfig("ref"):document.referrer&&(a=document.referrer)),this.urlCheck(a)||(a=c.getAsyncConfig("loc")||b),a=this.extractLoc(a)}catch(d){this.reportError("getOriginalLoc failure",d)}return a=this.urlCheck(a)?a:b,"http://"+a.replace("http://","").substr(0,1024)},getLoc:function(a){var b=this,c=b.getConfig();try{b.isInIframe()&&(a=a||b.getTopParentLoc(),b.isAsync()&&"1"===b.getAsyncConfig("ifr")?a=a||b.getAsyncConfig("loc"):document.referrer&&(a=a||document.referrer)),a=b.extractLoc(a),b.urlCheck(a)||(a=b.extractLoc(document.location.href))}catch(d){b.reportError("getLoc failure",d)}return b.urlCheck(a)?(c.zone&&1!==c.zone.rl&&!a.match(b.http_rgx)&&(a=c.protocol+"//"+a),a.substr(0,1024)):""},getTopParentLoc:function(){var a,b,c=this,d="";try{window.$sf?d=c.getCurrentDocument().referrer:(b=c.getCurrentDocument().location,a=b.ancestorOrigins,b&&a&&a.length>1?d=a[a.length-1]:b&&!b.hasOwnProperty("ancestorOrigins")&&(d=c.getNonWebKitTopParentLoc()))}catch(e){c.reportError("getTopParentLoc failure",e)}return d},getCurrentDocument:function(){return document},getNonWebKitTopParentLoc:function(){var a,b="",c="";do{a=a?a.parent:window;try{c=a.document.referrer}catch(d){return c}}while(a!==window.top);return b},getLocHost:function(a){return this.parseUri(this.getLoc(a)).host},getMoreParams:function(){var a=this,b="",c=/(^ljt_|^x_)/;return b+=a.isAsync()?a.buildQS(a.matchProps(c,a.getAsyncConfig())):a.buildQS(a.matchQueryParams(c)),b.length>0?"&"+b:""},getOD:function(){var a=this,b=a.getAsyncConfig("od")||null;return a.isInIframe()&&("1"===a.getAsyncConfig("ifr")&&a.getAsyncConfig("ref")?b=a.getAsyncConfig("ref"):document.referrer&&(b=document.referrer)),b=b||document.location.href.replace(/["']/g,""),a.parseUri(b).host},getMode:function(){var a=0;return this.isAsync()&&(a=1),this.isOldIE()&&(a+=2),a},getPod:function(a){return this.getConfig(a).chain.pod},getRef:function(){var a=this.isAsync()?this.getAsyncConfig("ref")||"":document.referrer;return a.substr(0,1024)},getRefSearch:function(a){var b,c,d=["q","p","search","query","kw"];if(a=a||this.getRef(),!a)return"";try{a=decodeURI(a)}catch(e){this.dbg(e)}for(c=this.parseQueryString(a),b=0;b=0;b--)if(d.test(a[b].src))return a[b];return null},getSpif:function(){return"undefined"!=typeof window.postMessage},getTID:function(){return this.getConfig().tid},getDTID:function(){return this.getConfigParam("dtid")||""},getTIDsByZoneID:function(a){for(var b,c=[],d=sovrn.config.ads.instances.length-1;d>=0;)b=this.getConfigByIndex(d),b.zone_id===a&&c.push(b.tid),d--;return c},getTime:function(a){return a=a||new Date,a.toUTCString().split(" ")[4]},getUsername:function(){return this.getConfigParam("u","")},getZoneID:function(){return parseInt(this.getConfigParam("z",0))},getViewability:function(){var a=this.getAsyncConfig()?this.getAsyncConfig():this.getConfig().query_params;return a.hasOwnProperty("iv")?a.iv:""},globalConfigDefaults:function(){var a=this;a.beacon_tid_ss_key="sovrn_beacon_tid_",a.tids=[],a.lgq=[],a.lg_fired=[],a.ie_cleanup_flag=!0,a.tag_regex=/^(https?:)?\/\/.*\.lijit\.(com|dev)(:\d+)?(\/\/)?(\/www)?(\/delivery)?(\/js)?\/(fp|sync)/i,a.origin_regex=/.*\.lijit\.(com|dev).*$/i,a.fprint="",Object.seal&&Object.seal(a)},init:function(a){"use strict";var b,c,d,e,f=this,g=f.getGlobalConfig();return f.buildConfig=new f.getBuildConfig,delete sovrn.config.ads.current_tid,b=sovrn.config.ads.current_tid=f.getGUID(),g.tids.push(b),d=f.getConfig(b),d.start_time=+new Date,d.async=a||window.sovrn_async||{},d.tid=b,d.log="",(c=f.getScriptTag())?(d.query_params=f.parseQueryString(c.src),d.zone_id="undefined"!=typeof d.query_params.z?d.query_params.z:f.getZoneID(),d.zone_id?"undefined"==typeof JSON?(f.reportError("JSON Browser support is required",new Error),!1):(d.finale_fired=!1,d.chain_finished=!1,d.bad_origins_logged=0,d.ad_unit_id=f.generateAdUnitID(d.zone_id),d.called_ad_server=!1,f.isAsync()&&f.initAsync(d),f.manageEventListeners(),f.log("INIT ("+d.zone_id+" / "+b+")"),void f.getConfigFromServer()):(e="Unknown Zone ID; URL: "+f.getLoc().substr(0,150)+"; REF: "+f.getRef().substr(0,150),f.log(e),f.reportError(e,new Error),!1)):(e="Cant find Script Tag; URL: "+f.getLoc().substr(0,150)+"; REF: "+f.getRef().substr(0,150),f.log(e),f.reportError(e,new Error),!1)},inFriendlyIframe:function(){var a,b;if(!this.isAsync())return!1;b=this.getAsyncConfig("id");try{a=!!self.parent.document.getElementById(b)}catch(c){a=!1}return a},initAsync:function(a){if("object"!=typeof a)throw new TypeError("my_config is required");var b,c=this,d=a.tid;c.buildConfig.log_all_js_errors&&c.inFriendlyIframe()&&(window.onerror=function(a,d,e,f,g){try{return g=g||new Error("Undetermined Error"),b="URL: "+d+" LINE: "+e+" COL: "+f+" MSG: "+a+" ERR: "+g,c.reportError(b,g),!0}catch(h){return c.reportError("Error in onerror handler",h),!1}}),c.log("Async Init ("+a.zone_id+" / "+d+")")},isAsync:function(){var a;return this.isInIframe()?(a=this.getConfig().async,"object"==typeof a&&"{}"!==JSON.stringify(a)):!1},isInIframe:function(){return self!==top},isOldIE:function(a){var b=new RegExp("MSIE ([0-9]+[\\.0-9]*)");return a=a||navigator.userAgent,"ie"===this.getBrowserEngine()&&!!b.exec(a)&&parseInt(RegExp.$1)<10},isTracker:function(a){try{var b=a.nodeName;return"IMG"!==b&&"IFRAME"!==b&&"DIV"!==b&&"SPAN"!==b&&"INS"!==b?!1:"undefined"==typeof a.height||"undefined"==typeof a.width||0!==a.height&&1!==a.height||0!==a.width&&1!==a.width?"undefined"!=typeof a.name&&a.name.match(/^google_conversion/)?!0:"undefined"==typeof a.style||"0px"!==a.style.height&&"1px"!==a.style.height||"0px"!==a.style.width&&"1px"!==a.style.width?!(1!==a.clientHeight&&1!==a.offsetHeight||1!==a.clientWidth&&1!==a.offsetWidth):!0:!0}catch(c){this.dbg(c)}return!1},matchProps:function(a,b){var c,d={};for(c in b)b.hasOwnProperty(c)&&c.match(a)&&(d[c]=b[c]);return d},log:function(a){var b,c,d,e="",f="";return"undefined"==typeof console?!1:void(this.dbgEnabled()&&(d=this.getConfig(),b=new Date-d.start_time,c="[sovrn.ads] "+b+": "+a,"ie"!==this.getBrowserEngine()&&(f="%c",e="background-color: #FFED96"),console.log(f+c,e),d.log+=c+"\n"))},recordEvent:function(a){var b=this.getConfig(),c={name:a,ts:new Date-b.start_time};"undefined"==typeof b.ad_events&&(b.ad_events=[]),b.ad_events.push(c)},logToServer:function(){var a,b,c,d=this,e=d.getConfig(),f=d.buildConfig.ad_timing_suffix,g={tid:e.tid,zoneid:e.zone_id,starttime:e.start_time};for(a=0;a0?a[0].innerHTML+"":""),c.substr(0,parseInt(sovrn.ads.buildConfig.page.title_size,10))},getDesc:function(){var a,b,c,d;return document.querySelector?(d=sovrn.ads.inFriendlyIframe()?parent.document:document,c="",b=d.querySelector("meta[property='og:description']"),b?c=b.getAttribute("content"):(a=d.querySelector("meta[name='description']"),a&&(c=a.getAttribute("content"))),c.substr(0,parseInt(sovrn.ads.buildConfig.page.desc_size,10))):""}},parseQueryString:function(a){var b={},c=a.split("?")[1]||"";return(c=c.split("#")[0]||"")?(c.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(a,c,d,e){try{b[c]=decodeURIComponent(e)}catch(f){sovrn.ads.dbg(f)}}),b):{}},parseUri:function(a){var b,c,d,e;try{for(b={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},c=b.parser.exec(a),d={},e=14;e--;)d[b.key[e]]=c[e]||"";return d[b.q.name]={},d[b.key[12]].replace(b.q.parser,function(a,c,e){c&&(d[b.q.name][c]=e)}),d}catch(f){this.reportError("parseUri Error",f)}},renderAd:function(a){var b,c,d=this,e=d.getConfig();d.getGlobalConfig();return"object"!=typeof a?(d.reportError("Invalid server config.",new Error),!1):(d.log("adcfg response: "+JSON.stringify(a)),d.recordEvent("adcfg_response"),e.zone=a,e.css_class=d.getCSSClass(),b=e.zone.tid,c=d.getTID(),d.setServerTID(c,b),d.appendCSS(),setTimeout(sovrn.ads.setBeaconTID,0),d.setBeaconTID(),void d.callAdServer())},reportError:function(a,b){var c,d,e,f,g=this,h=g.getConfig();d=h.zone_id;try{c=b&&b.hasOwnProperty("stack")?b.stack:"",e={zoneid:d,tid:h.tid,cv:g.getCV(),err:b&&b.hasOwnProperty("message")?b.message:"",msg:a,stack:c.substr(0,1024)},(new Image).src=g.buildConfig.error_url+"/fp?"+g.buildQS(e),g.dbgEnabled()&&(f="JS ERROR on Zone "+d+"\n\n"+a+"\n\n"+c,alert(f),window.console&&console.error(f))}catch(i){g.dbg(i)}return b},sendBeacon:function(){var a=this,b=a.getConfig(),c=a.getAdUnitID()+"_beacon",d=a.createiFrame(c,1,1);return a.beaconShouldFire()?"https:"===b.protocol?(a.log("sendBeacon: Beacon TID ("+a.getBeaconTID()+") is from a secure site; skipping beacon"),!1):(d.src=a.getBeaconURL(),document.body.appendChild(d),a.log("*beacon ("+b.zone_id+" / "+b.tid+")"),a.recordEvent("beacon"),!0):(a.log("sendBeacon: Beacon TID ("+a.getBeaconTID()+") does not match current TID ("+a.getTID()+"); skipping beacon"),!1)},setBeaconTID:function(){function a(){var a=window.parent;return a.sovrn_beacon_tid?!1:(a.sovrn_beacon_tid=sovrn.ads.getTID(),!0)}function b(){var a,b=sovrn.ads,c=b.getLoc().substr(0,128),d=b.getGlobalConfig().beacon_tid_ss_key+c;return sessionStorage.getItem(d)?!1:(a=b.getTID(),sessionStorage.setItem(d,a),!0)}function c(){return window.sovrn_beacon_tid?!1:(window.sovrn_beacon_tid=sovrn.ads.getTID(),!0)}var d=sovrn.ads,e=!1;if(d.isAsync())try{e=a()}catch(f){try{e=b()}catch(g){e=c()}}else e=c();return e&&d.log("Setting Beacon TID to: "+d.getTID()),!0},setDataAttribs:function(a,b,c){var d,e,f,g,h,i,j=this;return j.dbgEnabled()?(g=j.getConfig(),d=document.getElementById(g.ad_unit_id),h=j.isAsync()?"async":"sync",i=g.zone.w+"x"+g.zone.h,e=j.dbgEnabled()?"TID: "+c+"\nBID: "+a.data.bannerid+"\nCID: "+a.data.campaignid+"\nBH: "+b.history.bids.join(", ")+"\nCH: "+b.history.cids.join(", ")+"\nBIDs: "+j.getChainValues("bannerid")+"\nCIDs: "+j.getChainValues("campaignid")+"\nZID: "+g.zone_id+" ("+h+" "+i+")\nU: "+j.getUsername():"",d&&(d.setAttribute("data-bid",a.data.bannerid+""),d.setAttribute("data-cid",a.data.campaignid+""),d.setAttribute("title",e)),f=j.getFriendlyIframe(),f&&(f.setAttribute("data-tid",c),f.setAttribute("data-bid",a.data.bannerid+""),f.setAttribute("data-cid",a.data.campaignid+""),f.setAttribute("title",e)),!0):!1},setChainVars:function(a){var b=this,c=b.getConfig();b.recordEvent("addelivery_response"),c.chain={ads:a.ads,pod:a.pod,pbi:a.hasOwnProperty("pbi")?a.pbi:!1,start_time:+new Date,banner_id:0,campaign_id:0,index:0,history:{bids:[],cids:[],tss:[]}},c.chain.pbi&&b.fireContainerTag(),b.doPassback(); },setServerTID:function(a,b){var c=this.getConfig(),d=this.getGlobalConfig(),e=d.tids.indexOf(a);d.tids[e]=b,c.tid=b,sovrn.config.ads.instances[b]=sovrn.config.ads.instances[a],delete sovrn.config.ads.instances[a],sovrn.config.ads.current_tid=b},showOverlay:function(a){var b,c,d,e,f,g=this,h=g.getContainer(null,a);return h&&(c=g.getZoneID(),e=g.getBannerID(a),d="Zone: "+c+"",f="Banner: "+e+"",b=document.createElement("div"),b.innerHTML=d+"
"+f,b.setAttribute("class","sovrn_div_overlay"),h.appendChild(b)),!!h},unhideElem:function(a,b,c){var d;if(!a)return this.log("undefined element"),!1;for(d=a.parentNode;d&&"HTML"!==d.nodeName&&"BODY"!==d.nodeName;)d.style&&(b&&d.clientWidth=0||a.indexOf("data:")>=0)&&(b=!1);try{decodeURI(a)}catch(c){b=!1}return b},utils:{arrayIndexOf:function(a,b){var c;if(Array.prototype.indexOf)return a.indexOf(b);for(c=0;c=b)},hasClass:function(a,b){return new RegExp("(\\s|^)"+b+"(\\s|$)").test(a.className)},/*!(c)Lalit Patel, MODIFIED apache.org/licenses/LICENSE-2.0*/ hasFont:function(a){function b(a){var b,c,j=!1;for(b in d)d.hasOwnProperty(b)&&(g.fontFamily=a+","+d[b],e.appendChild(f),c=f.offsetWidth!==h[d[b]]||f.offsetHeight!==i[d[b]],e.removeChild(f),j=j||c);return j}var c,d=["monospace","sans-serif","serif"],e=document.body,f=document.createElement("span"),g=f.style,h={},i={};g.fontSize="42px",g.visibility="hidden",f.innerHTML="OWTMwMmllii";for(c in d)d.hasOwnProperty(c)&&(g.fontFamily=d[c],e.appendChild(f),h[d[c]]=f.offsetWidth,i[d[c]]=f.offsetHeight,e.removeChild(f));return b(a)},isNativeCode:function(a){var b=(typeof a).toLowerCase();return("function"===b||"object"===b)&&/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code\]\s*}\s*$/i.test(a+"")},/*!(c)2011 Gary Court;MIT LICENSE*/ murmurHash3:function(a,b){var c,d,e,f,g,h,i,j;for(c=3&a.length,d=a.length-c,e=b,g=3432918353,h=461845907,j=0;d>j;)i=255&a.charCodeAt(j)|(255&a.charCodeAt(++j))<<8|(255&a.charCodeAt(++j))<<16|(255&a.charCodeAt(++j))<<24,++j,i=(65535&i)*g+(((i>>>16)*g&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,e^=i,e=e<<13|e>>>19,f=5*(65535&e)+((5*(e>>>16)&65535)<<16)&4294967295,e=(65535&f)+27492+(((f>>>16)+58964&65535)<<16);switch(i=0,c){case 3:i^=(255&a.charCodeAt(j+2))<<16;case 2:i^=(255&a.charCodeAt(j+1))<<8;case 1:i^=255&a.charCodeAt(j),i=(65535&i)*g+(((i>>>16)*g&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,e^=i}return e^=a.length,e^=e>>>16,e=2246822507*(65535&e)+((2246822507*(e>>>16)&65535)<<16)&4294967295,e^=e>>>13,e=3266489909*(65535&e)+((3266489909*(e>>>16)&65535)<<16)&4294967295,e^=e>>>16,e>>>0}}},sovrn.config=sovrn.config||{},sovrn.config.ads=sovrn.config.ads||{instances:{},current_tid:"",globals:new sovrn.ads.globalConfigDefaults},sovrn.ads.utils.isNativeCode(Object.seal)&&(sovrn.ads=Object.seal(sovrn.ads)),LJT_Ads=sovrn.ads,sovrn.config=sovrn.config||{},sovrn.config.ct=sovrn.config.ct||{current_tid:"",globals:{tag_regex:/^(https?:)?\/\/.*\.lijit\.(com|dev)(:\d+)?\/res\/sovrn\.containertag(\.min)?\.js/i,fired_tags:{}},instances:{},tag_functions:{}},sovrn.containerTag={buildConfig:{},buildQS:function(a,b){var c,d=[],e=encodeURIComponent,f=b?"&":"&";for(c in a)a.hasOwnProperty(c)&&""!==c&&""!==a[c]&&d.push(e(c)+"="+e(a[c]));return d.join(f)},checkFreq:function(a){var b,c,d,e,f,g,h,i,j=this;if("number"==typeof a&&(a=j.getTagById(a)),!a.frequency)return!0;switch(a.frequency){case"sample":i=parseFloat(a.percent),0===i?(j.setStatusCode(a.id,"disabled"),h=!1):h=100===i||100*Math.random()<=(i||0);break;case"users":h=!1,100===parseInt(a.percent,10)?h=!0:(g=Math.floor(1/((parseFloat(a.percent)||0)/100)),b=j.getData("ljt_reader"),32===b.length&&(c=parseInt(b.substr(0,8),16),d=parseInt(b.substr(8,8),16),e=parseInt(b.substr(16,8),16),f=parseInt(b.substr(24,8),16),h=(c+d+e+f)%g===0));break;case"timed":h=!0;break;default:j.reportError("Invalid Tag Freq. Type",new Error),h=!1}return h===!1&&j.setStatusCode(a.id,"frequency_capped"),h},checkRules:function(a,b){var c,d,e,f,g,h=this,i=!0,j=["gt","gte","lt","lte"],k=["ct","nct"];if("number"==typeof a&&(a=h.getTagById(a,b)),!a)return h.reportError("checkRules: tag argument is required",new Error),!1;if(g=a.rules,0===g.length)return!0;for(c=0;c=0&&(isNaN(d)||isNaN(e)))return h.reportError("Numeric operand used on non-numeric data-layer var; Tag: "+a.id,new Error),!1;if(k.indexOf(f)>=0&&!(d instanceof Array))return h.reportError("Contains operator used on non-array data-layer var; Tag: "+a.id,new Error),!1;switch(f){case"eq":i=d+""==e+"";break;case"ne":i=d+""!=e+"";break;case"gt":i=parseFloat(d)>parseFloat(e);break;case"lt":i=parseFloat(d)=parseFloat(e);break;case"lte":i=parseFloat(d)<=parseFloat(e);break;case"ct":i=d.indexOf(e)>=0;break;case"nct":i=-1===d.indexOf(e);break;default:return h.log("checkRules: Unsupported Operand Detected; Tag: "+a.id),!1}if(!i){h.setStatusCode(a.id,"rules_did_not_pass");break}}return i},createBitmask:function(){var a=0,b=0,c=arguments.length>32?32:arguments.length;for(b;c>b;a|=arguments[b]<=0?"&":"?",image_src=tag.src+image_src_char+query_params),(new Image).src=image_src,config.img_tags_fired++}catch(e){return logFireTagError(tag,e)}break;case"script":try{if(eval(tag.src)===!1)return _this.setStatusCode(tag.id,"custom_js_logic_failed"),!1;config.script_tags_fired++}catch(e){return logFireTagError(tag,e)}}return _this.getGlobalConfig().fired_tags[tag.id]=config.fired_tags[tag.id]=tag.id,config.total_tags_fired++,_this.setStatusCode(tag.id,"fired"),config.tss.push(new Date-config.start_time),!0},fireTags:function(){var a,b,c,d,e,f,g,h,i,j,k=this;for(b=k.getConfig(),i=[],h=[],a=0;a>b/4).toString(16):([1e7]+1e3+4e3+8e3+1e19).replace(/[018]/g,a)}return a()},getQueryParam:function(a,b){var c=this.getConfig(b).query_params||{};return c.hasOwnProperty(a)?c[a]:null},getScriptTag:function(){var a,b,c,d=this.getGlobalConfig().tag_regex;if("currentScript"in document&&(c=document.currentScript,c&&d.test(c.src)))return c;for(a=document.getElementsByTagName("script"),b=a.length-1;b>=0;b--)if(d.test(a[b].src))return a[b];return null},setStatusCode:function(a,b){var c=this.getConfig();try{c.tag_status_codes&&"object"==typeof c.tag_status_codes[a]&&(c.tag_status_codes[a][b]=!0)}catch(d){return this.reportError("Error Setting Status Code: "+b+" for Tag: "+a,d),!1}return!0},getStatusCodes:function(a){var b,c,d,e=[],f=this.getConfig(a).tag_status_codes;for(c in f)f.hasOwnProperty(c)&&(b=f[c],d=[b.fired,b.disabled,b.frequency_capped,b.rules_did_not_pass,b.once_per_page_capped,b.custom_js_logic_failed,b.js_error],e.push(this.createBitmask.apply(this,d)));return e},getTagParams:function(a){var b,c;for(c={},b=0;b