-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLiveRail.AdManager-1.0.js
156 lines (154 loc) · 74.8 KB
/
LiveRail.AdManager-1.0.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*
LiveRail.Admanager version 1.0
Build Date: Thu, Jul 17, 2014 12:28:13 -0700
*/
'use strict';(function(){(function(){function m(a){var d,b,l,c,e,r;l=a.length;b=0;for(d="";b<l;){c=a.charCodeAt(b++)&255;if(b===l){d+=f.charAt(c>>2);d+=f.charAt((c&3)<<4);d+="\x3d\x3d";break}e=a.charCodeAt(b++);if(b===l){d+=f.charAt(c>>2);d+=f.charAt((c&3)<<4|(e&240)>>4);d+=f.charAt((e&15)<<2);d+="\x3d";break}r=a.charCodeAt(b++);d+=f.charAt(c>>2);d+=f.charAt((c&3)<<4|(e&240)>>4);d+=f.charAt((e&15)<<2|(r&192)>>6);d+=f.charAt(r&63)}return d}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
window.btoa||(window.btoa=m)})()})();
(function(){function m(){void 0===l&&(l=0);return l+=1}var f,a,d,b,l,c,e;void 0===window.LiveRail&&(window.LiveRail={});void 0===window.LiveRail.Framework&&(window.LiveRail.Framework={widget:{}},window.LiveRail.Framework.build={version:"1.1",timestamp:"201403031240",date:"Mon, Mar 3, 2014 12:40:42 -0800"},d=[],f={},function(){var a={Array:{},Date:{},Object:{}};a.Array.isArray=window.Array&&void 0!==window.Array.isArray?window.Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};
a.Date.now=window.Date&&void 0!==window.Date.now?window.Date.now:function(){return(new Date).getTime()};a.Object.defineProperties=window.Object&&void 0!==window.Object.defineProperties?window.Object.defineProperties:function(a,e){var d;if(a&&"object"===typeof a&&e&&"object"===typeof e)for(d in e)e.hasOwnProperty(d)&&e[d].hasOwnProperty("value")&&(a[d]=e[d].value)};a.Object.create=window.Object&&void 0!==window.Object.create?window.Object.create:function(e,d){var b;b=function(){};e&&(b.prototype=e);
b=new b;d&&"object"===typeof d&&a.Object.defineProperties(b,d);return b};a.Object.keys=window.Object&&void 0!==window.Object.keys?window.Object.keys:function(){var a=!{toString:null}.propertyIsEnumerable("toString"),e="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),d=e.length;return function(b){var r,c;if("object"!==typeof b&&"function"!==typeof b||null===b)throw new TypeError("Object.keys called on non-object");c=[];for(r in b)b.hasOwnProperty(r)&&
c.push(r);if(a)for(r=0;r<d;r+=1)b.hasOwnProperty(e[r])&&c.push(e[r]);return c}}();window.Object&&void 0!==window.Object.freeze?(a.Object.seal=window.Object.seal,a.Object.freeze=window.Object.freeze):(a.Object.seal=function(){},a.Object.freeze=function(){});a.Object.freeze(a.Array);a.Object.freeze(a.Date);a.Object.freeze(a.Object);a.Object.freeze(a);a.Object.defineProperties(f,{es5:{value:a,enumerable:!0}})}(),a=function(){function a(d){var u,r,l,f;r=d.context.id&&d.context.id.fullname?d.context.id.fullname:
"";if(!(e<d.priority)&&(u="",!n&&(d.context&&d.context.id)&&(u=d.context.id.fullname,2<e&&u&&(u+=" "+d.context.id.instance)),d.args[0]="LIVERAIL ["+b.date("H:i:s.",d.timestamp)+b.date("u",d.timestamp).substr(0,3)+"]","object"===typeof window.LiveRail&&(!window.LiveRail.debugFilterMessage&&c)&&(window.LiveRail.debugFilterMessage=!0,"function"===typeof window.console.warn&&window.console.warn(d.args[0],'Debug ID Filter set to "'+c+'"')),r.match(RegExp(c))&&(u&&(d.args[0]+="["+u+"]"),"purge"!==d.method))){if("object"===
typeof window.LiveRail.debugElement&&null!==window.LiveRail.debugElement&&window.LiveRail.debugElement.tagName){u=document.createElement("div");l="";if(window.LiveRail.debugElement.offsetHeight===window.LiveRail.debugElement.scrollHeight||window.LiveRail.debugElement.scrollTop+window.LiveRail.debugElement.offsetHeight>=window.LiveRail.debugElement.scrollHeight-2)f=!0;w.context.each(d.args,function(a){0<l.length&&(l+=" ");l+=a});u.innerHTML=l;window.LiveRail.debugElement.appendChild(u);f&&(window.LiveRail.debugElement.scrollTop=
window.LiveRail.debugElement.scrollHeight)}"function"===typeof window.console[d.method]&&window.console[d.method].apply(window.console,d.args)}}if("object"===typeof window.console&&0!==e){var b,n,u,l,f,v,m,w;b=this.context;n=this===window;m=new Date;u=this.priority;b.is_int(u)||(u=3);l=this.method;"string"!==typeof l&&(l="log");f=[""];for(v=0;v<arguments.length;v+=1)f.push(arguments[v]);void 0===e&&(document.location.href.match(/^https?:\/\/[A-Za-z0-9.\-_]+\.liverail\.com/)?((e=parseInt(b.readCookie().debug,
10))||(e=0),(c=b.readCookie().debugIdFilter)&&(c=decodeURIComponent(b.readCookie().debugIdFilter))):"object"===typeof window.LiveRail&&void 0!==window.LiveRail.debugOutput&&(e=parseInt(window.LiveRail.debugOutput,10),c=window.LiveRail.debugIdFilter||""));w={context:b,priority:u,timestamp:m,method:l,args:f};if(void 0===e)d.push(w);else{if(0<d.length){for(v=0;v<d.length;v+=1)a(d[v]);d=[]}Function.prototype.bind&&(window.console&&"object"===typeof window.console.log)&&"log info warn error assert dir clear profile profileEnd".split(" ").forEach(function(a){window.console[a]=
this.bind(window.console[a],window.console)},Function.prototype.call);a(w)}}},f.es5.Object.defineProperties(f,{getDebugLevel:{value:function(){return e||0},enumerable:!0},getDebugIdFilter:{value:function(){return c||""},enumerable:!0},info:{value:function(){a.apply({context:this,priority:1,method:"info"},arguments)},enumerable:!0},warn:{value:function(){a.apply({context:this,priority:1,method:"warn"},arguments)},enumerable:!0},error:{value:function(){a.apply({context:this,priority:1,method:"error"},
arguments)},enumerable:!0},debug:{value:function(){a.apply({context:this,priority:2,method:"log"},arguments)},enumerable:!0},log:{value:function(){a.apply({context:this,priority:1},arguments)},enumerable:!0},verbose:{value:function(){a.apply({context:this,priority:3},arguments)},enumerable:!0}}),f.es5.Object.defineProperties(f,{date:{value:function(a,d){var e,b,c=/\\?([a-z])/gi,l,f=function(a,b){a=a.toString();return a.length<b?f("0"+a,b,"0"):a},m="Sun Mon Tues Wednes Thurs Fri Satur January February March April May June July August September October November December".split(" ");
l=function(a,e){return b[a]?b[a]():e};b={d:function(){return f(b.j(),2)},D:function(){return b.l().slice(0,3)},j:function(){return e.getDate()},l:function(){return m[b.w()]+"day"},N:function(){return b.w()||7},S:function(){var a=b.j();return 4>a|20<a&&(["st","nd","rd"][a%10-1]||"th")},w:function(){return e.getDay()},z:function(){var a=new Date(b.Y(),b.n()-1,b.j()),e=new Date(b.Y(),0,1);return Math.round((a-e)/864E5)+1},W:function(){var a=new Date(b.Y(),b.n()-1,b.j()-b.N()+3),e=new Date(a.getFullYear(),
0,4);return f(1+Math.round((a-e)/864E5/7),2)},F:function(){return m[6+b.n()]},m:function(){return f(b.n(),2)},M:function(){return b.F().slice(0,3)},n:function(){return e.getMonth()+1},t:function(){return(new Date(b.Y(),b.n(),0)).getDate()},L:function(){var a=b.Y();return 0===a%4&0!==a%100|0===a%400},o:function(){var a=b.n(),e=b.W();return b.Y()+(12===a&&9>e?1:1===a&&9<e?-1:0)},Y:function(){return e.getFullYear()},y:function(){return b.Y().toString().slice(-2)},a:function(){return 11<e.getHours()?
"pm":"am"},A:function(){return b.a().toUpperCase()},B:function(){var a=3600*e.getUTCHours(),b=60*e.getUTCMinutes(),d=e.getUTCSeconds();return f(Math.floor((a+b+d+3600)/86.4)%1E3,3)},g:function(){return b.G()%12||12},G:function(){return e.getHours()},h:function(){return f(b.g(),2)},H:function(){return f(b.G(),2)},i:function(){return f(e.getMinutes(),2)},s:function(){return f(e.getSeconds(),2)},u:function(){return f(1E3*e.getMilliseconds(),6)},e:function(){throw"Not supported (see source code of date() for timezone on how to add support)";
},I:function(){var a=new Date(b.Y(),0),e=Date.UTC(b.Y(),0),d=new Date(b.Y(),6),k=Date.UTC(b.Y(),6);return a-e!==d-k?1:0},O:function(){var a=e.getTimezoneOffset(),b=Math.abs(a);return(0<a?"-":"+")+f(100*Math.floor(b/60)+b%60,4)},P:function(){var a=b.O();return a.substr(0,3)+":"+a.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-e.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(c,l)},r:function(){return"D, d M Y H:i:s O".replace(c,l)},U:function(){return e/1E3|0}};return function(a,
b){e=void 0===b?new Date:b instanceof Date?new Date(b):new Date(1E3*b);return a.replace(c,l)}(a,d)},enumerable:!0},detect:{value:function(a){var b={};if("object"===typeof a&&"string"===typeof a.feature){b.feature=a.feature.replace(/^\s\s*/,"").replace(/\s\s*$/,"").toLowerCase();switch(b.feature){case "flash":b.present=!1;var e;if(window.navigator&&window.navigator.plugins&&0<window.navigator.plugins.length)(a=window.navigator.mimeTypes)&&(a["application/x-shockwave-flash"]&&a["application/x-shockwave-flash"].enabledPlugin&&
a["application/x-shockwave-flash"].enabledPlugin.description)&&(b.present=!0);else if(void 0!==window.ActiveXObject){try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(d){e={activeXError:!0}}e.activeXError||(b.present=!0)}break;case "html5":b.present=!!document.createElement("video").canPlayType;break;case "svg":b.present=document.implementation&&document.implementation.hasFeature?document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"):!1}return b}},
enumerable:!0},each:{value:function(a,b){var e,d,c;if(a&&"function"===typeof b)if(void 0!==a.length)for(d=a.length,e=0;e<d&&!1!==b(a[e],e);e+=1);else for(c=f.es5.Object.keys(a),d=c.length,e=0;e<d&&!1!==b(a[c[e]],c[e]);e+=1);},enumerable:!0},eachKey:{value:function(a,b){this.each(a,function(a,e){if("function"===typeof b)return b(e,a)})},enumerable:!0},gmdate:{value:function(a,b){b=Date.parse((void 0===b?new Date:"object"===typeof b?new Date(b):new Date(1E3*b)).toUTCString().slice(0,-4))/1E3;return this.date(a,
b)},enumerable:!0},is_int:{value:function(a){return a===+a&&isFinite(a)&&0===a%1},enumerable:!0},readCookie:{value:function(){var a,b,e={},d;d=document.cookie.split("; ");for(b=0;b<d.length;b+=1)a=d[b].split("\x3d"),e[a[0]]=void 0!==a[1]?decodeURIComponent(a[1]):"";return e},enumerable:!0}}),b=function(a,b){function e(a){return function(){function b(a){a.id&&(a.id.name&&"Framework."!==a.id.name.substr(0,10))&&(0<e.length&&(e="."+e),e=a.id.name+e);a.id.parent&&b(a.id.parent)}var e="";b(a);return e}}
var d;if(!a)return null;d=f.es5.Object.create(f,{id:{value:{},enumerable:!0},descendent:{value:function(a,b){var d;d=f.es5.Object.create(this,b);f.es5.Object.defineProperties(d,{id:{value:{}}});f.es5.Object.defineProperties(d.id,{name:{value:a},instance:{value:m()},parent:{value:this},fullname:{get:e(d)}});d.verbose("New descendent of "+d.id.parent.id.fullname,d);return d},enumerable:!0}});b&&"object"===typeof b&&f.es5.Object.defineProperties(d,b);f.es5.Object.defineProperties(d.id,{name:{value:a,
enumerable:!0},instance:{value:m(),enumerable:!0},fullname:{get:e(d),enumerable:!0}});d.verbose("New descendent of window.LiveRail.Framework",d);return d},a.apply({context:f,priority:2,method:"log"},["LiveRail.Framework version "+window.LiveRail.Framework.build.version+", build "+window.LiveRail.Framework.build.timestamp+" ("+window.LiveRail.Framework.build.date+")"]),window.LiveRail.Framework.messageQueue={},f.es5.Object.defineProperties(window.LiveRail.Framework.messageQueue,{purge:{value:function(){a.apply({context:f,
priority:1,method:"purge"})},enumerable:!0}}),window.LiveRail.Framework.descendent=b,window.LiveRail.onFrameworkLoad&&(f.each(window.LiveRail.onFrameworkLoad,function(a){"function"===typeof a&&a()}),delete window.LiveRail.onFrameworkLoad))})();
(function(){function m(l){var c,e;l||(l=window.event);if(l.origin.match(/^https?:\/\/cdn-static(-secure)?\.liverail\.com/)&&l.data&&"string"===typeof l.data&&"lrHandshakeResponse\x3d"===l.data.substr(0,20)){c=l.data.substr(20);e="";for(l=0;l<c.length;l+=1)e+=String.fromCharCode(c.charCodeAt(l)-d.charCodeAt(l));c=e.split("\x26");for(l=0;l<c.length;l+=1)if(e=c[l].split("\x3d"),e[1])switch(e[1]){case "true":b[e[0]]=!0;break;case "false":b[e[0]]=!1;break;default:b[e[0]]=decodeURIComponent(e[1])}a&&a.parentNode===
document.body&&document.body.removeChild(a);void 0!==b.debug&&(window.LiveRail.debugOutput=parseInt(b.debug,10),window.LiveRail.debugIdFilter=b.debugIdFilter,window.LiveRail.Framework.messageQueue&&window.LiveRail.Framework.messageQueue.purge())}}function f(){var b,c;if("function"===typeof window.postMessage){if("https:"===window.location.protocol||"http:"!==window.location.protocol&&window.parent&&"https:"===window.parent.location.protocol)c=!0;b=c?"https://cdn-static-secure.liverail.com/js/handshake.html":
"http://cdn-static.liverail.com/js/handshake.html";d="";for(c=0;50>c;c+=1)d+=Math.random().toString(36).substr(2,5);a=document.createElement("iframe");a.style.display="none";a.src=b;document.body.appendChild(a);a.onload=function(){a.contentWindow&&a.contentWindow.postMessage?a.contentWindow.postMessage(d,b):a&&a.parentNode===document.body&&document.body.removeChild(a)};window.addEventListener?window.addEventListener("message",m,!1):window.attachEvent&&window.attachEvent("onmessage",m)}}var a,d,b=
{};void 0!==window.LiveRail.debugOutput||document.location.href.match(/^https?:\/\/[A-Za-z0-9.\-_]+\.liverail\.com/)||("complete"!==document.readyState||null===document.body?window.addEventListener?window.addEventListener("load",f,!1):window.attachEvent&&window.attachEvent("onload",f):f())})();
(function(){function m(){var f;f=window.LiveRail.Framework.descendent("Framework.Extended",{addElement:{value:function(a){var d,b,l,c,e,r;"object"===typeof a&&(b=a.target,l=a.before);void 0===b&&(b=document.body);"string"===typeof b&&(b=document.getElementById(a.target));"string"===typeof l&&(l=document.getElementById(a.before));if("object"===typeof b){d="div";"string"===typeof a.type&&(d=a.type);d=document.createElement(d);"string"===typeof a.html&&(d.innerHTML=a.html);if("object"===typeof a.attributes)for(c in a.attributes)a.attributes.hasOwnProperty(c)&&
d.setAttribute(c,a.attributes[c]);if("object"===typeof a.events)for(e in a.events)a.events.hasOwnProperty(e)&&d.addEventListener(e,a.events[e]);"function"===typeof a.onload&&(d.onload=a.onload);"string"===typeof a.className&&(d.className=a.className);if("object"===typeof a.styles)for(r in a.styles)a.styles.hasOwnProperty(r)&&(d.style[r]=a.styles[r]);"object"===typeof l?b.insertBefore(d,l):b.appendChild(d);return d}return null},enumerable:!0},ajax:{value:function(a){var d,b,l,c,e,r,k,n,u,f,m;if("object"!==
typeof a||!a.url)return null;u=a.url;n="GET";"POST"===a.type&&(n="POST",m=a.data,"object"===typeof a.data&&(m=this.urlSerialize(a.data)));l=function(b){if("function"===typeof a.onloadstart)a.onloadstart(b)};c=function(b){if("function"===typeof a.onprogress)a.onprogress(b)};e=function(b){if(void 0===d.responseText||null===d.responseText)r();else{f=b.responseText;if("json"===a.dataType)try{f=JSON.parse(b.responseText)}catch(e){r("parsererror");return}if("xml"===a.dataType)try{f=b.responseXML||null;
if((!f||!b.responseXML.documentElement)&&"string"===typeof b.responseText&&0<b.responseText.length)if(window.DOMParser)try{f=(new window.DOMParser).parseFromString(b.responseText,"text/xml")}catch(c){throw null;}else throw null;if(f&&"parsererror"===f.documentElement.tagName)throw null;if(f&&0<f.getElementsByTagName("parsererror").length)throw null;}catch(l){r("parsererror");return}"function"===typeof a.success&&a.success(f,"success",d)}};r=function(b){var e="error";"string"===typeof b&&(e=b);"function"===
typeof a.error&&a.error(d,e,{})};try{b=document.createElement("a"),b.href=u,k=b.hostname}catch(v){}if(!window.XMLHttpRequest||""!==k&&window.location.hostname!==k&&void 0===(new window.XMLHttpRequest).withCredentials)if(window.XDomainRequest)d=new window.XDomainRequest,d.open(n,u),d.onload=function(){e(d)},d.onerror=function(){r()},d.ontimeout=function(){r("timeout")};else return r("corserror"),null;else d=new window.XMLHttpRequest,d.overrideMimeType&&("json"===a.dataType&&d.overrideMimeType("application/json"),
"xml"===a.dataType&&d.overrideMimeType("text/xml")),d.open(n,u,!0),d.withCredentials=!0,"POST"===n&&d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d.onreadystatechange=function(){4===d.readyState&&(200!==d.status?r():e(d))},d.onloadstart=l,"object"===typeof a.xhrFields&&this.each(a.xhrFields,function(a,b){d[b]=a});try{this.verbose(d+" "+n+" request to:",u),d.onprogress=c,d.send(m)}catch(D){this.error(D.message)}return d},enumerable:!0},htmlspecialchars:{value:function(a){return a.toString().replace(/&/g,
"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;")},enumerable:!0},number_format:{value:function(a,d,b,l){a=a.toString().replace(/[^0-9+\-Ee.]/g,"");a=isFinite(+a)?+a:0;d=isFinite(+d)?Math.abs(d):0;l=void 0===l?",":l;b=void 0===b?".":b;var c="",c=function(a,b){var d=Math.pow(10,b);return(Math.round(a*d)/d).toString()},c=(d?c(a,d):Math.round(a).split(".")).toString();3<c[0].length&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,l));(c[1]||"").length<d&&(c[1]=c[1]||
"",c[1]+=""+(d-c[1].length+1));return c.join(b)},enumerable:!0},queryAPI:{value:function(a){var d,b,l,c,e;if("object"!==typeof a||"string"!==typeof a.call||"object"!==typeof a.query)return!1;c=!0;void 0!==a.async&&(c=a.async);l="http://api4.liverail.com";b=[{name:"LR-token-p",ext:""},{name:"LR-token-i",ext:".int"},{name:"LR-token-m",ext:".maint"},{name:"LR-token-d",ext:".dev"}];if(!a.query.token)if("object"===typeof a.credentials&&"string"===typeof a.credentials.environment&&"string"===typeof a.credentials.token)l=
"http://api4"+(a.credentials.environment?"."+a.credentials.environment:""),l+=".liverail.com",a.query.token=a.credentials.token;else for(d=0;d<b.length;d+=1)if(this.readCookie()[b[d].name]){l="http://api4"+b[d].ext+".liverail.com";a.query.token=this.readCookie()[b[d].name];break}void 0===a.query.lr_output&&(a.query.lr_output="json");return e=this.ajax({url:l+a.call,type:"POST",dataType:"json",async:c,data:a.query,success:function(b){var d=null,c,l;if("success"===b.response.status&&"function"===typeof a.success)if("string"===
typeof a.node)if(c=a.node.split("."),"object"===typeof b.response&&0===b.response.total)d=[];else{if("object"===typeof b[c[0]])for(d=b[c[0]],l=1;l<c.length;l+=1)if("object"===typeof d[c[l]])d=d[c[l]];else{d=null;break}}else d=b;null!==d?"function"===typeof a.success&&a.success(d):"function"===typeof a.error&&(b.response&&b.response.error?a.error(e,b.response.error[0]):a.error({}))},error:function(b,e){"function"===typeof a.error&&a.error(b,e)}})},enumerable:!0},round:{value:function(a,d,b){var l,
c,e;d=Math.pow(10,d|0);a*=d;e=0<a|-(0>a);c=a%1===0.5*e;l=Math.floor(a);if(c)switch(b){case "PHP_ROUND_HALF_DOWN":a=l+(0>e);break;case "PHP_ROUND_HALF_EVEN":a=l+l%2*e;break;case "PHP_ROUND_HALF_ODD":a=l%2?l+1:l;break;default:a=l+(0<e)}return(c?a:Math.round(a))/d},enumerable:!0},ucfirst:{value:function(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)},enumerable:!0},urlSerialize:{value:function(a){var d=[],b=this;b.each(a,function(a,c){Array.isArray(a)?b.each(a,function(a){d.push(encodeURIComponent(c)+
"[]\x3d"+encodeURIComponent(a))}):d.push(encodeURIComponent(c)+"\x3d"+encodeURIComponent(a))});return d.join("\x26")},enumerable:!0},urlUnserialize:{value:function(a){if("string"!==typeof a)return{};var d={},b,l;0<a.indexOf("?")&&(a=a.slice(a.indexOf("?")+1));b=a.split("\x26");for(l=0;l<b.length;l+=1)a=b[l].split("\x3d"),void 0===a[1]?d[decodeURIComponent(a[0])]=!0:d[decodeURIComponent(a[0])]=decodeURIComponent(a[1]);return d},enumerable:!0}});window.LiveRail.Framework.Extended={};f.es5.Object.defineProperties(window.LiveRail.Framework.Extended,
{build:{value:{version:"1.1",timestamp:"201403031240",date:"Mon, Mar 3, 2014 12:40:42 -0800"}},descendent:{value:function(a,d){return f.descendent(a,d)}}});f.log("LiveRail.Extended.Framework version "+window.LiveRail.Framework.Extended.build.version+", build "+window.LiveRail.Framework.Extended.build.timestamp+" ("+window.LiveRail.Framework.Extended.build.date+")")}"object"!==typeof window.LiveRail&&(window.LiveRail={});"object"!==typeof window.LiveRail.Framework||void 0!==window.LiveRail.Framework.Extended?
(window.LiveRail.onFrameworkLoad||(window.LiveRail.onFrameworkLoad=[]),window.LiveRail.onFrameworkLoad.push(function(){m()})):m()})();
(function(){window.LiveRail.AdManager||(window.LiveRail.AdManager={});window.getVPAIDAd||(window.getVPAIDAd=function(){return window.LiveRail.AdManager.AdLoader()});window.LiveRail.AdManager.framework=window.LiveRail.Framework.Extended.descendent("AdManager",{build:{value:{version:"1.0",timestamp:"201407171228",date:"Thu, Jul 17, 2014 12:28:13 -0700"}},detectDevice:{value:function(m){var f=navigator.userAgent.toLowerCase(),a;a=0;try{switch(m){case "android":-1<f.indexOf("android")&&(a=parseFloat(f.match(/android ([\.0-9]+)/)[1]));
break;case "msie":-1<f.indexOf("msie")&&(a=parseFloat(f.match(/msie ([\.0-9]+)/)[1]));break;case "ios":f.match(/(iphone|ipod|ipad)/)&&(a=parseFloat(f.match(/os ([0-9]+(_[0-9]+)?)/)[1].replace("_",".")))}}catch(d){}return a}},errorDefinition:{value:{400:"General Linear error.",401:"File not found.",402:"Timeout of MediaFile URI",405:"Problem displaying MediaFile",1E3:"LiveRail init failed, parameter LR_PUBLISHER_ID is not defined.",1001:"No available environment:",1002:"initAd must be called before startAd",
1003:"environmentVars.slot is not a valid DOM element",1004:"No valid video element",1005:"Unsupported device:",1006:"environmentVars is not defined",1101:"LiveRail request for ad-sources failed:",1102:"LiveRail request for ad-sources timed out.",1111:"LiveRail request for ads failed:",1112:"LiveRail request for ads timed out.",1201:"Failed to parse LiveRail XML response:",1202:"Unknown LiveRail XML response type:",1203:"Unknown LiveRail Error message.",1301:"LiveRail returned no ad sources.",1302:"No ad-slots available.",
1501:"Stream Error:",1502:"Stream Timeout",9800:"JavaScript-Flash VPAID load timed out",9910:"Clickthrough failed",9920:"measureViewable:",9921:"measureWindow:",9922:"Domain"},enumerable:!0},returnBoolean:{value:function(m){return"boolean"===typeof m?m:null===m?!1:"true"===m||"1"===m||"yes"===m?!0:!1},enumerable:!0},returnFloat:{value:function(m){m=parseFloat(m);return isNaN(m)?!1:m},enumerable:!0},returnInt:{value:function(m){m=parseInt(m,10);return isNaN(m)?!1:m},enumerable:!0},returnUnsignedInt:{value:function(m){return void 0!==
m&&!isNaN(m)&&null!==m&&0<=m?m:!1},enumerable:!0},xml2object:{value:function(m,f){function a(a){return/^\s*$/.test(a)?null:a}function d(b,l){var c=!0,e=0,f="",k,n,u,m;if(b.attributes&&0<b.attributes.length)for(c={},e=0;e<b.attributes.length;e+=1)k=b.attributes.item(e),c["@"+k.name]=a(k.value.trim());if(b.childNodes&&0<b.childNodes.length)for(m=0;m<b.childNodes.length;m+=1)k=b.childNodes.item(m),4===k.nodeType?(0===f.length&&(f=" "),f+=k.nodeValue,1<f.length&&(f=f.substring(1))):3===k.nodeType?f+=
k.nodeValue.trim():1!==k.nodeType||k.prefix||(0===e&&(c={}),n=k.nodeName.toLowerCase(),u=d(k,l),c.hasOwnProperty(n)?(c[n].constructor!==Array&&(c[n]=[c[n]]),c[n].push(u)):(l[k.nodeName.toLowerCase()]?c[n]=[u]:c[n]=u,e+=1));f&&(0<e?c.cdata=a(f):c=a(f));0<e&&"function"===typeof Object.freeze&&Object.freeze(c);return c}"object"!==typeof f&&(f={});if("object"===typeof m)return d(m,f);this.error("Failed to parse XML response from XML:",m);return null},enumerable:!0}})})();
(function(){window.LiveRail.AdManager.AdLoader=function(){var m,f,a,d,b={},l,c,e,r,k,n,u,Q={},W,v,D,w,L,G,y,z,t,p,q,F,J,s,ca,ba,R,oa,O,h,aa,g,H,P,E,T,B,A,X,da,S,ea,Y,ka,K,M,Z,pa,fa,ga,la,x,ha,ma,ia,na,qa,U;e=window.LiveRail.AdManager.framework.descendent("AdLoader");n={};u={};J={handshakeVersion:!0,initAd:!0,resizeAd:!0,startAd:!0,stopAd:!0,pauseAd:!0,resumeAd:!0,expandAd:!0,collapseAd:!0,skipAd:!0};ca={AdLinear:{get:!0,set:!1,reset:!1},AdWidth:{get:!0,set:!1,reset:0},AdHeight:{get:!0,set:!1,reset:0},
AdExpanded:{get:!0,set:!1,reset:!1},AdSkippableState:{get:!0,set:!1,reset:!1},AdSkippableRemainingTime:{get:!0,set:!1,reset:-2},AdRemainingTime:{get:!0,set:!1,reset:-2},AdDuration:{get:!0,set:!1,reset:-2},AdVolume:{get:!0,set:!0},AdCompanions:{get:!0,set:!1,reset:""},AdIcons:{get:!0,set:!1,reset:!1}};F={AdLoaded:[],AdStarted:[],AdStopped:[],AdSkipped:[],AdSkippableStateChange:[],AdSizeChange:[],AdLinearChange:[],AdDurationChange:[],AdExpandedChange:[],AdRemainingTimeChange:[],AdVolumeChange:[],AdImpression:[],
AdVideoStart:[],AdVideoFirstQuartile:[],AdVideoMidpoint:[],AdVideoThirdQuartile:[],AdVideoComplete:[],AdClickThru:["url","id","playerHandles"],AdInteraction:["id"],AdUserAcceptInvitation:[],AdUserMinimize:[],AdUserClose:[],AdPaused:[],AdPlaying:[],AdLog:["message"],AdError:["message"]};l={AdLog:!1};d={};m=0;ba=function(a){"string"!==typeof a&&(a="");H("AdError",[a])};O=function(a){var b={};b[a]={value:function(){return R(a,arguments)},enumerable:!0};e.es5.Object.defineProperties(u,b)};h=function(a){var b;
ca[a]&&(ca[a].get&&(b={},b["get"+a]={value:function(){var b=R("get"+a,arguments);void 0===b&&(b=ca[a].reset);return b},enumerable:!0},e.es5.Object.defineProperties(u,b)),ca[a].set&&(b={},b["set"+a]={value:function(){return R("set"+a,arguments)},enumerable:!0},e.es5.Object.defineProperties(u,b)))};R=function(a,b){var d,c,C,g;c={handshakeVersion:E,initAd:B,resizeAd:x,getAdVolume:P,setAdVolume:ha};"initAd"===a&&aa();if("startAd"===a&&2!==m)1>m&&ba(e.errorDefinition["1002"]),1===m&&(G=!0),e.warn("adStatus is "+
m+", ignoring startAd()");else{c[a]?d=c:s&&(d=s);C="verbose";J[a]&&(C="log");if(c[a])e[C](a+"(",b,")");else e[C](a+"()");d&&"function"===typeof d[a]&&(U(a),g=c[a]?d[a].apply(e,b):d[a](),void 0!==g&&e.verbose(a+" returned:",g));return g}};oa=function(a){s.subscribe(function(){H(a,arguments)},a)};g=function(){return p.document.fullScreen||p.document.webkitIsFullScreen||p.document.mozFullScreen?!0:!1};H=function(d,c){var g,h,C;U(d);if("AdLog"===d&&"string"===typeof c[0]&&"[LRERROR:"===c[0].substr(0,
9))h=c[0].substr(9,c[0].indexOf("]")-9),C=c[0].substr(c[0].indexOf("]")+1)||void 0,K({code:h,message:C});else{"AdStarted"===d&&(a&&"object"===typeof t&&"object"===typeof t.style)&&(t.style.backgroundColor="#000");g=[];if(e.es5.Array.isArray(c)||"[object Arguments]"===Object.prototype.toString.call(c))g=c;h="Dispatching "+d+" event"+(f?"":" (synchronous)");!1!==l[d]&&(0<c.length?e.log(h,c):e.log(h));b[d]&&e.each(b[d],function(a){var b=function(){"function"===typeof a.fn&&("object"===typeof a.listenerScope?
a.fn.apply(a.listenerScope,g):a.fn.apply(e,g))};f?window.setTimeout(b,0):b()});G&&(G=!1,e.debug("startAd() has already been called, performing lazy startAd()"),R("startAd"))}};aa=function(){e.verbose("destroyInit()");k={};m=0;f=!0;G=!1;fa={allowDomains:"*",currentSecurityDomain:"false"}};P=function(){return s&&"function"===typeof s.getAdVolume?s.getAdVolume():d.adVolume};E=function(a){return a};T=function(b){var d={};e.each(b,function(b,c){null===b||(void 0===b||"null"===b||"undefined"===b||""===
b)||"LR_URL"===c&&"[LR_URL]"===b||("vpaidURL"===c?q=b:"bgColor"===c?a=b:"asyncEvents"===c?f=e.returnBoolean(b):"string"===typeof fa[c]?fa[c]=b:(d[c]=b,c.match(/^LR_/)&&(k[c.toUpperCase()]=b)))});return d};B=function(a,b,d,c,C,g){var h={},f;g&&"object"===typeof g?(g.slot&&(g.slot.offsetWidth&&g.slot.offsetHeight)&&(a=g.slot.offsetWidth,b=g.slot.offsetHeight),w="normal","string"===typeof d&&(w=d),(d=e.returnInt(c))&&(v=d),k={},e.each(Q,function(a,b){k[b]=a}),W=T(C),D=T(g),e.verbose("Aggregated runtime parameters:",
k),e.each(Q,function(a,b){h[b]=a}),e.each(D,function(a,b){h[b]=a}),C="string"!==typeof k.LR_ENVIRONMENT?["html5"]:k.LR_ENVIRONMENT.split(","),e.each(C,function(a){a=e.detect({feature:a});if(a.present)return f=a.feature,!1}),f?(void 0===h.LR_DEBUG&&0<e.getDebugLevel()&&(h.LR_DEBUG=e.getDebugLevel()),"html5"===f?da(a,b,w,v,W,h):"flash"===f&&X(a,b,w,v,W,h)):ba(e.errorDefinition["1001"]+" "+k.LR_ENVIRONMENT)):(K({code:"1006"}),ba(e.errorDefinition["1006"]))};A=function(a,b,d,e,C,c){s?s.initAd(a,b,d,e,
C,c):ka(function(){for(var g in F)F.hasOwnProperty(g)&&oa(g);s.initAd(a,b,d,e,C,c)})};X=function(a,b,c,g,C,h){S(h.slot)?(h.LR_ENVIRONMENT="flash",h.LR_WIDTH=a,h.LR_HEIGHT=b,s&&y===h.slot&&s.initAd?s.initAd(-1,-1,c,g,C.AdParameters||"",ma(h)):(y=h.slot,p=y.ownerDocument.defaultView||y.ownerDocument.parentWindow,Y(function(){void 0!==d.adVolume&&s.setAdVolume(parseFloat(d.adVolume));s.initAd(-1,-1,c,g,C.AdParameters||"",ma(h))}))):(K({code:"1003"}),ba(e.errorDefinition["1003"]))};da=function(b,c,g,
h,C,f){var l,k;k=qa();if(k.unsupported)ba(e.errorDefinition["1005"]+k.trigger);else{try{if(void 0===f.videoSlot)if(S(f.slot))f.slot.innerHTML="",f.videoSlot=e.addElement({target:f.slot,type:"video",styles:{display:"block",width:b+"px",height:c+"px"}}),a&&(f.videoSlot.style.backgroundColor="#"+a);else throw K({code:"1003"}),e.errorDefinition["1003"];if(!ea(f.videoSlot))throw K({code:"1004"}),e.errorDefinition["1004"];}catch(n){ba(n);return}p="object"===typeof f.window?f.window:f.slot&&f.slot.ownerDocument?
f.slot.ownerDocument.defaultView||f.slot.ownerDocument.parentWindow:f.videoSlot.ownerDocument.defaultView||f.videoSlot.ownerDocument.parentWindow;t=f.videoSlot;y=f.slot||f.videoSlot.parentNode;b=t.offsetWidth;c=t.offsetHeight;l=la(C,f);d.config=l;q||l.adRequestConfig.LR_PUBLISHER_ID?"string"===typeof q?A(b,c,g,h,C,f):(e.log("Run-time Parameters:"),e.each(l.adRequestConfig,function(a,b){e.log(b+"\x3d"+a)}),L=window.LiveRail.AdManager.RTBHandler({protocol:p.location.protocol}),L.request({query:l.adRequestConfig,
onsuccess:function(a){e.log("Retrieved ad response:",a);A(b,c,g,h,a,l.adRenderConfig)},onerror:function(a){e.error("Error retrieving ad:",e.errorDefinition[a.code]+(a.message?" "+a.message:""));K(a);A(b,c,g,h,{creativeData:{},environmentVars:{}},l.adRenderConfig)}})):ba(e.errorDefinition["1000"])}};K=function(a){var b,c,g,C="9999",h="",f;"object"===typeof a&&a&&(a.code&&e.errorDefinition[a.code]&&(C=a.code,h=e.errorDefinition[a.code]),a.message&&(h="1203"===C?a.message:h+(" "+a.message)),"9999"===
C&&(h="Undefined error "+a.code+": "+a.message));try{b=document.createElement("img"),b.style.display="none",b.width=1,b.height=1,c="//log.liverail.com/html5/?ts\x3d"+e.es5.Date.now()+"\x26code\x3d"+C,g=d.config&&d.config.adRequestConfig?d.config.adRequestConfig:k,e.each(g,function(a,b){switch(b){case "LR_INTEGRATION":c+="\x26i\x3d"+encodeURIComponent(a);break;case "LR_URL":break;default:c+="\x26"+encodeURIComponent(b)+"\x3d"+encodeURIComponent(a)}}),c+="\x26LR_URL\x3d"+(d.topUrl?encodeURIComponent(d.topUrl):
""),f="build\x3d"+e.build.timestamp+"\x26isTop\x3d"+(g.LR_PAGE_URL?"1":"0"),e.each(["appName","appVersion","cookieEnabled","platform"],function(a){window.navigator.hasOwnProperty(a)&&(f+="\x26"+a+"\x3d"+window.navigator[a])}),c+="\x26pt\x3d"+encodeURIComponent(f),c+="\x26msg\x3d"+encodeURIComponent(h),b.src=c,document.body.appendChild(b),e.error("Logging error:",c)}catch(l){}};M=function(a,b){var d,e,c,g;c={bottom:null,error:null,focus:null,height:null,iframe:null,left:null,pageUrl:"",right:null,
top:null,topUrl:"",visibleWidth:null,visibleHeight:null,viewable:0,viewablePercent:null,viewportWidth:null,viewportHeight:null,width:null};try{void 0===b&&(b=a.ownerDocument.defaultView||a.ownerDocument.parentWindow);d=b.top;c.topUrl=d&&b!==d&&b.document.referrer?b.document.referrer:b.document.location.href;void 0!==b.document.hidden?c.focus=!b.document.hidden:void 0!==b.document.webkitHidden&&(c.focus=!b.document.webkitHidden);try{c.pageUrl=d.location.href}catch(h){}c.pageUrl?c.iframe=b.top===b.self?
0:1:(c.iframe=2,c.pageUrl=b.parent===b.top?c.topUrl:"");2!==c.iframe&&((g=b.document.documentElement.hasOwnProperty?b.document.documentElement.hasOwnProperty("ontouchstart"):!1)?(c.viewportWidth=d.innerWidth,c.viewportHeight=d.innerHeight):(c.viewportWidth=d.document.documentElement.clientWidth||d.innerWidth||d.document.body.clientWidth,c.viewportHeight=d.document.documentElement.clientHeight||d.innerHeight||d.document.body.clientHeight),"function"===typeof d.document.hasFocus&&(c.focus=d.document.hasFocus()),
c.top=0,c.left=0,e=function(a,b){var g=b.getBoundingClientRect();c.top+=g.top;c.left+=g.left;c.right=null===c.right?g.right:c.right+g.left;c.bottom=null===c.bottom?g.bottom:c.bottom+g.top;a.self!==d&&e(a.parent,a.frameElement)},e(b,a),c.width=c.right-c.left,c.height=c.bottom-c.top,c.visibleWidth=c.width,c.visibleHeight=c.height,0>c.left&&(c.visibleWidth+=c.left),0>c.top&&(c.visibleHeight+=c.top),c.right>c.viewportWidth&&(c.visibleWidth-=c.right-c.viewportWidth),c.bottom>c.viewportHeight&&(c.visibleHeight-=
c.bottom-c.viewportHeight),c.visibleWidth=Math.max(0,c.visibleWidth),c.visibleHeight=Math.max(0,c.visibleHeight),c.viewablePercent=Math.round(100*(c.visibleWidth*c.visibleHeight/(c.width*c.height)))||0)}catch(f){c.error="object"===typeof f?f.message:"unknown"}null!==c.error||!1!==c.focus&&2===c.iframe||(c.viewable=!1!==c.focus&&50<=c.viewablePercent?1:2);return c};Z=function(a){var b="",d="",c="",e=a||window,g,h,f=0,l=0,k=0,n="",p="";try{for(;null!==e&&100>k;){k+=1;h=g="";try{g=e.document.referrer,
h=e.location.href||e.document.location.href,b=g,d=h,l=k}catch(u){f+=1}n+=(n?"|*":"")+h;a.top?e===a.top?(h&&(c=h),e=null):(e.parent===a.top&&a.top&&g&&(c=g),e=e.parent):e=null}}catch(m){p=m.message||"unknown error"}return{errorMsg:p,window_top:a.top?"[Window]":"null",crossDomainCount:f,level:l,domains:n,location:d,referrer:b,topUrl:c||b||d,pageUrl:c}};la=function(a,b){var c,h={},f,l={},k;e.each([a,b],function(a){"object"===typeof a&&e.each(a,function(a,b){b.match(/^LR_/i)&&(l[b.toUpperCase()]=a)})});
f=Z(p);e.verbose("Retrieved window measurement:",f);k=M(b.videoSlot,p);e.verbose("Retrieved viewable measurement:",k);d.topUrl=k.topUrl;0.01>Math.random()&&K({code:"9921",message:"isTop\x3d"+(f.pageUrl?"1":"0")+" failed\x3d"+(""===f.pageUrl&&2>f.crossDomainCount&&k.topUrl!==f.location?"1":"0")+" LR_PAGE_URL\x3d"+f.pageUrl+" location\x3d"+f.location+" referrer\x3d"+f.referrer+" cdc\x3d"+f.crossDomainCount+" wLev\x3d"+f.level+" windowTop\x3d"+f.window_top+" jsErr\x3d"+f.errorMsg+" dList\x3d"+f.domains+
" ctoUrl\x3d"+k.topUrl+" viewable\x3d"+k.viewable});0.01>Math.random()&&function(){function a(b){var d,c;c="";b&&(d=b.split("/"),"http"===b.substring(0,4)&&2<d.length?c=d[2]:0<d.length&&(c=d[0]));return c}var b,d,c,e;c="0";e=b=d="";try{l.LR_URL&&(d=a(f.topUrl),b=a(l.LR_URL),""===f.topUrl?c="2":d!==b&&(c="1"))}catch(h){e=h.message}K({code:"9922",message:"override\x3d"+c+" LR_URL\x3d"+l.LR_URL+" error\x3d"+e})}();void 0!==d.adVolume&&(t.volume=d.adVolume,0<d.adVolume&&t.muted&&(t.muted=!1),delete d.adVolume);
h.adRequestConfig={LR_ADMAP:"in::0",LR_URL:d.topUrl,LR_MUTED:t.muted||0>=t.volume?1:0};h.adRenderConfig={};c={LR_TIMEOUT_STREAM:!0,LR_BITRATE:!0,LR_LAYOUT_LINEAR_PAUSEONCLICKTHRU:!0,LR_CLICK_TARGET:!0,LR_COMPANIONS:!0};e.each(l,function(a,b){c[b]?h.adRenderConfig[b]=a:h.adRequestConfig[b]&&""===a||(h.adRequestConfig[b]=a)});h.adRequestConfig.LR_ADMAP&&(h.adRequestConfig.LR_ADMAP=h.adRequestConfig.LR_ADMAP.split(";",1)[0]);delete h.adRequestConfig.LR_WIDTH;delete h.adRequestConfig.LR_HEIGHT;(g()||
e.detectDevice("ios")||e.detectDevice("android"))&&window.outerWidth?window.outerWidth>window.outerHeight?(h.adRequestConfig.LR_WIDTH=window.outerWidth,h.adRequestConfig.LR_HEIGHT=window.outerHeight):(h.adRequestConfig.LR_WIDTH=window.outerHeight,h.adRequestConfig.LR_HEIGHT=window.outerWidth):(t.offsetWidth&&(h.adRequestConfig.LR_WIDTH=t.offsetWidth),t.offsetHeight&&(h.adRequestConfig.LR_HEIGHT=t.offsetHeight));300>=h.adRequestConfig.LR_WIDTH||250>h.adRequestConfig.LR_HEIGHT?(e.log("Detected in-banner placement"),
h.adRequestConfig.LR_ADTYPE=2):"int"===h.adRequestConfig.LR_INTEGRATION?(e.log("Detected interstitial placement"),h.adRequestConfig.LR_ADTYPE=1):(e.log("Detected in-stream placement"),h.adRequestConfig.LR_ADTYPE=3);!1===b.videoSlotCanAutoPlay&&(h.adRequestConfig.LR_AUTOPLAY=0);e.verbose("Determining format support");h.adRequestConfig.LR_FORMAT="";e.each("application/x-mpegURL application/vnd.apple.mpegURL video/mp4 video/webm video/ogg video/3gpp".split(" "),function(a){var b=t.canPlayType(a);e.verbose(" "+
a+":",b);""!==b&&"no"!==b.toLowerCase()&&(0<h.adRequestConfig.LR_FORMAT.length&&(h.adRequestConfig.LR_FORMAT+=";"),h.adRequestConfig.LR_FORMAT+=a)});h.adRenderConfig.LR_FORMAT=h.adRequestConfig.LR_FORMAT;h.adRequestConfig.LR_VIEWABLE=k.viewable;h.adRequestConfig.LR_IFRAME=k.iframe;h.adRequestConfig.LR_PAGE_URL=f.pageUrl;h.adRequestConfig.LR_WINDOW_DEPTH=f.crossDomainCount;h.adRequestConfig.LR_WINDOW_LOCATION=f.location;h.adRequestConfig.LR_WINDOW_REFERRER=f.referrer;h.adRequestConfig.LR_ADAPTERS=
"";h.adRenderConfig.videoSlot=b.videoSlot;h.adRenderConfig.slot=b.slot;h.adRenderConfig.videoSlotCanAutoPlay=b.videoSlotCanAutoPlay;h.adRenderConfig.window=p;return h};S=function(a){return"object"===typeof a&&null!==a&&a.tagName?!0:!1};ea=function(a){return"object"!==typeof a||null===a||"function"!==typeof a.canPlayType?!1:!0};Y=function(b){function d(){window.setTimeout(function(){"function"===typeof l.getVPAID&&null!==l.getVPAID()?(e.log("Loaded Flash VPAID:",l),s=l,"function"===typeof b&&b()):
d()},100)}var h,f,g="",l,k,u;s=void 0;"string"!==typeof q&&(q=("https:"===p.location.protocol?"https://cdn-static-secure":"http://cdn-static")+".liverail.com/swf/v4/admanager.swf");p.LiveRail||(p.LiveRail={});p.LiveRail.Instances||(p.LiveRail.Instances={},p.LiveRail.InstanceCount=0);p.LiveRail.InstanceCount+=1;f="LiveRail.Instances.AdLoader_"+p.LiveRail.InstanceCount;k=("https:"===p.location.protocol?"https://cdn-static-secure":"http://cdn-static")+".liverail.com/swf/ui/vpaid-player.swf";k+="?build\x3d201311071800";
h="jscontext\x3d"+f+("\x26vpaidURL\x3d"+encodeURIComponent(q));h+="\x26allowDomains\x3d"+encodeURIComponent(fa.allowDomains);h+="\x26currentSecurityDomain\x3d"+encodeURIComponent(fa.currentSecurityDomain);g+='\x3cobject style\x3d"display: block; width: 100%; height: 100%;"';navigator.userAgent.match(/MSIE/i)?(g=g+(' id\x3d"'+f+'"')+(' name\x3d"'+f+'"'),g+=' classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\x3e',g+='\x3cparam name\x3d"movie" value\x3d"'+k+'" /\x3e'):(g+=' data\x3d"'+k+'"',g+=
' type\x3d"application/x-shockwave-flash"\x3e');g+='\x3cparam name\x3d"quality" value\x3d"high" /\x3e';g+='\x3cparam name\x3d"allowfullscreen" value\x3d"true" /\x3e';g+='\x3cparam name\x3d"allowscriptaccess" value\x3d"always" /\x3e';g+='\x3cparam name\x3d"flashvars" value\x3d"'+h+'" /\x3e';a?(g+='\x3cparam name\x3d"wmode" value\x3d"opaque" /\x3e',g+='\x3cparam name\x3d"bgcolor" value\x3d"#'+a+'" /\x3e'):g+='\x3cparam name\x3d"wmode" value\x3d"transparent" /\x3e';g+="\x3c/object\x3e";p.LiveRail.Instances["AdLoader_"+
p.LiveRail.InstanceCount]=n;c=p.document.createElement("div");c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.width="100%";c.style.height="100%";p.getComputedStyle?u=p.getComputedStyle(y,null).getPropertyValue("position"):y.currentStyle&&(u=y.currentStyle.position);z=void 0;"static"===u&&(z=y.style.position,y.style.position="relative");y.appendChild(c);c.innerHTML=g;l=c.childNodes[0];d();e.verbose("Loaded JS-Flash event interface:",n)};ka=function(a){var b;s=void 0;"string"!==
typeof q?(s=window.LiveRail.AdManager.AdRenderer({protocol:p.location.protocol}),"function"===typeof a&&a()):(r=p.document.createElement("iframe"),r.style.display="none",r.onload=function(){try{b=r.contentWindow.document.createElement("script"),b.src=q,b.onload=function(){"function"===typeof r.contentWindow.getVPAIDAd&&(s=r.contentWindow.getVPAIDAd(),e.log("Loaded JavaScript VPAID:",s),"function"===typeof a&&a())},r.contentWindow.document.body.appendChild(b)}catch(d){e.error("Error loading VPAID:",
d.message)}},p.document.body.appendChild(r))};pa=function(a){var b,d=[];window.setTimeout(function(){e.verbose("onVPAIDEvent(",a,")");if("object"===typeof a.data&&null!==a.data&&F[a.type])for(b=0;b<F[a.type].length;b+=1)d.push(a.data[F[a.type][b]]);if("AdStopped"===a.type||"AdError"===a.type)y.removeChild(c),void 0!==z&&(y.style.position=z);U(a.type);H(a.type,d)},0)};ga=function(a){var b={},d,c,e;d=a.slice(a.indexOf("?")+1).split("\x26");if(d[0]!==a)for(a=0;a<d.length;a+=1)if(c=d[a].split("\x3d"),
1===c.length)b[c[0]]=!0;else if(2===c.length)b[c[0]]=decodeURIComponent(c[1]);else for(b[c[0]]="",e=1;e<c.length;e+=1)b[c[0]]+=decodeURIComponent(c[e]),e<c.length-1&&(b[c[0]]+="\x3d");return b};x=function(a,b,d){if(s&&"function"===typeof s.resizeAd)return s.resizeAd(a,b,d)};ha=function(a){if(s&&"function"===typeof s.setAdVolume)return s.setAdVolume(a);d.adVolume=a};ma=function(a){var b,d=0,c="";for(b in a)a.hasOwnProperty(b)&&!b.match(/^(slot|videoSlot|videoSlotCanAutoPlay)/)&&(0<d&&(c+="\x26"),c+=
b+"\x3d"+encodeURIComponent(a[b]),d+=1);return c};ia=function(a,d,c){"string"===typeof d&&"function"===typeof a&&(b[d]||(b[d]=[]),b[d].push({fn:a,listenerScope:c}))};na=function(a,d){var c;if("string"===typeof d&&"function"===typeof a)for(c=0;c<b[d].length;c+=1)b[d][c].fn===a&&b[d].splice(c,1)};qa=function(){return e.detectDevice("android")?{unsupported:2.1>e.detectDevice("android"),trigger:"Android \x3c 2.1"}:{unsupported:!1}};U=function(a){var b={initAd:1,AdLoaded:2,AdStarted:3,AdError:0,AdStopped:0,
AdSkipped:0},d=["IDLE","INITIALIZING","READY","STARTED"];void 0!==b[a]&&(e.verbose("updateAdStatus(",a,"): adStatus is now ",b[a]+" ("+d[b[a]]+")"),m=b[a])};e.es5.Object.defineProperties(n,{onVPAIDEvent:{value:function(a){pa(a)},enumerable:!0}});e.es5.Object.defineProperties(u,{subscribe:{value:function(a,b,d){return ia(a,b,d)},enumerable:!0},unsubscribe:{value:function(a,b){return na(a,b)},enumerable:!0}});e.eachKey(J,function(a){O(a)});e.eachKey(ca,function(a){h(a)});(function(){var a,b;a=document.getElementsByTagName("script");
for(b=0;b<a.length&&-1===a[b].src.indexOf("LiveRail.AdManager");b+=1);b>=a.length||(a=a[b].src,Q=ga(a),e.log("Found Ad Manager URL:",a),e.verbose("Parsed URL query parameters:",Q))})();e.es5.Object.freeze(u);e.log("LiveRail AdManager version "+e.build.version+", build "+e.build.timestamp+" ("+e.build.date+"):",u);return u}})();
(function(){window.LiveRail.AdManager.AdRenderer=function(m){var f,a,d=!0,b,l,c,e,r=null,k={},n,u,Q={},W,v={},D=!1,w,L=[],G,y,z,t,p={},q,F,J,s,ca={},ba,R,oa,O,h,aa={},g=null,H,P,E=null,T,B=null,A,X,da,S,ea,Y,ka,K,M,Z,pa,fa,ga,la,x,ha,ma,ia,na,qa,U,Ma,va,ra,Na,C,sa,ta,wa,V,ja,ya,Ea,za,Aa,Fa,Ga,Ha,ua,Ia,Ba,Ja,Ka,xa,I,Ca,$,La,Da;h=window.LiveRail.AdManager.framework.descendent("AdRenderer");m||(m={});m.protocol||(m.protocol="http:");q={adLinear:{get:!0,reset:!1},adWidth:{get:!0},adHeight:{get:!0},adExpanded:{get:!0,
reset:!1},adSkippableState:{get:!0,reset:!1},adSkippableRemainingTime:{get:!0,reset:-2},adRemainingTime:{get:!0,reset:-2},adDuration:{get:!0,reset:-2},adVolume:{get:!0,set:!0,resetOnce:1},adCompanions:{get:!0,reset:""},adIcons:{get:!0,reset:!1}};b="idle";w={length:0,load:function(){return{}}};W={AdLog:!1};y={contextmenu:!0,loadstart:!0,progress:!1,abort:!0,error:!0,emptied:!0,stalled:!0,loadedmetadata:!0,loadeddata:!0,canplay:!0,canplaythrough:!0,playing:!0,waiting:!0,seeking:!0,seeked:!0,ended:!0,
durationchange:!0,timeupdate:!1,play:!0,pause:!0,ratechage:!0,volumechange:!0};ba=["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"];s=["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"];u=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"];ka=function(){void 0!==A&&(window.clearTimeout(A),A=void 0);3===F&&(F+=1,I("view",k.Ad.trackers.tracker,"100"),x("AdVideoComplete"));ia();x("AdStopped")};K=function(a,
d){a&&(k.Ad&&k.Ad.trackers)&&I("error",k.Ad.trackers.tracker,void 0,1E3>parseInt(a,10)?{"[ERRORCODE]":a}:void 0);"idle"!==b&&ia();x("AdError",[a?h.errorDefinition[a]:d])};M=function(a){var b="";Q.AdLog&&0<Q.AdLog.length&&(void 0!==b&&(b="string"!==typeof a?a.toString():a),x("AdLog",[b]))};Z=function(){var a;g.readyState!==R&&(R=g.readyState,a="videoSlot readyState has changed to: "+R,!1!==h.returnUnsignedInt(R)&&(a+=" ("+ba[R]+")"),h.verbose(a));g.networkState!==J&&(J=g.networkState,a="videoSlot networkState has changed to: "+
J,!1!==h.returnUnsignedInt(J)&&(a+=" ("+s[J]+")"),h.verbose(a))};pa=function(a){"function"===typeof window.lrClearCompanion&&Array.isArray(a)&&h.each(a,function(a){try{window.lrClearCompanion.call(B,a["@size"]),h.log("Cleared "+a["@size"]+" CompanionAd")}catch(b){}})};fa=function(){var a;if(g.paused)Fa();else if("string"===typeof k.Ad.clickthru&&0<k.Ad.clickthru.trim().length){t&&ta();try{h.log("Handling clickthrough url:",'"'+k.Ad.clickthru+'"'),a=B.open(k.Ad.clickthru,l),I("clickthru",k.Ad.trackers.tracker),
x("AdClickThru",["","",!1]),h.debug("Clickthrough window:",a),a||M("[LRERROR:9910]window\x3d"+a+" clickthru\x3d"+k.Ad.clickthru)}catch(b){}}};ga=function(){var b;z=G=f=a=!1;k={};F=0;ca={impression:!1,view25:!1,view50:!1,view75:!1,view100:!1};ea=!1;Y=null;if(D)for(b in q)q.hasOwnProperty(b)&&za(b);else D=!0};la=function(){oa=1600;da=15E3;t=!0;l="_blank";H=void 0};x=function(a,b){var c=[],e="",g="";d&&(Array.isArray(b)&&(c=b),!1!==W[a]&&(Q.AdLog&&0<Q.AdLog.length)&&(h.each(c,function(a){0<e.length&&
(e+=", ");e+=a}),g="Dispatching "+a+" event",""!==e&&(g+=" arguments\x3d["+e+"]"),h.verbose(g),x("AdLog",[g])),Q[a]&&h.each(Q[a],function(a){window.setTimeout(function(){"function"===typeof a.fn&&("object"===typeof a.listenerScope?a.fn.apply(a.listenerScope,c):a.fn.apply(h,c))},0)}))};ha=function(){var a;h.log("Displaying "+k.AdType+" ad at "+g.currentTime.toFixed(1)+" seconds");Ca();switch(k.AdType){case "Linear":p.adLinear=!0;x("AdLinearChange");$();P=void 0;g.controls&&(h.verbose("Removing controls from videoSlot"),
P=g.getAttribute("controls"),g.removeAttribute("controls"));h.log("Stream timeout set to "+da+"ms");X=window.setTimeout(function(){M("[LRERROR:402]url\x3d"+k.MediaFile.cdata);K("402")},da);""===g.src&&("function"===typeof g.getElementsByTagName&&0<g.getElementsByTagName("source").length)&&(ea=!0);V("error",g,function(a){var b,c;if(d){h.error("Error event occurred:",a);b="400";c="code\x3d";if(a.target&&a.target.error&&"number"===typeof a.target.error.code){switch(a.target.error.code){case a.target.error.MEDIA_ERR_NETWORK:b=
"401";break;case a.target.error.MEDIA_ERR_DECODE:b="405";break;case a.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:b="405"}c+=u[a.target.error.code]}else c+="(unknown error)";c+=" url\x3d"+k.MediaFile.cdata;M("[LRERROR:"+b+"]"+c);K(b)}},!0);Na();h.detectDevice("ios")?(h.debug("iOS version "+h.detectDevice("ios")+" detected, using canplay event to begin playback"),V("canplay",g,function(){1<=g.currentTime?(h.log("Target element currentTime is "+g.currentTime+", seeking to 0"),a=function(){g.removeEventListener("seeked",
a);ua()},g.addEventListener("seeked",a,!1),g.currentTime=0):ua()})):V("loadstart",g,ua);ea&&h.detectDevice("msie")?g.getElementsByTagName("source")[0].src=k.MediaFile.cdata:(h.debug("Setting target element source to "+k.MediaFile.cdata),g.src=k.MediaFile.cdata);c&&V("timeupdate",g,function(){c&&0<=g.currentTime&&ya()});h.debug("Calling load() on target element");g.load();break;case "NonLinear":K(null,"NonLinear ads are currently unsupported")}};ma=function(a,b){var c;"function"===typeof window.lrDisplayCompanion&&
Array.isArray(a)&&("function"===typeof window.lrInitCompanions&&(Array.isArray(b)?(h.debug("lrInitCompanions:",b),window.lrInitCompanions.call(B,b)):window.lrInitCompanions.call(B)),h.each(a,function(a){c=[];a.trackers&&Array.isArray(a.trackers.tracker)&&h.each(a.trackers.tracker,function(a){"impression"===a["@type"]&&Array.isArray(a.url)&&(c=c.concat(a.url))});window.lrDisplayCompanion.call(B,a["@size"],a["@type"],a.content,a.clickthru,c);h.debug("Registered "+a["@size"]+" companion banner")}))};
ia=function(){h.log("Ad process completed");try{window.clearTimeout(X)}catch(a){}Ja();ja();ya();if("playing"===b||"started"===b)null!==Y?(h.verbose("Setting video element cursor style to "+Y),g.style.cursor=Y):"pointer"===g.style.cursor&&(g.style.removeProperty("cursor"),h.verbose("Removed video element cursor style")),void 0!==P&&(h.verbose("Restoring controls on videoSlot"),P=g.setAttribute("controls",P),P=void 0),pa(k.CompanionAds);ga();b="idle"};v.adWidth=function(){return null!==g&&g.offsetWidth?
g.offsetWidth:null};v.adHeight=function(){return null!==g&&g.offsetHeight?g.offsetHeight:null};na=function(){var c;f||(f=!0,h.log("Impression occured at currentTime \x3d ",g.currentTime),X&&window.clearTimeout(X),V("ended",g,function(){ka()}),c=g,B.document.documentElement.hasOwnProperty("ontouchstart")?V("touchend",c,function(a){a.stopPropagation();a.preventDefault();h.debug("Received touchend event on videoSlot element");"playing"===b&&fa()},!0):V("click",c,function(a){a.stopPropagation();a.preventDefault();
h.debug("Received click event on videoSlot element");"playing"===b&&fa()},!0),V("contextmenu",g,function(a){a.preventDefault()},!0),V("pause",g,qa),V("play",g,U),V("volumechange",g,function(){p.adVolume!==g.volume&&va()}),g.style.cursor&&""!==g.style.cursor&&(Y=g.style.cursor,h.verbose("Storing video element cursor style as: "+Y)),h.verbose("Setting video element cursor style to pointer"),g.style.cursor="pointer",b="playing",h.log("Playing video ad: "+k.MediaFile.cdata),I("impression",k.Ad.trackers.tracker),
x("AdImpression"),x("AdVideoStart"),Da(),$(),a&&I("mute",k.Ad.trackers.tracker),ma(k.CompanionAds,r))};qa=function(){"playing"!==b||(z||0===g.duration-g.currentTime)||(z=!0,I("pause",k.Ad.trackers.tracker),x("AdPaused"))};U=function(){"playing"===b&&z&&(z=!1,I("resume",k.Ad.trackers.tracker),x("AdPlaying"))};Ma=function(a){M("handshakeVersion("+a+")");return a};va=function(){var b,c;b=g.volume;if((c=g.muted)||0>=b)c=!0,b=0;c?a||(a=!0,k.Creative&&I("mute",k.Ad.trackers.tracker)):a&&(a=!1,k.Creative&&
I("unmute",k.Ad.trackers.tracker));p.adVolume=b;x("AdVolumeChange")};ra=function(a,b,c,d,e,f){M("initAd("+a+", "+b+", "+c+", "+d+", "+e+", "+f+")");la();O="normal";"string"===typeof c&&(O=c);"number"===typeof d&&(oa=d);w=function(a){var b=1,c;c={};Object.defineProperties(c,{length:{get:function(){return b}},load:{value:function(){return 0<b?(b=0,a):{}}}});return c}({creativeData:e,environmentVars:f});g=f.videoSlot;H=f.videoSlotCanAutoPlay;E=f.slot;h.log("Target element:",g);B="object"===typeof f.window?
f.window:f.slot&&f.slot.ownerDocument?f.slot.ownerDocument.defaultView||f.slot.ownerDocument.parentWindow:f.videoSlot.ownerDocument.defaultView||f.videoSlot.ownerDocument.parentWindow;e.setup&&e.setup.trackers&&I("embed",e.setup.trackers.tracker);x("AdLoaded")};Na=function(){function a(b){return function(a){y[b]&&h.verbose("videoSlot event: "+b,a);Z()}}var b;J=R=void 0;for(b in y)y.hasOwnProperty(b)&&V(b,g,a(b))};C=function(a){var b,c,d;b=a.charAt(0).toUpperCase()+a.slice(1);c="get"+b;b="set"+b;za(a);
"boolean"===typeof q[a].get&&q[a].get&&(d={},d[c]={value:function(){return"function"===typeof v[a]?v[a]:function(){return p[a]}}()},Object.defineProperties(h,d));"boolean"===typeof q[a].set&&q[a].set&&(c={},c[b]={value:function(){return"function"===typeof aa[a]?aa[a]:function(b){p[a]=b}}()},Object.defineProperties(h,c))};sa=function(a){var b=g.duration/4;return g.currentTime>=b*a&&("fullscreen"!==n||g.currentTime<b*(a+1))?!0:!1};wa=function(a){var b,c,d,e,g,f,k={},n={},p,u,m;m={AdSlot:null,Ad:null,
AdType:null,CompanionAds:null,Creative:null,MediaFile:null};c={};b=a.environmentVars;h.each(b,function(a,b){switch(b){case "LR_TIMEOUT_STREAM":!1!==h.returnFloat(a)&&(da=Math.round(1E3*h.returnFloat(a)));break;case "LR_BITRATE":!1!==h.returnInt(a)&&(oa=h.returnInt(a));break;case "LR_LAYOUT_LINEAR_PAUSEONCLICKTHRU":t=h.returnBoolean(a);break;case "LR_CLICK_TARGET":"string"===typeof a&&0<a.length&&(l=a);break;case "LR_COMPANIONS":"string"===typeof a&&(r=[],d=a.split("|"),h.each(d,function(a){a=a.split(":");
2<a.length&&(a[3]||(a[3]=""),a[4]||(a[4]=!1),r.push({width:parseInt(a[0],10),height:parseInt(a[1],10),companionElement:a[2].toString(),defaultElement:a[3].toString(),purge:h.returnBoolean(a[4])}))}));break;default:c[b]&&""===a||(c[b]=a)}});h.log("Parsed parameters:",b);try{if(0===a.creativeData.ads.adslot.length)throw"Empty ad response";h.each(a.creativeData.ads.adslot,function(a){if("in"===a["@type"]&&0===parseInt(a["@start"],10))return e=a,!1});m.AdSlot=e;if(!(m.AdSlot&&m.AdSlot.ad&&m.AdSlot.ad[0]&&
m.AdSlot.ad[0].linear))throw"Empty ad response";g=m.AdSlot.ad[0].linear.url;h.each(g,function(a,b){h.verbose("Considering "+a["@mimetype"]+" creative "+b+" (bitrate "+a["@kbps"]+")");f=Math.abs(oa-parseInt(a["@kbps"],10));if(void 0===k[a["@mimetype"]]||k[a["@mimetype"]]>f)k[a["@mimetype"]]=f,n[a["@mimetype"]]=b});u=c.LR_FORMAT.split(";");p=u[0];h.each(u,function(a){if(void 0!==n[a])return p=a,!1});void 0!==n[p]&&(m.MediaFile=g[n[p]],m.Creative=m.AdSlot.ad[0],m.AdType="Linear");"object"===typeof m.AdSlot.ad[0].companions&&
(m.CompanionAds=m.AdSlot.ad[0].companions.companion);m.Creative&&(h.log("Selected "+p+" ad at bitrate "+m.MediaFile["@kbps"]+":",m.MediaFile),m.Ad=m.AdSlot.ad[0])}catch(q){h.error("Error parsing ad:",q)}return m};ta=function(){"playing"!==b||g.paused||g.pause()};V=function(a,b,c,d){d||(d=!1);"string"===typeof a&&("function"===typeof b.addEventListener&&"function"===typeof c)&&(L.push({event:a,target:b,action:c,capture:d}),b.addEventListener(a,c,d),h.verbose("Adding "+a+" event listener, capture:",
d))};ja=function(){h.each(L,function(a){a.target.removeEventListener(a.event,a.action,a.capture);h.verbose("Removed "+a.event+" event listener")});L=[]};ya=function(){c&&(E.removeChild(c),c=void 0,T!==E.style.position&&(h.debug("Setting slot element position to:",T),E.style.position=T))};Ea=function(a){function b(h){h.stopPropagation();1===h.which&&(g.style.position=e,g.style.left=f,g.style.right=l,c.removeChild(d),"function"===typeof a&&(g.play(),window.setTimeout(a,0)))}var d,e,f,l;T=E.style.position;
B.getComputedStyle&&!B.getComputedStyle(E).position.match(/(relative|absolute|fixed)/)&&(h.debug("Stored slot element position:",E.style.position),E.style.position="relative",h.debug("Set slot element position to:",E.style.position));c=h.addElement({target:E,styles:{width:"100%",height:"100%",position:"absolute",cursor:"pointer",top:"0px",left:"0px",backgroundColor:"#000"},events:{contextmenu:function(a){a.preventDefault()},mouseup:b,touchend:b}});d=h.addElement({target:c,type:"img",styles:{position:"absolute",
display:"block",border:"0px none",cursor:"pointer",top:"50%",left:"50%",width:"80px",height:"80px",margin:"-40px 0px 0px -40px"},attributes:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABFZJREFUeNrs3dtLI1ccB/BcNJe1yU7cohN121wUjCL1FitUUUnBQl5WWHxSqP+AD4Kvviq+CL4JFYuXFx+0IIIvwS1aSBHUQrVBnGTKrsaUrk4mpslE1+zvBLObtkubpmDmJL8vDDPJHDLhw5n5nRn0RKn4e3QMw9TD2gILc/8ek7FdLBHul/Q2LwiCD9bxzEYlmS8ArjeZTHYajcbH3d3dzWaz2aLRaHRkn8FgYEtLS3XFIHdzcxOPRCIXZDuRSMSDwSC/s7NzCDZhpVLpBcgX6bbKDLxnAPe52+3utdvtnfAB0vHx8etAIBBJtzk9Pb0uBsDa2tqP0ttWq9XQ0NDwBDqQluM47+bm5gtRFH8ExO/eAQLcVwDYMzIy8rVWq/14e3v71d7e3msF5l2cTueTvr6+GkmSfl9YWPgWAL8HyC01wDHQLZ8PDw8/B+WalZWVE5/PJyLZn3N+fh7jeV5saWl5arPZKg4ODsI6ne5QDde43ra2ti9gx5eLi4u+s7OzGHJ9OHBZuyWIUB8c19fXPFiFVdD7LE1NTc1wrRMQ799DjIgVMSN2BJCFs5g9OTkRkCe7ECtiRuxU6SEKVJgI0mQXYkXMyLYq/ebl5WUCabJLppUKOf5fEBABERABERCDgAiIgAiIQUAEREAExCBg0QBOT0/XmEwmNQLmmMHBwcqtrS3HwMDAYwTMMZWVldqZmZna5eVlu81m0yBgjunq6mI2NjYco6OjFQiYY8rKykrGxsaeejweR2trqx4Bc4zdbn+0trbWQEORkfUwhoYiI/txoNyLDDUDabkWGaruRORYZKi8lZNTkaH6XlgORYb6hwn5LjIF8zQmX0WmoB5n5aPIFOTzQJZlNdAjDQ9xrJJCw9vd3RUmJiZe+v3+BAL+h4RCIWlqaurl+vp6+CGPWxCAq6urocnJyeDV1dWbhz421YAcx/0xPj7O7+/v5+2/C6gEjEajt3Nzc8HZ2dnf8v1dqAN86CJRMID5KhIFAZjPIkE1oByKBJWAcioS1AHKrUhQAyjXIkEFoJyLhKwBaSgSsgZ0uVy/0H4fjn8fiIAIiIAIiEFABERABMQgIAIiIAJiEBABaQMks9ZmTryK+ecQK2KWBhTIlL9ms/kR0mQXYnU/TbKQAgyFQnxdXR2DNNmFWBGzFODd3Z3P6/UeVlVVGfA0zu70JVbEjNipIGTm3vDFxYXP7XZb9Hq9Gpk+HGJDjIhVagZfsFPHIWS6d47j4k6ns7mxsbHC7/eLsVjsDZK9T3l5uWZoaKhOq9VKS0tLy+DzQzgc/jnV2yRJegUr69HR0Wl7e7ujo6PjU5PJVBqNRm/I3MnFDFddXa3v6elh+/v7P4GXV/Pz898A3K+iKJKp4G+VGW11RqPxGXTLepfL9ZnVaq1nWbYe+55CQU7ZQCDg83g8P5Hr3j1eahij/GtjhmEs0KiTTDINiw75FIpkMhmHhYfORX7Jgc/c91aAAQBVWxmAi5XwnAAAAABJRU5ErkJggg\x3d\x3d"},
events:{contextmenu:function(a){a.preventDefault()},mouseup:b,touchend:b}});e=g.style.position;f=g.style.left;l=g.style.right;g.style.position="relative";g.style.left="-100000px";g.style.right=""};za=function(a){q[a].resetOnce?p[a]||(p[a]=q[a].resetOnce):p[a]=void 0!==q[a].reset?q[a].reset:null};Aa=function(a,b,c){M("resizeAd("+a+", "+b+", "+c+")");"string"===typeof c&&(O=c,Da());x("AdSizeChange")};Fa=function(){"playing"===b&&g.paused&&g.play()};aa.adVolume=function(a){var b=parseFloat(a);isNaN(b)||
(0>a&&(b=0),1<a&&(b=1),0<b&&(g.muted=!1),g.volume=b,va())};Ga=function(){M("skipAd()");p.adSkippableState?"idle"!==b?(I("skip",k.Ad.trackers.tracker),ia(),g&&"function"===typeof g.pause&&g.pause(),x("AdSkipped"),ka()):M("Ad is currently idle, ignoring skipAd()"):M("adSkippableState is false, ignoring skipAd()")};Ha=function(){var a;M("startAd()");"idle"!==b?M("Ad currently loaded - ignoring startAd()"):(b="starting",ga(),a=w.load(),k=wa(a),k.Ad?(x("AdStarted"),!1===H?(h.log("Rendering click-to-play interface"),
"object"===typeof E&&null!==E&&E.tagName?Ea(ha):(h.error("environmentVars.slot is invalid"),K("1003"))):ha()):(Ca(),K(null,"No ad available")))};ua=function(){Z();"progress"!==b&&(b="progress",void 0===S&&(h.debug("Starting progress monitor at currentTime \x3d",g.currentTime),S=window.setInterval(xa,250)))};Ia=function(){Z();"started"!==b&&(b="started",h.debug("Calling play() on target element"),g.play())};Ba=function(){M("stopAd()");"idle"!==b?(I("close",k.Ad.trackers.tracker),ia(),g&&"function"===
typeof g.pause&&g.pause(),x("AdStopped")):M("Ad is currently idle, ignoring stopAd()")};Ja=function(){if(void 0!==S){h.debug("Stopping progress monitor at currentTime \x3d",g.currentTime);try{window.clearInterval(S),S=void 0}catch(a){}}};Ka=function(a,b,c){"string"===typeof b&&"function"===typeof a&&(Q[b]||(Q[b]=[]),Q[b].push({fn:a,listenerScope:c}))};xa=function(){var a;if(window&&null!==window)if(window.parent&&Object){if(ea&&h.detectDevice("msie")){if(g.getElementsByTagName("source")[0].src!==
k.MediaFile.cdata){K(null,"Ad video has been removed");return}}else if(g.src!==k.MediaFile.cdata){K(null,"Ad video has been removed");return}"progress"===b&&Ia();if(!G)if(0<g.duration)h.debug("Media has started"),G=!0;else{h.debug("Media not yet started (currentTime\x3d"+g.currentTime+" duration\x3d"+g.duration+")");return}g.controls&&(h.verbose("Removing controls from videoSlot"),g.removeAttribute("controls"));"playing"!==b&&(!f&&0<g.currentTime)&&na();0<g.currentTime&&0<g.duration&&(p.adRemainingTime=
Math.ceil(g.duration-g.currentTime),p.adDuration!==Math.ceil(g.duration)&&(p.adDuration=Math.ceil(g.duration),x("AdDurationChange")));k.Ad.linear["@skipoffset"]&&(a=parseFloat(k.Ad.linear["@skipoffset"]),-1<a&&(a=k.Ad.linear["@skipispercent"]?p.adDuration*a-g.currentTime:a-g.currentTime,p.adSkippableRemainingTime=Math.max(0,a),0!==p.adSkippableRemainingTime||p.adSkippableState||(M("Ad is now skippable"),p.adSkippableState=!0,x("AdSkippableStateChange"))));"playing"!==b||(g.seeking||g.paused)||(0===
F&&sa(1)&&(F+=1,I("view",k.Ad.trackers.tracker,"25"),x("AdVideoFirstQuartile")),1===F&&sa(2)&&(F+=1,I("view",k.Ad.trackers.tracker,"50"),x("AdVideoMidpoint")),2===F&&sa(3)&&(F+=1,I("view",k.Ad.trackers.tracker,"75"),x("AdVideoThirdQuartile")),0.5>g.duration-g.currentTime&&void 0!==A&&(A=window.setTimeout(function(){ka()},500)))}else b="dead",d=!1;else h.error("Ad unit has been removed"),b="removed",d=!1,K(null,"Ad unit has been removed")};I=function(a,b,c,d){var e,g;g=a+(c||"");"string"===typeof a&&
(Array.isArray(b)&&!0!==ca[g])&&(!1===ca[g]&&(ca[g]=!0),h.each(b,function(b){b["@type"]!==a||(!Array.isArray(b.url)||void 0!==c&&b["@value"]!==c)||h.each(b.url,function(a){try{"object"===typeof d&&h.each(d,function(b,c){if(void 0!==b&&b!==c)for(;-1!==a.indexOf(c);)a=a.replace(c,b)}),e=document.createElement("img"),e.style.display="none",e.width=1,e.height=1,e.src=a,document.body.appendChild(e),h.log("Firing "+g+" tracker:",a)}catch(b){}})}))};Ca=function(){k.AdSlot&&k.AdSlot.trackers&&I("adslot",
k.AdSlot.trackers.tracker);k.Ad&&k.Ad.trackers&&I("adslot",k.Ad.trackers.tracker)};La=function(a,b){"string"===typeof b&&"function"===typeof a&&h.each(Q[b],function(c,d){c.fn===a&&Q[b].splice(d,1)})};$=function(){g.muted||0>=g.volume?(p.adVolume=0,a=!0):p.adVolume=g.volume};Da=function(){if(B.document.fullScreen||B.document.webkitIsFullScreen||B.document.mozFullScreen||g.webkitDisplayingFullscreen)O="fullscreen";return n!==O?(k.Ad&&("fullscreen"===O?I("fullscreen",k.Ad.trackers.tracker):"fullscreen"===
k.ViewMode&&I("leaveFullscreen",k.Ad.trackers.tracker)),n=O,!0):!1};Object.defineProperties(h,{subscribe:{value:function(a,b,c){return Ka(a,b,c)}},unsubscribe:{value:function(a,b){return La(a,b)}},initAd:{value:function(a,b,c,d,e,g){return ra(a,b,c,d,e,g)}},startAd:{value:function(){return Ha()}},stopAd:{value:function(){return Ba()}},skipAd:{value:function(){Ga()}},pauseAd:{value:function(){ta()}},resumeAd:{value:function(){Fa()}},resizeAd:{value:function(a,b,c){Aa(a,b,c)}},expandAd:{value:function(){}},
collapseAd:{value:function(){}},handshakeVersion:{value:function(a){return Ma(a)}}});h.log("Loading LiveRail.CompanionManager");e=document.createElement("script");e.src=("https:"===m.protocol?"https://cdn-static-secure":"http://cdn-static")+".liverail.com/js/LiveRail.CompanionManager-1.0.js";document.head.appendChild(e);(function(){for(var a in q)q.hasOwnProperty(a)&&C(a)})();h.es5.Object.freeze(h);return h}})();
(function(){window.LiveRail.AdManager.RTBHandler=function(m){var f,a,d,b,l,c,e,r,k;b=window.LiveRail.AdManager.framework.descendent("RTBHandler");m||(m={});m.protocol||(m.protocol="http:");f=m.protocol+"//ad4.liverail.com/";l={source:!0,adslot:!0,ad:!0,tracker:!0,url:!0,companion:!0};c=function(c){var d,e,f,l;if(0<arguments.length){e=[];d=Date.now()-a;f=c+" in "+d+"ms";if(1<arguments.length)for(e.push(f+":"),l=arguments.length,f=1;f<l;f+=1)e.push(arguments[f]);else e.push(f);b.debug.apply(b,e)}a=
Date.now();return d};e=function(a,b){b()};r=function(a,e,k,m){function r(){var q,J,s;b.each(a,function(a,c){b.each(a,function(a,b){"@"===b.substring(0,1)&&(null===a?e[b.substring(1)+c]="":e[b.substring(1)+c]=a)});a.url&&a.url[0]&&(e["erc"+c]=z[c],e["rtt"+c]=y[c],"0"===z[c]&&(e["response"+c]=p[c][0],1<p[c].length&&(e["subresponse"+c]=[],b.each(p[c],function(a,b){0<b&&e["subresponse"+c].push(a)}))))});e.LR_POSTXML=!0;b.verbose("Requesting final ad source from LiveRail with parameters:",e);c();(function(){var a;
for(a=0;1E4>a;a+=1);})();d=c("JavaScript performance test completed");q=f;J=e;if(4>d&&!parseInt(e.LR_DEBUG,10)){c();try{J=window.btoa(b.deflate(unescape(encodeURIComponent(b.urlSerialize(e))))),c("Deflated query string"),q+="?compressed\x26encoded"}catch(t){b.error("Error compressing data object: "+t.message,t),q=f,J=e}}s=window.setTimeout(function(){m({code:"1112"})},1E3*e.LR_TIMEOUT_DELIVERY);b.log("HTTP load, timeout\x3d"+e.LR_TIMEOUT_DELIVERY+"s url\x3d"+f);c();b.ajax({url:q,type:"POST",data:J,
dataType:"xml",success:function(a){window.clearTimeout(s);c("Retrieved final ad source from LiveRail");k(b.xml2object(a,l))},error:function(a,b){window.clearTimeout(s);"parsererror"===b?m({code:"1201",message:"responseText("+a.responseText.length+" bytes)\x3d"+a.responseText}):m({code:"1111",message:"status\x3d"+a.status+" statusText\x3d"+a.statusText+" errorStatus\x3d"+b})}})}function D(){G+=1;G>=L&&"function"===typeof k&&(q=!0,r())}function w(a,c,d){var f,l,k,m,n;Array.isArray(p[c])||(p[c]=[]);
b.log("HTTP load, count\x3d"+c+" timeout\x3d"+e.LR_TIMEOUT_ADSOURCE+"s url\x3d"+a);void 0===d&&(d=!0);f=window.setTimeout(function(){n=!0;try{t[c].abort()}catch(d){}y[c]+=Date.now()-l;z[c]="300";b.error("Ad source timed out after "+e.LR_TIMEOUT_ADSOURCE+"sec, url\x3d"+a);D()},1E3*e.LR_TIMEOUT_ADSOURCE);l=Date.now();t.push(b.ajax({url:a,type:"GET",dataType:"xml",xhrFields:{withCredentials:d},onloadstart:function(){l=Date.now()},onprogress:function(){void 0===k&&(k=Date.now()-l)},success:function(d,
r,g){var s,t,G,v;window.clearTimeout(f);n||q||(void 0===k&&(k=Date.now()-l),m=Date.now()-l,y[c]+=m,b.log("HTTP complete, status\x3d"+r+" count\x3d"+c+" latency\x3d"+k/1E3+"s, duration\x3d"+m/1E3+", url\x3d"+a),p[c].push(g.responseText),z[c]="0",0===g.responseText.trim().length?(b.warn("Empty response received from ad source "+c),z[c]="1",D()):d&&"function"===typeof d.getElementsByTagName?((r=d.querySelector("VAST")||d.querySelector("VideoAdServingTemplate"))&&(s=d.querySelector("Ad")),s?((d=s.querySelector("Wrapper"))&&
(t=d.getElementsByTagName("VASTAdTagURI")[0]||d.getElementsByTagName("VASTAdTagURL")[0]),t?p[c].length<=e.LR_WRAPPER_LIMIT?(b.log("* Found VASTWrapper. Adding new ServerRequest URL\x3d"+t.textContent),w(t.textContent,c)):(b.warn("Ad source "+c+" has exceeded the LR_WRAPPER_LIMIT of "+e.LR_WRAPPER_LIMIT+", dropping ad source"),z[c]="1",D()):(G={},b.each(e.LR_FORMAT.split(";"),function(a){G[a]=!0}),s=s.getElementsByTagName("MediaFile"),b.verbose("Found "+s.length+" MediaFile elements in ad source "+
c+":",s),b.each(s,function(a,c){b.verbose("Examining MediaFile "+c+":",a);if(a&&a.attributes&&a.attributes.type&&G[a.attributes.type.value])return b.verbose("Found valid MediaFile format: "+a.attributes.type.value),v=!0,!1}),v||(z[c]="200",b.warn("Ad source "+c+" has no usable MediaFile elements, dropping ad source")),D())):(r?(b.warn("Ad source "+c+" responsed with empty VAST"),z[c]="1"):b.warn("Unrecognizable XML response from ad source "+c),D())):(b.warn("Failed to parse XML response from ad source "+
c),D()))},error:function(e,q){window.clearTimeout(f);n||(void 0===k&&(k=Date.now()-l),m=Date.now()-l,y[c]+=m,204!==e.status&&b.error("Error loading ad source:",q,", count\x3d"+c+" latency\x3d"+k/1E3+"s, duration\x3d"+m/1E3+", ajaxQuery\x3d",e,", url\x3d"+a),"error"===q&&0===e.status&&d?(b.error("Possible CORS error, retrying ad call using withCredentials:false"),w(a,c,!1)):(p[c].push(e.responseText),"parsererror"===q?z[c]="0":204===e.status?(b.warn("Empty 204 response received from ad source "+c),
z[c]="1"):z[c]="300",D()))}}))}var L,G,y,z,t,p,q;t=[];p=[];y=[];z=[];G=L=0;b.each(a,function(a,b){"string"===typeof a.url[0]&&(0<a.url[0].length&&(!a["@erc"]||"0"===a["@erc"]))&&(L+=1,y[b]=0,w(a.url[0],b))});b.log("Received total of "+a.length+" Ad Sources of which "+L+" have a URL defined.")};k=function(a){var d,k,m,v;b.log("requestAd(",a,")");d={};"object"===typeof a&&"object"===typeof a.query&&b.each(a.query,function(a,b){"LR_"===b.substring(0,3)&&(d[b]=a)});d.LR_SCHEMA="liverail";b.each({LR_TIMEOUT_AUDIENCE:5,
LR_TIMEOUT_DELIVERY:10,LR_TIMEOUT_ADSOURCE:10,LR_WRAPPER_LIMIT:3},function(a,b){var c;d.hasOwnProperty(b)||(c=parseInt(a,10),isNaN(c)||(d[b]=parseInt(a,10)))});e(d.LR_PUBLISHER_ID,function(e){var w;w=function(){};"function"===typeof a.onerror&&(w=a.onerror);e&&(f=e);m=window.setTimeout(function(){v=!0;try{k.abort()}catch(a){}w({code:"1102"})},1E3*d.LR_TIMEOUT_DELIVERY);b.log("HTTP load, timeout\x3d"+d.LR_TIMEOUT_DELIVERY+"s url\x3d"+f);c();k=b.ajax({url:f,type:"POST",data:d,dataType:"xml",success:function(e,
k,y){var z,t;window.clearTimeout(m);b.log("HTTP complete, status\x3d"+k+", url\x3d"+f);c("Retrieved ad sources from LiveRail");v||(k=b.xml2object(e,l),c("Parsed ad data",k),k&&(k.liverail&&k.liverail.data)&&(d.data=k.liverail.data),z=function(){},"function"===typeof a.onsuccess&&(z=a.onsuccess),t=function(a){var c;if(a.liverail&&a.liverail.ads&&"ads"===a.liverail["@content"])z(a.liverail);else if(a.liverail&&"error"===a.liverail["@content"])w({code:"1203",message:a.liverail.message});else{c="response\x3d"+
a;try{c+=a.liverail?" response.liverail.content\x3d"+a.liverail["@content"]:" response.liverail\x3d"+a.liverail,c+=" responseNodes\x3d",b.each(e.childNodes,function(a,b){c+="["+b+"]"+a.nodeName})}catch(d){}w({code:"1202",message:c+" responseText("+y.responseText.length+" bytes)\x3d"+y.responseText})}},k.liverail&&"sources"===k.liverail["@content"]?void 0!==k.liverail.sources&&Array.isArray(k.liverail.sources.source)&&0<k.liverail.sources.source.length?r(k.liverail.sources.source,d,function(a){t(a)},
function(a){w(a)}):w({code:"1301"}):t(k))},error:function(a,b){window.clearTimeout(m);v||("parsererror"===b?w({code:"1201",message:"responseText("+a.responseText.length+" bytes)\x3d"+a.responseText}):w({code:"1101",message:"status\x3d"+a.status+" statusText\x3d"+a.statusText}))}})})};Object.defineProperties(b,{request:{value:function(a){return k(a)}}});b.es5.Object.freeze(b);return b}})();
(function(){window.LiveRail.AdManager.framework.deflate=function(m,f){var a,d,b,l,c=null,e,r,k,n,u,Q,W,v,D,w,L,G,y,z,t,p,q,F,J,s,ca,ba,R,oa,O,h,aa,g,H,P,E,T,B,A,X,da,S,ea,Y,ka,K,M,Z,pa,fa,ga,la,x,ha,ma,ia,na=function(){this.dl=this.fc=0},qa=function(){this.extra_bits=this.static_tree=this.dyn_tree=null;this.max_code=this.max_length=this.elems=this.extra_base=0},U=function(a,b,c,d){this.good_length=a;this.max_lazy=b;this.nice_length=c;this.max_chain=d},Ma=function(){this.next=null;this.len=0;this.ptr=
Array(8192);this.off=0},va=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ra=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Na=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],sa=[new U(0,0,0,0),new U(4,4,8,4),new U(4,5,16,8),new U(4,6,32,32),new U(4,4,16,16),new U(8,16,32,32),new U(8,16,128,128),new U(8,32,128,256),new U(32,128,258,1024),new U(32,258,258,4096)],ta=function(g){c[r+e++]=g;if(8192==r+e&&0!=e){var f;null!=
a?(g=a,a=a.next):g=new Ma;g.next=null;g.len=g.off=0;null==d?d=b=g:b=b.next=g;g.len=e-r;for(f=0;f<g.len;f++)g.ptr[f]=c[r+f];e=r=0}},wa=function(a){a&=65535;8190>r+e?(c[r+e++]=a&255,c[r+e++]=a>>>8):(ta(a&255),ta(a>>>8))},V=function(){L=(L<<5^n[q+3-1]&255)&8191;G=W[32768+L];W[q&32767]=G;W[32768+L]=q},ja=function(a,b){$(b[a].fc,b[a].dl)},ya=function(a,b,c){return a[b].fc<a[c].fc||a[b].fc==a[c].fc&&S[b]<=S[c]},Ea=function(a,b,c){var d;for(d=0;d<c&&ia<ma.length;d++)a[b+d]=ma.charCodeAt(ia++)&255;return d},
za=function(a){var b=ca,c=q,d,e=p,g=32506<q?q-32506:0,f=q+258,h=n[c+e-1],l=n[c+e];p>=oa&&(b>>=2);do if(d=a,n[d+e]==l&&n[d+e-1]==h&&n[d]==n[c]&&n[++d]==n[c+1]){c+=2;d++;do;while(n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&n[++c]==n[++d]&&c<f);d=258-(f-c);c=f-258;if(d>e){F=a;e=d;if(258<=d)break;h=n[c+e-1];l=n[c+e]}}while((a=W[a&32767])>g&&0!=--b);return e},Aa=function(){var a,b,c=65536-s-q;if(-1==c)c--;else if(65274<=q){for(a=0;32768>
a;a++)n[a]=n[a+32768];F-=32768;q-=32768;w-=32768;for(a=0;8192>a;a++)b=W[32768+a],W[32768+a]=32768<=b?b-32768:0;for(a=0;32768>a;a++)b=W[a],W[a]=32768<=b?b-32768:0;c+=32768}J||(a=Ea(n,q+s,c),0>=a?J=!0:s+=a)},Fa=function(a,b,c){var f;if(!l){if(!J){D=v=0;var m,N;if(0==g[0].dl){P.dyn_tree=O;P.static_tree=aa;P.extra_bits=va;P.extra_base=257;P.elems=286;P.max_length=15;P.max_code=0;E.dyn_tree=h;E.static_tree=g;E.extra_bits=ra;E.extra_base=0;E.elems=30;E.max_length=15;E.max_code=0;T.dyn_tree=H;T.static_tree=
null;T.extra_bits=Na;T.extra_base=0;T.elems=19;T.max_length=7;for(N=m=T.max_code=0;28>N;N++)for(ka[N]=m,f=0;f<1<<va[N];f++)ea[m++]=N;ea[m-1]=N;for(N=m=0;16>N;N++)for(K[N]=m,f=0;f<1<<ra[N];f++)Y[m++]=N;for(m>>=7;30>N;N++)for(K[N]=m<<7,f=0;f<1<<ra[N]-7;f++)Y[256+m++]=N;for(f=0;15>=f;f++)B[f]=0;for(f=0;143>=f;)aa[f++].dl=8,B[8]++;for(;255>=f;)aa[f++].dl=9,B[9]++;for(;279>=f;)aa[f++].dl=7,B[7]++;for(;287>=f;)aa[f++].dl=8,B[8]++;Ia(aa,287);for(f=0;30>f;f++)g[f].dl=5,g[f].fc=La(f,5);Ha()}for(f=0;8192>f;f++)W[32768+
f]=0;ba=sa[R].max_lazy;oa=sa[R].good_length;ca=sa[R].max_chain;w=q=0;s=Ea(n,0,65536);if(0>=s)J=!0,s=0;else{for(J=!1;262>s&&!J;)Aa();for(f=L=0;2>f;f++)L=(L<<5^n[f]&255)&8191}d=null;r=e=0;3>=R?(p=2,t=0):(t=2,z=0);k=!1}l=!0;if(0==s)return k=!0,0}if((f=Ga(a,b,c))==c)return c;if(k)return f;if(3>=R)for(;0!=s&&null==d;){V();0!=G&&32506>=q-G&&(t=za(G),t>s&&(t=s));if(3<=t)if(N=I(q-F,t-3),s-=t,t<=ba){t--;do q++,V();while(0!=--t);q++}else q+=t,t=0,L=n[q]&255,L=(L<<5^n[q+1]&255)&8191;else N=I(0,n[q]&255),s--,
q++;N&&(xa(0),w=q);for(;262>s&&!J;)Aa()}else for(;0!=s&&null==d;){V();p=t;y=F;t=2;0!=G&&(p<ba&&32506>=q-G)&&(t=za(G),t>s&&(t=s),3==t&&4096<q-F&&t--);if(3<=p&&t<=p){N=I(q-1-y,p-3);s-=p-1;p-=2;do q++,V();while(0!=--p);z=0;t=2;q++;N&&(xa(0),w=q)}else 0!=z?I(0,n[q-1]&255)&&(xa(0),w=q):z=1,q++,s--;for(;262>s&&!J;)Aa()}0==s&&(0!=z&&I(0,n[q-1]&255),xa(1),k=!0);return f+Ga(a,f+b,c-f)},Ga=function(b,f,g){var h,l,k;for(h=0;null!=d&&h<g;){l=g-h;l>d.len&&(l=d.len);for(k=0;k<l;k++)b[f+h+k]=d.ptr[d.off+k];d.off+=
l;d.len-=l;h+=l;0==d.len&&(l=d,d=d.next,l.next=a,a=l)}if(h==g)return h;if(r<e){l=g-h;l>e-r&&(l=e-r);for(k=0;k<l;k++)b[f+h+k]=c[r+k];r+=l;h+=l;e==r&&(e=r=0)}return h},Ha=function(){var a;for(a=0;286>a;a++)O[a].fc=0;for(a=0;30>a;a++)h[a].fc=0;for(a=0;19>a;a++)H[a].fc=0;O[256].fc=1;ga=Z=pa=fa=x=ha=0;la=1},ua=function(a,b){for(var c=A[b],d=b<<1;d<=X;){d<X&&ya(a,A[d+1],A[d])&&d++;if(ya(a,c,A[d]))break;A[b]=A[d];b=d;d<<=1}A[b]=c},Ia=function(a,b){var c=Array(16),d=0,e;for(e=1;15>=e;e++)d=d+B[e-1]<<1,c[e]=
d;for(d=0;d<=b;d++)e=a[d].dl,0!=e&&(a[d].fc=La(c[e]++,e))},Ba=function(a){var b=a.dyn_tree,c=a.static_tree,d=a.elems,e,f=-1,g=d;X=0;da=573;for(e=0;e<d;e++)0!=b[e].fc?(A[++X]=f=e,S[e]=0):b[e].dl=0;for(;2>X;)e=A[++X]=2>f?++f:0,b[e].fc=1,S[e]=0,x--,null!=c&&(ha-=c[e].dl);a.max_code=f;for(e=X>>1;1<=e;e--)ua(b,e);do e=A[1],A[1]=A[X--],ua(b,1),c=A[1],A[--da]=e,A[--da]=c,b[g].fc=b[e].fc+b[c].fc,S[g]=S[e]>S[c]+1?S[e]:S[c]+1,b[e].dl=b[c].dl=g,A[1]=g++,ua(b,1);while(2<=X);A[--da]=A[1];g=a.dyn_tree;e=a.extra_bits;
var d=a.extra_base,c=a.max_code,h=a.max_length,l=a.static_tree,k,m,n,p,q=0;for(m=0;15>=m;m++)B[m]=0;g[A[da]].dl=0;for(a=da+1;573>a;a++)k=A[a],m=g[g[k].dl].dl+1,m>h&&(m=h,q++),g[k].dl=m,k>c||(B[m]++,n=0,k>=d&&(n=e[k-d]),p=g[k].fc,x+=p*(m+n),null!=l&&(ha+=p*(l[k].dl+n)));if(0!=q){do{for(m=h-1;0==B[m];)m--;B[m]--;B[m+1]+=2;B[h]--;q-=2}while(0<q);for(m=h;0!=m;m--)for(k=B[m];0!=k;)e=A[--a],e>c||(g[e].dl!=m&&(x+=(m-g[e].dl)*g[e].fc,g[e].fc=m),k--)}Ia(b,f)},Ja=function(a,b){var c,d=-1,e,f=a[0].dl,g=0,h=
7,l=4;0==f&&(h=138,l=3);a[b+1].dl=65535;for(c=0;c<=b;c++)e=f,f=a[c+1].dl,++g<h&&e==f||(g<l?H[e].fc+=g:0!=e?(e!=d&&H[e].fc++,H[16].fc++):10>=g?H[17].fc++:H[18].fc++,g=0,d=e,0==f?(h=138,l=3):e==f?(h=6,l=3):(h=7,l=4))},Ka=function(a,b){var c,d=-1,e,f=a[0].dl,g=0,h=7,l=4;0==f&&(h=138,l=3);for(c=0;c<=b;c++)if(e=f,f=a[c+1].dl,!(++g<h&&e==f)){if(g<l){do ja(e,H);while(0!=--g)}else 0!=e?(e!=d&&(ja(e,H),g--),ja(16,H),$(g-3,2)):10>=g?(ja(17,H),$(g-3,3)):(ja(18,H),$(g-11,7));g=0;d=e;0==f?(h=138,l=3):e==f?(h=
6,l=3):(h=7,l=4)}},xa=function(a){var b,c,d,e;e=q-w;M[fa]=ga;Ba(P);Ba(E);Ja(O,P.max_code);Ja(h,E.max_code);Ba(T);for(d=18;3<=d&&0==H[C[d]].dl;d--);x+=3*(d+1)+14;b=x+3+7>>3;c=ha+3+7>>3;c<=b&&(b=c);if(e+4<=b&&0<=w)for($(0+a,3),Da(),wa(e),wa(~e),d=0;d<e;d++)ta(n[w+d]);else if(c==b)$(2+a,3),Ca(aa,g);else{$(4+a,3);e=P.max_code+1;b=E.max_code+1;d+=1;$(e-257,5);$(b-1,5);$(d-4,4);for(c=0;c<d;c++)$(H[C[c]].dl,3);Ka(O,e-1);Ka(h,b-1);Ca(O,h)}Ha();0!=a&&Da()},I=function(a,b){Q[Z++]=b;0==a?O[b].fc++:(a--,O[ea[b]+
256+1].fc++,h[(256>a?Y[a]:Y[256+(a>>7)])&255].fc++,u[pa++]=a,ga|=la);la<<=1;0==(Z&7)&&(M[fa++]=ga,ga=0,la=1);if(2<R&&0==(Z&4095)){var c=8*Z,d=q-w,e;for(e=0;30>e;e++)c+=h[e].fc*(5+ra[e]);c>>=3;if(pa<parseInt(Z/2)&&c<parseInt(d/2))return!0}return 8191==Z||8192==pa},Ca=function(a,b){var c,d=0,e=0,f=0,g=0,h,l;if(0!=Z){do 0==(d&7)&&(g=M[f++]),c=Q[d++]&255,0==(g&1)?ja(c,a):(h=ea[c],ja(h+256+1,a),l=va[h],0!=l&&(c-=ka[h],$(c,l)),c=u[e++],h=(256>c?Y[c]:Y[256+(c>>7)])&255,ja(h,b),l=ra[h],0!=l&&(c-=K[h],$(c,
l))),g>>=1;while(d<Z)}ja(256,a)},$=function(a,b){D>16-b?(v|=a<<D,wa(v),v=a>>16-D,D+=b-16):(v|=a<<D,D+=b)},La=function(a,b){var c=0;do c|=a&1,a>>=1,c<<=1;while(0<--b);return c>>1},Da=function(){8<D?wa(v):0<D&&ta(v);D=v=0};return function(e,f){var k,m;ma=e;ia=0;"undefined"==typeof f&&(f=6);(k=f)?1>k?k=1:9<k&&(k=9):k=6;R=k;J=l=!1;if(null==c){a=d=b=null;c=Array(8192);n=Array(65536);u=Array(8192);Q=Array(32832);W=Array(65536);O=Array(573);for(k=0;573>k;k++)O[k]=new na;h=Array(61);for(k=0;61>k;k++)h[k]=
new na;aa=Array(288);for(k=0;288>k;k++)aa[k]=new na;g=Array(30);for(k=0;30>k;k++)g[k]=new na;H=Array(39);for(k=0;39>k;k++)H[k]=new na;P=new qa;E=new qa;T=new qa;B=Array(16);A=Array(573);S=Array(573);ea=Array(256);Y=Array(512);ka=Array(29);K=Array(30);M=Array(1024)}for(var p=Array(1024),q=[];0<(k=Fa(p,0,p.length));){var r=Array(k);for(m=0;m<k;m++)r[m]=String.fromCharCode(p[m]);q[q.length]=r.join("")}ma=null;return q.join("")}(m,f)};Object.freeze&&Object.freeze(window.LiveRail.AdManager.framework.deflate)})();