!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){!function(e){"use strict";var t,r,i,o=n(8),a=n(18),s=n(5),l=n(19),c=n(20),d="undefined";typeof e._HAP===d&&(e._HAP={}),r=n(1),r.init("ad_init"),i=r.open("ad_loader");var u=o.getTopWindow(e);if(!u)return void i.msg("Couldn't get topWindow");e._HAP.topWindow=u,i.msg("Acquired top window: ",u),i.msg("framed="+o.isFramed(e)),typeof u._HAP===d?(u._HAP={RQID:""},i.msg("Created global namespace topWindow._HAP")):i.msg("Global namespace topWindow._HAP apparently exists:",u._HAP);var f=function(e){i.msg("isHomeUrl? "+e);var t=e.match(/^(https?)(:\/\/)(.*?)(\/)(.*)$/);if(null===t||t.length<4)return!1;var n=t[3].split(".");if(n.length<2)return!1;var r=n[n.length-2];return"toboads"===r||"httpool"===r?!0:!1},p=function(t){if(e.hasOwnProperty(t))try{delete e[t]}catch(n){e[t]=void 0}},h="http://tas-rs.toboads.com",g="1d5d3a0f-b7d3-4fbd-84eb-5a558708f29b";if(typeof e.__vtcpcb!==d&&e.__vtcpcb instanceof Function&&f(e.document.referrer)){var m=e.document.referrer,v=m.search("[a-z]/");return 10>v&&(v=m.length-1),void e.__vtcpcb(g,m.substr(0,v+1))}if(u._HAP.hasOwnProperty("GlobalManager")||(u._HAP.GlobalManager=n(3)()),u._HAP.Random=a,u._HAP.PubSubHub=n(21)(),u._HAP.CustomAdTag=n(22)(),u._HAP.DOMLoad=n(2)(e),u._HAP.MessageReceiver=n(9)(u._HAP.DOMLoad),u._HAP.hasOwnProperty("WindowManager")||(u._HAP.WindowManager=n(23)(e,h)),t=u._HAP.WindowManager,u._HAP.VideoPushdown=n(28)(e,u._HAP.MessageReceiver),u._HAP.VideoInBanner=n(29)(e,u._HAP.MessageReceiver),e._HAP._bindc=function(e,t,n,r){u._HAP.WindowManager.bindContainer(e,t,n,r)},e._HAP._collc=function(e,t,n){n=n||document,u._HAP.WindowManager.collapseContainer(e,t,n)},e._HAP._bindp=function(){i.msg("Adding pixel")},(typeof u._HAP.RQID===d||""===u._HAP.RQID)&&(i.msg("topWindow._HAP.RQID is empty, generating"),u._HAP.RQID=a.generateUUID()),i.msg("topWindow._HAP.RQID:",u._HAP.RQID),u._HAP.WindowManager.readParam("publisher_id","","md5")){var y={publisherId:t.readParam("publisher_id","","md5"),viewerTag:g,blockFormat:t.readParam("ad_format","","dim"),blockType:t.readParam("block_type",1,"int"),typeText:t.readParam("ad_type_text",!0,"bool"),typeShop:t.readParam("ad_type_shop",!0,"bool"),typeBigshop:t.readParam("ad_type_bigshop",!0,"bool"),typeRich:t.readParam("ad_type_rich",!0,"bool"),typeVideo:t.readParam("ad_type_video",!0,"bool"),typeHttpPerf:t.readParam("ad_type_http_perf","",{type:"set",values:["local","global","false",""],def:""}),typePerfText:t.readParam("ad_type_perf_text",!0,"bool"),typePerfShop:t.readParam("ad_type_perf_shop",!0,"bool"),typePerfBigshop:t.readParam("ad_type_perf_bigshop",!0,"bool"),typePerfRich:t.readParam("ad_type_perf_rich",!0,"bool"),typePerfVideo:t.readParam("ad_type_perf_video",!0,"bool"),style:{borderColor:t.readParam("color_border","#FFFFFF","clr"),backgroundColor:t.readParam("color_bg","#FFFFFF","clr"),titleColor:t.readParam("color_title","#0000FF","clr"),linkColor:t.readParam("color_link","#34A705","clr"),textColor:t.readParam("color_text","#000000","clr")},alternativeUrl:t.readParam("alternative_url",""),pageUrl:t.readParam("page_url",""),customCategories:t.readParam("categories",""),testMode:t.readParam("test_mode",!1,"bool"),adChannel:t.readParam("channel","","chan"),altAdTag:t.readParam("alternative_ad_tag","","chan"),adZone:"",excludeParams:t.readParam("exclude_params",""),openInNewWindow:t.readParam("open_new_window",!1,"bool"),autoHide:t.readParam("autohide",!1,"bool"),hideTagline:t.readParam("hide_tagline",!1,"bool"),clickTrackingUrl:t.readParam("click_tracking_url",""),cookies:t.readParam("cookies","1"),flashVersion:l.major,vh:s.getHeight(e),vw:s.getWidth(e)};y.typeBigshop=t.readParam("ad_type_bigshop",y.typeShop,"bool"),y.typePerfBigshop=t.readParam("ad_type_perf_bigshop",y.typePerfShop,"bool"),t.createContainer(e,y)}else e.AdPlatform={showAds:function(n){var r={adZone:t.filterVar(n.zone,"","zone"),externalId:t.filterVar(n.external_id,"","external"),pixelId:t.filterVar(n.pixel_id,"","pixel"),param:t.filterVar(c.stringify(n.param),""),publisherId:"",viewerTag:g,blockFormat:t.filterVar(n.format,"","dim"),blockType:"",typeText:"",typeShop:"",typeBigshop:"",typeRich:"",typeVideo:"",typeHttpPerf:"",typePerfText:"",typePerfShop:"",typePerfBigshop:"",typePerfRich:"",typePerfVideo:"",style:{borderColor:"",backgroundColor:"",titleColor:"",linkColor:"",textColor:""},alternativeUrl:"",pageUrl:"",customCategories:"",testMode:t.filterVar(n.test,!1,"bool"),adChannel:"",altAdTag:"",excludeParams:"",openInNewWindow:0,autoHide:0,hideTagline:t.filterVar(n.hide_tagline,""),clickTrackingUrl:t.filterVar(n.click_tracking_url,""),cookies:t.filterVar(n.cookies,"1"),flashVersion:l.major,vh:s.getHeight(e),vw:s.getWidth(e),pixelLabel:t.filterVar(n.pixel_label,""),pixelValue:t.filterVar(n.pixel_value,"")};t.createContainer(e,r)}},e.AdPlatformZone?(e.AdPlatformZone.id&&(e.AdPlatformZone.zone=e.AdPlatformZone.id,delete e.AdPlatformZone.id),e.AdPlatform.showAds(e.AdPlatformZone),p("AdPlatformZone")):e.AdPlatformExternal?(e.AdPlatformExternal.id&&(e.AdPlatformExternal.external_id=e.AdPlatformExternal.id,delete e.AdPlatformExternal.id),e.AdPlatform.showAds(e.AdPlatformExternal),p("AdPlatformExternal")):e.AdPlatformPixel&&(e.AdPlatformPixel.id&&(e.AdPlatformPixel.pixel_id=e.AdPlatformPixel.id,delete e.AdPlatformPixel.id,e.AdPlatformPixel.pixel_label=e.AdPlatformPixel.label,delete e.AdPlatformPixel.label,e.AdPlatformPixel.pixel_value=e.AdPlatformPixel.value,delete e.AdPlatformPixel.value,e.AdPlatformPixel.format="0x0"),e.AdPlatform.showAds(e.AdPlatformPixel),p("AdPlatformPixel"))}(window)},function(e){"use strict";var t=function(){},n={app:"",init:t,open:function(){return{write:t,msgObject:t,msg:t}}};e.exports=n},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){var t=r.open("DOMLoaded"),n=[],i=[],o=!1,a=0,s=e,l=s.document,c=function(e){return t.msg("registerLoad "+e+"\nisReady="+o),o?void e():void(n[n.length]=e)},d=function(e){i[i.length]=e},u=function(){var e;if(a++,!o)for(o=!0,t.msg("triggerLoad:",n.length,"listeners"),e=0;e0)for(t=0;ti.surfaceSize)&&(i=n[t]);return i?i.document.location.href:""}catch(o){return""}}}},function(e,t,n){"use strict";var r=n(6),i=n(7);e.exports={getWidth:function(e){return e.innerWidth?+e.innerWidth:e.document.documentElement.clientWidth?+e.document.documentElement.clientWidth:null===e.document.body?0:+e.document.body.clientWidth},getHeight:function(e){return e.innerHeight?+e.innerHeight:e.document.documentElement.clientHeight?+e.document.documentElement.clientHeight:null===e.document.body?0:+e.document.body.clientHeight},getSize:function(e){return{width:this.getWidth(e),height:this.getHeight(e)}},getBounds:function(e){var t=this.getSize(e);return new r(0,0,t.width,t.height)},getClipRect:function(e){var t=this.getBounds(e),n=this.getOffset(e);return t.offsetBy(n)},getSurfaceSize:function(e){var t,n=0;if(e.frames&&e.frames.length>0)for(t=0;tthis.left?e.left:this.left,e.top>this.top?e.top:this.top,e.rightn.right||n.top>n.bottom?new t:n},t.isValidRect=function(e){return void 0!==e.isNull&&void 0!==e.left&&void 0!==e.top&&void 0!==e.right&&void 0!==e.bottom},t.prototype.offsetBy=function(e){return this.isNull?new t:new t(this.left+e.x,this.top+e.y,this.right+e.x,this.bottom+e.y)},t.prototype.copy=function(){return new t(this.left,this.top,this.right,this.bottom)},t.prototype.area=function(){return this.isNull?0:Math.abs(this.right-this.left)*Math.abs(this.bottom-this.top)},t.prototype.covers=function(e,t){return Math.ceil(100*this.intersect(e).area()/this.area())>=t}},function(e){"use strict";function t(e,n){this.x=e,this.y=n,this.negate=function(){return new t(-this.x,-this.y)},this.add=function(e){return new t(this.x+e.x,this.y+e.y)},this.subtract=function(e){return this.add(e.negate())}}e.exports=t},function(e){"use strict";var t=null,n=null,r=null,i=function(e){for(var t,i,o=e;o;)try{if(i=o.parent,null===i||i===o)break;try{t=i.title,t=i.document.location,t=i.document.location.href}catch(a){return n=!0,r=(o.innerWidth||o.document.documentElement.clientWidth||o.document.body.clientWidth)+"x"+(o.innerHeight||o.document.documentElement.clientHeight||o.document.body.clientHeight),o}o=i}catch(s){break}return o},o=function(e){return null===t&&(t=i(e)),t};e.exports={getTopWindow:function(e){return o(e)},isFramed:function(e){return o(e),n},getWrapperDimensions:function(e){return o(e),r},NV:navigator,UA:navigator.userAgent}},function(e,t,n){"use strict";var r=n(4),i=window._HAP.DOMLoad,o=window._HAP.topWindow,a=n(1);e.exports=function(e){var t=a.open("MessageReceiver"),n=[],s=function(e,r){var i;for(t.msg("handleMessage",e,r,"(",n.length," handlers)"),r.hasOwnProperty("msg")&&"ERROR"===r.msg&&l(r),i=0;i=0?""+parseFloat(e.filter.match(/opacity=([^)]*)/)[1])/100:""):(t=t.replace(/-([a-z])/gi,function(e,t){return t.toUpperCase()}),void 0!==n&&(e[t]=n),e[t])},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()}}},,,,,,,,function(e){"use strict";var t="undefined";e.exports={rndSeed:(new Date).getTime(),rnd:function(){return this.rndSeed=(9301*this.rndSeed+49297)%233280,this.rndSeed/233280},get:function(e){return typeof e===t&&(e=1),Math.floor(this.rnd()*e)},getUniqueString:function(e){var n,r,i="",o="0123456789abcdef";for(typeof e===t&&(e=32),n=0;e>n;n++)r=this.get(o.length),i+=o.charAt(r);return i},generateUUID:function(){return this.getUniqueString(8)+"-"+this.getUniqueString(4)+"-"+this.getUniqueString(4)+"-"+this.getUniqueString(4)+"-"+this.getUniqueString(12)}}},function(e,t,n){"use strict";var r=n(1),i=n(8).NV;e.exports=function(){var e,t,n,o,a,s,l,c=-1,d=r.open("FlashVersion"),u=function(e){var t=-1;try{t=e.GetVariable("$version")}catch(n){}return t},f=function(e){var t=e.split(",");return{major:parseInt(t[0].split(" ")[1],10),minor:parseInt(t[1],10),revision:parseInt(t[2],10),revisionStr:t[2]}},p=[{name:"ShockwaveFlash.ShockwaveFlash.7",version:function(e){return u(e)}},{name:"ShockwaveFlash.ShockwaveFlash.6",version:function(e){var t="6,0,21";try{e.AllowScriptAccess="always",t=u(e)}catch(n){}return t}},{name:"ShockwaveFlash.ShockwaveFlash",version:function(e){return u(e)}}],h=function(e){return parseInt(e.replace(/[a-zA-Z]/g,""),10)||o},g=function(e){var t=-1;try{t=new ActiveXObject(e)}catch(n){}return t};if(i.plugins&&i.plugins.length>0){var m="application/x-shockwave-flash",v=i.mimeTypes;if(v&&v[m]&&v[m].enabledPlugin&&v[m].enabledPlugin.description){var y=v[m].enabledPlugin.description,b=y.split(" "),w=b[2].split(".");e=parseInt(w[0],10),t=parseInt(w[1],10),n=b[3],o=h(n),a=!0}}else if(-1===i.appVersion.indexOf("Mac")&&window.execScript)for(s=0;se?"0"+e:e}function n(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,function(e){var t=l[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function r(e,t){var s,l,c,d,u,f=i,p=t[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),"function"==typeof a&&(p=a.call(t,e,p)),typeof p){case"string":return n(p);case"number":return isFinite(p)?p+"":"null";case"boolean":case"null":return p+"";case"object":if(!p)return"null";if(i+=o,u=[],"[object Array]"===Object.prototype.toString.apply(p)){for(d=p.length,s=0;d>s;s+=1)u[s]=r(s,p)||"null";return c=0===u.length?"[]":i?"[\n"+i+u.join(",\n"+i)+"\n"+f+"]":"["+u.join(",")+"]",i=f,c}if(a&&"object"==typeof a)for(d=a.length,s=0;d>s;s+=1)l=a[s],"string"==typeof l&&(c=r(l,p),c&&u.push(n(l)+(i?": ":":")+c));else for(l in p)p.hasOwnProperty(l)&&(c=r(l,p),c&&u.push(n(l)+(i?": ":":")+c));return c=0===u.length?"{}":i?"{\n"+i+u.join(",\n"+i)+"\n"+f+"}":"{"+u.join(",")+"}",i=f,c}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var i,o,a,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};"function"!=typeof t.stringify&&(t.stringify=function(e,t,n){var s;if(i="",o="","number"==typeof n)for(s=0;n>s;s+=1)o+=" ";else"string"==typeof n&&(o=n);if(a=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return r("",{"":e})})}()},function(e){"use strict";e.exports=function(){var e=[];return{publish:function(t){var n,r=e.length;for(n=0;r>n;n++)e[n].postFramelessMessage(t)},subscribe:function(t){e.push(t)}}}},function(e){"use strict";e.exports=function(){var e=function(){};e.prototype.decorate=function(){};var t=function(e){this.typeDecorator=e};t.prototype.inject=function(e){return new n(this.typeDecorator,e)};var n=function(e,t){this.typeDecorator=e,this.block=t};n.prototype.into=function(e,t,n){return this.typeDecorator.decorate(this.block,e,t,n)};var r=function(e,t){var n=function(){};n.prototype=e.prototype;var r=new n,i=e.apply(r,t);return Object(i)===i?i:r},i=function(n){var i={normal:e},o=r(i[n],[]);return new t(o)},o=function(e,t,n,r,o){var a=i(e);return a.inject(t).into(n,r,o)},a=function(e,t,n){var r=n.createElement("script");r.async=!0,r.src=t,e.appendChild(r)};return{renderTag:o,addExternalScript:a}}},function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(24),a=n(25),s=n(26),l=n(8),c=n(18),d=n(27),u="undefined";e.exports=function(e,t){var n=r.open("WindowManager"),f=e._HAP.topWindow,p=f._HAP.DOMLoad,h=[],g=e,m=g.document,v=[],y=[],b=100,w=function(e){var t=e||{};return{build:function(e){var n,r=t;e=e||{};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r}}},_={encode:function(e){var t,n="";for(e=e.replace(/\r\n/g,"\n"),t=0;tr?n+=String.fromCharCode(r):r>127&&2048>r?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n}},P=function(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")},x=function(e){var t=/\[native code\]/;return!t.test(e.write+"")},C=function(e){var t,n;return t=m.getElementById(e),typeof t!==u&&t&&(n=t.getElementsByTagName("div"),n.length)?n[0]:null},S=function(e,t,r){n.msg("hidePlaceholder",e,r);var i,o=r.getElementById(e+"_ph");if(typeof o!==u&&o&&o.parentNode&&(o.parentNode.parentNode.removeChild(o.parentNode),i=C(e),i&&i.parentNode.removeChild(i)),t){var a=r.getElementById(e);typeof a!==u&&a&&(a.style.display="none")}},A=function(){var e,r=this.block;r.state===d.State.LOAD?(r.state=d.State.DONE,r.observer=new o(r,700,l.isFramed(g),p),r.observer.reset(1000),r.messageSender=new a(r,t),r.engineParams.pushdown&&(e=r.container.getElementsByTagName("div")[0],f._HAP.VideoPushdown.hideContainer(e,r),f._HAP.VideoPushdown.registerScroll(e,r.container,e,r)),r.engineParams.inbanner&&(f._HAP.VideoInBanner.openContainer(r),f._HAP.VideoInBanner.registerAutoplayScroll(r))):n.msg("Unexpected state:",r.state)},E=function(e){i.konq?setTimeout(function(){A.apply(e)},3e3):p.addEventHandler(e,"load",A)},k=function(e){var t,n,r,i=e.length,o="";for(n=0;i>n;n++)if(e.charCodeAt(n)>127)for(t=_.encode(e.substr(n,1)),r=0;r0&&(t+=n+"="+P(e[n])+"&")}return t},I=function(e,t){return typeof t!==u?e+"?"+H(t):e},T=function(e){return e.split("?",1)[0]},N=function(e,t,n){n.getElementById(e+"_ph").parentNode.style.display="none"},V=function(){var e,r=this.block;if(r.state===d.State.LOAD){r.state=d.State.DONE,r.observer=new o(r,700,l.isFramed(g),p),r.observer.reset(1000),r.messageSender=new a(r,t,!0),n.msg("Preparing MessageReceiver for frameless message");try{e=f._HAP.MessageReceiver,e.setAllowFramelessMessages(!0)}catch(i){n.msg("Message receiver could not be found, frameless block cannot send messages")}}else n.msg("Unexpected state:",r.state)},O=function(e,t,n){var r=m.createElement("form"),i=m.createElement("input");r.setAttribute("method","POST"),r.setAttribute("action",T(n)),r.setAttribute("target",e.getAttribute("name")),i.setAttribute("type","hidden"),i.setAttribute("value",n),i.setAttribute("name","async_data"),r.appendChild(i),m.body.appendChild(r),e.setAttribute("data-url",n),r.submit(),r.parentNode.removeChild(r)},M=function(e,r){var i,o,a,s=e;if(n.msg("initializeBlock",s,s.engine,r),s.state=d.State.LOAD,"ha"===s.engine)a=w(s.sharedParams),o=a.build({L:s.engineParams.link,alt_url:s.parameters.alternativeUrl,afs:s.parameters.adFormats,sck:s.engineParams.serving_context_cache_key}),s.url=I(t+"/ads.php",o);else{if("srcless"===s.engine){delete s.url;var l=m.getElementById(s.containerId+"_ph");l.style.visibility="visible";var p=":'"+g[s.containerId+"_var"]+"'";return l.src="javascript"+p,l.block=s,s.frame=l,void A.apply(l)}if("frameless"===s.engine){delete s.url;var h=m.getElementById(s.containerId+"_ph").parentNode;if("DIV"===h.tagName){var v=h;h=v.parentNode,h.removeChild(v)}h.block=s,V.apply(h)}}"backfill"===s.engine?(s.custom_tag_renderer=s.engineParams.custom_tag_renderer,s.engineParams.custom_tag||s.engineParams.custom_external_script?(s.use_custom=!0,s.custom_tag=s.engineParams.custom_tag,s.custom_external_script=s.engineParams.custom_external_script):s.url=I(t+s.engineParams.backfillProxy,s.engineParams)):"alt"===s.engine?typeof s.engineParams!==u&&typeof s.engineParams.url!==u&&s.engineParams.url.length>0?(n.msg("Got alternative_url from callback:",s.engineParams.url),s.url=s.engineParams.url):s.parameters.alternativeUrl.length>0&&(n.msg("Got alternative_url from js code var:",s.parameters.alternativeUrl),s.url=s.parameters.alternativeUrl):"blank"===s.engine&&(i=s.parameters,o={rq:f._HAP.RQID,vt:i.viewerTag,brand:s.engineParams.brand,af:i.blockFormat,clr_border:i.style.borderColor,clr_bg:i.style.backgroundColor,clr_title:i.style.titleColor,clr_link:i.style.linkColor,clr_text:i.style.textColor,nw:i.openInNewWindow},typeof s.engineParams.clr_bg!==u&&(o.clr_bg=s.engineParams.clr_bg,o.clr_border=s.engineParams.clr_border,o.clr_title=s.engineParams.clr_title,o.clr_link=s.engineParams.clr_link,o.clr_text=s.engineParams.clr_text),s.url=I(t+"/alt.php",o)),setTimeout(function(e,t){var r=e,i=t;return function(){var e=i,t=r,o=t.doc.createElement("iframe");t.frame=o,o.block=t,o.id="hA_blk_"+c.getUniqueString(8),o.name=o.id,o.style.width="100%",o.style.height="100%",o.style.border="0px solid white",o.scrolling="no",o.frameBorder=0,o.hspace=0,o.vspace=0,o.marginWidth=0,o.marginHeight=0,o.allowTransparency="false","ha"===t.engine&&E(o),setTimeout(function(e,t,r){n.msg("delayed iframe attach [closure]",e,t,r);var i=e,o=t,a=r,s=e.parentNode;return function(){o.url&&o.url.length<2e3&&(i.src=o.url);try{a.parentNode.replaceChild(i,a)}catch(e){o.container.replaceChild(i,a),n.msg("replaced node (via block.container reference)")}o.url&&o.url.length>=2e3?O(i,m,o.url):o.use_custom&&(s.innerHTML=o.custom_tag,f._HAP.CustomAdTag.renderTag(o.custom_tag_renderer,o,s,m,g),o.custom_external_script&&f._HAP.CustomAdTag.addExternalScript(s,o.custom_external_script,m),s.block=o,V.apply(s))}}(o,t,e),100+50*t.index)}}(s,r),50*s.index)},R=function(){n.msg("initializeBlocks","blocks=",h.length);var e,t,r,i=s.newHub(window,[/\.tas\.vrt/]);for(i.listenForMessages(window),i.registerHandler("ERROR",function(e){for(var n=0,r=h.length;r>n;++n)h[n].index===e&&(S(t.containerId,!0,t.doc),t.state=d.State.COLLAPSE)}),e=0;eo?n.msg("won't fire delayed init: too many calls ("+o+")"):(n.msg("fire delayed init #"+R.callCount),setTimeout(R,100*R.callCount))}},W=function(){n.msg("windowReady"),R()},B=function(e){if(n.msg("Async blocks"),e){if(b>5e3)return;setTimeout(function(){5e3>=b&&(B(!0),R(),b+=100)},100)}else R()};p.registerLoad(function(){setTimeout(function(){W(),B(!0)},1)});var D=function(e){var t=function(e){g[e]=null;try{delete g[e]}catch(t){g[e]=void 0}};t("toboads_"+e),t("httpool_"+e)},L=function(e,t){var n;if(typeof e.anull===u&&(e.anull=!1),null===t&&e.anull)return null;if("set"===e.type){for(n=0;n'),P=s.createElement("span"),P.style.cssText="margin:0px;padding:0px;border-width:0px;display:inline-block",P.id=p,_=s.createElement("div"),_.style.cssText="display:inline-block;zoom:1;*display:inline;margin:0px;padding:0px;border-width:0px;position:relative;overflow:hidden;width:"+r.width+"px;height:"+r.height+"px",C=s.createElement("iframe"),C.scrolling="no",C.width="100%",C.height="100%",C.id=m.containerId+"_ph",C.frameBorder=0,C.marginWidth=0,C.marginHeight=0,C.style.cssText=b,S=s.createElement("script"),S.src=I(t+"/js/adl-39430.js",y),S.type="text/javascript",_.appendChild(C),P.appendChild(_),E.appendChild(P),E.appendChild(S),setTimeout(function(){var e=s.getElementById(A),t=e.parentNode;n.msg("Populating anchor"),t.insertBefore(E,e),t.removeChild(e),n.msg("Anchor removed"),setTimeout(B,0)},50)}else{z(s,''),z(s,'
'),z(s,''),z(s,"
");var H=I(t+"/js/adl-39430.js",y);n.msg("script.src="+H),z(s,''),z(s,"
"),n.msg("wrote script tag.")}var T,N=v.length;for(T=0;N>T;T++)D(v[T]);return m},bindContainer:function(e,t,r,i){var o,a=f._HAP.WindowManager.blockMap[e];if(n.msg("bindContainer","cid:",e,", engine:",t,", params:",r,", block:",a),typeof a!==u)if(i&&N(e,!1,a.doc),a.state===d.State.WAIT){if(o=a.doc.getElementById(e))return a.state=d.State.INIT,a.engine=t,a.engineParams=r,a.container=o,o.block=a,a;n.msg("Could not locate container!")}else n.msg("Unexpected block state: ",a.state);else n.msg("Could not locate block!")},collapseContainer:function(e,t,n){S(e,t,n)},readParam:function(e,t,n){return F(e,t,n)},filterVar:function(e,t,n){return U(e,t,n)}}}},function(e,t,n){"use strict";function r(e,t,n,r){this.d=i.open("Observer",e.index),this.block=e,this.delay=t,this.timer=null,this.viewportTimer=null,this.blockVisible=!1,this.visibilityCheckCount=0,this.framed=n;var o,a=function(){this.reset()},s=function(e){return function(){a.apply(e)}}(this),l=this.block.win;for(e.winStack=[];l;){e.winStack.push(l),r.addEventHandler(l,"scroll",s),r.addEventHandler(l,"resize",s);try{if(o=l.parent,null===o||o===l||!o.document.location.href)break;l=o}catch(c){break}}}var i=n(1),o=n(6),a=n(5),s=n(10),l=n(4),c="undefined";e.exports=r,r.prototype.calculateBaseVisibleRect=function(){var e,t,n,r,i,o=null;if(i=this.block.winStack.slice(),1===i.length)o=a.getClipRect(this.block.win);else for(var c=null,d=i.pop();d;){if(null===o&&(o=a.getClipRect(d)),c=i.pop())try{var u=c.frameElement;if("frameless"===this.block.engine&&l.msie&&+l.version<9&&(u=this.block.container),t=s.getOffset(u),n=a.getBounds(c).offsetBy(t),e=n.intersect(o),r=a.getOffset(c),o=e.offsetBy(t.negate()).offsetBy(r),o.isNull)break}catch(f){this.d.msg("EXCEPTION",f)}d=c}return o},r.prototype.calculateBlockViewport=function(){var e,t,n,r,i,a=this.calculateBaseVisibleRect(),l=this.block,d=new o;return l.engineParams.render_block_format!==c?(i=l.engineParams.render_block_format.split("x")[0],r=l.engineParams.render_block_format.split("x")[1]):(i=l.frame.width,r=l.frame.height),a.isNull||(e=s.getOffset(l.frame),"srcless"!==l.engine||"0"!==r&&"hidden"!==l.frame.style.visibility||(e.y>=r&&(e.y=e.y-r),"0"===i&&e.x>=i&&(e.x=e.x-i),"hidden"===l.frame.style.visibility&&(l.frame.style.visibility="visible",l.frame.style.zIndex="-1000")),"frameless"===l.engine&&(e=s.getOffset(l.container)),t=new o(e.x,e.y,e.x+parseInt(i,10),e.y+parseInt(r,10)),n=a.intersect(t),n.isNull||(d=n.offsetBy(e.negate()))),d},r.prototype.exec=function(e){var t=this.calculateBlockViewport(),n=e||this.delay;t&&typeof t.isNull!==c&&t.isNull===!1&&(!this.blockVisible&&this.visibilityCheckCount<3&&(this.d.msg("Checking visibility:",this.visibilityCheckCount+1),this.blockVisible=s.isElementVisible(this.block.win,this.block.frame),this.d.msg("blockVisible=",this.blockVisible),this.visibilityCheckCount++),this.blockVisible&&this.block.messageSender.send("VIEWPORT",{rect:t,initialDelay:n,viewport:a.getSize(window._HAP.topWindow)})),this.stop(this.timer)},r.prototype.adBlockViewport=function(){var e=this.calculateBlockViewport();this.blockInViewport=!1,e&&typeof e.isNull!==c&&e.isNull===!1&&(this.blockInViewport=s.isElementVisible(this.block.win,this.block.frame),this.blockInViewport&&(this.d.msg("->>> Viewport visible"),this.block.messageSender.send("VIDEO_INVIEWPORT",{rect:e,viewport:a.getSize(window._HAP.topWindow)}))),!this.blockInViewport&&this.block.messageSender&&(this.d.msg("->>> Out of viewport"),this.block.messageSender.send("VIDEO_OUTOFVIEWPORT",{rect:e,viewport:a.getSize(window._HAP.topWindow)})),this.stop(this.viewportTimer)},r.prototype.reset=function(e){this.stop(this.timer),this.stop(this.viewportTimer),typeof e===c&&(e=this.delay),this.framed&&(e=4e3),this.timer=setTimeout(function(t){return function(){t.exec(e)}}(this),e),this.viewportTimer=setTimeout(function(e){return function(){e.adBlockViewport()}}(this),150)},r.prototype.stop=function(e){null!==e&&clearTimeout(e)}},function(e,t,n){"use strict";function r(e,t,n){if(this.d=i.open("MessageSender"),this.block=e,this.baseUrl=t,n)return void(this.senderFunc=function(e){window._HAP.PubSubHub.publish(e)});this.senderFunc=function(e){this.d.msg("MESSAGE (senderFunc not set)",e)};var r=!1;try{r=this.block.frame.contentWindow.postMessage}catch(a){this.d.msg("EXCEPTION",a)}var s=this;r?(this.d.msg("Browser supports window.postMessage (Firefox 3, Opera 9, IE8, Chrome 2, Safari 4)"),this.senderFunc=function(e){s.block.frame.contentWindow.postMessage(e,"*")}):o.saf||o.msie?(this.d.msg("MSIE 6, 7, Safari 3, Chrome 1: postMessageViaIframe"),this.senderFunc=function(e){s.postMessageViaIframe(e)}):(this.d.msg("Firefox 2 or any Konqueror: postMessageViaFragment"),this.senderFunc=function(e){s.postMessageViaFragment(e)})}var i=n(1),o=n(4),a=n(18),s=n(20);e.exports=r,r.prototype.send=function(e,t){try{this.d.msg("send",this.block,e,t);var n={name:e,data:t};this.senderFunc(s.stringify(n))}catch(r){this.d.msg("EXCEPTION",r)}},r.prototype.postMessageViaIframe=function(e){this.d.msg("postMessageViaIframe");try{var t=this.block,n=t.doc.createElement("iframe");n.style.position="absolute",n.style.visibility="hidden",n.style.display="none",n.style.top=n.style.left="0",n.style.width=n.style.height="0",n.id="ta_msgprxy_frm_"+a.getUniqueString(16),n.name=n.id,n.src=this.baseUrl+"/cdmp.html#r="+Math.random()+",t="+t.frame.name+",m="+encodeURIComponent(e),this.d.msg("iframe.src="+n.src),t.win.document.body.appendChild(n),setTimeout(function(){t.win.document.body.removeChild(n)},3e3)}catch(r){this.d.msg("EXCEPTION",r)}},r.prototype.postMessageViaFragment=function(e){this.d.msg("postMessageViaFragment");try{var t=this.block.url+"#"+encodeURIComponent(e);o.konq?this.block.frame.src=t:this.block.frame.contentWindow.location.replace(t)}catch(n){}}},function(e,t,n){"use strict";function r(){}var i,o,a=n(1),s="undefined",l=a.open("MessagingHub");i=function(e,t){return e.postMessage?new o(t):new r},e.exports={newHub:i},r.prototype.listenForMessages=function(){},r.prototype.registerHandler=function(){},o=function(){function e(e){this.allowedDomains=e,this.handlers={}}var t,n,r,i,o;return n=function(e,t){var n,r;for(n=0,r=t.length;r>n;++n)if(t[n].test(e))return!0;return!1},i=function(e){return typeof e.msg!==s&&typeof e.blockId!==s},o=function(e){return parseInt(e,10)-1},t=function(e){var t,r,a=this,s=e.data;if(n(e.origin,a.allowedDomains)&&i(s)&&(l.msg("Message from Block:",s.blockId,"Data:",s.msg),a.handlers.hasOwnProperty(s.msg)))for(t=0,r=a.handlers[s.msg].length;r>t;++t)a.handlers[s.msg][t](o(s.blockId),s)},r=function(e){return function(n){t.apply(e,[n])}},e.prototype.listenForMessages=function(e){var t=r(this);e.attachEvent?e.attachEvent("onmessage",t):e.addEventListener&&e.addEventListener("message",t,!1)},e.prototype.registerHandler=function(e,t){this.handlers.hasOwnProperty(e)||(this.handlers[e]=[]),this.handlers[e].push(t)},e}()},function(e){"use strict";e.exports={State:{WAIT:1,INIT:2,LOAD:3,DONE:4,COLLAPSE:5}}},function(e,t,n){"use strict";var r,i=n(1),o=n(27),a=n(7),s=n(5),l=n(6),c=n(10),d=window._HAP.DOMLoad;e.exports=function(e,t){var n=i.open("VideoPushdown"),u=!0,f=17,p=!1,h=function(e){this.tick=e,this.interval=f};h.prototype.start=function(){var e=(new Date).getTime(),t=this;this.intervalId||(this.intervalId=setInterval(function(){var n=(new Date).getTime();t.tick(n-e),e=n},this.interval))},h.prototype.stop=function(){clearInterval(this.intervalId),this.intervalId=null};var g=function(e,t){e["data-orig-height"]=t.engineParams.render_block_format.split("x")[1],e["data-orig-margin"]=e.style.marginBottom?parseInt(e.style.marginBottom,10):0,e.style.height="0px",e.style.display="",e.style.visibility="hidden"},m=function(e){e.style.visibility="visible",e.style.marginBottom=e["data-orig-margin"],u&&(e.style.maxWidth=parseInt(e.style.width,10)+"px",e.style.width="")},v=function(e){var t=parseInt(e["data-orig-height"],10),n=parseInt(""!==e.style.maxWidth?e.style.maxWidth:e.style.width,10),r=parseInt(e.clientWidth>0?e.clientWidth:e.offsetWidth,10),i=t/n;return u&&r>0?i*r:t},y=function(e,t,i){var a;e||n.msg("Invalid frame",e),t.state!==o.State.DONE&&n.msg("Invalid block state",t.state),a=function(e,t,n,r,i){var o=t/1e3*n,a=parseInt(e.style.height,10),s=a+o,l=!1;return s>=r&&(s=r,l=!0),e.style.height=s+"px",i?e.style.marginBottom=e["data-orig-margin"]+e["data-orig-height"]-s+"px":e.style.marginBottom=e["data-orig-margin"]+"px",l};var s=function(s){var l;return t.state!==o.State.DONE?(n.msg("Invalid block state, interrupting pushdown",t.state),void r.stop()):(l=a(e,i,s,v(e),p),l&&r.stop(),void t.messageSender.send("VIEWPORT_RESIZE",{orgHeight:e["data-orig-height"],type:"video"}))};m(e),r=new h(s),n.msg("Started animation for frame:",e),r.start()},b=function(e,t,n,i){var o=parseInt(t.style.maxWidth,10)||parseInt(t.style.width,10);u=!1,r&&r.stop(),t.style.width=o+"px",t.style.maxWidth="",e.style.display="inline-block",y(t,n,i)},w=function(e){e.style.height=v(e)+"px"},_=function(e){var t=c.getOffset(e),n=e.offsetWidth,r=e.offsetHeight;return new l(t.x,t.y,t.x+n,t.y+r)},P=function(t,n,r){var i,o=r.doc.createElement("div");i=function(e){return e.returnValue=!1,e.cancelBubble=!0,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e},o.style.position="absolute",o.style.width="16px",o.style.height="16px",o.style.top="0",o.style.right="0",o.style.background='transparent url("http://cdn.toboads.com/static/video/flowplayer/httpool/img/close.png") top right no-repeat',o.style.cursor="pointer",d.addEventHandler(o,"click",function(t){var o=t||window.event;return r.messageSender.send("VIDEO_PUSHDOWN_CLOSE",{}),e._HAP._collc(n,!0),i(o),!1}),t.appendChild(o)},x=function(n,r,i,o){var l=300;i.scrollTriggered=!1;var c=function(e){var t,c,d;return i.scrollTriggered?(e=e||window.event,void("resize"===e.type&&(w(i),o.messageSender.send("VIEWPORT_RESIZE",{orgHeight:n["data-orig-height"],type:"video"})))):(c=_(r).offsetBy(new a(30,0)),t=s.getClipRect(window),d=!t.intersect(c).isNull,void(d&&(i.scrollTriggered=!0,setTimeout(function(){o.messageSender.send("VIDEO_PUSHDOWN",{}),setTimeout(function(){y(i,o,l)},300)},150))))};r.style.display="block",P(n,o.containerId,o),t.registerHandler(function(e,t){(/\.toboads\.com/.test(e)||/\.tas\.vrt/.test(e))&&t.hasOwnProperty("msg")&&"VIEWPORT_LOCK"===t.msg&&b(r,i,o,l)}),d.addEventHandler(e,"scroll",c),d.addEventHandler(e,"resize",c),d.addEventHandler(e,"touchmove",c),d.addEventHandler(e,"gesturechange",c)};return{hideContainer:g,registerScroll:x}}},function(e,t,n){"use strict";var r=n(7),i=n(5),o=n(6),a=n(10),s=window._HAP.DOMLoad;e.exports=function(e){var t=function(e){e.messageSender.send("VIDEO_INCONTENT",{})},l=function(e){var t=a.getOffset(e),n=e.offsetWidth,r=e.offsetHeight;return new o(t.x,t.y,t.x+n,t.y+r)},c=function(e){var t,n,o;n=l(e.container).offsetBy(new r(30,0)),t=i.getClipRect(window),o=!t.intersect(n).isNull,o&&e.messageSender.send("VIDEO_INCONTENT_AUTOPLAY",{})},d=function(t){c(t),s||(s=n(2)(e)),s.addEventHandler(e,"scroll",c.bind(null,t)),s.addEventHandler(e,"resize",c.bind(null,t)),s.addEventHandler(e,"touchmove",c.bind(null,t)),s.addEventHandler(e,"gesturechange",c.bind(null,t))};return{openContainer:t,registerAutoplayScroll:d}}}]);