(function(a){a.vast={}})(jwplayer);(function(a){a.vast.adcontroller=function(I,A,L){var e=I,K=L,O=A,n=this,h,P,o,w,d,H=false,C,B,t,G,f=false,g,j={},b=a.utils,r=a.vast,J=false;e.onReady(N);K.style.width="100%";function N(){if(e.getRenderingMode()=="flash"){L.style.visibility="hidden";return}B=new r.companion();y();var R=new r.configparser();R.parse(O);P=R.getSchedule();h=R.getOptParams();C=new r.adui(K,e.getWidth(),e.getHeight(),h.dynamicMessage);e.onBeforePlay(u);e.onTime(E);e.onBeforeComplete(c);e.onPlaylistItem(M);e.onPlaylistComplete(M)}function u(){var R=P.getPreRoll();if(!J&&R){J=true;g="pre";Q(R)}}function E(R){var S=P.getNextMidRoll(R.position);if(S){g="mid";Q(S)}}function c(){var R=P.getPostRoll();if(R){g="post";e.detachMedia();Q(R)}}function M(){J=false;P.reset()}function Q(S){w=new r.vloader();w.addEventListener(a.events.COMPLETE,F);w.addEventListener(a.events.ERROR,x);var R=n.doReplacement(S._adTag);w.load(R)}n.doReplacement=function(R){R=n.doReplace(R,"__random-number__",Math.random()*Math.pow(10,18));R=n.doReplace(R,"__timestamp__",new Date().getTime());R=n.doReplace(R,"__page-url__",window.location.href);R=n.doReplace(R,"__referrer__",document.referrer);return R};n.doReplace=function(R,T,S){return R.replace(T,S)};function F(S){var R={sources:[]};t=S.data;S.data.media.forEach(function(T){var U={};U.file=T.file;R.sources.push(U)});o=e.loadInstream(R);o.onMute(D);o.onPlay(z);o.onComplete(k);o.onFullscreen(v);o.onPause(q);o.onTime(m);o.onClick(p);o.onError(s);l();S.data.trackers.impression.push(G);d=new r.tracker(S.data.trackers)}function x(R){b.log(R);if(g=="post"){e.attachMedia()}e.releaseState()}function s(R){b.log("Error playing back video ad");H=false;C.complete();if(g=="post"){e.attachMedia()}}function p(R){d.click();window.open(t.clickthrough)}function D(R){if(R.mute){d.mute()}else{d.unmute()}}function v(R){if(R.fullscreen){d.fullscreen()}}function q(){d.pause()}function z(R){if(h.companion&&t.companions){hasComp=B.addCompanion(h.companion,t.companions)}if(!H){H=true;d.impression();d.start();d.creativeView()}else{if(R.OLDSTATE=="PAUSED"){d.resume()}}}function k(){d.complete();H=false;C.complete();if(g=="post"){e.attachMedia()}}function m(R){d.time(R.position,R.duration);C.updateTime(R.duration-R.position)}function y(){var R=window.location.href;j.domain=R.match(new RegExp(/^https?:\/\/([^\/]*)/))[1];j.trackingbase=R.match(/^https/)?"https://s.n.jwpltx.com/v1/adclient/ping.gif":"http://i.n.jwpltx.com/v1/adclient/ping.gif";j.account=new b.key(a.key).token()}function l(){var R=new Object(),S=true;R.d=j.domain;R.c="vast";R.m="html5";R.a=j.account;R.co=f;R.p=g;R.ad=t.adsystem;R.type="linear";G=j.trackingbase;b.foreach(R,function(U,T){if(S){G+="?";S=false}else{G+="&"}G+=U;G+="=";G+=T})}};a().registerPlugin("vast","6.3",a.vast.adcontroller,"vast.swf")})(jwplayer);(function(a){a.vast.adui=function(b,c,l,h){var e=b,f=c,g=l,k=document.createElement("div"),d=document.createElement("div"),j=h;d.style.color="white";d.style.paddingLeft="5px";k.style.width="100%";k.style.height="20px";k.style.backgroundColor="rgba(0,0,0,.5)";k.id=b.id+"_adbar";k.style.position="absolute";k.style.visibility="hidden";d.id=b.id+"_admessage";d.style.visibility="hidden";e.appendChild(k);k.appendChild(d);this.updateTime=function(n){k.style.visibility="visible";d.style.visibility="visible";if(!isNaN(n)){var m=j;d.innerHTML=m.replace(/xx/gi,Math.round(n))}};this.complete=function(){k.style.visibility="hidden";d.style.visibility="hidden"}}})(jwplayer);(function(a){a.vast.companion=function(d){var j=this,g=a.utils,c,f;if(d){window.jwplayer["companionvast"]=[]}j.addCompanion=function(m,k){c=m;f=document.getElementById(c.id);if(!f){return false}for(var l=0;l=b+1){var f=c[b];if(f._offSet=o&&g=l&&g=k&&g