var OX=OX||function(f,i){var c={},b,j,h,l,a={},n,k,e="OX_sd";var m=function(){var o=0;return function(){if(o){return}g();o=1}}();function g(){var p,o;if(!k.isFramed()){p=k.getCookie(e);if(parseInt(p)){p++}else{p=1}o=new Date(k.now()+1200000).toGMTString();k.cookie(e,p,o);n._requestArgs.sd=p}}function d(s,q){var o,x,w,p={},u={},t,v,r;if(s.vars){for(var y in s.vars){if(s.vars.hasOwnProperty(y)){p["c."+escape(y)]=s.vars[y]}}s.vars=null}if(s.gw){t=s.gw;s.gw=null}if(""){u.oxns=""}if(j){u.ju=j}if(h){u.jr=h}u.cb=k.rand();v=k.merge([s,u,p,k.contextArgs()]);r=k.serialize(v);o=k.template(k.Templates.GW_URL,{gw:t||b,v:"1.0",r:q,q:r});x=k.ensureRightProtocol(o);w=k.template(k.Templates.SCRIPT,{src:o,id:"ox_"+q+"_"+k.rand()});k.write(w)}n=function(p){var o=new OX.AdRequest(p,{url:j=j||k.detectPageURL(),ref:h=h||k.detectRefererURL(),gw:b});c[o.get("o")]=o;return o};n._customVars={};n._requestArgs={};n.addHook=function(p,o){if(!a[o]){a[o]=[]}a[o].push(p)};n.addVariable=function(q,s,r,p){var o=n._customVars,t=(r||"c")+"."+q;if(p||!o[t]){o[t]=[]}o[t].push(s)};n.appendTag=function(o){k.write(o)};n.dflt=function(q,r,o){var p=c[q];p&&p.dflt(r,o)};n.ifrmHTML=function(q,r,o){var p=c[q];p&&p.ifrmHTML(r,o)};n.frameCreatives=function(o){l=o};n.getFramed=function(){return l};n.getHooksByType=function(o){return a[o]};n.init=function(){k=OX.utils;m()};n.load=function(o){n(o).load()};n.requestAd=function(o){n(o).fetchAds()};n.recordAction=function(o){d(o,n.Resources.RAJ)};n.recordSegments=function(q){var o,r={};if(q.expires){o=Date.parse(q.expires);if(o<new Date()){return}}for(var p in q){if(q.hasOwnProperty(p)){switch(p){case"add":r.as=q[p];break;case"del":r.ds=q[p];break;default:r[p]=q[p]}}}d(r,n.Resources.RSJ)};n.renderCreative=function(o){k.write(o)};n.setGateway=function(o){b=k.ensureRightProtocol(o)};n.setPageURL=function(o){j=o};n.setRefererURL=function(o){h=o};n.Hooks={ON_AD_REQUEST:1,ON_AD_RESPONSE:2,ON_ADUNIT_CREATED:3,ON_ADUNIT_INITIALIZED:4,ON_ADUNIT_RENDER_START:5,ON_ADUNIT_RENDER_FINISH:6,ON_AD_RENDER_START:7,ON_AD_RENDER_FINISH:8,ON_AD_DEFAULTED:9,ON_AD_NOT_DEFAULTED:10};n.Modes={IMMEDIATE:1,DEFERRED:2};n.RemoteCacheModes={STORE_AD:1,RETRIEVE_AD:2,RETRIEVE_AD_CACHE_MISS:3};n.Resources={ACJ:"acj",RAJ:"raj",RDF:"rdf",RR:"rr",RI:"ri",RSJ:"rsj",RE:"re"};n.GeoLocationSources={GPS:1,IP_ADDRESS:2,USER_REGISTRATION:3};n.shareFrameContents=false;return n}(window,document);
OX.utils=OX.utils||function(d,e,g){var i,b="w",c=true,h="BI",a=1000000;function f(k,j){if(k.attachEvent){k.attachEvent("onload",j)}else{k.onload=j}}i={IMAGE_BEACON_TEMPLATE:"<div style='position:absolute;left:0px;top:0px;visibility:hidden;'><img src='{src}'/></div>",PIXEL_IFRAME_TEMPLATE:"<iframe src='{src}' width='0' height='0' style='display:none;'></iframe>",append:function(k,j){k.parentNode.insertBefore(j,k.nextSibling);return j},attachListener:function(l,j,k){if(l.addEventListener){l.addEventListener(j,k,false)}else{if(l.attachEvent){l.attachEvent("on"+j,k)}}},beacon:function(j){var k=i.ensureRightProtocol(j);(new Image()).src=k},getImgBeacon:function(j){var k=i.ensureRightProtocol(j);return i.template(i.IMAGE_BEACON_TEMPLATE,{src:k})},loadPixels:function(m){var j,l,k;if(m){j=i.template(i.PIXEL_IFRAME_TEMPLATE,{src:m});k=i.create(j);if(l=e.body){l.appendChild(k)}}},browserIDKey:function(){return h},appendBrowserIdToPixelUrl:function(m){var j=i.store.get(h),k=[];if(j){k=j.split(".")}if(k.length===3){var l=i.serialize({bi:k[0]});m+="&"+l}return m},contextArgs:function(){var n=i.detectWindowDims(),p={res:screen.width+"x"+screen.height+"x"+screen.colorDepth,plg:i.detectPlugins(),ch:e.charset||e.characterSet,tz:(new Date()).getTimezoneOffset()},o=e.getElementsByTagName("meta"),r;if(n){p.ws=n[0]+"x"+n[1]}p.ifr=i.inIframe()?1:0;if(p.ifr){try{tWin=d.top;tDoc=d.top.document;tDims=i.detectWindowDimensions(tWin,tDoc);if(tDims){p.tws=tDims.width+"x"+tDims.height}}catch(l){}}else{p.tws=p.ws}for(var m=0;m<o.length;m++){r=o[m];if(r.name&&r.name==="viewport"){p.vmt=1;break}}if(OX.browser_id){var k=OX.browser_id.get();if(k&&k.length===2){p.bi=k[0];p.ba=k[1]}}else{i.store.remove(h)}if(OX.tp_xdi_tapad){OX.tp_xdi_tapad.sync()}if(OX.tp_presync_criteo){var q=OX.tp_presync_criteo.get();p["tp.presync.criteo"]=q.id;p["tp.presync.criteo.status"]=q.status}if(OX.tp_presync_mediamath){var j=OX.tp_presync_mediamath.get();p["tp.presync.mediamath"]=j.id;p["tp.presync.mediamath.status"]=j.status}return p},create:function(k){var j=e.createElement("div");j.innerHTML=k;return j.firstChild},cookie:function(l,m,j){if(c){var k=l+"=";k+=(m||"")+";path=/;";if(i.defined(j)){k+="expires="+j+";"}try{e.cookie=k}catch(n){}}},createScript:function(k){var j=e.createElement("script");j.type="text/javascript";k.id&&(j.id=k.id);k.src&&(j.src=k.src);return j},defined:function(j){return typeof j!="undefined"},detectWindowDims:function(){var l=e.documentElement,j=d.innerWidth,k=d.innerHeight;j=i.defined(j)?j:l.clientWidth;k=i.defined(k)?k:l.clientHeight;if(i.defined(j)&&i.defined(k)){return[j,k]}},detectWindowDimensions:function(o,n){var m=n.documentElement,k=n.getElementsByTagName("body")[0],l=o.innerWidth||m.clientWidth||k.clientWidth,j=o.innerHeight||m.clientHeight||k.clientHeight;return{width:l,height:j}},detectPlugins:function(){var l,k="OX_plg",m="ShockwaveFlash.ShockwaveFlash",j={swf:{activex:[m,m+".3",m+".4",m+".5",m+".6",m+".7"],plugin:/flash/gim},sl:{activex:["AgControl.AgControl"],plugin:/silverlight/gim},pdf:{activex:["acroPDF.PDF.1","PDF.PdfCtrl.1","PDF.PdfCtrl.4","PDF.PdfCtrl.5","PDF.PdfCtrl.6"],plugin:/adobe\s?acrobat/gim},qt:{activex:["QuickTime.QuickTime","QuickTime.QuickTime.4"],plugin:/quicktime/gim},wmp:{activex:["WMPlayer.OCX"],plugin:/(windows\smedia)|(Microsoft)/gim},shk:{activex:["SWCtl.SWCtl","SWCt1.SWCt1.7","SWCt1.SWCt1.8","SWCt1.SWCt1.9",m+".1"],plugin:/shockwave/gim},rp:{activex:["RealPlayer","rmocx.RealPlayer G2 Control.1"],plugin:/realplayer/gim}};return function(){var q,r,o="",n=[];if(l){return l}try{if(e.cookie){q=e.cookie.split((escape(k)+"="));if(2<=q.length){r=q[1].split(";");if(r[0]){if(r[0].indexOf("|")>=0){return unescape(r[0].split("|").join(","))}}}}}catch(v){}for(var u in j){if(j.hasOwnProperty(u)){if(d.ActiveXObject){for(var t=0;t<j[u].activex.length;++t){try{ActiveXObject(j[u].activex[t]);n.push(u);break}catch(v){}}}else{for(var s=0;s<g.plugins.length;++s){if(g.plugins[s].name.match(j[u].plugin)){n.push(u);break}}}}}if(d.postMessage){n.push("pm")}l=o=n.join(",");i.cookie(k,n.join("|"));return o}}(),detectPageURL:function(){var j;try{j=top.location.href}catch(k){}return j||i.detectRefererURL()},detectProtocol:function(){return location.protocol},detectRefererURL:function(){var j=e.referrer;try{j=top.document.referrer}catch(m){if(parent){try{j=parent.document.referrer}catch(l){}}}if(!j&&opener){try{j=opener.location.href}catch(k){}}return j||""},each:function(m,n){if(i.isArray(m)){for(var l=0;l<m.length;l++){n(m[l],l)}}else{for(var j in m){if(m.hasOwnProperty(j)){n(j,m[j])}}}},ensureRightProtocol:function(k){var j;if(k){j=k.indexOf("//");if(j!=5&&j!=6){k="http://"+k}return(i.detectProtocol()=="https:")?k.replace("http:","https:"):k}},get:function(j){return e.getElementById(j)},getCookie:function(j){try{var k=e.cookie.split(j+"=");if(k.length==2){return k[1].split(";")[0]}}catch(l){}},getMedium:function(){return b},setMedium:function(j){b=j},ieVersion:(function(){var m=0,j,k;if(g){try{j=g.userAgent;if(g.appName=="Microsoft Internet Explorer"){k=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");if(k.exec(j)!=null){m=parseFloat(RegExp.$1)}}else{if(g.appName=="Netscape"){k=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})");if(k.exec(j)!=null){m=parseFloat(RegExp.$1)}}}}catch(l){}return m}})(),intersection:function(n,m){var k={},l,j=[];if(!i.isValidArray(n)||!i.isValidArray(m)){return j}for(l=0;l<n.length;l++){k[n[l]]=true}for(l=0;l<m.length;l++){if(k[m[l]]){j.push(m[l])}}return j},isArray:function(j){return Object.prototype.toString.call(j)==="[object Array]"},isEmpty:function(k){for(var j in k){if(k.hasOwnProperty(j)){return false}}return true},isFramed:function(){return d.self!=d.top},isFriendlyFramed:function(){if(!i.isFramed()){return false}try{d.parent.document.getElementsByTagName("body");return true}catch(j){return false}},isUnfriendlyFramed:function(){return i.isFramed()&&!i.isFriendlyFramed()},isIE:0,lastScript:function(){var j=e.getElementsByTagName("script");return j[j.length-1]},merge:function(m){var j,n;if(i.isArray(m)){j={};for(var l=0;l<m.length;l++){n=m[l];for(var k in n){if(n.hasOwnProperty(k)){j[k]=n[k]}}}}return j},now:function(){return(new Date()).getTime()},postMessage:function(j){i.attachListener(d,"message",j)},createFrameElement:function(k,l,j){var n;try{n=(i.isIE&&k)?e.createElement('<iframe name="'+k+'">'):e.createElement("iframe")}catch(m){n=e.createElement("iframe")}if(k){n.setAttribute("id",k);n.setAttribute("name",k)}n.setAttribute("width",l);n.setAttribute("height",j);n.setAttribute("frameSpacing","0");n.setAttribute("frameBorder","no");n.setAttribute("scrolling","no");return n},produceFrame:function(j){var q,k,p='javascript:window["contents"]',w,y=j.hookNode,l=j.name,n=j.width,z=j.height,m=j.onStart,o=j.onFinish,t=j.onSuccess,s=l+"_contents",x=i.template(i.Templates.IFRAME_DOC,{title:j.title||"OpenX",head:j.headHTML,body:j.bodyHTML});q=i.createFrameElement(l,n,z);if(j.replace){i.replace(y,q)}else{y.innerHTML="";y.appendChild(q)}k=(i.isIE&&(i.ieVersion<11))||d.opera;if(k){q.src=p}if(k){try{o&&f(q,o);q.contentWindow.contents=x;m&&m();q.src=p}catch(r){var v=q;q=i.createFrameElement(l,n,z);d[s]=x;p=i.template(i.Templates.IFRAME_JS_URI,{contentsVar:s,domain:e.domain});o&&f(q,o);q.src=p;m&&m();i.replace(v,q)}}else{try{w=q.contentWindow||q.contentDocument;if(w.document){w=w.document}o&&f(q,o);if(w){w.open("text/html","replace");m&&m();w.write(x);w.close()}}catch(u){if(!j.isRetry){j.hookNode=q;j.replace=true;j.isRetry=true;d.setTimeout(function(){i.produceFrame(j)},0)}}}t&&t(q)},rand:function(){return Math.floor(Math.random()*9999999999)+""},remove:function(j){j.parentNode.removeChild(j)},replace:function(k,j){k.parentNode.replaceChild(j,k);return j},replaceOrRemove:function(j,l,k){if(!j){l&&i.remove(l)}else{if(l){return i.replace(l,j)}else{return i.append(k,j)}}},serialize:function(k){var m="",l;if(typeof k==="object"){for(var j in k){if(k.hasOwnProperty(j)){l=k[j];if(i.defined(l)&&(l!==null)){if(i.isArray(l)){l=l.join(",")}m+=j+"="+escape(l)+"&"}}}}if(m.length>1){m=m.substr(0,m.length-1)}return m},store:function(){var o="1",p=630720000000,m="|",r,j,q,l={};try{r=localStorage;r.setItem(o,o);r.removeItem(o);j=1}catch(n){if(g.cookieEnabled&&c){q=1}}function k(v,u){var x="OX_"+v,t,s;if(j){s=r.getItem(x);u&&r.removeItem(x)}else{if(q){s=i.getCookie(x);u&&i.cookie(x)}else{s=l[x];u&&(delete l[x])}}if(s){t=s.split(m);for(var w=0;w<t.length;w++){t[w]=unescape(t[w])}if(t.length===1){return t[0]}else{return t}}}return{put:function(u,y){var w="OX_"+u,x,s,t;if(i.isArray(y)){s=[];for(var v=0;v<y.length;v++){s.push(escape(y[v]))}x=s.join(m)}else{x=escape(y)}if(j){r.setItem(w,x)}else{if(q){t=new Date(i.now()+p).toGMTString();i.cookie(w,x,t)}else{l[w]=x}}},get:function(s){return k(s)},remove:function(s){return k(s,1)}}}(),template:function(t,o,k,p){o=o||{};var m="",l=false,r="",j,k=k||"{",p=p||"}",s,n;for(var q=0;q<t.length;q++){j=t.charAt(q);if(!l&&j===k){l=true}else{if(l&&j===p){s=o[m];if(i.defined(s)&&s!==null){n=s}else{n=""}r+=n;l=false;m=""}else{if(l){m+=j}else{r+=j}}}}return r},Templates:{SCRIPT:"<script type='text/javascript' id='{id}' src='{src}'><\/script>",IFRAME_DOC:"<!DOCTYPE html><html><head><title>{title}</title><base target='_top'/>{head}</head><body style='margin:0;padding:0'>{body}</body></html>",GW_URL:"{gw}/{v}/{r}?{q}",IFRAME_JS_URI:"javascript:document.open();document.domain='{domain}';document.write(window.parent['{contentsVar}']);window.parent['{contentsVar}']=null;setTimeout('document.close()',5000)"},write:function(j){e.readyState!=="complete"&&e.write(j)},isCookieEnabled:function(){return g.cookieEnabled&&c},isValidDIM:function(j){if(j>a){return false}else{if(isNaN(j)){return false}}return true},isEmpty:function(j){for(var k in j){if(j.hasOwnProperty(k)){return false}}return true},isSubset:function(k,j){var m,l;if(!i.isValidArray(k)||!i.isValidArray(j)){return false}if(k.length<j.length){return false}for(m=0;m<j.length;m++){for(l=0;l<k.length;l++){if(j[m]===k[l]){break}if(l===k.length-1){return false}}}return true},isValidArray:function(j){return j&&i.isArray(j)&&j.length!==0},inIframe:function(){return d.self!==d.top},getPosition:function(l){var k,j;if(!l){return null}if(l.tagName==="SCRIPT"){j=e.createElement("div");i.append(l,j);k=j.getBoundingClientRect();i.remove(j)}else{k=l.getBoundingClientRect()}return{top:Math.round(k.top),left:Math.round(k.left)}},getPositionById:function(k,l){var j=k.getElementById(l);return i.getPosition(j)},getAdPosition:function(m,n){var k,j,p=d,o=d.document;if(d.parent!=d.top){return null}try{m=d.frameElement?d.frameElement:m;if(i.inIframe()){p=d.parent;o=d.parent.document}k=i.detectWindowDimensions(p,o);if(!i.isValidDIM(k.width)||!i.isValidDIM(k.height)){return null}if(n){j=i.getPositionById(o,m);if(j==null){return null}}else{j=i.getPosition(m)}if(!i.isValidDIM(j.left)||!i.isValidDIM(j.top)){return null}return{browserDims:k,adUnitStartPos:j}}catch(l){return null}}};if(i.ieVersion){i.isIE=1}return i}(window,document,navigator);
/*@cc_on OX.utils.isIE=1;@*/;
OX.AdRequest=OX.AdRequest||function(O,D){var R=OX.utils,K="OX_remote_cache_token",e=O&&O.remoteCacheToken,e=e||O&&O.useLocalRemoteCacheToken&&R.getCookie(K),e=e||R.rand(),I,l={},x,v=false,h,q,m={},f={},A,g,M,B,u={},S=false,w={o:e},s={mode:null,auid:null,record_tmpl:null,ad_units:[]},d="net_latency",H=5,p=-1,y=-1,F=2048,z="OX_"+e,J="ox_"+OX.Resources.ACJ+"_"+e,j=this,P=OX.Hooks,G=OX.Modes;RemoteCacheModes=OX.RemoteCacheModes;function t(){return(w.rm>0)&&(w.rd>0)&&(w.rc<w.rm)}function c(){if((w.rd>0)&&(w.rm>0)&&(!w.rc)){w.rc=0}}function r(){var k=j.createAdRequestURL(),U=w.rc&&("_"+w.rc),T=J+(U||""),i=R.createScript({id:T,src:k});return i}function a(W,V){var k=f[W]||[],T=OX.getHooksByType(W)||[],Y=T.concat(k),X;if(Y){for(var U=0;U<Y.length;U++){X=Y[U];X.apply(this,V)}}}function L(){w.rc++;setTimeout(function(){j.refreshAds()},1000*w.rd)}function E(k){var i;if(k){i=document.createComment(" "+k.replace(/--/g,"- -"))}g=R.replaceOrRemove(i,g,A)}function o(){var k="ma",i="js";R.setMedium(k);I=I.replace(/\/m?w$/,"/"+k);w.sp=i;delete w.ju;delete w.jr}function C(k,i,V){var U=new XMLHttpRequest(),W=k.split("?");try{W[1]=W[1].replace(/(^|&)callback=[^&]*$/,"");W[1]=W[1].replace(/(^|&)callback=.*?&/,"$1")}catch(T){}U.open("POST",W[0]);U.setRequestHeader("Content-Type","application/x-www-form-urlencoded");U.onreadystatechange=function(){if(this.readyState===4){if(this.status===200){i&&i(JSON.parse(this.responseText))}else{S=false;u={};delete w.openrtb;V&&V()}}};U.send(W[1])}function b(){var V,Z,U,k,Y,W="",X=[];if(true&&!w.be){V=w.auid||[];for(var T=0;T<V.length;T++){Z=V[T];U=l[Z];k=U.get("anchor");if(!k&&s.mode===G.IMMEDIATE){k=R.lastScript()}Y=R.getAdPosition(k,false);if(Y){W=Y.browserDims.width+"x"+Y.browserDims.height;X.push(Y.adUnitStartPos.left+","+Y.adUnitStartPos.top)}else{X.push("")}}j.setBrowserDims(W);j.setAdUnitLocation(X.join("|"))}}j.addAdUnit=function(T){var k=j.getOrCreateAdUnit(T),i;if(!w.auid){w.auid=[]}w.auid.push(T)};j.addContentTopic=function(i){w.tid=w.tid||[];w.tid.push(i)};j.addHook=function(k,i){if(!f[i]){f[i]=[]}f[i].push(k)};j.addPage=function(i){w.pgid=w.pgid||[];w.pgid.push(i)};j.addVariable=function(k,U,T,i){var V=(T||"c")+"."+k;if(i||!m[V]){m[V]=[]}m[V].push(U)};j.createAdRequestURL=function(){var T,k,i,V="ai=904b3aaa-0fb0-451b-ce31-5acfbfaa8b9a";c();b();if(!R.isEmpty(u)){try{w.openrtb=JSON.stringify(u)}catch(U){}}k=R.merge([w,m,R.contextArgs(),OX._customVars,OX._requestArgs]);V&&(V+="&");V+=R.serialize(k);i=j.getNetworkLatencyString();if(i){V+="&nl="+escape(i)}if(M){V+="&r="+escape(M)}T=R.template(R.Templates.GW_URL,{gw:I,v:"1.0",r:OX.Resources.ACJ,q:V});if(!R.isEmpty(u)&&T.length>F){S=true}return T};j.dflt=function(T,i){var k=l[T];k&&k.dflt(i)};j.ifrmHTML=function(T,i){var k=l[T];k&&k.set("iframe_html",i)};j.disableFeature=function(i){w.df=w.df||[];w.df.push(i)};j.disableMarket=function(){j.disableFeature("m")};j.disableSegmentation=function(){w.ns=1};j.enableFeature=function(i){w.ef=w.ef||[];w.ef.push(i)};j.enableMarket=function(){j.enableFeature("m")};j.enableSegmentation=function(){w.ns=null};j.flagStoreRemoteCachedAd=function(i){w.o=i||e;w.cache=RemoteCacheModes.STORE_AD};j.setRemoteCacheToken=function(i){w.o=i;w.cache=RemoteCacheModes.RETRIEVE_AD_CACHE_MISS};j.setRequestStart=function(){p=new Date().getTime()};j.setRequestEnd=function(i){if(p<0){return}y=new Date().getTime();if(i.ads&&i.ads.oxt){var T=i.ads.oxt;var k=(y-p);if(T&&k>T){j.storeNetworkLatency(k-T)}}};j.storeNetworkLatency=function(k){var i=j.getNetworkLatencyList();i.push(k);if(i.length>H){i=i.slice(-H)}R.store.put(d,i.toString())};j.getNetworkLatencyList=function(){var k=R.store.get(d);if(k){var V=JSON.parse("["+k+"]");if(V&&R.isArray(V)){var T=[];for(var U=0;U<H;++U){var W=parseInt(V[U]);if(W>0){T.push(W)}}return T}}return[]};j.getNetworkLatencyString=function(){var k=j.getNetworkLatencyList(),i;if(k.length>0){i=k.toString()}return i};j.fetchAds=function(){var k,i;j.setRequestStart();a(P.ON_AD_REQUEST,[j]);k=j.createAdRequestURL();if(S){C(k,window[z],j.fetchAds)}else{i=R.template(R.Templates.SCRIPT,{src:k,id:J});R.write(i)}};j.fetchAdsComplete=function(){switch(s.mode){case G.IMMEDIATE:j.showAdUnit(s.auid);break;case G.DEFERRED:for(var i in l){if(l.hasOwnProperty(i)){if(l[i].get("anchor")){j.showAdUnit(i)}}}break;default:}t()&&L()};j.frameCreatives=function(i){x=i};j.getOrCreateAdUnit=function(i){if(!l[i]){l[i]=new OX.AdUnit(i,j.get("o"));s.ad_units.push(l[i]);a(P.ON_ADUNIT_CREATED,[l[i]])}return l[i]};j.get=function(i){return s.hasOwnProperty(i)?s[i]:w[i]};j.getQueryArgs=function(){return w};j.getProperties=function(){return s};j.isResponseEmpty=function(){var k,i;if(!(B&&B.ads&&B.ads.adunits&&(k=B.ads.adunits[0])&&(i=k.chain)&&i.length)){return true}else{return false}};j.getRecordTemplate=function(){if(B&&B.ads){return B.ads.record_tmpl}return""};j.loadAdResponse=function(T){var V=T.ads,X=T.ads.adunits,k,W;A=A||R.get(J);B=T;E(s.debug=V.debug);for(var U=0;U<X.length;U++){k=X[U];if(k.refresh_delay){w.rd=k.refresh_delay}if(k.refresh_max){w.rm=k.refresh_max}c();if(t()){x=1}W=function(i){a(P.ON_ADUNIT_INITIALIZED,[i])};j.getOrCreateAdUnit(k.auid).load({adunit:k,rt:V.record_tmpl,oninit:W,chain:V.chain})}};j.load=function(){var k,T,i=j.createAdRequestURL();j.setRequestStart();a(P.ON_AD_REQUEST,[j]);x=1;if(S){C(i,window[z],j.load)}else{k=r();T=document.head||document.body;if(T){T.appendChild(k);A=k}else{A=R.append(R.lastScript(),k)}}};j.refreshAds=function(){var k,i=j.createAdRequestURL();a(P.ON_AD_REQUEST,[j]);if(S){C(i,window[z],j.load)}else{k=r();A=R.replace(A,k)}};j.setAdUnitFallback=function(k,i){j.getOrCreateAdUnit(k).set("fallback",i)};j.setAdUnitImpBeacon=function(k,i){j.getOrCreateAdUnit(k).set("imp_beacon",i)};j.setAdUnitMarketFloor=function(k,i){j.getOrCreateAdUnit(k);w.aumf=w.aumf||[];w.aumf.push(k+":"+i)};j.setAdUnitNGFloor=function(k,i){j.getOrCreateAdUnit(k);w.aungf=w.aungf||[];w.aungf.push(k+":"+i)};j.setAdUnitSlotId=function(k,i){j.getOrCreateAdUnit(k).set("anchor",R.get(i))};j.setAnchorTarget=function(i){w.tg=i};j.setBrowserDims=function(i){w.dims=i};j.setAdUnitLocation=function(i){w.adxy=i};j.setClickRedirectURL=function(i){M=i};j.setGateway=function(i){I=R.ensureRightProtocol(i)};j.setMode=function(i){s.mode=i};j.setPageURL=function(i){w.ju=R.ensureRightProtocol(i)};j.setRefererURL=function(i){w.jr=i};j.setRefreshDelay=function(i){w.rd=i};j.setRefreshMax=function(i){w.rm=i};j.setTest=function(i){w.test=i?"true":null};j.setUserID=function(i){w.xid=i};j.setBidderEligibility=function(i){w.be=i?1:0};j.setPrefetch=function(i){w.prf=i?1:0};j.setBidderConfiguration=function(i){w.bc=i};j.setBidderTimeout=function(i){w.bt=i};j.setCacheEnabled=function(i){w.ce=i?1:0};j.setCoords=function(i){if(i.latitude&&i.longitude){w.lat=i.latitude;w.lon=i.longitude;w.lt=i.source||OX.GeoLocationSources.GPS}};j.setAdSizes=function(i){w.aus=w.aus?w.aus+"|":"";w.aus=w.aus+i.join(",")};j.setAppName=function(i){if(i){w["app.name"]=i;o()}};j.setAppBundleID=function(i){if(i){w["app.bundle"]=i;o()}};j.setAppStoreURL=function(i){if(i){w.url=R.ensureRightProtocol(i);o()}};j.setAPIFrameworks=function(i){if(i.toString()){w.af=i.toString();o()}};j.addDeviceID=function(T,U){var i={"did.ia":"did.iat","did.adid":"did.adid.enabled"},k;if(T.type&&T.id){k=(U||"did.")+T.type;w[k]=T.id;if(i.hasOwnProperty(k)&&T.hasOwnProperty("tracking")){w[i[k]]=!!T.tracking}o()}};j.setOpenRTBParameters=function(k){var i;if(Object.prototype.toString.call(k)==="[object Object]"){u=k}else{if(typeof k==="string"){try{i=JSON.parse(k);this.setOpenRTBParameters(i)}catch(T){}}}};j.addOpenRTBParameter=function(X,Y){var W=X.split("."),U=u,Z,T,k;for(var V=0;V<W.length;V++){Z=W[V];if(V===W.length-1){U[Z]=Y;break}T=Z.match(/(\w+)\[(\d+)\]/);if(T){Z=T[1];k=T[2];U[Z]=U[Z]||[];U[Z][k]=U[Z][k]||{};U=U[Z][k]}else{U[Z]=U[Z]||{};U=U[Z]}}};j.showAdUnit=function(T){var k=l[T],i;if(k){i=function(){if(R.getMedium()==="ma"&&!k.get("anchor")){return 0}if(v){return 0}if(k.get("framed")){return 1}if(R.defined(x)){return x}return !!OX.getFramed()}();k.render({framed:i,onAdUnitRenderStart:function(){a(P.ON_ADUNIT_RENDER_START,[k])},onAdUnitRenderFinish:function(){a(P.ON_ADUNIT_RENDER_FINISH,[k])},onAdRenderStart:function(){a(P.ON_AD_RENDER_START,[k])},onAdRenderFinish:function(V,W,U){a(P.ON_AD_RENDER_FINISH,[V,W,U])},onAdDefaulted:function(V,W,U){a(P.ON_AD_DEFAULTED,[V,W,U])},onAdNotDefaulted:function(V,W,U){a(P.ON_AD_NOT_DEFAULTED,[V,W,U])},shareFrameContents:OX.shareFrameContents})}};window[z]=function(i){if(w.cache===RemoteCacheModes.STORE_AD){if(O.useLocalRemoteCacheToken&&!O.remotelyCacheAd){R.cookie(K,w.o)}}else{if(w.cache===RemoteCacheModes.RETRIEVE_AD_CACHE_MISS&&O.useLocalRemoteCacheToken&&!O.remoteCacheToken){R.cookie(K)}j.loadAdResponse(i);j.setRequestEnd(i);a(P.ON_AD_RESPONSE,[j]);j.fetchAdsComplete()}};w.callback=z;j.setGateway(O&&O.gw||D.gw);j.setPageURL(O&&O.url||D.url);j.setRefererURL(O&&O.ref||D.ref);if(!window.postMessage){j.disableFeature("c")}if(O){j.setMode(G.IMMEDIATE);s.auid=O.auid;O.auid&&j.addAdUnit(s.auid);O.tid&&j.addContentTopic(O.tid);O.aumf&&j.setAdUnitMarketFloor(s.auid,O.aumf);O.aungf&&j.setAdUnitNGFloor(s.auid,O.aungf);O.tg&&j.setAnchorTarget(O.tg);O.imp_beacon&&j.setAdUnitImpBeacon(s.auid,O.imp_beacon);O.slot_id&&j.setAdUnitSlotId(s.auid,O.slot_id);O.fallback&&j.setAdUnitFallback(s.auid,O.fallback);O.test&&j.setTest(O.test);O.userid&&j.setUserID(O.userid);O.r&&j.setClickRedirectURL(O.r);O.rd&&j.setRefreshDelay(O.rd);O.rm&&j.setRefreshMax(O.rm);O.md&&j.disableMarket();O.ns&&j.disableSegmentation();O.coords&&j.setCoords(O.coords);O.openrtb&&j.setOpenRTBParameters(O.openrtb);O.appName&&j.setAppName(O.appName);O.appBundle&&j.setAppBundleID(O.appBundle);O.appStoreURL&&j.setAppStoreURL(O.appStoreURL);O.af&&j.setAPIFrameworks(O.af);if(O.deviceIDs){for(var Q=0;Q<O.deviceIDs.length;Q++){j.addDeviceID(O.deviceIDs[Q])}}if(O.remotelyCacheAd){j.flagStoreRemoteCachedAd(O.remoteCacheToken)}if(O.remoteCacheToken&&!O.remotelyCacheAd){j.setRemoteCacheToken(O.remoteCacheToken)}if(O.useLocalRemoteCacheToken&&!w.cache){var n=R.getCookie(K);if(n){j.setRemoteCacheToken(n)}else{j.flagStoreRemoteCachedAd()}}if(O.vars){for(var N in O.vars){O.vars.hasOwnProperty(N)&&j.addVariable(N,O.vars[N])}}if(O.ef){for(var Q=0;Q<O.ef.length;Q++){j.enableFeature(O.ef[Q])}}if(O.df){for(var Q=0;Q<O.df.length;Q++){j.disableFeature(O.df[Q])}}if(R.defined(O.frameCreatives)){x=O.frameCreatives}O.forceUnframed&&(v=true);O.onResponse&&j.addHook(O.onResponse,P.ON_AD_RESPONSE);O.onAdUnitRender&&j.addHook(O.onAdUnitRender,P.ON_ADUNIT_RENDER_START);O.onAdUnitLoaded&&j.addHook(O.onAdUnitLoaded,P.ON_ADUNIT_RENDER_FINISH)}else{j.setMode(G.DEFERRED)}};
OX.AdUnit=OX.AdUnit||function(T,k){var V=OX.utils,i=this,B=OX.Resources,U=T,G=k,S,O,s,M,l,I,E,t={adunit_id:T,anchor:null,rm_anchor:null},v=false,K="dflt",r="dflt",g="loaded",c="flash",A="rich_media",a="ox_"+G+"_"+U,n=parseInt("2500")||2500,W=0,H="<script type='text/javascript'>var OX_swfobject = window.parent.OX.swfobject(window, document, navigator);<\/script>",x,j=a+"_ch_{i}",y=V.IMAGE_BEACON_TEMPLATE,L="<script type='text/javascript'>(new Image()).src='{src}'{suffix}<\/script>",w="<script type='text/javascript'>(function() {attachListener(window, 'message', dflt);function dflt(e) {if (e.data === '#data#') {signalDefaultTo(window.parent);var frames = window.parent.frames;for (var i = 0; i < frames.length; i++) {signalDefaultTo(frames[i]);}window.frameElement.style.display = 'none';}}function signalDefaultTo(win) {try {win.OX.dflt('#rid#','#auid#',#index#);} catch(e) {var msg = JSON.stringify({action : '#data#',params : ['#rid#','#auid#',#index#]});win.postMessage(msg, '*');}}function attachListener(target, type, listener) {if (target.addEventListener) {target.addEventListener(type, listener, false);} else {target.attachEvent('on' + type, listener);}}})();<\/script>",z="<script type='text/javascript'>window.onload = function() {var html = document.documentElement.innerHTML;window.parent.OX.ifrmHTML('[rid]', '[auid]', html);};<\/script>";var J=function(X){this.renderStrategy=X};J.prototype.render=function(X){return this.renderStrategy(X)};function D(Y){var X=x,aa={medium:V.getMedium(),rtype:B.RI,txn_state:Y.ts},Z="KnowYourMeme";if(Z){X+="&bs={bs}";aa.bs=Z}return V.template(X,aa)}function Q(X){q(X)}function q(Y){var aa=t.fallback,Z,X,ab=function(){Y.onAdRenderFinish(i,S,0);Y.onAdUnitRenderFinish()};if(S&&S.html&&(i.get("type")!==c)){Z=D(S);X=F(y,{src:Z});if(!i.get("is_fallback")){S.html=S.html+X}}if(i.get("is_fallback")){aa=t.fallback||(S&&S.html)}else{if(S&&S.html){aa=S.html+(t.imp_beacon||"")}}if(aa){Y.onAdUnitRenderStart();if(Y.framed){R(aa,a,i.get("type")===c?H:"",i.get("width")||i.get("primary_width"),i.get("height")||i.get("primary_height"),Y.onAdRenderStart,ab,Y.shareFrameContents)}else{Y.onAdRenderStart();u(aa);ab()}}}function P(X){E=V.now();I=X;I.onAdUnitRenderStart();d(0)}function m(Y){var X,Z;if(S&&S.html){X=V.template(x,{medium:V.getMedium(),rtype:B.RR,txn_state:S.ts});Z=F(y,{src:X});if(!i.get("is_fallback")){S.html=Z+S.html}}q(Y)}function d(ac){var ae="",Z="",ai="",ad="",Y,af,ag,ab="",aa,ah="",X=t.chain,aj=V.template(j,{i:ac});S=X[ac];O=ac;if(!I.renderTest){ag=V.template(x,{medium:V.getMedium(),rtype:B.RR,txn_state:S.ts});if(v&&(ac<X.length-1)){ag+="&cts=";ab=" + new Date().getTime();"}Z=F(L,{src:ag,suffix:ab})}if(ac<X.length-1){C();ae=V.template(w,{data:K,rid:G,auid:U,index:ac},"#","#");S.dflting=1;Y=f(ac);af=function(){Y();I.onAdRenderFinish(i,S,ac)}}else{if(i.get("type")===c){ae=H}else{if(!I.renderTest){aa=D(S);ai=F(L,{src:aa,suffix:ah})}}if(i.get("is_fallback")){ad=t.fallback||(S&&S.html);Z="";ai=""}else{if(S&&S.html){ad=S.html+(t.imp_beacon||"")}}af=function(){I.onAdRenderFinish(i,S,ac);I.onAdUnitRenderFinish()}}R(Z+(ad||S.html)+ai,aj,ae,S.width,S.height,I.onAdRenderStart,af,I.shareFrameContents)}function N(){return(V.now()-E)>t.chain_timeout}function f(X){return function(){window.setTimeout(function(){var aa=t.chain[X],Y=X+1,Z;aa[g]=1;if(aa.hasOwnProperty(r)){if(N()){Y=t.chain.length-1}d(Y)}else{I.onAdNotDefaulted(i,aa,X);if(!I.renderTest){Z=D(S);if(v){Z+="&cte="+V.now()}V.beacon(Z)}I.onAdUnitRenderFinish()}},W)}}function R(aa,X,ab,ag,Z,ah,ac,ai){var af=(t.pre_html||"")+aa+(t.post_html||""),ad="",Y,ae;if(ai){ad=V.template(z,{rid:G,auid:U},"[","]")}Y=(t.head_html||"")+ab+ad;if(V.isUnfriendlyFramed()&&i.get("type")===A){p(X,ag,Z,Y,af,ah,ac)}else{e(X,ag,Z,Y,af,ah,ac)}i.set("iframe_id",X)}function p(X,ae,Z,ad,aa,af,ac){h(ab,Y);function ab(ag){window.parent.postMessage(JSON.stringify({action:"render_ad",params:[X,ae,Z,ad,aa]}),"*");af();V.attachListener(window,"message",function(ah){if(ah.source===ag.contentWindow&&ah.data===X){ac()}})}function Y(){if(t.chain&&t.chain.length>O+1){d(O+1)}else{e(X,ae,Z,ad,aa,af,ac)}}}function e(ae,Y,ac,ab,X,Z,ad){var aa;if(V.isFriendlyFramed()&&i.get("type")===A){if(!t.rm_anchor){t.rm_anchor=document.createElement("div");V.append(window.frameElement,t.rm_anchor)}aa=t.rm_anchor;window.frameElement.style.display="none"}else{if(!t.anchor){t.anchor=document.createElement("div");if(!document.body&&V.isFramed()){V.write("<body style='margin:0;padding:0'></body>");document.body.appendChild(t.anchor)}else{V.append(V.lastScript(),t.anchor)}}aa=t.anchor}V.produceFrame({hookNode:aa,replace:true,name:ae,width:Y,height:ac,headHTML:ab,bodyHTML:X,onStart:Z,onFinish:ad,onSuccess:function(af){if(aa===t.rm_anchor){t.rm_anchor=af}else{t.anchor=af}}})}function h(ae,ac){var Z=document.referrer,ab=Z.split("/"),Y=ab[0]+"//"+ab[2],X=Y+"/ox_buster.html",ad,aa;ad=V.createFrameElement("",0,0);ad.style.display="none";ad.src=X;document.body.appendChild(ad);V.attachListener(window,"message",function(af){if(af.source===ad.contentWindow){aa=true}});V.attachListener(ad,"load",function(){setTimeout(function(){aa?ae(ad):ac()},100)});h=function(ag,af){aa?ag(ad):af()}}function u(X){var Z=(t.pre_html||"")+X+(t.post_html||""),Y=Z;if(!document.body&&V.isFramed()){Y="<body style='margin:0;padding:0'>"+Z+"</body>"}V.write(Y)}function C(){V.attachListener(window,"message",function(X){try{var Z=JSON.parse(X.data);if(Z.action===K){OX.dflt.apply(OX,Z.params)}}catch(Y){}});C=function(){}}function b(X){var Y=V.template(x,{medium:V.getMedium(),rtype:B.RDF,txn_state:X.ts});if(v){Y+="&cte="+V.now()}V.beacon(Y)}var o=[{shouldDefer:function(){return(window.mraid&&typeof mraid.isViewable==="function"&&!mraid.isViewable())},defer:function(X){mraid.addEventListener("viewableChange",(function(){var Y=false;return function(Z){if(!Y&&Z){V.beacon(X);Y=true}}})())}},{shouldDefer:function(){return typeof trackImpressionHelper==="function"},defer:function(X){var Y=trackImpressionHelper;trackImpressionHelper=function(){V.beacon(X);Y()}}}];function F(aa,ad,ae,ab){var Y=ad.src,X="",ac;for(var Z=0;Z<o.length;Z++){ac=o[Z];if(ac.shouldDefer()){ac.defer(Y);return X}}X=V.template(aa,ad,ae,ab);return X}i.dflt=function(Y){var Z=t.chain[Y],X=Y+1;if(Z[r]){return}Z[r]=1;b(S);I.onAdDefaulted(i,Z,Y);if(V.isUnfriendlyFramed()&&Z.type===A){window.parent.postMessage(JSON.stringify({action:"restore_busted_frame"}),"*")}else{if(V.isFriendlyFramed()&&Z.type===A){window.frameElement.style.display=""}}if(!I.renderTest){if(Z.hasOwnProperty(g)){if(N()){X=t.chain.length-1}d(X)}}};i.get=function(X){return t.hasOwnProperty(X)?t[X]:(S&&S[X])};i.set=function(X,Y){t[X]=Y};i.getProperties=function(){return V.merge([t,S])};i.load=function(Z){var Y=Z.adunit,aa;x=Z.rt;for(var X in Y){if(Y.hasOwnProperty(X)){t[X]=Y[X]}}if(t.size){aa=t.size.split("x");t.primary_width=aa[0];t.primary_height=aa[1]}t.chain_timeout=t.chain_timeout||n;if(Z.chain){if(t.chain&&t.chain.length>0){if(t.chain.length>1){s=new J(P)}else{S=t.chain&&t.chain[0];s=new J(m)}}else{s=new J(Q)}}else{S=t.chain&&t.chain[0];s=new J(q)}M=1;l=0;Z.oninit&&Z.oninit(i)};i.render=function(Y){var ab,X=i.get("height"),Z=i.get("width");if(V.isFramed()){try{ab=V.detectWindowDimensions(window,document);if(ab.height<X){window.frameElement.height=X;window.frameElement.style.height=X+"px"}if(ab.width<Z){window.frameElement.width=Z;window.frameElement.style.width=Z+"px"}}catch(aa){}}if(l){return}i.set("framed",Y.framed);if(!M){s=new J(Q)}s.render(Y);l=1}};
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */
;OX.swfobject=function(N,j,t){var P=OX.utils.defined,r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",N=N||window,j=j||document,t=t||navigator,T=false,U=[h],o=[],M=[],H=[],l,Q,D,B,I=false,a=false,n,F,m=true,L=function(){var aa=P(j.getElementById)&&P(j.getElementsByTagName)&&P(j.createElement),ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(P(t.plugins)&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(P(t.mimeTypes)&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(P(N.ActiveXObject)){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!L.w3){return}if((P(j.readyState)&&j.readyState=="complete")||(!P(j.readyState)&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!I){if(P(j.addEventListener)){j.addEventListener("DOMContentLoaded",f,false)}if(L.ie&&L.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(N==top){(function(){if(I){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(L.wk){(function(){if(I){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(I){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}I=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function J(X){if(I){X()}else{U[U.length]=X}}function s(Y){if(P(N.addEventListener)){N.addEventListener("load",Y,false)}else{if(P(j.addEventListener)){j.addEventListener("load",Y,false)}else{if(P(N.attachEvent)){i(N,"onload",Y)}else{if(typeof N.onload=="function"){var X=N.onload;N.onload=function(){X();Y()}}else{N.onload=Y}}}}}function h(){if(T){V()}else{G()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);aa.setAttribute("style","display:none;");var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(P(Z.GetVariable)){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");L.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;G()})()}else{G()}}function G(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(L.pv[0]>0){var ae=c(Y);if(ae){if(E(o[af].swfVersion)&&!(L.wk&&L.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}O(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&P(Z.SetVariable)){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(P(Y.SetVariable)){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&E("6.0.65")&&(L.win||L.mac)&&!(L.wk&&L.wk<312)}function O(aa,ab,X,Z){a=true;D=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(!P(aa.width)||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(!P(aa.height)||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=L.ie&&L.win?"ActiveX":"PlugIn",ac="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(P(ab.flashvars)){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(L.ie&&L.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(L.ie&&L.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(L.win&&L.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(L.wk&&L.wk<312){return X}if(aa){if(!P(ai.id)){ai.id=Y}if(L.ie&&L.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";M[M.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(L.ie&&L.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);H[H.length]=[Z,X,Y]}function E(Z){var Y=L.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(L.ie&&L.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;F=null}if(!n||F!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(L.ie&&L.win&&P(j.styleSheets)&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}F=X}if(L.ie&&L.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&P(j.createTextNode)){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(I&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function K(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&P(encodeURIComponent)?encodeURIComponent(Y):Y}var d=function(){if(L.ie&&L.win){window.attachEvent("onunload",function(){var ac=H.length;for(var ab=0;ab<ac;ab++){H[ab][0].detachEvent(H[ab][1],H[ab][2])}var Z=M.length;for(var aa=0;aa<Z;aa++){y(M[aa])}for(var Y in L){L[Y]=null}L=null;for(var X in OX_swfobject){OX_swfobject[X]=null}OX_swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(L.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(L.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(L.w3&&!(L.wk&&L.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);J(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(P(am.flashvars)){am.flashvars+="&"+ai+"="+escape(Z[ai])}else{am.flashvars=ai+"="+escape(Z[ai])}}}if(E(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;O(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:L,getFlashPlayerVersion:function(){return{major:L.pv[0],minor:L.pv[1],release:L.pv[2]}},hasFlashPlayerVersion:E,createSWF:function(Z,Y,X){if(L.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(L.w3&&A()){O(Z,aa,X,Y)}},removeSWF:function(X){if(L.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(L.w3){v(aa,Z,Y,X)}},addDomLoadEvent:J,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return K(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return K(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(L.ie&&L.win){l.style.display="block"}}if(D){D(B)}}a=false}}}};var OX_swfobject=OX_swfobject||OX.swfobject(window,document,navigator);
 !function(){OX.init();OX.setGateway("http://viumbe-d.openx.net/w");var a=true;var g=OX.utils.appendBrowserIdToPixelUrl("http://us-u.openx.net/w/1.0/pd?plm=5&ph=96048d4c-2ba3-40dc-b72a-60812efcaaf2");if(a){OX.utils.attachListener(window,"load",function(){OX.utils.loadPixels(g)})}var e;while(window.OX_cmds&&(e=OX_cmds.shift())){if(typeof e==="function"){e()}}var f=window.OX_reporter_cmds;if(!f){try{f=window.top.OX_reporter_cmds}catch(d){}}for(var b in f){if(typeof f[b]==="function"){f[b](window)}}var c;while(window.OX_ads&&(c=OX_ads.shift())){c.hasOwnProperty("slot_id")?OX.load(c):OX.requestAd(c)}}(); window.OXHBConfig={};OXHBConfig={oxns:"OX",host:"viumbe-d.openx.net",medium:"w",ad_position_detection_enabled:true,siteName:"KnowYourMeme"};OXHBConfig.DFP_mapping={"/1025485/chz_media_btf_mediumrect_2": {"oxAdUnitId": {"default": 538501234}, "sizes": ["300x250"]}, "/1025485/chz_home_atf_leaderboard": {"oxAdUnitId": {"default": 538501231}, "sizes": ["728x90", "970x250"]}, "/1025485/kym_ros_btf_skyscraper_2": {"oxAdUnitId": {"default": 538501227}, "sizes": ["160x600"]}, "/1025485/chz_media_btf_mediumrect_1": {"oxAdUnitId": {"default": 538501251}, "sizes": ["300x600", "300x250"]}, "/1025485/chz_channel_btf_mediumrect_2": {"oxAdUnitId": {"default": 538501249}, "sizes": ["300x250"]}, "/1025485/chz_channel_btf_mediumrect_1": {"oxAdUnitId": {"default": 538501244}, "sizes": ["300x600", "300x250"]}, "currency": ["USD"], "/1025485/chz_media_atf_mediumrect": {"oxAdUnitId": {"default": 538501226}, "sizes": ["300x600", "300x250"]}, "/1025485/kym_ros_btf_skyscraper_1": {"oxAdUnitId": {"default": 538501242}, "sizes": ["160x600"]}, "/1025485/kym_home_atf_mediumrect": {"oxAdUnitId": {"default": 538501246}, "sizes": ["300x600", "300x250"]}, "/1025485/chz_channel_atf_mediumrect": {"oxAdUnitId": {"default": 538501245}, "sizes": ["300x600", "300x250"]}, "version": "2.0", "/1025485/kym_ros_atf_mediumrect": {"oxAdUnitId": {"default": 538501228}, "sizes": ["300x600", "300x250"]}, "max_bucket": 2000, "/1025485/chz_media_atf_leaderboard": {"oxAdUnitId": {"default": 538501239}, "sizes": ["728x90"]}, "hb_ver": "2.0", "/1025485/kym_ros_atf_leaderboard": {"oxAdUnitId": {"default": 538501235}, "sizes": ["728x90"]}, "/1025485/kym_ros_btf_mediumrect_1": {"oxAdUnitId": {"default": 538501225}, "sizes": ["300x250"]}, "/1025485/kym_ros_btf_mediumrect_2": {"oxAdUnitId": {"default": 538501230}, "sizes": ["300x250"]}, "/1025485/kym_ros_btf_mediumrect_3": {"oxAdUnitId": {"default": 538501229}, "sizes": ["300x250"]}, "/1025485/chz_home_btf_skyscraper": {"oxAdUnitId": {"default": 538501248}, "sizes": ["160x600"]}, "/1025485/chz_home_btf_mediumrect": {"oxAdUnitId": {"default": 538501237}, "sizes": ["300x600", "300x250"]}, "bm": 1, "/1025485/chz_home_atf_mediumrect": {"oxAdUnitId": {"default": 538501243}, "sizes": ["300x600", "300x250"]}, "/1025485/kym_home_atf_leaderboard": {"oxAdUnitId": {"default": 538501241}, "sizes": ["728x90", "970x250"]}, "/1025485/chz_channel_atf_leaderboard": {"oxAdUnitId": {"default": 538501247}, "sizes": ["728x90", "970x250"]}, "/1025485/kym_home_btf_mediumrect_2": {"oxAdUnitId": {"default": 538501238}, "sizes": ["300x250"]}, "/1025485/kym_home_btf_mediumrect_3": {"oxAdUnitId": {"default": 538501232}, "sizes": ["300x250"]}, "/1025485/kym_home_btf_mediumrect_1": {"oxAdUnitId": {"default": 538501233}, "sizes": ["300x250"]}, "/1025485/chz_channel_btf_skyscraper": {"oxAdUnitId": {"default": 538501240}, "sizes": ["160x600"]}, "omit_js_sdk": 0, "zlb": false, "timeout": 2500, "/1025485/chz_home_btf_mediumrect_2": {"oxAdUnitId": {"default": 538501236}, "sizes": ["300x250"]}};
/*! hb-sdk v2.0.15-8 */
var oxhbjs=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){i(4);var n=(i(1),i(38),i(20),i(5),i(36));e.exports=n},function(e,t,i){var n=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),i=0,n=t.length;i<n;i++)for(var r=t[i],o=Object.keys(r),a=0,s=o.length;a<s;a++){var d=o[a],u=r[d];"undefined"!=typeof u&&(e[d]=u)}return e};e.exports=n.apply(this,[{},i(12),i(6),i(24),i(26),i(25),i(28),i(29),i(7),i(31),i(32),i(27)])},function(e,t,i){var n=i(1).keyMirror,r={DEBUG:null,ERROR:null,WARN:null,START_AUCTION:null,AUCTION_START:null,AUCTION_BID_REQUESTED:null,BIDS_REQUESTED:null,AUCTION_BID_RECEIVED:null,BID_RECEIVED:null,BID_RENDERED:null,AUCTION_POST_BID_RECEIVED:null,END_AUCTION:null,AUCTION_END:null,AUCTION_COMPLETE:null,GET_POST_BIDS:null,BID_ON_FLIGHT:null,AUCTION_TIMEOUT_START:null,BID_EXPIRED:null,BIDDER_ADAPTOR_ERROR:null};e.exports=n(r)},function(e,t,i){var n=i(17);e.exports=new n},function(e,t,i){var n,r,o=i(1),a=i(22),s=i(2),d={},u=[],c={},l={},f=i(3);t.addAdapter=function(e,t){f.emit(s.DEBUG,"Adding "+t+" adapter",e),e&&t&&o.isFn(e.callBids)&&("ssmeta"==t?n=e:d[t]=e)},t.fetchBids=function(e,t,i,u){if(d=u||d,!e)return void f.emit(s.ERROR,"fetchBids failed, no config.");if(t&&!o.isFn(t)&&(f.emit(s.WARN,"fetchBids called with improper callback"),t=null),i&&!o.isInteger(i)&&(f.emit(s.WARN,"fetchBids called with improper timeout"),i=null),!n&&d=={})return void f.emit(s.WARN,"fetchBids called with no adapters");var c=a.createAuction(t),p={};if(l[c.id]=c,r=c,n)e.params=e.params||{},e.params.auction_id=c.id,n.callBids(e);else{for(var g in d)if(d.hasOwnProperty(g)){var h=(d[g],[]),m={params:e.params[g]};c.expectedBidsByBidder[g]=0;for(var v in e.slots)if(e.slots.hasOwnProperty(v)&&e.slots[v].bids&&e.slots[v].bids[g]){var _,y=e.slots[v],S={};if(S.div=y.div,S.adunit=y.adunit,S.sizes=y.sizes,S.params={},e.params&&e.params[g])for(_ in e.params[g])e.params[g].hasOwnProperty(_)&&(S.params[_]=e.params[g][_]);for(_ in y.bids[g])y.bids[g].hasOwnProperty(_)&&(S.params[_]=y.bids[g][_]);y.targetingMap&&(S.targetingMap=y.targetingMap),y.floor&&(S.floor=y.floor),S.placementCode=y.div+"-.-"+y.adunit+"-.-"+c.id,h.push(S),c.expectedBidsByBidder[g]++,c.expectedBids++}h.length>0&&(m.bids=h,m.auction_id=c.id,m.bidderCode=g,m.isPrefetch=e.isPrefetch,e.pageTargeting&&(m.pageTargeting=e.pageTargeting),p[g]=m)}if(0!==c.expectedBids)for(g in d)if(d.hasOwnProperty(g)&&p[g])try{f.emit(s.BIDS_REQUESTED,p[g]),d[g].callBids(p[g])}catch(D){f.emit(s.BIDDER_ADAPTOR_ERROR,"Bidder:"+g+" caused an error.",D)}}return 0===c.expectedBids?(f.emit(s.WARN,"fetchBids called with invalid params or no valid bid requests",e),setTimeout(function(){A(c)},0),c):(f.emit(s.AUCTION_START,c),c.startTime=new Date,i&&setTimeout(function(){c.ended||E(c.id)},1*i),c)},t.getAuctions=function(){var e=[];for(var t in l)l.hasOwnProperty(t)&&e.push(l[t]);return e},t.getAuctionByAuctionId=function(e){return e?l[e]:null},t.setExpectedBids=function(e,t){if(!(r&&r.expectedBidsByBidder&&o.isStr(e)&&o.isInteger(t)))return void f.emit(s.WARN,"setExpectedBidsCount failed.",e);if(r.completed)return void f.emit(s.WARN,"setExpectedBidsCount called after auction completed.",e);var i=0;r.expectedBidsByBidder[e]=1*t;for(var n in r.expectedBidsByBidder)r.expectedBidsByBidder.hasOwnProperty(n)&&(i+=r.expectedBidsByBidder[n]);r.expectedBids=i};var p=function(e){return!!(e&&e.bidderCode&&e.auction_id&&e.div&&e.adunit)},g=function(e){for(var t=[],i=0;i<u.length;i++)e&&!e(u[i])||t.push(u[i]);return t},h=function(e){return g(function(t){return t.auction_id==e})},m=function(e){return g(function(t){return t.div==e})},v=function(e){return g(function(t){return t.adunit==e})},_=function(e){return g(function(t){e=o.normalizeSizes(e);for(var i=0;i<e.length;i++)if(e[i]==t.getSize())return!0;return!1})},y=function(e){return c[e]},S=function(e){var t=0,i=u.length,n=c[e];if(!n)return null;for(delete c[e],f.emit(s.BID_EXPIRED,n);t<i;t++)if(e===u[t].id)return u.splice(t,1),n};t.getBidById=y,t.getBids=g,t.getBidsByAuctionId=h,t.getBidsByDiv=m,t.getBidsByAdunit=v,t.getBidsBySizes=_,t.deleteBidById=S,t.addBid=function(e){if(!p(e))return void f.emit(s.ERROR,"addBid could not add bid, required fields: bidderCode, auction_id, div, adunit",e);try{e.timestamp=new Date,u.push(e),c[e.id]=e,f.emit(s.BID_RECEIVED,e),e.exp&&(e.ttlTimer=setTimeout(function(){S(e.id)},+e.exp));var t=l[e.auction_id];if(!t)return;t.returnedBids++,t.returnedBids==t.expectedBids&&A(t)}catch(i){f.emit(s.ERROR,"addBid exception: ",i)}},t.renderBid=function(e,t){if(!e||!o.isStr(e)||!t)return f.emit(s.ERROR,"renderBid called with improper arguments",e,t),!1;var i=c[e];if(!i)return f.emit(s.ERROR,"renderBid called but could not find bid.",e),!1;if(i.rendered)return f.emit(s.ERROR,"renderBid called but bid already rendered.",e),!1;try{i.renderBid&&o.isFn(i.renderBid)?i.renderBid(t):o.renderCreative(i.ad,t,i.height,i.width,i.id),i.rendered=!0,f.emit(s.BID_RENDERED,i)}catch(n){return void f.emit(s.ERROR,"renderBid failed to render.",n)}};var E=function(e){if(!e||!o.isStr(e))return void f.emit(s.ERROR,"endAuction called with improper argument",e);var t=l[e];return t?(t.ended&&f.emit(s.WARN,"endAuction called but auction has already ended.",e),t.ended=!0,t.endTime=new Date,void f.emit(s.AUCTION_END,t)):void f.emit(s.ERROR,"endAuction called but could not find auction.",e)};t.endAuction=E;var A=function(e){e.completed=!0,e.complete_time=new Date,e.ended||(e.callback&&e.callback(h(e.id)),E(e.id)),f.emit(s.AUCTION_COMPLETE,e)};t._clearBids=function(){u=[],c={}}},function(e,t,i){var n=i(1),r={MAX_BUCKET:2e3,TIER_1:1e3,TIER_2:5e3,MAX_BUCKET_MULTIPLIER:10,TIMEOUT:2500,SUPPORTED_AD_UNIT_SIZES:{300:["250","600","1050"],320:["480","50"],728:["90"],768:["1024"],160:["600"],970:["90","250"],468:["60"],120:["600"],480:["320"],336:["280"],1024:["768"]},OX_DFP_HEIGHT_DELTA:5,SLOT_STATUS:{BYPASS:1,READY:2,REQUESTED:3,TIMED_OUT:8,REFRESHING:9,DIL_REFRESH_SKIP:10,RESPONDED:4,DISPLAYING:5,DISPLAYED:6,CREATED:7},REQUEST_STATUS:{READY:2,REQUESTED:3,RESPONDED:4,TIMEOUT:5},BID_EXPIRATION_THRESHOLD:27e4,BID_ID_PREFIX:"hb-bid-",TARGETING_MAP_SEARCH_PREFIXES:["ox","meta"],BC_BIDDER_TYPES:{STANDARD_BIDDER:"hb_2",API_BIDDER:"hb_2api",PREFETCH_BIDDER:"hb_2prf",PREFETCH_WITH_DEFINED_SLOTS_BIDDER:"hb_2prfds"}};r.SLOT_STATUS=n.keyMirror(r.SLOT_STATUS),e.exports=r},function(e,t){var i="Array",n="String",r="Function",o=Object.prototype.toString;t.isSubset=function(e,t){var i,n;if(!this.isValidArray(e)||!this.isValidArray(t))return!1;if(e.length<t.length)return!1;for(i=0;i<t.length;i++)for(n=0;n<e.length&&t[i]!==e[n];n++)if(n===e.length-1)return!1;return!0},t.isA=function(e,t){return o.call(e)==="[object "+t+"]"},t.isFn=function(e){return this.isA(e,r)},t.isDefined=function(e){return"undefined"!=typeof e},t.isStr=function(e){return this.isA(e,n)},t.isArray=function(e){return this.isA(e,i)},t.isValidArray=function(e){return e&&this.isArray(e)&&0!==e.length},t.isNumeric=function(e){return!this.isArray(e)&&e-parseFloat(e)+1>=0},t.isInteger=function(e){return this.isNumeric(e)&&e%1===0},t.isEmpty=function(e){if(!e)return!0;if(this.isArray(e)||this.isStr(e))return e.length<=0;for(var t in e)if(hasOwnProperty.call(e,t))return!1;return!0}},function(e,t,i){var n=(i(14),i(6)),r=Object.prototype.hasOwnProperty,o=(Array.prototype.slice,function(){var e=0;return function(){return e++,e}}());t.addEventHandler=function(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i)},t.contains=function(e,t){if(n.isEmpty(e))return!1;if(n.isFn(e.indexOf))return e.indexOf(t)!==-1;for(var i=e.length;i--;)if(e[i]===t)return!0;return!1},"function"!=typeof Object.create&&(Object.create=function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()),"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),i=this,n=function(){},r=function(){return i.apply(this instanceof n?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),r.prototype=new n,r}),t["extends"]=function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);null===t?e.prototype=Object.create(t):(i.prototype=t.prototype,e.prototype=new i)},t.getUniqueIdentifierStr=function(){return o()+Math.random().toString(16).substr(2)},t.intersection=function(e,t){var i,n={},r=[],o=!!e&&e.length,a=!!t&&t.length;for(i=0;i<o;i++)n[e[i]]=!0;for(i=0;i<a;i++)n[t[i]]&&r.push(t[i]);return r},t.keyMirror=function(e){var t=Object.keys(e),i={};return t.forEach(function(e){i[e]=e}),i},t.replaceTokenInString=function(e,t,i){return this._each(t,function(t,n){t=void 0===t?"":t;var r=i+n.toUpperCase()+i,o=new RegExp(r,"g");e=e.replace(o,t)}),e},t._each=function(e,t){if(!n.isEmpty(e)){if(n.isFn(e.forEach))return e.forEach(t,this);var i=0,o=e.length;if(o>0)for(;i<o;i++)t(e[i],i,e);else for(i in e)r.call(e,i)&&t.call(this,e[i],i)}},t._keys=function(e){if(e!==Object(e))throw new TypeError("utils.keys called on a non object");var t,i=[];for(t in e)e.hasOwnProperty(t)&&i.push(t);return i},t._map=function(e,t){if(n.isEmpty(e))return[];if(n.isFn(e.map))return e.map(t);var i=[];return this._each(e,function(n,r){i.push(t(n,r,e))}),i}},function(e,t,i){function n(e){function t(e){var t,i={};for(var n in e)e.hasOwnProperty(n)&&(t=e[n],n.indexOf("/")!==-1&&(n=n.toLowerCase()),i[n]=t);return i}D=e.max_bucket||I.MAX_BUCKET,B=I.TIER_1,b=I.TIER_2,T=D*I.MAX_BUCKET_MULTIPLIER;var i=this;this.metadata={slots:[],slotsByDivId:{},slotsBySlotId:{},pageTargeting:{},syncRendering:!1,singleRequest:!!e.force_sra_order,disableInitialLoad:!1},this.mapping=t(e),P.emit(O.MAPPING_INIT,window.OXHBConfig,this.mapping),this.caf=C,i.allowCacheNoFills(!0),P.on(w.BID_RECEIVED,function(e){i.onBidReceived.call(i,e)})}function r(e){return this.metadata.slotsByDivId[e]}function o(e){var t=this;e||(e=this.metadata.slots),R._each(e,function(e){t.fireOxMetricForSlot(e)})}function a(e){if(e.skipBoBeacon)return void(e.skipBoBeacon=!1);if(!e.isTimedOut()){var t=C.getBidById(e.bid_id);P.emit(O.FIRE_METRICS_BEACON,t,e.metrics)}}function s(e){return e&&(window.OXHBConfig&&(window.OXHBConfig._bidderConfiguration=e),this.bcBidderType=e),this.bcBidderType}function d(e,t){var i={},n=!1;if(t||(t=[]),!R.isEmpty(e)){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o.toLowerCase()]=e[o]);R._each(t,function(e){e=e.toLowerCase(),r[e]&&(i[e]=r[e],n=!0)})}return n&&i}function u(e,t){var i=this,n=C.getBids(function(n){return i.isBidUnused(n,e,t,i._noFillsAllowed)});return n.length>1&&n.sort(function(e,t){return e.prefetched&&!t.prefetched?1:t.prefetched&&!e.prefetched?-1:e.cpm>t.cpm?-1:e.cpm<t.cpm?1:0}),n}function c(e){var t,i,n=e&&e.length;for(t=0;t<n;t++)switch(i=e[t],i.status){case x.REQUESTED:case x.READY:case x.CREATED:return P.emit(w.DEBUG,"Not Ready to request AdServer due to Slot "+i.div+" status: "+i.status),!1}return!0}function l(e,t){var i,n=this,r=[],o=n.newAuctionConfig();if(R._each(e,function(e){if(e.status===x.DIL_REFRESH_SKIP)return e.status=x.RESPONDED,void(e.skipBoBeacon=!0);var t;if(e.status!==x.CREATED&&e.status!==x.READY&&e.status!==x.BYPASS||n.performAdServerMapping(e),e.status===x.READY){if(e.inFlight)return e.status=x.REQUESTED,void r.push(e);if(t=n.getCachedBids(e.div,e.supportedSizes||e.size),t.length>0){var i=t[0];return i.isUsingDiv=e.div,e.status=x.REQUESTED,P.emit(w.DEBUG,"Unused bid "+i.id+" "+i.div+" is being used for "+e.div),e.setStartMetricsFromAuction(C.getAuctionByAuctionId(i.auction_id)),i.div=e.div,i.prefetched&&(i.prefetched=!1),void n.onBidReceived(i,!0)}r.push(e),n.addSlotForAuction(e,o)}}),i=n.createAuction(o),!(r.length<=0))return t?i.setToTimeout=function(){setTimeout(n.createTimeoutForSlots(i,r),n.mapping.timeout),n._beforeDisplayAuction.setToTimeout=null}:setTimeout(n.createTimeoutForSlots(i,r),n.mapping.timeout),i}function f(e,t,i,n){if(!e.timestamp)return!1;if(e.div!==t){var r=R.domElById(e.div);if(r&&!e.prefetched)return!1}if(!R.isSubset(i,[e.getSize()]))return!1;var o=R.dateNow()-I.BID_EXPIRATION_THRESHOLD,a=e.timestamp<o;return!(!n&&!e.cpm)&&!(e.rendered||a||e.used||e.isUsingDiv)}function p(e,t){t||(t=1);var i,n=1e3*e/t,r=Math.min(n,T);return r>0&&r<25&&(r=25),i=n<B?5*Math.round(r/50):n<b?10*Math.round(r/100):50*Math.round(r/500),i+""}function g(e,t){var i=this;if(e){var n,r,o,a,s=e.slots&&e.slots.length,u=i.mapping;if(!s)return void P.emit(w.DEBUG,"createAuction: No eligible bids for auction");for(u&&u.params&&(e.params=u.params),u.ssmeta_endpoint&&(e.params.ssmeta_endpoint=u.ssmeta_endpoint),e.isPrefetch=t,e.pageTargeting=d(i.metadata.pageTargeting,u.keys),P.emit(w.DEBUG,"Creating Auction",e),r=C.fetchBids(e,function(e){i.onAuctionComplete.call(i,e)}),a=0;a<s;a++)n=e.slots[a],o=i.metadata.slotsByDivId[n.div],o&&o.status===x.READY&&(o.setStartMetricsFromAuction(r),o.status=x.REQUESTED,o.inFlight=r.id);return r}}function h(e,t){var i={div:e.div,adunit:e.zone,sizes:e.supportedSizes,bids:{openx:{adunitid:e.auid}}},n=e.slot;n&&n.getTargetingMap&&(i.targetingMap=d(n.getTargetingMap(),this.mapping.keys)),e.metaConfig&&(i.bids=e.metaConfig),this.mapping.single_request||i.targetingMap||(i.targetingMap={}),e.floor&&(i.floor=e.floor),t.slots.push(i)}function m(){return{params:{},slots:[]}}function v(){var e=this;e.requestAdServer()}function _(e,t){var i,n=this;return i=R._map(t,function(e){return e.setAsTimeoutStarted(),{dfpSlot:e,auction_id:e.inFlight}}),function(){R._each(i,function(e){var t=e.dfpSlot,i=C.getBids(function(i){return i.auction_id===e.auction_id&&i.div===t.div});t.status===x.REQUESTED&&0===i.length&&(P.emit(w.WARN,"Slot "+t.div+" has timed out!!"),t.setAsTimedOut())}),e&&!e.ended&&(P.emit(w.WARN,"Auction has timed out.",e,t),C.endAuction(e.id)),n.requestAdServer()}}function y(){}function S(e){var t=this;t.createAuction()}function E(e,t){var i=this,n=i.metadata.slotsByDivId[e.div];if(n&&(n.inFlight=null,t&&(e.cacheUseTimestamp=new Date),n.isTimedOut()&&P.emit(O.FIRE_METRICS_BEACON,e,n.metrics),n.status===x.REQUESTED||n.status===x.RESPONDED)){if(e.width&&e.height)n.sizeString=e.getSize(),i.mapping.size_override&&(n.sizeString=i.mapping.size_override[n.sizeString]||n.sizeString),n.sizeKey="ox"+n.sizeString;else if(n.sizeString){var r=n.sizeString.split("x");e.width=Number(r[0]),e.height=Number(r[1])}e.bucket=p(e.cpm,i.mapping.bm),n.bids.push(e),n.bucket=e.bucket,n.cpm=e.cpm,n.bid_id=e.id,n.status=x.RESPONDED,n.ad=e.ad,e.sp&&(n.spBucket=p(e.sp,i.mapping.bm)),i.requestAdServer()}}function A(e){P.emit(w.DEBUG,"ALLOWING CACHE NO FILLS SETTING: ",e),this._noFillsAllowed=e}var D,T,B,b,R=i(1),I=i(5),w=i(2),O=i(11),P=i(3),x=I.SLOT_STATUS,C=i(4);n.prototype.bidderType=s,n.prototype.createAuction=g,n.prototype.createTimeoutForSlots=_,n.prototype.onAuctionComplete=v,n.prototype.addSlotForAuction=h,n.prototype.requestAdServer=y,n.prototype.newAuctionConfig=m,n.prototype.requestSlotToAuction=S,n.prototype.onBidReceived=E,n.prototype.isBidUnused=f,n.prototype.requestSlotsToAuction=l,n.prototype.areSlotsReadyForAdServer=c,n.prototype.getCachedBids=u,n.prototype.fireOxMetricForSlot=a,n.prototype.fireOxMetrics=o,n.prototype.allowCacheNoFills=A,n.prototype._filterTargetingMap=d,n.prototype._getBucketFromCPM=p,n.prototype._getSlotByDiv=r,e.exports=n},function(e,t,i){function n(e){var t=[];try{var i=u.getNormalizedWindowDims(),n=e.slot,r=n.getSizes(i.width,i.height);if(0===r.length)return f.emit(l.WARN,"DFPSizesToOXSizes: No size specified on slot.",n),t;for(var o=0;o<r.length;o++)try{t.push(r[o].getWidth()+"x"+r[o].getHeight())}catch(a){}}catch(a){}return t}function r(e,t){for(var i=[],n=t||{},r=0;r<e.length;r++){var o=e[r];i.push(n[o]||o)}return i}function o(e,t){var i,n,r,o,a;if("object"!=typeof e)return e;i=e["default"];var s=u._keys(t);if(s.length>0)e:for(var d=s.length-1;d>=0;d--)if(r=s[d],a=e[r])if(u.isArray(t[r])){for(var c in t[r])if(n=a[t[r][c]])break e}else o=t[r],n=a[o];return n||i}function a(e){return 0===e.indexOf("/")?e.substring(1):"/"+e}function s(e){var t={};return u._each(e,function(e,i){"sizes"!=i&&(t[i]=e)}),t}function d(e,t,i){var n=e.status===p.BYPASS||e.status===p.CREATED,r=t.disable_dilpf&&i&&i.disableInitialLoad;return n&&r}var u=i(1),c=i(5),l=i(2),f=i(3),p=c.SLOT_STATUS;c.OX_DFP_HEIGHT_DELTA,c.SUPPORTED_AD_UNIT_SIZES;e.exports=function(e,t,i,c){var g,h,m,v,_,y,S=e.slot,E=e.zone;if(c||(e.size=n(e)),0===e.size.length)return f.emit(l.WARN,"Returning early from _performDFPMapping because slot does not have a size."),e.noSize=!0,void(e.status=p.BYPASS);for(e.noSize=!1,h=E.toLowerCase()+"/";(y=h.lastIndexOf("/"))>0&&!g;)if(h=h.substring(0,y),m=t[h]||t[a(h)])switch(v=u.intersection(r(e.size,t.size_override),m.sizes),t.version){case"2.0":v.length>0?(g=o(m.oxAdUnitId,S.getTargetingMap()),e.sizeKey="oxb",e.sizeString=v[0],e.supportedSizes=v):e.noSize=!0;break;case"META":if(v.length>0){e.sizeString=v[0],e.supportedSizes=v,e.metaConfig=e.metaConfig||s(m),g=!0;continue}e.noSize=!0;break;default:for(var A=0;A<e.size.length;A++)if(_=e.size[A],g=o(m[_],S.getTargetingMap())){e.sizeKey="ox"+_,e.sizeString=_,e.supportedSizes=r(e.size,t.size_override);break}}return g?(e.auid=g,void(d(e,t,i)?e.status=p.BYPASS:e.status=p.READY)):void(e.status=p.BYPASS)}},function(e,t,i){function n(e,t,i,n,s,d,u,c,l){s||(s=a.CREATED);var f={zone:e,div:i,dfpDisplayed:0,status:s,rendered:0,size:r.normalizeSizes(t),sizeString:d,metrics:{},targetingMap:u||{},bids:[],refreshCount:0,setAsRenderedIfUnsupported:function(){!this.noSize&&r.domElById(this.div)||(this.rendered=!0)}};return n||(n={isApi:!0,setTargeting:function(e,t){},getTargetingMap:function(){return f.targetingMap}},f.bucket="t",f.bucket_2="t",f.ad=""),f.setTargeting=function(e,t){f.slot.setTargeting(e,t)},f.slot=n,f.getOxTargetingKey=function(){switch(c){case"2.0":return"oxb";case"META":return"oxb";default:return f.sizeKey}},f.getOxTargetingValue=function(e){var t,i,n=[],a=e||f;switch(a.bids&&a.bids.length>0&&(r._each(f.bids,function(e){var i=e.width&&e.height?e.getSize():f.sizeString;i=l&&l[i]?l[i]:i,"META"==c&&(n.push(e.bidderCode+"_"+i+"_"+e.bucket),e.deal_id&&n.push(e.bidderCode+"_"+e.deal_id),e.pmp&&n.push(e.bidderCode+"_pmp")),(!t||e.cpm>t.cpm)&&(t=e,a.sizeString=i,a.sizeKey="ox"+a.sizeString)}),a.bucket=t.bucket,a.cpm=t.cpm,a.bid_id=t.id),i=[a.bucket],t&&(t.pmp&&i.push("pmp"+t.bucket),t.deal_id&&i.push(t.deal_id),t.id&&i.push(o.BID_ID_PREFIX+t.id)),i=i.join(","),c){case"2.0":return f.sizeString+"_"+i;case"META":return n.push(f.sizeString+"_"+f.bucket),n.push(f.bucket),t&&n.push(t.bidderCode),n.join(",");default:return i}},f.setAsTimedOut=function(){f.status=a.RESPONDED,f.metrics.timedOut=!0,f.bucket="t"},f.reset=function(){f.metrics={},f.bids=[]},f.setStartMetricsFromAuction=function(e){f.metrics.startTime=e.startTime},f.setAsTimeoutStarted=function(){f.metrics.timeoutStarted=new Date},f.isTimedOut=function(){return f.metrics.timedOut},f}var r=i(1),o=i(5),a=o.SLOT_STATUS;e.exports=n},function(e,t,i){var n=i(1).keyMirror,r={MAPPING_INIT:null,FIRE_METRICS_BEACON:null};e.exports=n(r)},function(e,t){function i(e){return Array.prototype.slice.call(e)}e.exports={toArray:i}},function(e,t){function i(e,t,i){var n,r,o,a,s,d,u,c=function(e){if(!i.searchKeys)return!1;var t,n,r=i.searchKeys,o=i.searchKeys.length;for(n=0;n<o;n++)if(t=r[n],e.indexOf(t)!==-1)return!0;return!1};for(n in e)if(e.hasOwnProperty(n)&&c(n))if(r=n,e[r]instanceof Array){for(o=e[r].length,a=0;a<o;a++)if(s=e[r][a],s.indexOf(i.bidIdPrefix)!==-1){d=s.split(i.bidIdPrefix)[1];break}}else if("string"==typeof e[r]&&(s=e[r],d=s.split(i.bidIdPrefix)[1]))break;if(d)for(var l in t)if(t.hasOwnProperty(l)&&t[l].bid_id===d){u=t[l];break}return{bidId:d,dfpSlot:u}}e.exports={getBidIdAndDfpSlotFromTargetingMap:i}},function(e,t){e.exports={"function":"function",undefined:"undefined",object:"object",string:"string",number:"number"}},function(e,t,i){function n(e){function t(e,i,n){var o,a,s=b.slots,d=s.length,u=i&&i.length,c=(B.newAuctionConfig(),function(e){return b.disableInitialLoad&&e.dfpDisplayed&&e.status!==y.DISPLAYED}),l=function(e){return!b.disableInitialLoad&&e.dfpDisplayed&&!e.rendered},f=function(){return function(){for(e(i,n),a=0;a<d-1;a++)s[a].status=y.DISPLAYED,s[a].setAsRenderedIfUnsupported()}},g=function(e,i,n){return function(){return t(e,i,n)}};for(r.call(B),a=0;a<d;a++)if(c(s[a])||l(s[a]))return i=p.isArray(i)?i.slice():i,void setTimeout(g(e,i,n),250);for((!i||i&&i.length>1)&&(B.metadata.singleRequest=!0),B.allowCacheNoFills(!1),a=0;a<d;a++)s[a].proxyDisplay=0;if(i&&i.length>0){for(s=[],a=0;a<u;a++)try{o=b.slotsBySlotId["google_ads_iframe_"+i[a].getSlotId().getId()],o&&s.push(o)}catch(h){_.emit(v.DEBUG,"Slots are not defined in the beginning",h)}d=s.length}for(a=0;a<d;a++)s[a].refreshCount+=1,1===s[a].refreshCount&&b.disableInitialLoad&&(s[a].bid_id||s[a].isTimedOut())&&(s[a].status=y.DIL_REFRESH_SKIP);for(a=0;a<d;a++)o=s[a],o.status!==y.DIL_REFRESH_SKIP&&(o.status!==y.READY&&o.status!==y.BYPASS&&o.sizeKey?(o.status=y.READY,o.setTargeting(o.getOxTargetingKey(),"r"),o.bucket="r",delete o.bid_id,o.reset()):(o.status=y.BYPASS,o.bucket="t"),o.rendered=!1);for(a=d-1;a>=0;a--)if(o=s[a],o.dfpDisplayed){o.proxyDisplay=f(o.slot);break}var m=B.requestSlotsToAuction(s);m||B.requestAdServer()}function i(e){var t,i;try{t=e.slot.getSlotElementId(),i=b.slotsByDivId[t],i.rendered=1,_.emit(v.DEBUG,"GPT slotRendered is called for div:"+i.div,e),i.dfpDisplayed||(i.dfpDisplayed=1,i.status=y.DISPLAYED),i.bids&&p._each(i.bids,function(e){(!i.bid_id||i.bid_id&&i.bid_id===e.id)&&(e.used=!0)})}catch(n){_.emit(v.ERROR,"onGptSlotRendered: unexpected error",n)}}function n(e,t,i,n){B.addSlot.call(B,e,t,i,n)}function o(e,t,i){_.emit(v.DEBUG,"GPT defineOutOfPageSlot is called."),B.addSlot.call(B,e,[],t,i)}function a(e,i,n){_.emit(v.DEBUG,"GPT Refresh is called. Slots: ",e);var r=this,o=function(){n.apply(r,arguments)};n.delayed=!0,t(o,e,i)}function s(e,t){_.emit(v.DEBUG,"GPT Display is called for div: "+e);var i=this,n=arguments,r=b.slotsByDivId[e],o=function(){return r&&r.dfpDisplayed&&r.status===y.DISPLAYED};return o()&&B.fireOxMetricForSlot(r),b.syncRendering||!r||o()||r.slot.isApi?void t.apply(i,n):(r.dfpDisplayed=1,t.delayed=!0,r.proxyDisplay=function(){t.apply(i,n)},B.requestSlotToAuction(r))}function d(){return _.emit(v.DEBUG,"GPT enableServices is called."),b.syncRendering?void _.emit(v.DEBUG,"syncRendering is enabled."):void(B._beforeDisplayAuction||(B._beforeDisplayAuction=B.requestSlotsToAuction(B.metadata.slots,!0)))}function u(e){_.emit(v.DEBUG,"GPT enableSingleRequest is called."),e&&(_.emit(v.DEBUG,"isSingleRequestEnabled is true."),B.metadata.singleRequest=!0)}function c(){_.emit(v.DEBUG,"GPT enableSyncRendering is called."),B.metadata.syncRendering=!0}function h(){_.emit(v.DEBUG,"GPT disableInitialLoad is called."),B.metadata.disableInitialLoad=!0}function S(e,t){B.metadata.pageTargeting[e]=t}function E(e){delete B.metadata.pageTargeting[e]}function A(){_.emit(v.DEBUG,"GPT loaded - Proxying GPT Calls");var e=R.pubads();e.refresh=l.before(e.refresh,function(e,t){B.metadata.syncRendering||a.call(this,t[0],t[1],e)}),R.display=l.before(R.display,function(e,t){B.metadata.syncRendering||s.call(this,t[0],e)}),B.mapping.disable_es||(R.enableServices=l.before(R.enableServices,d)),R.defineSlot=l.after(R.defineSlot,function(e,t,i){n.call(this,t[0],t[1],t[2],i)}),R.defineOutOfPageSlot=l.after(R.defineOutOfPageSlot,function(e,t,i){o.call(this,t[0],t[1],i)}),e.enableSyncRendering=l.after(e.enableSyncRendering,c),e.enableSingleRequest=l.after(e.enableSingleRequest,function(e,t,i){u.call(this,i)}),e.disableInitialLoad=l.before(e.disableInitialLoad,h),e.setTargeting=l.before(e.setTargeting,function(e,t){S(t[0],t[1])}),e.clearTargeting=l.before(e.clearTargeting,function(e,t){E(t[0])}),R.pubads().addEventListener("slotRenderEnded",i)}function D(){return m(!1,B.metadata.slotsBySlotId)}function T(){function e(){return 0===R.pubads().getSlots().length}return _.emit(v.DEBUG,"Proxy Bidder initialize"),p.isArray(R.cmd)?void R.cmd.splice(0,0,A):void(e()&&R.cmd.push(function(){e()&&A()}))}f.call(this,e),this.bidderType(g.BC_BIDDER_TYPES.STANDARD_BIDDER),window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[];var B=this,b=this.metadata,R=window.googletag;this.showAd=D.apply(this),this.init=T,this._beforeDisplayAuction=null,this._requestRefresh=t,this._onGptSlotRendered=i,this._onGptDefineSlot=n,this._onGptDefineOutOfPageSlot=o,this._onGptRefresh=a,this._onGptDisplay=s,this._onGptEnableServices=d,this._onGptEnableSingleRequest=u,this._onGptEnableSyncRendering=c,this._onGptDisableInitialLoad=h,this._onGptPageLevelSetTargeting=S,this._onGptPageLevelClearTargeting=E,this._doProxyGpt=A}function r(){_.emit(v.DEBUG,"SLOTS LENGTH: ",this.metadata.slots.length),p._each(this.metadata.slots,function(e){_.emit(v.DEBUG,e.div,e.status)})}function o(){function e(e){return(e.status!==y.BYPASS||"t"===e.bucket)&&(e.status!==y.DISPLAYED&&e.status!==y.DISPLAYING&&(!!e.sizeString&&!!e.bucket))}var t=this;p._each(t.metadata.slots,function(t){if(e(t)){var i=[t.getOxTargetingKey(),t.getOxTargetingValue()];t.setTargeting.apply(t,i),_.emit(v.DEBUG,"Slot "+t.div+" "+t.status+"  has setTargeting to "+i),t.spBucket&&(t.setTargeting(t.getOxTargetingKey()+"_2",t.getOxTargetingValue({bucket:t.spBucket})),delete t.spBucket)}})}function a(){var e=this;_.emit(v.DEBUG,"=== DISPLAYING SLOTS ===");var t,i,n,r=this.metadata.slots.length,o=function(t){return function(){t.proxyDisplay&&t.proxyDisplay(),e.fireOxMetricForSlot(t),t.setAsRenderedIfUnsupported(),_.emit(v.DEBUG,"Slot "+t.div+" is DISPLAYED"),t.status=y.DISPLAYED}};for(t=0;t<r;t++)i=this.metadata.slots[t],n=i.status,n!==y.RESPONDED&&n!==y.BYPASS&&n!==y.TIMED_OUT||!i.dfpDisplayed||(i.status=y.DISPLAYING,_.emit(v.DEBUG,"Slot "+i.div+" is DISPLAYING"),setTimeout(o(i),0))}function s(e){return h(e,this.mapping,this.metadata,!1)}function d(e){var t,i=this;i._beforeDisplayAuction&&i._beforeDisplayAuction.setToTimeout&&i._beforeDisplayAuction.setToTimeout(),t=i.requestSlotsToAuction(i.metadata.slots),t||e.status!==y.BYPASS&&e.status!==y.RESPONDED||i.requestAdServer()}function u(){if(_.emit(v.DEBUG,"Attempting to Request Ad Server"),!this.metadata.syncRendering&&(r.call(this),!this.metadata.singleRequest||this.areSlotsReadyForAdServer(this.metadata.slots)))return o.call(this),a.call(this),!0}function c(e,t,i,n){var r,o=this,a=new S(e,t,i,n,y.CREATED,null,null,o.mapping.version,o.mapping.size_override);return r=n.getSlotId().getId(),o.metadata.slotsByDivId[i]=a,o.metadata.slotsBySlotId["google_ads_iframe_"+r]=a,o.metadata.slots.push(a),_.emit(v.DEBUG,"GPT.defineSlot called => added slot div: "+i+" zone: "+e),a}var l=i(30),f=i(8),p=i(1),g=i(5),h=i(9),m=i(16),v=i(2),_=i(3),y=g.SLOT_STATUS,S=i(10);i(4);p["extends"](n,f),n.prototype.requestAdServer=u,n.prototype.requestSlotToAuction=d,n.prototype.performAdServerMapping=s,n.prototype.addSlot=c,n.prototype._setTargetingForSlots=o,n.prototype._displaySlots=a,e.exports=n},function(e,t,i){function n(e,t){return function(i,n,s){e&&(i=i.replace("_ad_container",""));var d,u,c,l,f,p,g,h;if(d=t[i],n&&!d&&(h=a.getBidIdAndDfpSlotFromTargetingMap(n,t,{searchKeys:o.TARGETING_MAP_SEARCH_PREFIXES,bidIdPrefix:o.BID_ID_PREFIX}),p=h.bidId,d=h.dfpSlot),p=p||d&&d.bid_id,p&&!r.getBidById(p).rendered&&(e||!d||"s"!==d.bucket)&&(u=d&&document.getElementById(d.div),!u&&s&&s.frameElement&&(u=s.frameElement.parentNode),u)){if(c=u.childNodes,l=c.length,!e)for(g=0;g<l;g++)f=c[g],f.style&&(f.style.display="none");return r.renderBid(p,u),d&&d.setTargeting(d.getOxTargetingKey(),"s"),!0}}}var r=i(4),o=i(5),a=i(13);e.exports=n},function(e,t,i){"use strict";function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function r(){}var o="function"!=typeof Object.create&&"~";r.prototype._events=void 0,r.prototype.listeners=function(e,t){var i=o?o+e:e,n=this._events&&this._events[i];if(t)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,s=new Array(a);r<a;r++)s[r]=n[r].fn;return s},r.prototype.emit=function(e,t,i,n,r,a){var s=o?o+e:e;if(!this._events||!this._events[s])return!1;var d,u,c=this._events[s],l=arguments.length;if("function"==typeof c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,n),!0;case 5:return c.fn.call(c.context,t,i,n,r),!0;case 6:return c.fn.call(c.context,t,i,n,r,a),!0}for(u=1,d=new Array(l-1);u<l;u++)d[u-1]=arguments[u];c.fn.apply(c.context,d)}else{var f,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;default:if(!d)for(f=1,d=new Array(l-1);f<l;f++)d[f-1]=arguments[f];c[u].fn.apply(c[u].context,d)}}return!0},r.prototype.on=function(e,t,i){var r=new n(t,i||this),a=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):this._events[a]=r,this},r.prototype.once=function(e,t,i){var r=new n(t,i||this,(!0)),a=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):this._events[a]=r,this},r.prototype.removeListener=function(e,t,i,n){var r=o?o+e:e;if(!this._events||!this._events[r])return this;var a=this._events[r],s=[];if(t)if(a.fn)(a.fn!==t||n&&!a.once||i&&a.context!==i)&&s.push(a);else for(var d=0,u=a.length;d<u;d++)(a[d].fn!==t||n&&!a[d].once||i&&a[d].context!==i)&&s.push(a[d]);return s.length?this._events[r]=1===s.length?s[0]:s:delete this._events[r],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[o?o+e:e]:this._events=o?{}:Object.create(null),this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=o,e.exports=r},function(e,t){e.exports={BID_EXPIRATION_THRESHOLD:6e4,STATUS_CODES:{0:"Pending",1:"Bid available",2:"Bid returned empty or error response",3:"Bid timed out"}}},function(e,t,i){var n=i(1).keyMirror,r={ERROR:null};e.exports=n(r)},function(e,t,i){var n=(i(4),i(2),i(11)),r=i(3),o=i(1),a=window.OXHBConfig,s=window.OXHBConfig.DFP_mapping,d={getBidResult:function(e,t){return e.noFill?"0":t.timedOut?"t":"p"},bidNeedsBoBeacon:function(e){return"openx"===e.bidderCode},fireSingleBoBeacon:function(e,t){var i=0;if(e&&a&&s&&d.bidNeedsBoBeacon(e)){t.timeoutStarted&&t.startTime&&(i=t.timeoutStarted-t.startTime),e.cacheUseTimestamp&&e.timestamp&&(i=e.cacheUseTimestamp-e.timestamp),(i<0||!i)&&(i=0);var n={},r="http://"+a.host+"/"+a.medium+"/1.0/bo?bd={bd}&br={br}&bp={bp}&bt={bt}&ts={ts}&bs={bs}&ca={ca}&bsq={bsq}";return e&&e.transactionState&&(n.bd=e.timestamp-t.startTime,n.br=d.getBidResult(e,t),n.bp=String(1e3*e.cpm),n.bt=s.timeout+i,n.ts=e.transactionState,n.bs=a.siteName,n.bsq=e.seq_no,n.ca=e.cacheUseTimestamp?1:0,o.beacon(o.template(r,n)),e.incrementAttemptMetric&&e.incrementAttemptMetric()),n}},setConfig:function(e,t){a=e,s=t}};r.on(n.MAPPING_INIT,d.setConfig),r.on(n.FIRE_METRICS_BEACON,d.fireSingleBoBeacon),e.exports=d},function(e,t,i){var n=i(2),r=i(3);t.loadScript=function(e,t){r.emit(n.DEBUG,"Adapter loadScript:",e);var i=document.createElement("script");i.type="text/javascript",i.async=!0,t&&"function"==typeof t&&(i.readyState?i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(i.onreadystatechange=null,
t())}:i.onload=function(){t()}),i.src=e;var o=document.getElementsByTagName("head");o=o.length?o:document.getElementsByTagName("body"),o.length&&(o=o[0],o.insertBefore(i,o.firstChild))}},function(e,t,i){var n=i(1),r=function(e){var t=n.getUniqueIdentifierStr();this.startTime=new Date,this.callback=e,this.expectedBidsByBidder={},this.expectedBids=0,this.returnedBids=0,this.ended=0,this.completed=0,this.id=t};t.createAuction=function(e){return new r(e)}},function(e,t,i){function n(e,t){function i(){return s.STATUS_CODES[c]}function n(){return o.emit(r.DEBUG,"Bid Status: ",i(),this),c}function d(){return this.width+"x"+this.height}var u=a.getUniqueIdentifierStr(),c=e||0;this.bidderCode="",this.width=0,this.height=0,this.cpm=0,this.statusMessage=i(),this.adId=u,this.id=u,this.exp=t||s.BID_EXPIRATION_THRESHOLD,this.seq_no=1,this.timestamp,this.getSize=d,this.getStatusCode=n,this.incrementAttemptMetric=function(){this.seq_no+=1}}var r=i(2),o=i(3),a=i(1),s=i(18);t.createBid=function(e,t){return new n(e,t)}},function(e,t){function i(){return window.console&&window.console.log}t.logMessage=function(e){i()&&console.log("MESSAGE: "+e)},t.hasConsoleLogger=i;var n=function(e){return e?window.console.error?"error":"log":""}(i());t.logError=function(e,t,r){var o=t||"ERROR";i()&&console[n].call(console,o+": "+e,r||"")}},function(e,t){t.dateNow=function(){return(new Date).getTime()}},function(e,t,i){function n(e){return document.getElementById(e)}function r(e){return document.querySelector(e)}function o(e){return document.querySelectorAll(e)}i(7);t.getNormalizedWindowDims=function(e,t){e||(e=window),t||(t=document);var i=t.documentElement,n=t.body,r=e.innerWidth||i.clientWidth||n.clientWidth,o=e.innerHeight||i.clientHeight||n.clientHeight;return{width:r,height:o}},t.getTopWindowUrl=function(){try{return window.top.location.href}catch(e){return window.location.href}},t.renderCreative=function(e,t,i,n,r){var o,u,c='javascript:window["contents"]',l=r+"_contents",f="<!DOCTYPE html><html><head><base target='_top'/></head><body style='margin:0;padding:0'>"+e+"</body></html>",p=a(r,n,i);if(o=d&&d<11||window.opera,o&&(p.src=c),t.appendChild(p),o)try{p.contentWindow.contents=f,p.src=c}catch(g){var h=p;p=a(r,n,i),window[l]=f,c="javascript:document.open();document.domain='"+document.domain+"';document.write(window.parent['"+l+"']);window.parent['"+l+"']=null;setTimeout('document.close()',5000)",p.src=c,s(h,p)}else u=p.contentWindow||p.contentDocument,u.document&&(u=u.document),u&&(u.open("text/html","replace"),u.write(f),u.close());return!0};var a=function(e,t,i){var n;try{n=d&&e?document.createElement('<iframe name="'+e+'">'):document.createElement("iframe")}catch(r){n=document.createElement("iframe")}return n.setAttribute("width",t),n.setAttribute("height",i),n.setAttribute("frameSpacing","0"),n.setAttribute("frameBorder","no"),n.setAttribute("scrolling","no"),e&&(n.setAttribute("id",e),n.setAttribute("name",e)),n},s=function(e,t){return e.parentNode.replaceChild(t,e),t},d=function(){var e,t,i=0;if(navigator){try{e=navigator.userAgent,"Microsoft Internet Explorer"==navigator.appName?(t=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"),null!==t.exec(e)&&(i=parseFloat(RegExp.$1))):"Netscape"==navigator.appName&&(t=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})"),null!==t.exec(e)&&(i=parseFloat(RegExp.$1)))}catch(n){}return i}}();t.domElById=n,t.domGet=r,t.domGetAll=o,t.createNewFrameElement=a},function(e,t,i){function n(e,t){return o.isArray(e)||(e.params&&(t.params&&t.params.openx&&(e.params.openx=t.params.openx),t.params=e.params,!t.ssmeta_endpoint&&e.params.ssmeta_endpoint&&(t.ssmeta_endpoint=e.params.ssmeta_endpoint)),e=r._map(e.slots||[],function(e){return[e.adunit,e.sizes,e.div,e.targetingMap,e.bids]})),e}var r=i(7),o=i(6);e.exports={metaConfigToSlotArray:n}},function(e,t){function i(e){var t=s(e);(new Image).src=t}function n(e){return"undefined"!=typeof e}function r(){return location.protocol}function o(){var e;try{e=top.location.href}catch(t){}return e||a()}function a(){var e=document.referrer;try{e=top.document.referrer}catch(t){if(parent)try{e=parent.document.referrer}catch(i){}}if(!e&&opener)try{e=opener.location.href}catch(n){}return e||""}function s(e){var t;if(e)return t=e.indexOf("//"),5!=t&&6!=t&&(e="http://"+e),"https:"==r()?e.replace("http:","https:"):e}function d(e,t,i,r){t=t||{};var o,a,s,d="",u=!1,c="";i=i||"{",r=r||"}";for(var l=0;l<e.length;l++)o=e.charAt(l),u||o!==i?u&&o===r?(a=t[d],s=n(a)&&null!==a?a:"",c+=s,u=!1,d=""):u?d+=o:c+=o:u=!0;return c}function u(e){var t="<div style='position:absolute;left:0px;top:0px;visibility:hidden;'><img src='{src}'/></div>",i=s(e);return d(t,{src:i})}function c(e){try{var t=document.cookie.split(e+"=");if(2==t.length)return t[1].split(";")[0]}catch(i){}}function l(e,t,i){var r=e+"=";if(r+=(t||"")+";path=/;",n(i)){var o=new Date;o.setTime(o.getTime()+i),r+="expires="+o.toUTCString()+";"}try{document.cookie=r}catch(a){}}e.exports={beacon:i,defined:n,detectProtocol:r,ensureRightProtocol:s,template:d,getImgBeacon:u,detectPageURL:o,detectRefererURL:a,getCookie:c,setCookie:l}},function(e,t){function i(){return window.parent==window.top}function n(e,t){return e.parentNode.insertBefore(t,e.nextSibling),t}function r(e){e.parentNode.removeChild(e)}function o(e,t){var i=t.documentElement,n=t.getElementsByTagName("body")[0],r=e.innerWidth||i.clientWidth||n.clientWidth,o=e.innerHeight||i.clientHeight||n.clientHeight;return{width:r,height:o}}function a(e){return!isNaN(e)&&e<1e6}function s(){return window.self!==window.top}function d(e){var t,i;return e?("SCRIPT"===e.tagName?(i=document.createElement("div"),n(e,i),t=i.getBoundingClientRect(),r(i)):t=e.getBoundingClientRect(),{top:Math.round(t.top),left:Math.round(t.left)}):null}function u(){var e,t=window,i=window.document;try{return s()&&(t=window.parent,i=window.parent.document),e=o(t,i),e&&a(e.width)&&a(e.height)?e:null}catch(n){return null}}function c(e){var t,i;if(!e)return null;try{return i=s()?window.parent.document:window.document,t=d(i.getElementById(e)),t&&a(t.left)&&a(t.top)?t:null}catch(n){return null}}e.exports={append:n,remove:r,detectWindowDimensions:o,isValidDim:a,inIframe:s,getPosition:d,isPagePosAvailable:i,getBrowserDimensions:u,getAdPosition:c}},function(e,t,i){function n(e,t,i){i||(i={mode:"before"});var n=function(){function n(){u=!0,d=e.apply(this,arguments)}function s(){try{var e=r.toArray(arguments);t.call(this,n,e,d)}catch(i){a.emit(o.ERROR,i)}}var d,u=!1;if("before"===i.mode&&s.apply(this,arguments),u||n.delayed||n.apply(this,arguments),"after"===i.mode){var c=Array.prototype.slice.call(arguments);s.apply(this,c)}return d};return n}var r=i(12),o=i(19),a=i(3);e.exports={before:function(){return n.apply(this,arguments)},after:function(){var e=r.toArray(arguments);return e.push({mode:"after"}),n.apply(this,e)}}},function(e,t){t.getParameterByName=function(e){var t="[\\?&]"+e+"=([^&#]*)",i=new RegExp(t),n=i.exec(window.location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.parseQueryStringParameters=function(e){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+"="+encodeURIComponent(e[i])+"&");return t},t.transformAdServerTargetingObj=function(e){var t="";if(!e)return"";for(var i in e)e.hasOwnProperty(i)&&(t+=i+"="+encodeURIComponent(e[i])+"&");return t},t.tryAppendQueryString=function(e,t,i){return i?e+=t+"="+encodeURIComponent(i)+"&":e}},function(e,t,i){function n(e){var t,i,n,r={},o=[];if(!d.isArray(e))return o;for(i=0;i<e.length;i++)t=e[i],r[t.width+"x"+t.height]=!0;for(n in r)r.hasOwnProperty(n)&&o.push(n);return o}function r(e){if(d.isArray(e)&&2===e.length&&!isNaN(e[0])&&!isNaN(e[1]))return e[0]+"x"+e[1]}function o(e){var t,i=[];if(typeof e===s.string){var n=e.split(","),o=/^(\d)+x(\d)+$/i;if(n)for(var a in n)n.hasOwnProperty(a)&&n[a].match(o)&&i.push(n[a])}else if(typeof e===s.object){var d=e.length;if(d>0)if(2===d&&typeof e[0]===s.number&&"number"==typeof e[1])i.push(r(e));else for(var u=0;u<d;u++)i.push(r(e[u]))}var c=i.length;if(c>0&&(t="size="+i[0],c>1)){t+="&promo_sizes=";for(var l=1;l<c;l++)t+=i[l]+=",";t&&","===t.charAt(t.length-1)&&(t=t.slice(0,t.length-1))}return t}function a(e){var t=[];if(typeof e===s.string){var i=e.replace(" ","").split(","),n=/^(\d)+x(\d)+$/i;if(i)for(var o in i)i.hasOwnProperty(o)&&i[o].match(n)&&t.push(i[o])}else if(typeof e===s.object){var a=e.length;if(a>0)if(2===a&&typeof e[0]===s.number&&typeof e[1]===s.number)t.push(r(e));else{if(typeof e[0]===s.string)return e;for(var d=0;d<a;d++)t.push(r(e[d]))}}return t}var s=i(14),d=i(6);e.exports={getChainSizes:n,parseGPTSingleSizeArray:r,parseSizesInput:o,normalizeSizes:a}},function(e,t,i){function n(e){function t(t){var i,n=t[0],r=t[1],a=t[1][0],s=t[2],d=t[3]||{},c=t[4],l=t[5];return i=new g(n,r,s,null,o.CREATED,a,d,e.version,e.size_override),c&&(i.metaConfig=c),l&&u.isNumeric(l)&&(i.floor=parseFloat(l)),E.performAdServerMapping(i),_.slotsByDivId[i.div]=i,_.slots.push(i),i}function i(e,i){var n,r,o=e.length,a=[];for(i&&(A=i),n=0;n<o;n++)a.push(t(e[n]));S=a,r=E.requestSlotsToAuction(a),r||E.requestAdServer()}function n(){if(window.googletag){var e,t,i,n,o,a=window.googletag.pubads().getSlots();for(n=0;n<a.length;n++)e=a[n],t=e.getSlotId(),i=_.slotsByDivId[e.getSlotElementId()],i||(o=l.getBidIdAndDfpSlotFromTargetingMap(e.getTargetingMap(),_.slotsByDivId,{searchKeys:r.TARGETING_MAP_SEARCH_PREFIXES,bidIdPrefix:r.BID_ID_PREFIX}),i=o.dfpSlot),i&&(i.slot=e,_.slotsBySlotId["google_ads_iframe_"+t.getId()]=i)}}function h(e){var t=_.slotsByDivId[e];if(!t)throw p.emit(f.ERROR,"Div ID "+e+" is invalid"),"Div ID "+e+" is invalid";return t}function m(){E.areSlotsReadyForAdServer(E.metadata.slots)&&(A&&(S&&E.fireOxMetrics(S),A(E.getPriceMap())),A=void 0,S=null)}function v(e){return d(e,E.mapping,E.metadata,!0)}s.call(this,e),this.bidderType(r.BC_BIDDER_TYPES.API_BIDDER);var _,y,S,E=this,A=function(){"oxDone"in window&&window.oxDone()};E.performAdServerMapping=v,E.requestAdServer=m,E._mapApiZones=n,E._findSlotByDivId=h,E._addDfpSlotAsApi=t,E._addAndRequestSlotsToAuction=i,E.init=function(){var e=window.OX_dfp_options||window.OX_bidder_options,t=window.OX_dfp_ads||window.OX_bidder_ads;if(_=E.metadata,y=a(!1,_.slotsBySlotId),p.emit(f.DEBUG,"API Bidder initialize"),e){if(e.disableInitialLoad)return void p.emit(f.DEBUG,"API Bidder disabling initial auction");e.callback&&(A=e.callback)}t=u.metaConfigToSlotArray(t,E.mapping),i(t,A)},E.showAd=function(e){return n(),y.apply(E,arguments)},E.addSlots=function(e,t){i(e,t)},E.getPriceMap=function(){var e,t,i={},n=_.slotsByDivId;for(e in n)try{if(!n.hasOwnProperty(e))continue;if(t=n[e],t.getOxTargetingValue&&t.getOxTargetingValue(),!t.sizeString){i[e]={size:"none",price:"0",cpm:"0.0",ad:"",bid_id:null};continue}i[e]={size:t.sizeString,price:t.bucket,cpm:t.cpm,ad:t.ad,bid_id:t.bid_id},t.spBucket&&(i[e].secondPrice=t.spBucket);var r=c.getBidById(t.bid_id);r&&r.deal_id&&(i[e].deal_id=r.deal_id)}catch(o){p.emit(f.ERROR,"getPriceMap: Unexpected error ",o)}return i},E.refresh=function(e,t){if(A)return void setTimeout(function(){E.refresh(e,t&&t.slice())},250);E.allowCacheNoFills(!1),n(),A=e;var i,r,a,s,d,u=_.slots,c=!!t&&t.length;if(t)if(u=[],c=t.length,window.googletag)for(d=0;d<c;d++)try{if(s=t[d].getSlotId().getId(),!("google_ads_iframe_"+s in _.slotsBySlotId))continue;u.push(_.slotsBySlotId["google_ads_iframe_"+s])}catch(l){p.emit(f.ERROR,"refresh: Unexpected error while retrieving slot ID",l)}else for(d=0;d<c;d++)s=t[d],_.slotsByDivId[s]&&u.push(_.slotsByDivId[s]);for(r=u.length,d=0;d<r;d++)i=u[d],i.status!==o.READY&&i.status!==o.BYPASS&&i.sizeKey?i.status=o.READY:i.status=o.BYPASS,i.bucket="t",i.reset();S=u,a=E.requestSlotsToAuction(u),a||(S=null,E.requestAdServer())},E.getSize=function(e){try{var t=_.slotsByDivId[e].sizeString,i=E.mapping.size_override||{};return i[t]||t}catch(n){return p.emit(f.WARN,'getSize: Unexpected error returning dfp size string, returning "none".',e,n),"none"}},E.getPrice=function(e){var t;try{return t=_.slotsByDivId[e],t&&t.getOxTargetingValue&&t.getOxTargetingValue(),t.bucket}catch(i){return p.emit(f.WARN,"getPrice: Unexpected error return dfp bucket.",e,i),"0"}},E.getSecondPrice=function(e){var t=h(e);return t&&t.spBucket},E.getOxTargetingKey=function(e){var t=h(e);return t.getOxTargetingKey()},E.getOxTargetingValue=function(e){var t=h(e),i=t.getOxTargetingValue();return i},E.setOxTargeting=function(e){var t,i,n,r=e&&e.length;try{for(e||(e=window.googletag.pubads().getSlots(),r=e&&e.length),t=0;t<r;t++)i=e[t].getSlotElementId(),n=_.slotsByDivId[i],n&&e[t].setTargeting(n.getOxTargetingKey(),n.getOxTargetingValue())}catch(o){p.emit(f.ERROR,"Unexpected error in setOxTargeting",o)}},E.getBidId=function(e){try{var t=_.slotsByDivId[e];return t.bid_id}catch(i){return null}},E.getBids=function(e,t){p.emit(f.DEBUG,"API Bidder starting initial auction");var n=u.metaConfigToSlotArray(e,E.mapping);t&&(A=t),i(n,A)}}var r=i(5),o=r.SLOT_STATUS,a=i(16),s=i(8),d=i(9),u=i(1),c=i(4),l=i(13),f=i(2),p=i(3),g=i(10);u["extends"](n,s),e.exports=n},function(e,t,i){var n=i(15),r=i(33),o=i(37);e.exports={createApiBidder:function(e){return new r(e)},createPrefetchBidder:function(e){return new o(e)},createProxyBidder:function(e){return new n(e)}}},function(e,t,i){var n=i(1);e.exports=function(e){var t;if(e.oxhbjsCmds&&n.isArray(e.oxhbjsCmds)){for(t=0;t<e.oxhbjsCmds.length;t++)n.isFn(e.oxhbjsCmds[t])&&e.oxhbjsCmds[t]();e.oxhbjsCmds={push:function(e){try{e()}catch(t){}finally{return 0}}}}}},function(e,t,i){var n,r=(i(2),i(34)),o=i(35),a={init:function(){function e(){var e=window.OXHBConfig.DFP_mapping,t=window.OX_dfp_options||window.OX_bidder_options,i=window.OX_dfp_ads||window.OX_bidder_ads,n=!!(e.prefetch&&e.prefetch.auid&&e.prefetch.slots.length),o=t&&t.prefetch;return i&&!o?r.createApiBidder(e):o||n?r.createPrefetchBidder(e):r.createProxyBidder(e)}n=e(),n.init(),a.__debug&&(a.__debug.bidder=n)},showAd:function(){n.showAd.apply(this,arguments)},refresh:function(){return n.refresh&&n.refresh.apply(this,arguments)},getSize:function(){return n.getSize&&n.getSize.apply(n,arguments)},getPrice:function(){return n.getPrice&&n.getPrice.apply(n,arguments)},getPriceMap:function(){return n.getPriceMap&&n.getPriceMap.apply(n,arguments)},getSecondPrice:function(){return n.getSecondPrice&&n.getSecondPrice.apply(n,arguments)},getBids:function(){return n.getBids&&n.getBids.apply(n,arguments)},getBidId:function(){return n.getBidId&&n.getBidId.apply(n,arguments)},setOxTargeting:function(){return n.setOxTargeting&&n.setOxTargeting.apply(n,arguments)},addSlots:function(){return n.addSlots&&n.addSlots.apply(n,arguments)},getOxTargetingKey:function(){return n.getOxTargetingKey&&n.getOxTargetingKey.apply(n,arguments)},getOxTargetingValue:function(){return n.getOxTargetingValue&&n.getOxTargetingValue.apply(n,arguments)},getVersion:function(){return"2.0.15-8"}};window.OXHBConfig&&window.OXHBConfig.oxns&&window[window.OXHBConfig.oxns]&&(window[window.OXHBConfig.oxns].dfp_bidder=a),a.init(),o(window),e.exports=a},function(e,t,i){function n(e){function t(e){var t=e[0],i=e[1],n=e[1][0],r=e[2],o=e[3]||{},a=e[4],s=y.metadata.slotsByDivId[r];return s||(s=new f(t,i,r,null,d.CREATED,n,o,y.mapping.version),a&&(s.metaConfig=a),y.metadata.slotsByDivId[r]=s,y.metadata.slots.push(s)),s}function i(){function e(e){return u(e,y.mapping,y.metadata,!0)}var i,n,r=window.OX_dfp_ads,s=y.newAuctionConfig();r=a.metaConfigToSlotArray(r,y.mapping);var c=r&&r.length;for(n=0;n<c;n++){var l=r[n];i=t(l),e(i),i.status===d.READY&&o.prototype.addSlotForAuction.call(y,i,s)}return s}function n(){var e,t,i=window.OX_dfp_slots||y.mapping.prefetch&&y.mapping.prefetch.slots,n=y.mapping.prefetch&&y.mapping.prefetch.auid,r=i&&i.length,a=y.newAuctionConfig();for(t=0;t<r;t++)e={div:String(t),supportedSizes:i[t],auid:n},o.prototype.addSlotForAuction.call(y,e,a);return a}function p(){S=E?i():n(),y._beforeDisplayAuction=y.createAuction(S,!0),y._beforeDisplayAuction&&(y._beforeDisplayAuction.setToTimeout=function(){var e=y.metadata.slots.slice();a._each(e,function(e){e.setStartMetricsFromAuction(y._beforeDisplayAuction)}),E?setTimeout(y.createTimeoutForSlots(y._beforeDisplayAuction,e),y.mapping.timeout):a._each(e,function(e){e.setAsTimeoutStarted()}),y._beforeDisplayAuction.setToTimeout=null},A=y._beforeDisplayAuction.startTime.getTime())}function g(e,t){var i,n=t.slots.length,r=null,o=a.dateNow()-s.BID_EXPIRATION_THRESHOLD;if(A<o)return l.emit(c.WARN,"Ads are after the current threshold (4.5 min)"),null;for(i=0;i<n;i++){if(r=t.slots[i],r.div===e.div&&!r.matchedDiv)return r.matchedDiv=e.div,e.matchedDiv=r.div,r;if(a.isSubset(e.supportedSizes||e.size,r.sizes)&&!r.matchedDiv)return r.matchedDiv=e.div,e.matchedDiv=r.div,r}return l.emit(c.WARN,"No pre-bid matches found for dfpSlot:",e),null}function h(e,t,i,n){var o=y.metadata.slotsByDivId[i];return o?(o.slot=n,o.size=t,o.zone=e,o.div=i,void(y.metadata.slotsBySlotId["google_ads_iframe_"+n.getSlotId().getId()]=o)):r.prototype.addSlot.apply(y,arguments)}function m(e){return y._beforeDisplayAuction&&!y._beforeDisplayAuction.completed&&a._each(e,function(e){if(!e.inFlight){e.status!==d.CREATED&&e.status!==d.READY&&e.status!==d.BYPASS||y.performAdServerMapping(e);var t,i=g(e,S);if(i&&(e.inFlight=y._beforeDisplayAuction.id,t=y.getCachedBids(e.div,e.size),t.length>0)){var n=t[0];n.isUsingDiv=e.div,e.status=d.REQUESTED,e.setStartMetricsFromAuction(y._beforeDisplayAuction),n.div=e.div,l.emit(c.DEBUG,"Unused bid "+n.id+" is being used for "+e.div),y.onBidReceived(n,!0)}}}),o.prototype.requestSlotsToAuction.apply(y,arguments)}function v(e){var t=y.metadata.slotsByDivId[e.div];if(!t){var i=Number(e.div),n=S.slots[i];if(n){if((!e.width||!e.height)&&n.sizes&&n.sizes.length>0){var r=n.sizes[0].split("x");e.width=Number(r[0]),e.height=Number(r[1])}e.prefetched=!0,n.matchedDiv&&(e.div=n.matchedDiv)}}return T.apply(this,arguments)}function _(){l.emit(c.DEBUG,"Prefetch Bidder initialized"),p(),D()}r.call(this,e);var y=this,S=null,E=window.OX_dfp_options&&window.OX_dfp_options.prefetch&&window.OX_dfp_ads,A=null,D=this.init,T=this.onBidReceived;this.bidderType(E?s.BC_BIDDER_TYPES.PREFETCH_WITH_DEFINED_SLOTS_BIDDER:s.BC_BIDDER_TYPES.PREFETCH_BIDDER),this.init=_,this.addSlot=h,this.requestSlotsToAuction=m,this.onBidReceived=v,this._makeApiPrefetchSlot=t,this._createPrefetchAuctionConfigFromApi=i,this._createPrefetchAuctionConfigFromMapping=n,this._doPrefetchAuction=p,this._mapToPrefetchAuctionConfig=g}var r=i(15),o=i(8),a=i(1),s=i(5),d=s.SLOT_STATUS,u=i(9),c=i(2),l=i(3),f=i(10);a["extends"](n,r),e.exports=n},function(e,t,i){var n=i(2),r=i(3),o=i(39),a=i(4);r.emit(n.DEBUG,"Adding Adapters"),a.addAdapter(o(),"openx")},function(e,t,i){var n=i(1),r=i(23),o=(i(41),i(21)),a=i(2),s=i(3),d=i(5),u=i(4),c=window.OXHBConfig,l=function(e){function t(){var e=window.OXHBConfig;return e&&e.oxns&&"OX"!==e.oxns?window[e.oxns]:window.OX}function i(e,t){return function(i){e.responded||(e.responded=!0,m(i,e,t.getRecordTemplate()))}}function l(e){var t,i,r=[],d=[],u=e.pageTargeting;n._each(e.bids,function(e){return e.params.adunitid&&e.sizes?(e.params.jstag_url&&(t=e.params.jstag_url),e.params.gateway&&(i=e.params.gateway),void(c.DFP_mapping.single_request&&n.isEmpty(e.targetingMap)?r.push(e):d.push(e))):(s.emit(a.WARN,"OpenX: invalid bid request.",e),void v(!1,e))}),_?y(r,d,u,{gateway:i,isPrefetch:e.isPrefetch}):t?o.loadScript(t,function(){y(r,d,u,{gateway:i,isPrefetch:e.isPrefetch})}):(s.emit(a.WARN,"OpenX: OX not in window and no jstag_url"),n._each(e.bids,function(e){v(!1,e)}))}function f(e,t,r){var o,d,u;n._each(e,function(e){try{e.responded=!1,o=_(),o.setBidderEligibility(!0),o.setPrefetch(r.isPrefetch),o.addAdUnit(e.params.adunitid),o.setAdSizes(n.normalizeSizes(e.sizes)),o.setBidderConfiguration(c._bidderConfiguration),c.DFP_mapping&&c.DFP_mapping.timeout&&o.setBidderTimeout(c.DFP_mapping.timeout),e.floor&&o.setAdUnitMarketFloor(e.params.adunitid,e.floor),c.ad_position_detection_enabled&&n.isPagePosAvailable()&&(u=n.getBrowserDimensions(),d=n.getAdPosition(e.div),u&&d&&(o.setBrowserDims(u.width+"x"+u.height),o.setAdUnitLocation(d.left+","+d.top))),g(o,e.targetingMap),g(o,t),o.addHook(i(e,o),_.Hooks.ON_ADUNIT_INITIALIZED),o.addHook(i(e,o),_.Hooks.ON_AD_RESPONSE),e.startTime=n.dateNow(),o.load()}catch(l){s.emit(a.BIDDER_ADAPTOR_ERROR,"Bid request caused an error.",e),v(!1,e)}})}function p(e,t,i){try{var r,o,d,u,l=0,f=_(),p=[],h=[],y=[],S=new RegExp("/^[|]+$/");for(f.setBidderEligibility(!0),f.setBidderConfiguration(c._bidderConfiguration),f.setPrefetch(i.isPrefetch),c.DFP_mapping&&c.DFP_mapping.timeout&&f.setBidderTimeout(c.DFP_mapping.timeout),n._each(e,function(e){e.floor&&f.setAdUnitMarketFloor(e.params.adunitid,e.floor)}),g(f,t),f.addHook(function(e){var t={auid:e.get("auid"),chain_timeout:e.get("chain_timeout"),chain_revenue:e.get("chain_revenue"),actual_auid:e.get("auid"),chain:e.get("chain")},i={adunit:t,rt:f.getRecordTemplate(),oninit:void 0,chain:1};p.push(i),l++},_.Hooks.ON_ADUNIT_INITIALIZED),f.addHook(function(t){var i,r,o,a,s;for(i=0;i<p.length;i++){var d=f.getOrCreateAdUnit(""+i);d.load(p[i]),h.push(d)}for(i=e.length-1;i>=0;i--){for(o=e[i],a=!1,r=h.length-1;r>=0;r--){s=h[r];var u=n.getChainSizes(s.get("chain")),c=n.normalizeSizes(o.sizes);if(e[i].params.adunitid==s.get("auid")&&n.isSubset(c,u)){m(s,o,f.getRecordTemplate()),h.splice(r,1),a=!0;break}}a||m(!1,o)}},_.Hooks.ON_AD_RESPONSE),r=0;r<e.length;r++)f.addAdUnit(e[r].params.adunitid),f.setAdSizes(n.normalizeSizes(e[r].sizes)),e[r].startTime=n.dateNow();if(c.ad_position_detection_enabled&&n.isPagePosAvailable()){for(o=n.getBrowserDimensions(),r=0;r<e.length;r++)u=n.getAdPosition(e[r].div),u?y.push(u.left+","+u.top):y.push("");d=y.join("|"),o&&!S.test(d)&&(f.setBrowserDims(o.width+"x"+o.height),f.setAdUnitLocation(d))}f.load()}catch(E){s.emit(a.BIDDER_ADAPTOR_ERROR,"Batched request caused an error.",e),n._each(e,function(e){v(!1,e)})}}function g(e,t){if(e&&t)for(var i in t)if(t.hasOwnProperty(i))if(n.isArray(t[i]))for(var r in t[i])t[i].hasOwnProperty(r)&&e.addVariable(i,t[i][r]);else e.addVariable(i,t[i])}function h(e,t,i){var r,o={medium:c.medium,rtype:t,txn_state:i};return"ri"===t&&(e+="&bs={bs}",o.bs=c.siteName),r=n.template(e,o),n.getImgBeacon(r)}function m(e,t,i){if(!t.added){t.added=!0;var n,o,a=t.placementCode.split("-.-"),s=e&&e.get("chain_revenue"),c=e&&e.get("pub_rev");if(e&&(s||c)){n=r.createBid(1);var l,f,p,g=e.get("chain"),m=g&&g.length&&g[g.length-1],v=g&&g[0],y=m&&m.tbd,S=s||m&&m.pub_rev,E=y||S;o=m?m.ts:"",n.bidderCode="openx",n.ad_id=e.get("ad_id"),n.adUnit=e,n.cpm=Number(E)/1e3,n.deal_id=m?m.deal_id:void 0,n.pmp=1===e.get("auct_win_is_deal"),y&&(n.sp=Number(S)/1e3),l=m?m.html||m.ad_url:"",f=h(i,"rr",o),p=h(i,"ri",o),n.ad=f+l+p,n.adUrl=e.get("ad_url"),n.width=e.get("width")||v&&v.width,n.height=e.get("height")||v&&v.height,n.renderBid=function(e){var t=document.createElement("div");e.appendChild(t),n.adUnit.set("anchor",t),n.adUnit.render({framed:1,onAdUnitRenderStart:function(){},onAdUnitRenderFinish:function(){},onAdRenderStart:function(){},onAdRenderFinish:function(e,t,i){},onAdDefaulted:function(e,t,i){},onAdNotDefaulted:function(e,t,i){},shareFrameContents:_.shareFrameContents})},n.div=a[0],n.adunit=a[1],n.auction_id=a[2],n.noFill=!1,n.exp=d.BID_EXPIRATION_THRESHOLD}else n=r.createBid(2),n.bidderCode="openx",n.div=a[0],n.adunit=a[1],n.auction_id=a[2],n.cpm=0,n.noFill=!0;n.transactionState=o,u.addBid(n)}}function v(e,t,i){return setTimeout(function(){m(e,t,i)},0)}var _=t(),y=function(e,t,i,n){n.gateway&&(n.gateway.indexOf("/w")<0&&(n.gateway=n.gateway+"/w"),_.setGateway(n.gateway)),e.length&&p(e,i,n),t.length&&f(t,i,n)};return{callBids:l}};e.exports=l},,function(e,t,i){var n=i(4),r={};t.pbCallbackMap=r,t.getPlacementIdByCBIdentifer=function(e){return r[e]},t.setExpectedBidsCount=function(e,t){n.setExpectedBids(e,t)},t.addBidResponse=function(e,t){var i=e.split("-.-");t.div=i[0],t.adunit=i[1],t.auction_id=i[2],n.addBid(t)}}]);


