var EBGInfra=EBGInfra?EBGInfra:{declareNamespace:function(a){for(var b=window.EBG,a=a.split("."),c=0;c<a.length;c++){var d=a[c],e=b[d];e||(e=b[d]={});b=e}},declareClass:function(a,b){a.prototype.constructor=a;if(b)a.__superClass=b,a.__basePrototypePending=!0,EBG._resolveInheritance(a);return a},runTimed:function(a,b,c,d){return setTimeout(function(){b.apply(a,c)},d)},setInterval:function(a,b,c,d){return setInterval(function(){b.apply(a,c)},d)},clearInterval:function(a){clearInterval(a)},sequence:function(){var a=
[],b=function(c){c.count--;if(0<=c.count)return EBG.runTimed(this,b,[c],c.interval),c.tfunc.apply(c.context,c.args);EBG.isFunc(c.callback)&&c.callback.apply(c.cbContext,c.cbArgs);a[c.index]=null};return function(c,d,e,g,f,h,k,l,m,o){if(EBG.isFunc(d)){var p;a:{for(p=0;p<a.length;p++)if(a[p]&&a[p].func==d)break a;p=!1}h=EBG.isNumber(h)?h:f;o=o||{};if(EBG.isFunc(l)&&!EBG.isDefined(o.trailing))o.trailing=!1;c={context:c,func:d,tfunc:!1===p?this.throttle(d,h,o):a[p].tfunc,args:e?e:[],count:g,interval:f,
cbContext:k,callback:l,cbArgs:m?m:[]};d=a.push(c)-1;a[d].index=d;return b(c)}return!1}}(),debounce:function(a,b,c){var d,e,g,f,h,k=function(){var l=(new Date).getTime()-f;l<b&&0<=l?d=setTimeout(k,b-l):(d=null,c||(h=a.apply(g,e),d||(g=e=null)))};return function(){g=this;e=arguments;f=(new Date).getTime();var l=c&&!d;d||(d=setTimeout(k,b));l&&(h=a.apply(g,e),g=e=null);return h}},throttle:function(a,b,c){var d,e,g,f=null,h=0;c||(c={});var k=function(){h=!1===c.leading?0:(new Date).getTime();f=null;g=
a.apply(d,e);f||(d=e=null)};return function(){var l=(new Date).getTime();!h&&!1===c.leading&&(h=l);var m=b-(l-h);d=this;e=arguments;0>=m||m>b?(f&&(clearTimeout(f),f=null),h=l,g=a.apply(d,e),f||(d=e=null)):!f&&!1!==c.trailing&&(f=setTimeout(k,m));return g}},_resolveInheritance:function(a){if(a.__basePrototypePending){var b=a.__superClass;EBG._resolveInheritance(b);var b=b.prototype,c=a.prototype,d;for(d in b)c[d]=c[d]||b[d];delete a.__basePrototypePending}},callSuperConstructor:function(a,b,c){(a=
a.__superClass)&&(c?a.apply(b,c):a.apply(b));return b},callSuperFunction:function(a,b,c,d){if(a=a.__superClass)var e=a.prototype[c];try{if(e)return d?e.apply(b,d):e.apply(b)}catch(g){}},typeOf:function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array||!(a instanceof Object)&&"[object Array]"==Object.prototype.toString.call(a)||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof
Object)&&("[object Function]"==Object.prototype.toString.call(a)||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call")))return"function"}else return"function"==b&&"undefined"==typeof a.call?"object":"null";return b},isFunc:function(a){return"function"==EBG.typeOf(a)},isDefined:function(a){return"undefined"!=EBG.typeOf(a)},notNull:function(a){return null!=a},isDefinedNotNull:function(a){return this.isDefined(a)&&this.notNull(a)},hasValue:function(a){return null!=
a&&"undefined"!=EBG.typeOf(a)},hasOwnValue:function(a,b,c){for(var d in a)if(a.hasOwnProperty(d))if(c&&EBG.isFunc(a[d].toLowerCase)){if(a[d].toLowerCase()===b.toLowerCase())return!0}else if(a[d]===b)return!0;return!1},objMatch:function(a,b){var c=!1;if(a&&!b||!a&&b)return!1;for(var d in a){switch(!0){case !EBG.isDefined(b[d]):c=!1;break;case a[d]===b[d]:case EBG.isElementOrNode(a[d]):c=a[d]===b[d];break;case EBG.isObj(a[d]):case EBG.isArray(a[d]):c=EBG.objMatch(a[d],b[d]);break;default:c=!1}if(!c)return!1}return!0},
getRandomNumber:function(){var a="";try{a=Math.random().toString(),a=a.substr(a.indexOf(".")+1)}catch(b){a=""}return a},isObj:function(a){return"object"==EBG.typeOf(a)},isArray:function(a){return"array"==EBG.typeOf(a)},isBool:function(a){return"boolean"==EBG.typeOf(a)},isNumber:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},isNode:function(a){var b=a&&a.ownerDocument&&(a.ownerDocument.defaultView||a.ownerDocument.parentwindow);return b&&("object"===typeof b.Node||"function"===typeof b.Node)?
a instanceof b.Node:a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName},isElement:function(a){var b=a&&a.ownerDocument&&(a.ownerDocument.defaultView||a.ownerDocument.parentwindow);return b&&("object"===typeof b.HTMLElement||"function"===typeof b.HTMLElement)?a instanceof b.HTMLElement:a&&"object"===typeof a&&null!==a&&1===a.nodeType&&"string"===typeof a.nodeName},isElementOrNode:function(a){return this.isElement(a)||this.isNode(a)},format:function(a){for(var b=1;b<
arguments.length;b++)a=a.replace(RegExp("\\{"+(b-1)+"\\}","gi"),""+arguments[b]);return a},throwEx:function(a){throw{name:"",message:a};},mergeObj:function(a,b,c){var c=!!c,d;for(d in a)if(a.hasOwnProperty(d)&&(!b.hasOwnProperty(d)||c))b[d]=a[d]},cloneObj:function(a,b){if(!EBG.isObj(a))return null;var c={},d;for(d in a)a.hasOwnProperty(d)&&(c[d]=b&&EBG.isElementOrNode(a[d])?a[d]:EBG.isObj(a[d])?EBG.cloneObj(a[d]):a[d]);return c},combinePaths:function(a,b){a=a||"";b=b||"";a&&"/"!=a[a.length-1]&&b&&
"/"!=b[0]&&(a+="/");var c=a;b&&(c+=b);return c},px:function(a){return EBG.format("{0}px",a)},strEQ:function(a,b,c){return a&&b?c?a===b:a.toLowerCase()===b.toLowerCase():!1},indexOfArray:function(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},filterObject:function(a,b,c){if("function"!=typeof b)throw new TypeError;var d={};for(prop in a)if(a.hasOwnProperty(prop)){var e=a[prop];if(b.call(c||window,e,prop,a))d[prop]=e}return d},filterArray:function(a,b,c){var d=a.length>>>0;if("function"!=
typeof b)throw new TypeError;for(var e=[],g=0;g<d;g++)if(g in a){var f=a[g];b.call(c||window,f,g,a)&&e.push(f)}return e},mapArray:function(a,b,c){var d=a.length>>>0;if("function"!=typeof b)throw new TypeError;for(var e=[],g=0;g<d;g++)g in a&&e.push(b.call(c||window,a[g],g,a));return e},isGlobalDef:function(a,b){var c="undefined"!=typeof window[a];b&&c&&(c=eval(a+"=="+b));return c},numberToEnum:function(a,b){var c="",d;for(d in b)if(b.hasOwnProperty(d)&&b[d]===a){c=d;break}return c},getPageUrl:function(a){try{return a&&
a.location&&a.location.href?a.location.href:null}catch(b){return null}},_isXMLHttpRequestSupported:function(){var a=window.XMLHttpRequest?new XMLHttpRequest:null;return a&&EBG.isBool(a.withCredentials)&&!EBG.isMRAID()},htmlDecode:function(a){this.helperDiv=this.helperDiv?this.helperDiv:document.createElement("div");this.helperDiv.innerHTML=a;return this.helperDiv.textContent},htmlEncode:function(a){this.helperDiv=this.helperDiv?this.helperDiv:document.createElement("div");this.helperDiv.textContent=
a;return this.helperDiv.innerHTML},getDataFromRemoteServer:function(a,b,c,d,e){if(!a||EBG.isOfflineDemo)return!1;var d=EBG.isBool(d)?d:!0,e=EBG.isBool(e)?e:!1,g=function(){try{if(e){var a,d;9===document.documentMode?d=(new window.DOMParser).parseFromString(k.responseText,"text/xml"):(a=document.createElement("div"),a.innerHTML="<xml>"+k.responseText+"</xml>",document.body.appendChild(a),d=a.firstChild.XMLDocument,document.body.removeChild(a));b.call(c,d)}else b.call(c,k.responseText)}catch(f){b.call(c)}},
f=!1;try{if(this._isXMLHttpRequestSupported()){var h=new XMLHttpRequest;h.open("GET",a,d);f=!0;if(d)h.onreadystatechange=function(){4==h.readyState&&(200==h.status?b.call(c,e?h.responseXML:h.responseText):b.call(c))};h.send();d||b.call(c,e?h.responseXML:h.responseText)}else if(window.XDomainRequest&&d){var k=new XDomainRequest;if(k)k.onerror=function(){EBG.log.error("XDomain request error");b.call(c)},k.ontimeout=function(){EBG.log.error("XDomain request timeout");b.call(c)},k.onload=g,k.onprogress=
function(){},k.open("get",a),k.send(),f=!0}}catch(l){f=!1}return f},getFeatureFlagValue:function(a,b){if(!EBG.isDefined(a))return!1;if(EBG.isArray(a)){for(var c=0;c<a.length;c++)if(a[c].name==b)return a[c].state;return!1}return!!a[b]},isPercentage:function(a){return"string"==typeof a?/\d+%/.test(a)&&EBG.isNumber(parseInt(a)):!1},getTime:function(){var a=(new Date).getTime()/1E3;return function(){return(new Date).getTime()/1E3-a}}(),getObjKeys:function(a){a=a||{};if(Object.keys)return Object.keys(a);
var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b},serializeObject:function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);return b.join("&")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},getTopAccessibleWindow:function(){var a=window.ebO&&ebO.ffs&&ebO.ffs||window.EB&&EB._adConfig&&EB._adConfig.ffs;if(!a){var b=arguments.callee;return function(){return b()()}}var c=window;if(c.location.ancestorOrigins&&a&&a.CFF_ancestorOrigins){for(var d=window,
e=window,a=c.location.ancestorOrigins,g=!1,f=0;f<a.length;f++){var c=c.parent,h=document.createElement("a");h.href=a[f];h=h.hostname;"null"!==a[f]&&(window.location.origin===a[f]||""===window.location.hostname&&""===h)?(e=c,g||(d=c)):g=!0}return function(a){return("boolean"==typeof a?a:1)?d:e}}try{if(c.top.document.domain||""===c.parent.document.domain)c=c.top;else throw new DOMException;}catch(k){try{for(c=window;c!==c.parent&&c.self!==c.parent;)if(c.parent.document.domain||""===c.parent.document.domain)c=
c.parent}catch(l){}}return function(){return c}}(),getBigScript:function(){var a;if(document.currentScript)a=document.currentScript;else{var b=document.getElementsByTagName("script");a=b[b.length-1]}return function(){return a}}(),valueFromPath:function(a,b,c){for(var b=b.split("."),d=0;d<b.length;d++)a=a[b[d]];return EBG.isObj(a)&&c?EBG.cloneObj(a):a},isMRAID:function(){return window.mraid&&EBG.isFunc(mraid.getVersion)}};EBG=window.EBG||{};EBGInfra.mergeObj(EBGInfra,EBG,!1);EBG.declareNamespace("Logging");
EBG.Logging.LoggerLevels={NONE:0,ERROR:1,INFO:2,WARN:3,DEBUG:4};EBG.Logging.Logger=function(a){this._level=a;this.startNestingGroupNames=[];this.endNestingGroupNames=[];this._stringFilters=[];this._fGroupFilter=!1;this._maxIndent=15};
EBG.Logging.Logger.prototype={setLevel:function(a){this._level=a},setFilter:function(a,b){"string"==EBG.typeOf(a)&&(a=[a]);this._fGroupFilter=EBG.isDefined(b)?b:!0;this._stringFilters=a},debug:function(a){this._reportToLog(EBG.Logging.LoggerLevels.DEBUG,arguments)},info:function(a){this._reportToLog(EBG.Logging.LoggerLevels.INFO,arguments)},warn:function(a){this._reportToLog(EBG.Logging.LoggerLevels.WARN,arguments)},error:function(a){this._reportToLog(EBG.Logging.LoggerLevels.ERROR,arguments)},exception:function(a,
b){var c="string"!==b?EBG.format("Exception in {0}. message: {1}",a,b.message):EBG.format("Exception in: {0}. message: {1}",a,b);b.stack&&(c+=EBG.format(" stack: {0}",b.stack));this._reportToLog(EBG.Logging.LoggerLevels.ERROR,[c])},startGroup:function(a){this._supportNesting()&&this._passesFilter(a)&&this.startNestingGroupNames.push(a)},endGroup:function(){this._supportNesting()&&0<this.endNestingGroupNames.length&&window.console.groupEnd(this.endNestingGroupNames.pop())},_consoleAvailable:function(){return void 0!==
window.console},_supportNesting:function(){return this._consoleAvailable()?void 0!==window.console.group:!1},_supportErrorMessage:function(){return void 0!==window.console.error},_supportInfoMessage:function(){return void 0!==window.console.info||void 0!==window.opera},_supportWarnMessage:function(){return void 0!==window.console.warn||void 0!==window.opera},_supportObjectView:function(){return void 0!==window.console.dir||void 0!==window.opera},_callConsoleFunction:function(a,b){var c=!1;switch(a){case EBG.Logging.LoggerLevels.INFO:this._supportInfoMessage()&&
(window.console.info(b),c=!0);break;case EBG.Logging.LoggerLevels.WARN:this._supportWarnMessage()&&(window.console.warn(b),c=!0);break;case EBG.Logging.LoggerLevels.ERROR:this._supportErrorMessage()&&(consoleFunction=window.console.error(b),c=!0)}c||window.console.log(b)},_resetNesting:function(){for(var a=0;a<=this._maxIndent;a++)this.endGroup();console.warn("Reset log group nesting. MaxIndent = "+this._maxIndent)},_passesFilter:function(a){var b=!1;if(0==this._stringFilters.length)b=!0;else for(var c=
0;c<this._stringFilters.length;c++)if(-1<a.indexOf(this._stringFilters[c])){b=!0;break}return b},_reportToLog:function(a,b){if(this._level>=a&&this._consoleAvailable()){var c=b[0];"[object String]"!==Object.prototype.toString.call(c)?this._supportObjectView()||(c=c.toString()):c=EBG.format.apply(null,b);if(void 0===window.opera){for(;this.startNestingGroupNames.length;)window.console.group(this.startNestingGroupNames[0]),this.endNestingGroupNames.push(this.startNestingGroupNames.shift());(this._passesFilter(c)||
this._fGroupFilter&&0<this.endNestingGroupNames.length)&&this._callConsoleFunction(a,c);this.endNestingGroupNames.length>this._maxIndent&&this._resetNesting()}else this._passesFilter(c)&&opera.postError(c)}}};EBG.declareClass(EBG.Logging.Logger,null);EBG.log=EBG.log||new EBG.Logging.Logger(EBG.Logging.LoggerLevels.DEBUG);EBG.declareNamespace("Reporter");EBG.Reporter.ServerReporter=function(a){this.reportFrequency=a.reportFrequency||0;this.bs=a.bs};
EBG.Reporter.ServerReporter.prototype={bs:null,report:function(a){this._shouldReport()&&this._reportMessage(a)},getCallStack:function(){try{throw Error();}catch(a){return formatCallStack(a.stack)}},_shouldReport:function(){var a=!1;0<this.reportFrequency&&this.reportFrequency/100>Math.random()&&(a=!0);return a},formatCallStack:function(a){if(a){for(var b;b!=a;)b=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");a=a.replace(/\n/g,"")}return a},_reportMessage:function(a){var b=EBG.format("{0}{1}/BurstingPipe/adServer.bs?cn=cLog&ord={2}",
EBG.protocol,this.bs,Math.random()),c;for(c in a)a.hasOwnProperty(c)&&(b+="&"+c+"="+a[c]);EBG.adaptor.reportToRemoteServerUsingImage(b)}};EBG.declareClass(EBG.Reporter.ServerReporter,null);
(function(a,b,c){b||(b={fn:{},extend:function(){for(var a=arguments[0],b=1,c=arguments.length;b<c;b++){var d=arguments[b],k;for(k in d)a[k]=d[k]}return a}});b.fn.pm=function(){return this};b.pm=EBG.pm=function(a){d.send(a)};b.pm.bind=EBG.bind=function(a,b,c,h,k){d.bind(a,b,c,h,k)};b.pm.unbind=EBG.unbind=function(a,b){d.unbind(a,b)};b.pm.dispatch=function(a,b,c,h){d._dispatch({data:JSON.stringify({data:b,type:a}),source:c,target:h,origin:null})};b.pm.origin=EBG.pm.origin=null;var d={send:function(a){var a=
b.extend({},d.defaults,a),c=a.target;if(a.target&&a.type){var f={data:a.data,type:a.type};if(a.success)f.callback=d._callback(a.success);if(a.error)f.errback=d._callback(a.error);"postMessage"in c&&!a.hash&&(d._bind(),c.postMessage(JSON.stringify(f),a.origin||"*"))}},bind:function(c,g,f,h,k,l){"postMessage"in a&&!l&&(d._bind(h),h=d.data("listeners.postmessage"),h||(h={},d.data("listeners.postmessage",h)),l=h[c],l||(l=[],h[c]=l),l.push({fn:g,origin:k||b.pm.origin,bindObj:f}))},unbind:function(a,b){var c=
d.data("listeners.postmessage");if(c&&a)if(b){var h=c[a];if(h){for(var k=[],l=0,m=h.length;l<m;l++){var o=h[l];o.fn!==b&&k.push(o)}c[a]=k}}else delete c[a]},data:function(a,b){return b===c?d._data[a]:d._data[a]=b},_data:{},_CHARS:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),_random:function(){for(var a=[],b=0;32>b;b++)a[b]=d._CHARS[0|32*Math.random()];return a.join("")},_callback:function(a){var b=d.data("callbacks.postmessage");b||(b={},d.data("callbacks.postmessage",
b));var c=d._random();b[c]=a;return c},_bind:function(b){d.data("listening.postmessage")||(b=b?b:a,b.addEventListener?b.addEventListener("message",d._dispatch,!1):a.attachEvent&&b.attachEvent("onmessage",d._dispatch),d.data("listening.postmessage",1))},_dispatch:function(a){var b={};try{b=JSON.parse(a.data)}catch(c){return}if(b.type){var h=(d.data("callbacks.postmessage")||{})[b.type];if(h)h(b.data);else for(var h=(d.data("listeners.postmessage")||{})[b.type]||[],k=0,l=h.length;k<l;k++){var m=h[k];
if(m.origin&&a.origin!==m.origin)b.errback&&d.send({target:a.source,data:{message:"postmessage origin mismatch",origin:[a.origin,m.origin]},type:b.errback});else try{var o;o=m.bindObj?m.fn.apply(m.bindObj,[b.data,a]):m.fn(b.data,a);b.callback&&d.send({target:a.source,data:o,type:b.callback})}catch(p){b.errback&&d.send({target:a.source,data:p,type:b.errback})}}}}};b.extend(d,{defaults:{target:null,url:null,type:null,data:null,success:null,error:null,origin:"*",hash:!1}})})(this,"undefined"===typeof jQuery?
null:jQuery);"JSON"in window&&window.JSON||(JSON={});
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,n,r,s=g,t,q=d[a];q&&"object"===typeof q&&"function"===typeof q.toJSON&&(q=q.toJSON(a));"function"===typeof k&&(q=k.call(d,a,q));switch(typeof q){case "string":return b(q);case "number":return isFinite(q)?""+q:"null";case "boolean":case "null":return""+
q;case "object":if(!q)return"null";g+=f;t=[];if("[object Array]"===Object.prototype.toString.apply(q)){r=q.length;for(e=0;e<r;e+=1)t[e]=c(e,q)||"null";n=0===t.length?"[]":g?"[\n"+g+t.join(",\n"+g)+"\n"+s+"]":"["+t.join(",")+"]";g=s;return n}if(k&&"object"===typeof k){r=k.length;for(e=0;e<r;e+=1)h=k[e],"string"===typeof h&&(n=c(h,q))&&t.push(b(h)+(g?": ":":")+n)}else for(h in q)Object.hasOwnProperty.call(q,h)&&(n=c(h,q))&&t.push(b(h)+(g?": ":":")+n);n=0===t.length?"{}":g?"{\n"+g+t.join(",\n"+g)+"\n"+
s+"}":"{"+t.join(",")+"}";g=s;return n}}if("function"!==typeof Date.prototype.toJSON)Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,f,h={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;if("function"!==typeof JSON.stringify)JSON.stringify=function(a,b,d){var e;f=g="";if("number"===typeof d)for(e=0;e<d;e+=1)f+=" ";else"string"===typeof d&&(f=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",
{"":a})};if("function"!==typeof JSON.parse)JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");}})();EBG.declareNamespace("API");EBG.API.InjectionMethod={APPEND:"append",INSERT_BEFORE:"insertBefore",INSERT_AFTER:"insertAfter",FIRST_CHILD:"firstChild",LAST_CHILD:"lastChild"};EBG.API.BrowserTypes={NON_SUPPORTED:0,IE:1,FF:2,NN:3,SAFARI:4,CHROME:5,AOL:6,OPERA:7,EDGE:8};
EBG.API.PlatformTypes={NON_SUPPORTED:0,WIN_95:1,WIN_98:2,WIN_2000:3,WIN_XP:4,WIN_ME:5,WIN_NT:6,MAC:7,WIN_VISTA:8,WIN_7:9,IPHONE:10,IPAD:11,IPOD:12,ANDROID_2_TAB:13,ANDROID_3_TAB:14,WIN_10:15,ANDROID_5_TAB:16,ANDROID_2_MOBILE:17,ANDROID_3_MOBILE:18,WIN_MOBILE_7:19,ANDROID_4_TAB:20,ANDROID_4_MOBILE:21,WIN_8:22,MAC_NEW:23,MAC_YOSEMITE:24,ANDROID_5_MOBILE:25,CROS:26,FBAN:27,SMART_TV:28,UBUNTU:29,LINUX:30,ANDROID_1:31,ANDROID_6_MOBILE:32,ANDROID_6_TAB:33};
EBG.API.DeviceTypes={DESKTOP:0,MOBILE:1,TABLET:2,UNKNOWN:3};
EBG.API.EventNames={CREATE_AD:"CREATE_AD",CREATE_ADAPTOR:"CREATE_ADAPTOR",CREATE_INT_MGR:"CREATE_INT_MGR",CREATE_ANIM_MGR:"CREATE_ANIM_MGR",CREATE_POSITIONING_HELPER:"CREATE_POSITIONING_HELPER",CREATE_GEOMETRY_HELPER:"CREATE_GEOMETRY_HELPER",SHOW_AD:"SHOW_AD",ADD_CREATIVES:"ADD_CREATIVES",ADD_INTERACTION:"ADD_INTERACTION",ADD_EYE_DIV:"ADD_EYE_DIV",ADD_HTML5_MAIN_CREATIVE:"ADD_HTML5_MAIN_CREATIVE",ADD_HTML5_PANEL_CREATIVE:"ADD_HTML5_PANEL_CREATIVE",ADD_EMPTY_BANNER_CREATIVE:"ADD_EMPTY_BANNER_CREATIVE",
ADD_BANNER_IMAGE_CREATIVE:"ADD_BANNER_IMAGE_CREATIVE",ADD_BANNER_DEFAULT_IMAGE_CREATIVE:"ADD_BANNER_DEFAULT_IMAGE_CREATIVE",ADD_BANNER_PRELOAD_IMAGE_CREATIVE:"ADD_BANNER_PRELOAD_IMAGE_CREATIVE",ADD_BANNER_DEFAULT_FLASH_CREATIVE:"ADD_BANNER_DEFAULT_FLASH_CREATIVE",ADD_BANNER_RICH_FLASH_CREATIVE:"ADD_BANNER_RICH_FLASH_CREATIVE",ADD_FLOATING_INTRO_CREATIVE:"ADD_FLOATING_INTRO_CREATIVE",ADD_FLOATING_REMINDER_CREATIVE:"ADD_FLOATING_REMINDER_CREATIVE",ADD_FLOATING_MINISITE_CREATIVE:"ADD_FLOATING_MINISITE_CREATIVE",
ADD_PANEL_RICH_FLASH_CREATIVE:"ADD_PANEL_RICH_FLASH_CREATIVE",SHOW_BANNER_RICH_FLASH_CREATIVE:"SHOW_BANNER_RICH_FLASH_CREATIVE",SHOW_PANEL_RICH_FLASH_CREATIVE:"SHOW_PANEL_RICH_FLASH_CREATIVE",SHOW_PANEL_CREATIVE:"SHOW_PANEL_CREATIVE",SHOW_REMINDER:"SHOW_REMINDER",SHOW_MINISITE:"SHOW_MINISITE",PAGE_LOAD:"PAGE_LOAD",COLLECT_TIMERS:"COLLECT_TIMERS",PAGE_UNLOAD:"PAGE_UNLOAD",AD_UNLOAD:"AD_UNLOAD",PAGE_BEFORE_UNLOAD:"PAGE_BEFORE_UNLOAD",PAGE_HIDE:"PAGE_HIDE",PAGE_RESIZE:"PAGE_RESIZE",PAGE_SCROLL:"PAGE_SCROLL",
PAGE_FOCUS:"PAGE_FOCUS",PAGE_FOCUSIN:"PAGE_FOCUSIN",PAGE_FOCUSOUT:"PAGE_FOCUSOUT",PAGE_BLUR:"PAGE_BLUR",PAGE_HIDDEN:"PAGE_HIDDEN",PAGE_VISIBLE:"PAGE_VISIBLE",INTERACTION_REPORT_REMOTE_SERVERS:"INTERACTION_REPORT_REMOTE_SERVERS",START_TIMER:"START_TIMER",STOP_TIMER:"STOP_TIMER",UPDATE_TIMER:"UPDATE_TIMER",HANDLE_COUNTER_INTERACTION:"HANDLE_COUNTER_INTERACTION",HANDLE_TIMER_INTERACTION:"HANDLE_TIMER_INTERACTION",DEFAULT_CLICK:"DEFAULT_CLICK",EXPAND:"EXPAND",COLLAPSE:"COLLAPSE",USER_INTERACTION:"USER_INTERACTION",
MOUSE_OVER:"MOUSE_OVER",MOUSE_OUT:"MOUSE_OUT",MOUSE_MOVE:"MOUSE_MOVE",MODULE_LOAD:"MODULE_LOAD",USER_INITIATED_VIDEO:"USER_INITIATED_VIDEO",DWELL_UNIQUE:"DWELL_UNIQUE",DWELL_VIDEO_START:"DWELL_VIDEO_START",DWELL_VIDEO_STOP:"DWELL_VIDEO_STOP",CREATIVE_CONTAINER_READY:"CREATIVE_CONTAINER_READY",RICH_FLASH_PLAYED:"RICH_FLASH_PLAYED",REPLAY_AD:"REPLAY_AD",BANDWITH_DETECTED:"BANDWITH_DETECTED",FULL_SCREEN_START:"FULL_SCREEN_START",FULL_SCREEN_END:"FULL_SCREEN_STOP",ANIMATE_PANEL:"ANIMATE_PANEL",CLOSE_AD:"CLOSE_AD",
OPEN_PAGE:"OPEN_PAGE",MAX_AD_DURATION:"MAX_AD_DURATION",FLASH_IN_FRAME_TWO:"FLASH_IN_FRAME_TWO",SHOW_HIDE_ELEMENTS:"SHOW_HIDE_ELEMENTS",DEFAULT_IMPRESSION:"DEFAULT_IMPRESSION",AIE_LOADED:"AIE_LOADED",INIT_MANAGERS:"INIT_MANAGERS",MOUSE_MOVE_NEEDED:"MOUSE_MOVE_NEEDED",VISIBILITY_CHECK:"VISIBILITY_CHECK",VISIBILITY_HIDDEN:"VISIBILITY_HIDDEN",VISIBILITY_MILESTONE:"VISIBILITY_MILESTONE",AD_START:"AD_START",ELEMENT_LOADED:"ELEMENT_LOADED",AD_STACKING:"AD_STACKING",SCREEN_ORIENTATION:"SCREEN_ORIENTATION",
PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE",CHANGE_PANEL_POSITION:"CHANGE_PANEL_POSITION",PANEL_FREQUENCY_LOADED:"PANEL_FREQUENCY_LOADED",THROTTLED:"THROTTLED",FLASH_DETECTED:"FLASH_DETECTED",ANIMATION:"ANIMATION",RESIZE_PANEL:"RESIZE_PANEL",MESSAGE_CREATIVE:"MESSAGE_CREATIVE"};EBG.API.EbEventNames={PAGE_LOAD:EBG.API.EventNames.PAGE_LOAD,SCREEN_ORIENTATION:EBG.API.EventNames.SCREEN_ORIENTATION,VISIBILITY:EBG.API.EventNames.VISIBILITY_CHECK,EXPAND:EBG.API.EventNames.EXPAND,COLLAPSE:EBG.API.EventNames.COLLAPSE};
EBG.VideoInteraction={STARTED:"ebVideoStarted",PERCENT_25_PLAYED:"eb25Per_Played",PERCENT_50_PLAYED:"eb50Per_Played",PERCENT_75_PLAYED:"eb75Per_Played",FULLPLAY:"ebVideoFullPlay",MUTE:"ebVideoMute",UNMUTE:"ebVideoUnmute",PAUSE:"ebVideoPause",REPLAY:"ebVideoReplay",UNMUTED:"ebVideoUnmuted",FULLSCREEN_START:"ebFSStart",FULLSCREEN_END:"ebFSEnd",FULLSCREEN_MUTE:"ebFSVideoMute",FULLSCREEN_PAUSE:"ebFSVideoPause",SLIDER_DRAGGED:"ebSliderDragged",VIDEO_PLAY_DURATION:"ebVideoPlayDuration",VIDEO_ASSET_DURATION:"ebVideoAssetDuration",
FULLSCREEN_DURATION:"ebFSVideoPlayDuration",FULLSCREEN_ASSET_DURATION:"ebFSVideoAssetDuration",USER_INITIATED_VIDEO:"ebUserInitiatedVideo"};EBG.VideoQuartiles=[EBG.VideoInteraction.STARTED,EBG.VideoInteraction.PERCENT_25_PLAYED,EBG.VideoInteraction.PERCENT_50_PLAYED,EBG.VideoInteraction.PERCENT_75_PLAYED,EBG.VideoInteraction.FULLPLAY];
EBG.EBMessage={REQ_INIT:"reqInit",INIT:"ebInit",INITDONE:"ebInitDone",GET_ENVIROMENT:"ebGetEnvironment",SHOW_DEFAULT_IMAGE:"ebShowDefaultImage",CLICKTHROUGH:"ebclickthrough",NOTIFIED_INTERACTION:"ebNotifiedInteraction",VERSION_TRACKING_IMPRESSION:"ebversiontrackingimpression",USER_ACTION_COUNTER:"ebCIUserActionCounter",AUTOMATIC_EVENT_COUNTER:"ebCIAutomaticEventCounter",START_TIMER:"ebCIStartTimer",UPDATE_TIMER:"ebUpdateTimer",STOP_TIMER:"ebCIStopTimer",START_VIDEO_TIMER:"ebStartVideoTimer",STOP_VIDEO_TIMER:"ebendvideotimer",
VIDEO_INTERACTION:"ebVideoInteraction",VIDEO_LOAD:"ebVideoLoad",INIT_VIDEO_LOADER:"ebInitVideoLoader",VIDEO_FS_OPEN:"ebVideoFSOpen",VIDEO_FS_CLOSE:"ebVideoFSClose",VIDEO_FS_AUTO_CLOSE:"ebVideoFSAutoClose",START_VIDEO:"ebtStartVideo",STOP_VIDEO:"ebtStoptVideo",UPDATE_VIDEO_DURATION:"ebtUpdateVideoDuration",FULL_SCREEN_OPEN:"ebFullScreenOpen",FULL_SCREEN_CLOSE:"ebFullScreenClose",FULL_SCREEN_AUTO_CLOSE:"ebFullScreenAutoClose",MOUSE_MOVE:"ebMouseMove",PAGE_LOAD:"ebPageLoad",TRIGGER_AD_START:"ebTriggerAdStart",
INIT_EXPANSION_PARAMS:"ebInitExpansionParams",RESET_COLLAPSE_TIMER:"ebResetCollapseTimer",NEW_SE:"ebNewSE",EXPAND:"ebExpandPanel",EXPAND_DONE:"ebExpandDone",COLLAPSE:"ebCollapsePanel",COLLAPSE_DONE:"ebCollapseDone",NOTIFY_INTERACTION_MONITOR:"NotifyInteractionMonitor",HIDE_INTRO:"ebHideIntro",INTRO_FULL_PLAY:"ebIntroFullPlay",KEEP_AD_OPREN:"ebKeepAdOpen",GO_TO_MINISITE:"ebGoToMiniSite",UPDATE_CLICK:"ebUpdateClick",DOCUMENT_LOADED:"ebDocumentLoaded",PLAY_VIDEO_ON_NATIVE_PLAYER:"playVideoOnNativePlayer",
CREATE_CALENDAR_EVENT:"createCalendarEvent",STORE_PICTURE:"storePicture",SDK_DATA_CHANGE:"sdkDataChange",SDK_EVENT:"sdkEvent",ADAPTOR_READY:"adaptorReady",SWIPE:"ebSwipe",DISPOSE:"ebDispose",SET_RESIZE_PROPS:"ebResizeProperties",RESIZE:"ebResize",SET_EXPAND_PROPS:"ebExpandProperties",SET_ORIENTATION_PROPS:"ebOrientationProperties",CLOSE:"ebClose",CLOSE_AD:"ebclosead",SET_STATE:"ebSetstate",RESET_STATE:"ebResetstate",REQ_MOUSE_MOVE:"ebReqMouseMove",ANIMATION:"ebAnimation",VISIBILITY:"ebVisibility",
PANEL_FREQUENCY:"ebPanelFrequency",HIDE_ELEMENT:"ebHideElement",SHOW_ELEMENT:"ebShowElement",ACKNOWLEDGE:"ebAcknowledge",ALLOW_INTERACTION_REPORTING:"ebAllowInteractionreporting"};EBG.DurationInteraction={TIMER:"Timer",AGGREGATE:"Aggregate"};
EBG.Animation={Easing:{linear:"linear",easeInQuad:"easeInQuad",easeOutQuad:"easeOutQuad",easeInOutQuad:"easeInOutQuad",easeInCubic:"easeInCubic",easeOutCubic:"easeOutCubic",easeInOutCubic:"easeInOutCubic",easeInQuart:"easeInQuart",easeOutQuart:"easeOutQuart",easeInOutQuart:"easeInOutQuart",easeInQuint:"easeInQuint",easeOutQuint:"easeOutQuint",easeInOutQuint:"easeInOutQuint"},TransitionEasing:{ease:"ease",linear:"linear",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out"}};
EBG.INNERIFRAMEMessage={LOADED:"ebInnerIframeLoaded",INIT:"ebInitInnerIframe",VERIFY:"ebVerifyInnerIframe",EBO:"ebO",GLOBALPARAMS:"ebGlobalParams",CONTINUE_SENDING:"ContinueSending",NOT_LASTMSG:"NotLastMsg",LASTMSG:"LastMsg",ADCONFIG_REQUEST:"AdConfig_Request",SECRET_TAGS:"Secret_Tags"};
EBG.FS={EB_VERSION_TRACKING_IMPRESSION:"ebversiontrackingimpression",EB_CLICKTHROUGH:"ebclickthrough",EB_CREATIVE_EVENT_SUBSCRIPTION:"ebcreativeaddhdr",EB_CI_USER_ACTION_COUNTER:"ebciuseractioncounter",EB_CI_AUTOMATIC_EVENT_COUNTER:"ebciautomaticeventcounter",EB_VIDEO_INTERACTION:"ebvideointeraction",EB_START_TIMER:"ebstarttimer",EB_END_TIMER:"ebendtimer",EB_CI_START_TIMER:"ebcistarttimer",EB_CI_STOP_TIMER:"ebcistoptimer",EB_UPDATE_TIMER:"ebupdatetimer",EB_START_VIDEO_TIMER:"ebstartvideotimer",EB_STOP_VIDEO_TIMER:"ebendvideotimer",
EB_PAGE_LOAD:"ebpageload",EB_COMMAND:"ebcommand",EB_MSG:"ebmsg",EB_EXPAND_PANEL:"ebexpandpanel",EB_COLLAPSE_PANEL:"ebcollapsepanel",EB_SET_STATE:"ebsetstate",EB_RESET_STATE:"ebresetstate",EB_MOUSE_TRACKER:"ebmousetracker",EB_MOUSE_MOVE:"ebmousemove",EB_TEST_DC:"ebtestdc",EB_CLOSE_AD:"ebclosead",EB_REPLAY_AD:"ebreplayad",EB_REPLAY_EXP:"ebreplayexp",EB_LOAD_RICH_BANNER:"ebloadrichbanner",EB_SHOW_RICH_BANNER:"ebshowrichbanner",EB_INIT_VIDEO_LOADER:"ebinitvideoloader",EB_HIDE_INTRO:"ebhideintro",EB_INTRO_FULL_PLAY:"ebintrofullplay",
EB_KEEP_AD_OPREN:"ebkeepadopen",EB_GO_TO_MINISITE:"ebgotominisite",EB_VIDEO_LOAD:"ebvideoload",EB_VIDEO_LOAD_AND_PLAY:"ebvideoloadandplay",EB_FULL_SCREEN_OPEN:"ebfullscreenopen",EB_FULL_SCREEN_CLOSE:"ebfullscreenclose",EB_FULL_SCREEN_AUTO_CLOSE:"ebfullscreenautoclose",EB_VIDEO_FS_OPEN:"ebvideofsopen",EB_VIDEO_FS_CLOSE:"ebvideofsclose",EB_VIDEO_FS_AUTO_CLOSE:"ebvideofsautoclose",EB_START_VIDEO:"ebtstartvideo",EB_STOP_VIDEO:"ebtstopvideo",EB_UPDATE_VIDEO_DURATION:"ebtupdatevideoduration",EB_GET_JS_VAR:"ebgetjsvar",
EB_GET_ALL_JS_VARS:"ebgetalljsvars",EB_SET_JS_VAR:"ebsetjsvar",EB_INIT_SE:"ebinitse",EB_SET_SE_PROXY:"ebsetseproxy",EB_SE_EXPAND_STARTED:"ebseexpandstarted",EB_SE_RETRACT_STARTED:"ebseretractstarted",EB_SE_RETRACT_FINISHED:"ebseretractfinished",EB_NOTIFICATION:"notification",EB_VIDEO_ACTIVE_MODE:"ebvideoactivemode"};EBG.ActionType={USER:"user",AUTO:"auto"};EBG.ExpBaseInteractions={PANELS_VIEWED:"ebPanelsViewed",AUTO_SHOW:"autoshow",DURATION:"duration"};EBG.SingleExpInteractions=EBG.ExpBaseInteractions;
EBG.orientation={Both:"BOTH",Landscape:"LANDSCAPE",Portrait:"PORTAIT"};
EBG.adTypes={RichBannerHtml5:"Html5Banner",PoliteBannerHtml5:"Html5PoliteBanner",SEBannerHtml5:"Html5SEBanner",ExpBannerHtml5:"Html5ExpBanner",DynamicExpBannerHtml5:"Html5DynamicExpBanner",StdBanner:"StdBanner",Banner:"Banner",SingleExpBanner:"SingleExpBanner",ExpBanner:"ExpBanner",VisibilityAd:"Visibility",FloatingAd:"FloatingAd",FloatingAdWithRem:"FloatingAdWithReminder",TrackingAd:"Tracking",StdBannerHtml5:"Html5StdBanner",WallpaperAd:"WallpaperAd",Image:"Image"};
EBG.adParts={BANNER:"banner",PANEL:"panel",DEFAULTBANNER:"defaultBanner",RICHBANNER:"richBanner"};EBG.WindowTarget={BLANK:"_blank",SELF:"_self",PARENT:"_parent",TOP:"_top"};
EBG.Const={OUTER_DIV:"eyeDiv",DATACAPTURE:"/BurstingPipe/BurstingDataCapturePipe.asp",AKAMAIFCS_PLUID_9:"rtmp://flv.stream.atwola.com/flash/flv/mm",AKAMAIFCS_PLUID_43:"rtmp://eyeblaster.fcod.msecnd.net/vod/a10061/e1",AKAMAIFCS_PLUID_42_45:"rtmp://cp57388.edgefcs.net/ondemand",AKAMAI_DEFAULT:"rtmp://cp16207.edgefcs.net/ondemand",SHOW_HIDE_FLAG:"data-ebhidingoverlappingelement",SHOW_HIDE_BACKUP:"data-ebvisibilitybackup"};
EBG.PanelPositionType={PAGE_RELATIVE_PERCENTAGE:0,BANNER_RELATIVE_PIXELS:1,PAGE_RELATIVE_PIXELS:2,VIEWPORT_RELATIVE_PERCENTAGE:3,VIEWPORT_RELATIVE_PIXELS:4};EBG.PanelCorner={TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_LEFT:3,BOTTOM_RIGHT:4};EBG.AnimationType={NONE:"none",LINEAR:"linear",EASE_OUT:"easeout",EASE_OUT_SNAP:"easeoutsnap"};EBG.ExpandCollapseMethod={CLIP:"clip",RESIZE:"resize"};
EBG.AnimationDefaults={easeOutCoefficient:0.1,stepTime:10,linearSteps:50,snapThreshold:10,animationType:EBG.AnimationType.NONE,snap:!1,checkShowHideOnEachStep:!1,hideAssetAfterExpand:!1,removeAssetAfterExpand:!1,hideAssetAfterCollapse:!0,removeAssetAfterCollapse:!0,method:EBG.ExpandCollapseMethod.ExpBanner,endAnimationHideAsset:!1,endAnimationRemoveAsset:!1};
EBG.AnimationPushDownDefaults={easeOutCoefficient:0.1,stepTime:50,linearSteps:20,snapThreshold:10,animationType:EBG.AnimationType.LINEAR,snap:!1,method:EBG.ExpandCollapseMethod.RESIZE,checkShowHideOnEachStep:!1,hideAssetAfterExpand:!1,removeAssetAfterExpand:!1,hideAssetAfterCollapse:!0,removeAssetAfterCollapse:!0,method:EBG.ExpandCollapseMethod.ExpBanner,endAnimationHideAsset:!1,endAnimationRemoveAsset:!1};
EBG.AnimProps={easeOutCoefficient:"easeOutCoefficient",snapThreshold:"snapThreshold",method:"method",endAnimationHideAsset:"endAnimationHideAsset",endAnimationRemoveAsset:"endAnimationRemoveAsset"};EBG.AnimDefaultProps={stepTime:"stepTime",linearSteps:"linearSteps",animationType:"animationType"};EBG.AnimNonDefaultPanelValues={animationType:EBG.AnimationType.NONE,stepTime:0,linearSteps:1};EBG.AnimExpansionProps={hideAssetAfterExpand:"hideAssetAfterExpand",removeAssetAfterExpand:"removeAssetAfterExpand"};
EBG.AnimCollapseProps={hideAssetAfterCollapse:"hideAssetAfterCollapse",removeAssetAfterCollapse:"removeAssetAfterCollapse"};EBG.ProtectedElementIds=["ebAd","eyeDiv","ebDefault","ebRich","ebDiv"];EBG.VisibilityMode={DEFAULT_MODE:"defaultMode",BASIC_MODE:"basicMode",ENHANCED_MODE:"enhancedMode"};EBG.AcCertProgram={IAB_EU:0,NAI_US:1};EBG.AcIconPosition={TopRight:0,TopLeft:1,BottomRight:2,BottomLeft:3};EBG.PreloadType={DefaultImg:0,PreloadImg:1,DefaultFlash:2};
EBG.ThrottleStates={LOAD:"load",THROTTLE:"throttle",RESUME:"resume",PAUSE:"pause",POLLED:"polled"};EBG.WebEnvironment={BROWSER:0,ANDROID_MOBILE_BROWESR:1,ANDROID_WEB_VIEW:2,IOS_MOBILE_BROWSER:3,IOS_WEB_VIEW:4,OTHER_MOBILE_BROWSER:5,OTHER_WEB_VIEW:6,ANDROID_UNKNOWN:97,IOS_UNKNOWN:98,UNKNOWN:99};EBG.SDK_STATES=EBG.SDK_STATES||{};EBG.SDK_STATES.API={DEFAULT:"SDKdefault",EXPANDED:"SDKexpanded",LOADING:"SDKloading",RESIZED:"SDKresized"};EBG.SDK_EVENTS=EBG.SDK_EVENTS||{};
EBG.SDK_EVENTS.API={STATE_CHANGE:"SDKstateChange",ERROR:"SDKerror",READY:"SDKready",VIEWABLE_CHANGE:"SDKviewableChange",SIZE_CHANGE:"SDKsizeChange",RESIZE_PROPS_CHANGE:"SDKresizePropsChange",EXPAND_PROPS_CHANGE:"SDKexpandPropsChange",WINDOW_SIZE_CHANGE:"windowSizeChange"};EBG.declareNamespace("Events");EBG.Events.EventTiming={BEFORE:"BEFORE",ONTIME:"ONTIME",AFTER:"AFTER",ONTIME_AND_AFTER:"ONTIME_AND_AFTER"};EBG.Events.EventNames=EBG.API.EventNames;EBG.Events.EbEventNames=EBG.API.EbEventNames;
EBG.Events.EventSubscription=function(a,b,c){this.eventName=a;this.callback=b;this.callbackBinding=c?c:null};
EBG.Events.EventSubscription.prototype={dispatcherFilters:null,timing:EBG.Events.EventTiming.ONTIME,isElementEvent:!1,elementId:"",isDocumentEvent:!1,isValid:function(){return EBG.isFunc(this.callback)&&(!this.callbackBinding||EBG.isObj(this.callbackBinding))},toString:function(){return EBG.format("EventSubscription: eventName={0}, timing={1}, callback={2}, callbackBinding={3}, dispatcherFilters={4}",this.eventName,this.timing,EBG.typeOf(this.callback),EBG.typeOf(this.callbackBinding),EBG.typeOf(this.dispatcherFilters))}};
EBG.declareClass(EBG.Events.EventSubscription,null);EBG.Events.Event=function(a){this.name=a;this.creationTime=+new Date};EBG.Events.Event.prototype={dispatcher:null,eventData:null,timing:null,toString:function(){return EBG.format("Event: name={0}, creationTime={1}, dispatcher={2}, eventData={3}",this.name,this.creationTime,EBG.typeOf(this.dispatcher),EBG.typeOf(this.eventData))}};EBG.declareClass(EBG.Events.Event,null);
EBG.Events.EventManager=function(){this._subscriptions={};this._dispatchedEvents={};this._trackedEvents[EBG.Events.EventNames.ADD_CREATIVES]=!0};
EBG.Events.EventManager.prototype={_subscriptions:{},_dispatchedEvents:{},_trackedEvents:{},subscribeToEvent:function(a){if(a.isValid())if(a.isElementEvent)EBG.adaptor&&EBG.adaptor.subscribeToEventOnElement(a.eventName,a.elementId,a.callback);else{var b=this._subscriptions[a.eventName]=this._subscriptions[a.eventName]||{},c;for(c in EBG.Events.EventTiming)EBG.Events.EventTiming.hasOwnProperty(c)&&(b[c]=b[c]||[]);-1==this._getSubscriptionId(a,b[a.timing])&&(b[a.timing].push(a),EBG.adaptor&&EBG.adaptor.hasEvent(a.eventName)&&
EBG.adaptor.subscribeToEvent(a.eventName,a.isDocumentEvent))}},unsubscribeFromEvent:function(a){if(a&&a.isValid())if(a.isElementEvent)EBG.adaptor&&EBG.adaptor.unsubscribeFromEventOnElement(a.eventName,a.elementId,a.callback);else if(this._subscriptions[a.eventName]&&this._subscriptions[a.eventName][a.timing]){var b=this._subscriptions[a.eventName][a.timing],a=this._getSubscriptionId(a,b);-1!=a&&(b[a]=null)}},dispatchEvent:function(a){var b=!1;switch(a.timing){case EBG.Events.EventTiming.BEFORE:case EBG.Events.EventTiming.ONTIME:case EBG.Events.EventTiming.AFTER:b=
this._dispatchEventByTiming(a,a.timing);break;case EBG.Events.EventTiming.ONTIME_AND_AFTER:b=(b=this._dispatchEventByTiming(a,EBG.Events.EventTiming.ONTIME))||this._dispatchEventByTiming(a,EBG.Events.EventTiming.AFTER);break;default:b=(b=(b=this._dispatchEventByTiming(a,EBG.Events.EventTiming.BEFORE))||this._dispatchEventByTiming(a,EBG.Events.EventTiming.ONTIME))||this._dispatchEventByTiming(a,EBG.Events.EventTiming.AFTER)}return b},attachToAdaptor:function(){EBG.adaptor.setListener(this.dispatchEvent,
this)},_trackEvent:function(a){a&&this._trackedEvents[a.name]&&(this._dispatchedEvents[a.name]||(this._dispatchedEvents[a.name]={}),this._dispatchedEvents[a.name][a.timing]||(this._dispatchedEvents[a.name][a.timing]=[]),10>this._dispatchedEvents[a.name][a.timing].length&&this._dispatchedEvents[a.name][a.timing].push(a))},getDispatchedEvents:function(a){return this._dispatchedEvents[a.name]?this._dispatchedEvents[a.name][a.eventTiming]:null},_dispatchEventByTiming:function(a,b){this._trackEvent(a);
var c=this._subscriptions[a.name];if(!c)return!1;for(var c=c[b],d=!1,e=0;e<c.length;e++){var g=c[e];if(g&&(g=this._dispatchEventToSubscription(a,g),EBG.isBool(g)&&!g)){d=!0;break}}return d},_dispatchEventToSubscription:function(a,b){var c=b.dispatcherFilters;if(EBG.isObj(c))for(var d in c)if(c.hasOwnProperty(d)){var e=c[d],g=!0,f=d.split("."),h=a.dispatcher;if(h)for(var k=0;k<f.length;k++){var h=h[f[k]],l=k==f.length-1;if(!h||l&&h!==e){g=!1;break}}if(!g)return null}c=null;d=b.callback;if(EBG.isFunc(d)){e=
[a];try{c=d.apply(b.callbackBinding,e)}catch(m){}}return c},_getSubscriptionId:function(a,b){for(var c=0;c<b.length;c++)if(b[c]&&b[c].callback===a.callback&&b[c].callbackBinding===a.callbackBinding&&b[c].isDocumentEvent===a.isDocumentEvent&&this._compareFilters(b[c].dispatcherFilters,a.dispatcherFilters))return c;return-1},_compareFilters:function(a,b){if(!EBG.isObj(a))return EBG.isObj(b)?!1:!0;if(!EBG.isObj(b))return!1;for(var c in a)if(a.hasOwnProperty(c))if(b.hasOwnProperty(c)){if(a[c]!==b[c])return!1}else return!1;
for(c in b)if(b.hasOwnProperty(c)&&!a.hasOwnProperty(c))return!1;return!0}};EBG.declareClass(EBG.Events.EventManager,null);EBG.eventMgr=EBG.eventMgr||new EBG.Events.EventManager;EBG.declareNamespace("Adaptors");EBG.Adaptors.TagNames={DIV:"div",IFRAME:"iframe",IMG:"img",SCRIPT:"script",OBJECT:"object",EMBED:"embed",SPAN:"span",A:"a",BODY:"body"};EBG.Adaptors.InjectionMethod=EBG.API.InjectionMethod;EBG.Adaptors.WindowProp={top:"top",left:"left",location:"location",menubar:"menubar",width:"width",height:"height"};
EBG.Adaptors.MoreSupportedEvent={visibilitychange:1,mozvisibilitychange:1,msvisibilitychange:1,webkitvisibilitychange:1};EBG.Adaptors.StdWebAdaptor=function(){this._setEvents()};
EBG.Adaptors.StdWebAdaptor._walkUpIframes=function(a,b,c,d){var c=c||window,e=c.location.origin||c.location.protocol+"//"+c.location.host,g=c,f=!1,h="",d=!!d;try{if(c.location.ancestorOrigins){a&&a.call(g);for(h=0;h<c.location.ancestorOrigins.length;h++){0==h&&"null"==e&&(e=c.location.ancestorOrigins[0]);g=g.parent;f=!1;if(c.location.ancestorOrigins[h]==e)try{f=!0}catch(k){f=!1}if(f)a&&a.call(g);else{try{b&&b.call(g)}catch(l){}if(!d)break}}}else for(a&&a.call(g);g!==g.parent;){g=g.parent;h=null;try{if(h=
g.location.origin||g.location.protocol+"//"+g.location.host,"null"==e||"about://"==e)e=h}catch(m){}if(h===e)a&&a.call(g);else{try{b&&b.call(g)}catch(o){}if(!d)break}}}catch(p){}};EBG.Adaptors.StdWebAdaptor._getTopAccessibleWindow=function(a){var b=window;EBG.Adaptors.StdWebAdaptor._walkUpIframes(function(){b=this},null,window,!("boolean"==typeof a?a:1));return b};EBG.Adaptors.StdWebAdaptor.onEnvEvent=function(){EBG.adaptor._handleEvent.apply(EBG.adaptor,arguments)};
EBG.Adaptors.StdWebAdaptor.prototype={_environmentEvents:{},_logicalEvents:{},_subscribedEvents:{},_subscribedEventsOnElement:[],_listener:null,_listenerBinding:null,_loadedModules:{},walkUpIframes:EBG.Adaptors.StdWebAdaptor._walkUpIframes,getTopAccessibleWindow:EBG.Adaptors.StdWebAdaptor._getTopAccessibleWindow,initInnerModules:function(a,b,c,d,e){if(!this.browser)this.browser=new EBG.Adaptors.Browser(a,b,c,d,e);if(!this.flash)this.flash=EBG.Adaptors.FlashDetector?new EBG.Adaptors.FlashDetector:
null},registerSpecialBrowserEvents:function(){},loadModule:function(a,b,c,d){if(!a||!b||!b.modulesDir)return!1;var e=this,b=0==a.indexOf("http")?a:b.modulesDir+a+".js",a=a.toLowerCase(),g=new EBG.Events.Event(EBG.Events.EventNames.MODULE_LOAD);g.dispatcher=this;g.eventData={name:a};g.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(g)){if(this._loadedModules[a])c&&this._loadedModules[a].callback.push({func:c,binding:d||window});else{this._loadedModules[a]={loading:!0,loaded:!1,
scriptWin:window,callback:c?[{func:c,binding:d||window}]:[]};var f=document.createElement("script");f.type="text/javascript";f.async=!0;f.readyState?f.onreadystatechange=function(){if("loaded"===f.readyState||"complete"===f.readyState)f.onreadystatechange=null,e._handleModuleLoaded(a)}:f.onload=function(){e._handleModuleLoaded(a)};f.src=b;(EBG.getBigScript().parentElement||document.getElementsByTagName("html")[0]).appendChild(f);EBG.scripts=EBG.scripts||[];EBG.scripts.push(f)}this._loadedModules[a].loaded&&
EBG.runTimed(this,function(){this._handleModuleLoaded(a)},[],0)}},_handleModuleLoaded:function(a){var b=this._loadedModules[a];b.loading=!1;b.loaded=!0;var c=new EBG.Events.Event(EBG.Events.EventNames.MODULE_LOAD);c.dispatcher=this;c.eventData={name:a};c.timing=EBG.Events.EventTiming.ONTIME;if(!EBG.eventMgr.dispatchEvent(c)){for(var a=b.callback.length,d=0;d<a;d++){var e=b.callback.shift();e.func.apply(e.binding,[b.scriptWin])}c.timing=EBG.Events.EventTiming.AFTER;EBG.eventMgr.dispatchEvent(c)}},
copy:function(a){for(var b in this._subscribedEvents)this._subscribedEvents.hasOwnProperty(b)&&(this._removeEventListener(window,this._environmentEvents[b].name,EBG.Adaptors.StdWebAdaptor.onEnvEvent),a.subscribeToEvent(b));for(b=0;b<this._subscribedEventsOnElement.length;b++){var c=this._subscribedEventsOnElement[b];if(c){var d=c.elementId,e=c.eventName,c=c.callback,g=this.getElementById(d);g&&(this._removeEventListener(g,e,c),a.subscribeToEventOnElement(e,d,c))}}a.flash=this.flash||null},intMonitorExist:function(){return EBG.isPreview&&
top.ebHandleFsCommandsPrev},notifyIntMonitor:function(a){top.ebHandleFsCommandsPrev(a.command,a.args,a.objName,a.adId,a.elapsedTime)},hasEvent:function(a){return!!this._environmentEvents[a]},generateElementId:function(a,b){return EBG.format("eb{0}_{1}",a,b)},_getTags:function(a,b){EBG.isGlobalDef("JSON");var c="";if(b&&a.tagName==EBG.Adaptors.TagNames.SCRIPT&&a.text&&!a.attributes)b.push(a);else{c="";a.attributes&&(this._setObjDefaultAttributes(a),c=this._getObjAttributesStr(a));c=EBG.format("<{0} {1}>",
a.tagName,c);a.innerHTML&&(c+=a.innerHTML);a.text&&(c+=a.text);a.params&&(c+=this._getObjParamsStr(a));if(a.children)for(var d=0;d<a.children.length;d++)c+=this._getTags(a.children[d],b);c+=EBG.format("</{0}>",a.tagName)}return c},writeReportingIFrame:function(a,b,c){this.inject({tagName:EBG.Adaptors.TagNames.IFRAME,attributes:{id:a,src:b,style:{width:"0px",height:"0px"},frameborder:0}},EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(c))},writeScript:function(a,b,c){try{this.inject({tagName:EBG.Adaptors.TagNames.SCRIPT,
attributes:{id:a,name:a,src:b}},EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(c))}catch(d){}},write:function(a){this._documentWrite(this._getTags(a))},inject:function(a,b,c){if(c&&a){var d=c.ownerDocument,e=!1;if(EBG.isElementOrNode(a))d=a,e=!0;else if(d=d.createElement(a.tagName),a.attributes){this._setObjDefaultAttributes(a);for(var g in a.attributes)EBG.isObj(a.attributes[g])?this.setStyleToElem(d,a.attributes[g]):d.setAttribute(g,a.attributes[g])}switch(b){case EBG.Adaptors.InjectionMethod.INSERT_BEFORE:c.parentNode.insertBefore(d,
c);break;case EBG.Adaptors.InjectionMethod.INSERT_AFTER:c.nextSibling?c.parentNode.insertBefore(d,c.nextSibling):c.parentNode.appendChild(d);break;case EBG.Adaptors.InjectionMethod.FIRST_CHILD:c.firstChild?c.insertBefore(d,c.firstChild):c.appendChild(d);break;default:c.appendChild(d)}if(e)return d;e="";if(a.innerHTML)e=a.innerHTML;g=[];if(a.children)for(var f=0;f<a.children.length;f++){var h=a.children[f],e=e+EBG.adaptor._getTags(h,g);h.meta&&!0==h.meta.isChromePowerSaver&&this._resizeAfterPaint(h.attributes.id,
h.meta.origWidth,h.meta.origHeight)}if(e)d.innerHTML=e;if(a.text)d.text=a.text;for(f=0;f<g.length;f++)this.inject(g[f],b,c);return d}},addInlineDOM:function(a,b){this.inject(a,EBG.Adaptors.InjectionMethod.APPEND,this.getElementById(b))},setInnerHtml:function(a,b){if(a)a.innerHTML=b},setStyleToElem:function(a,b,c){if(a&&"object"===typeof b)if(c)for(var d in b){if(b.hasOwnProperty(d))if(void 0===a.style[d])for(var c=["Webkit","Moz","ms","O"],e=window.getComputedStyle?window.getComputedStyle(a,null):
a.style,g=0;g<c.length;g++){var f=c[g]+EBG.capitalize(d);if(void 0!==e[f]){a.style[f]=b[d];break}}else a.style[d]=b[d]}else for(d in b)b.hasOwnProperty(d)&&(a.style[d]=b[d])},getStyleOfElem:function(a){if(a)return a.style},setListener:function(a,b){this._listener=a;this._listenerBinding=b},hasHiddenParent:function(a){if(!a)return!1;for(var b="none"==window.getComputedStyle(a).display;(a=a.parentElement)&&!(b="none"==window.getComputedStyle(a).display););return b},subscribeToEvent:function(a,b){var c=
this.getDisplayWin(),d=this.getPageWin();if(this.hasEvent(a)&&!this._subscribedEvents[a]){var e=this._environmentEvents[a],g=e.inCurWin?window:this.getPageWin();if(b)g=g.document;this._logicalEvents[e.name].signInAllWindows&&this.serving.detectServingMode(!0)===EBG.Adaptors.ServingMode.FRIENDLY_IFRAME&&c!==d?(this._addEventListener(d,e.name,EBG.Adaptors.StdWebAdaptor.onEnvEvent),this._addEventListener(c,e.name,EBG.Adaptors.StdWebAdaptor.onEnvEvent)):this._addEventListener(g,e.name,EBG.Adaptors.StdWebAdaptor.onEnvEvent);
this._subscribedEvents[a]={}}},subscribeToEventOnElement:function(a,b,c){var d=!1,e="string"==typeof b?this.getDisplayWin().document.getElementById(b):b;e||(d=!0);for(var g=this._subscribedEventsOnElement.length,f=0;f<g;f++)if(this._subscribedEventsOnElement[f]&&this._subscribedEventsOnElement[f].elementId==b&&this._subscribedEventsOnElement[f].eventName==a){d=!0;break}d||(this._addEventListener(e,a,c),this._subscribedEventsOnElement[g]={elementId:b,eventName:a,callback:c})},unsubscribeFromEventOnElement:function(a,
b,c){var d="string"==typeof b?this.getDisplayWin().document.getElementById(b):b;if(d){for(var e=this._subscribedEventsOnElement.length,g=-1,f=0;f<e;f++)if(this._subscribedEventsOnElement[f]&&this._subscribedEventsOnElement[f].elementId==b&&this._subscribedEventsOnElement[f].eventName==a&&this._subscribedEventsOnElement[f].callback==c){g=f;break}0<=f&&(this._removeEventListener(d,a,c),this._subscribedEventsOnElement[g]=null)}},_addEventListener:function(a,b,c){"load"==b&&this.isPageLoaded()?setTimeout(function(){c({type:"load"})},
5):window.addEventListener?a.addEventListener(b,c,!1):window.attachEvent&&a.attachEvent("on"+b,c)},_removeEventListener:function(a,b,c){window.removeEventListener?a.removeEventListener(b,c,!1):window.detachEvent&&a.detachEvent("on"+b,c)},_checkIfPropExist:function(a,b){return a&&0<=a?EBG.format(", {0}={1}",b,a):""},openPage:function(a,b){var c=EBG.WindowTarget.BLANK,d="",e=null;if(b&&(c=b.target,b.xPos||b.yPos||b.width||b.height))d="titlebar=1,resizable=1,scrollbars=1,directories=0,toolbar=1,status=1"+
this._checkIfPropExist(b.yPos,EBG.Adaptors.WindowProp.top),d+=this._checkIfPropExist(b.xPos,EBG.Adaptors.WindowProp.left),d+=this._checkIfPropExist(b.showAddressBar,EBG.Adaptors.WindowProp.location),d+=this._checkIfPropExist(b.showMenuBar,EBG.Adaptors.WindowProp.menubar),d+=this._checkIfPropExist(b.width,EBG.Adaptors.WindowProp.width),d+=this._checkIfPropExist(b.height,EBG.Adaptors.WindowProp.height);e=""!=d?window.open(a,c,d):window.open(a,c);ebO&&ebO.ffs&&ebO.ffs.CFF_MRAIDAnchorClickFix&&!e&&EBG.adaptor.browser.isMobile()&&
(c=document.createElement("a"),c.setAttribute("id","SZMK_BRD_Anchortag"),c.setAttribute("href",a),c.setAttribute("target","_blank"),EBG.getBigScript().parentElement.appendChild(c),document.getElementById("SZMK_BRD_Anchortag").click());return e},reportBeacon:function(a){navigator&&EBG.isFunc(navigator.sendBeacon)&&navigator.sendBeacon(a)},reportToRemoteServerUsingImage:function(){var a=[];return function(b){for(var c=0;c<a.length;c++)if(a[c]===b)return;this.ReportingImg=new Image;this.ReportingImg.src=
b;a.push(b)}}(),getDataFromRemoteServer:function(a,b,c,d,e){return EBG.getDataFromRemoteServer(a,b,c,d,e)},reportToRemoteServer:function(a,b,c,d){if(a&&!EBG.isOfflineDemo){var b=!!b,d=d||this.getRequestMethod(a),e;"POST"==d&&(e=a.split("?"),a=e[0],e=e[1]);var g=!1;try{if(this.browser.isSafari()&&"POST"==d){var f=document.createElement("iframe");f.style.display="none";f.style.width="0px";f.style.height="0px";document.body.appendChild(f);f=f.contentWindow?f.contentWindow:f.contentDocument.document?
f.contentDocument.document:f.contentDocument;f.document.open();f.document.write(this.getIframeFormScript(a,e));f.document.close();g=!0}else if(EBG._isXMLHttpRequestSupported()){var h=new XMLHttpRequest;h.open(d,a,b);h.setRequestHeader("Content-type","text/plain");if(b||!b&&!this.browser.isFF())h.withCredentials=!0;try{h.send(e)}catch(k){if(b)throw k;}g=!0}else if(window.XDomainRequest&&!c&&b){var l=new XDomainRequest;l.open(d,a);l.send(e);g=!0}}catch(m){g=!1}g||this.reportToRemoteServerUsingImage(a)}},
getIframeFormScript:function(a,b){return'<script>var e=document.createElement("form"),t="'+b+'".split("&");e.setAttribute("method","post"),e.setAttribute("action","'+a+'");for(var i=0;i<t.length;++i){var a=t[i].substr(0,t[i].indexOf("=")),r=t[i].substr(t[i].indexOf("=")+1),m=document.createElement("input");m.setAttribute("type","hidden"),m.setAttribute("name",a),m.setAttribute("value",r),e.appendChild(m)}e.submit();<\/script>'},getElementById:function(a,b){var c=null,b=b?b:this.getDisplayWin();EBG.isDefinedNotNull(a)&&
(c=b.document.getElementById(a));return c},supportsPageLoadEvents:function(){return!(this.browser.isOpera()&&14>this.browser.getVersion())&&!(this.browser.isIE()&&7>this.browser.getVersion())&&!EBG.isMRAID()},getHostName:function(a){return(a?a:this.getDisplayWin()).location.hostname},getDomain:function(a){return(a?a:this.getDisplayWin()).document.domain},getDisplayWin:function(){return window},getPageWin:function(){return window},inInnerIframe:function(){return!1},inPlacementIframe:function(){return!1},
_setEvents:function(){this.supportsPageLoadEvents&&(this._setEvent(EBG.Events.EventNames.PAGE_LOAD,"load"),this._setEvent(EBG.Events.EventNames.PAGE_UNLOAD,"unload",!0),this._setEvent(EBG.Events.EventNames.PAGE_BEFORE_UNLOAD,"beforeunload",!0),this._setEvent(EBG.Events.EventNames.PAGE_HIDE,"pagehide",!0));this._setEvent(EBG.Events.EventNames.PAGE_RESIZE,"resize");this._setEvent(EBG.Events.EventNames.SCREEN_ORIENTATION,"orientationchange");this._setEvent(EBG.Events.EventNames.MOUSE_MOVE,"mousemove",
!1,["clientX","clientY","pageX","pageY","view"],!0)},_setEvent:function(a,b,c,d,e){this._environmentEvents[a]={name:b,inCurWin:c?c:!1};this._logicalEvents[b]={name:a,signInAllWindows:e};if(d){this._logicalEvents[b].attr=[];for(a=0;a<d.length;a++)this._logicalEvents[b].attr[a]=d[a]}},_documentWrite:function(a){document.write(a)},isPageLoaded:function(){if(this._isPageLoaded)return!0;this._isPageLoaded=EBGInfra.isDefined(window.gEBMainWindow)&&EBGInfra.isDefined(gEBMainWindow.EBP)&&gEBMainWindow.EBP.isPageLoaded;
if(!this._isPageLoaded&&this.getPageWin().document.readyState)this._isPageLoaded="complete"==this.getPageWin().document.readyState;return EBG.adaptor._isPageLoaded},_handleEvent:function(a){var b=this._logicalEvents[a.type].name;switch(b){case EBG.Events.EventNames.PAGE_LOAD:this._isPageLoaded=!0;break;case EBG.Events.EventNames.PAGE_RESIZE:EBG.adaptor.inInnerIframe()&&this.serving.rehidePlacementIframe();break;case EBG.Events.EventNames.SCREEN_ORIENTATION:this._handleOrientationEvent();return;case EBG.Events.EventNames.PAGE_BEFORE_UNLOAD:if(this.browser.isIE()&&
this._isPageLoaded)return}b&&(b=new EBG.Events.Event(b),EBGInfra.isDefinedNotNull(this._logicalEvents[a.type].attr)&&this._prepareLogicalEventData(b,a,this._logicalEvents[a.type].attr),EBG.isFunc(this._listener)&&this._listener.call(this._listenerBinding,b))},_handleOrientationEvent:function(){},_prepareLogicalEventData:function(a,b,c){try{a.eventData={};for(var d=0;d<c.length;d++)a.eventData[c[d]]=b[c[d]]}catch(e){}},_getDefaultAttributes:function(a){var b={};switch(a.toLowerCase()){case EBG.Adaptors.TagNames.IFRAME:b=
{marginheight:"0px",marginwidth:"0px",frameborder:"0",scrolling:"no"}}return b},_getDefaultStyle:function(a){var b={border:"0px",padding:"0px",margin:"0px"};switch(a.toLowerCase()){case EBG.Adaptors.TagNames.DIV:EBG.mergeObj({top:"0px",left:"0px",overflow:"visible",fontSize:"0px",lineHeight:"0px",textAlign:"left"},b,!0)}return b},_setObjDefaultAttributes:function(a){var b=this._getDefaultAttributes(a.tagName);EBG.mergeObj(a.attributes,b,!0);b.style=this._getDefaultStyle(a.tagName);a.attributes.style&&
EBG.mergeObj(a.attributes.style,b.style,!0);a.attributes=b},_getObjParamsStr:function(a){var a=a.params,b="",c;for(c in a)a.hasOwnProperty(c)&&(b+=EBG.format("<PARAM name='{0}' value='{1}'>",c,a[c]));return b},_getObjAttributesStr:function(a){var a=a.attributes,b="",c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(EBG.isObj(d)){var e=d,d="",g;for(g in e)if(e.hasOwnProperty(g)){var f=e[g];"textAlign"==g&&(g="text-align");d+=EBG.format("{0}:{1}; ",g,f)}}if(d)try{d=d.toString().replace(/\"/ig,"&quot;"),
b+=EBG.format(' {0}="{1}"',c,d)}catch(h){}}return b},_resizeAfterPaint:function(a,b,c){b&&c&&EBG.runTimed(this,function(){var d=this.getElementById(a);this.setElemStyle(d,"width",b);this.setElemStyle(d,"height",c)},[],50)},handleEvent:function(a){this._handleEvent(a)},setElemStyle:function(a,b,c){a.style[b]=c},getBrowserLanguage:function(){var a="en-US";if("undefined"!==typeof navigator.language)a=navigator.language;else if("undefined"!==typeof navigator.userLanguage)a=navigator.userLanguage;return a},
getPositioningById:function(a,b,c){return this.getPositioningByElement(this.getElementById(a),b,c)},getPositioningByElement:function(a,b,c){a=a&&a.getBoundingClientRect?a.getBoundingClientRect():null;if(!a)return null;b=this.getScrollLeftTop(b,c);return{X:Math.floor(a.left)+b.X,Y:Math.floor(a.top)+b.Y}},getScrollLeftTop:function(a,b){var c=this._getCurrentWindow(a,b),d=c.document,e={X:{"0":"XOffset",1:"Left"},Y:{"0":"YOffset",1:"Top"}},g;for(g in e)e[g]=c["page"+e[g][0]]||(d.documentElement?d.documentElement["scroll"+
e[g][1]]:d.documentElement["page"+e[g][0]])||(d.body?d.body["scroll"+e[g][1]]:0);return e},_getCurrentWindow:function(a){try{return a?this.getDisplayWin():top}catch(b){}},getRequestMethod:function(a){return this.browser.isIE()&&6==this.browser.getVersion()||this.isInApp()?"GET":2E3<a.length?"POST":"GET"},removeElement:function(a){var b;"string"==EBG.typeOf(a)?b=this.getElementById(a):EBG.isElementOrNode(a)&&(b=a);b&&(b.parentNode.removeChild(b),b.removeNode&&b.removeNode(!0))},appendChildElement:function(a,
b){a&&b&&this.getElementById(a).appendChild(b)},getMaxZIndex:function(a){if(this.browser.isIE()&&8>this.browser.getVersion())return 10001;var b=0;if(a){var c=this.getStyleOfElem(a);c&&c.zIndex&&(b=c.zIndex);for(var d in a.childNodes)d&&a.childNodes[d]&&(c=this.getMaxZIndex(a.childNodes[d]),b=b>c?b:c)}return b},setCookieKeyValuePair:function(a,b,c){if(EBG.isDefined(a)&&""!=a&&EBG.isDefined(b))b=EBG.isDefined(c)&&c?escape(b):b,document.cookie=a+"="+b+";"},isSafeFrame:function(){return!(!window.$sf||
!$sf.ext)},isInApp:function(){return!1},isSkype:function(){try{return!!(window.$WLXRmAd||!window.location.ancestorOrigins&&window.parent&&window.parent.$WLXRmAd)}catch(a){return!1}},isAMP:function(){var a=!1;ebO&&ebO.ffs&&ebO.ffs.CFF_AMPUtil&&(ebO.ffs.CFF_WinWalk?(doIfAccessible=function(){a=a||!(!this.context||!this.context.reportRenderedEntityIdentifier)},this.walkUpIframes(doIfAccessible)):a=!(!window.context||!window.context.reportRenderedEntityIdentifier));return a},isReady:function(){return!0},
hasLayoutViewport:function(){return document.documentElement.clientWidth>window.innerWidth},getBoundingClientRect:function(a,b){if(!a||!this.getElementById(a.id))return null;var b=b||{},c=a.getBoundingClientRect();ebO&&ebO.ffs&&ebO.ffs.CFF_RoundBoundingClientRect?(c={top:Math.round(c.top),left:Math.round(c.left),bottom:Math.round(c.bottom),right:Math.round(c.right)},c.width=Math.round(c.width)||c.right-c.left,c.height=Math.round(c.height)||c.bottom-c.top):(c={top:~~c.top,left:~~c.left,bottom:~~c.bottom,
right:~~c.right},c.width=~~c.width||c.right-c.left,c.height=~~c.height||c.bottom-c.top);ebO&&ebO.ffs&&ebO.ffs.CFF_AndroidClientRect&&this.browser.isAndroid()&&this.hasLayoutViewport()&&(c.top-=window.pageYOffset,c.left-=window.pageXOffset,c.bottom-=window.pageYOffset,c.right-=window.pageXOffset);if(b.clip)try{var d=/rect\((.*?)px(.*?)px(.*?)px(.*?)px\)/g.exec(this.getComputedStyle(a).getPropertyValue("clip"));if(d){for(var e=1;e<d.length;e++)d[e]=parseFloat(d[e].replace(",",""));if(0!=d[1]+d[2]+d[3]+
d[4]){var g={top:c.top+d[1],left:c.left+d[4]};g.right=Math.min(g.left+(d[2]-d[4]),c.right);g.bottom=Math.min(g.top+(d[3]-d[1]),c.bottom);g.width=g.right-g.left;g.height=g.bottom-g.top;c=g}}}catch(f){}if(b.relativeToTop){var h=0,k=0,d=this.getElementWindow(a);if(ebO&&ebO.ffs&&ebO.ffs.CFF_WinWalk)EBG.adaptor.walkUpIframes(function(){if(this.frameElement){var a=this.frameElement.getBoundingClientRect();h+=a.top;k+=a.left}},null,d);else for(e=EBG.getTopAccessibleWindow();d!==e&&d.frameElement;)g=d.frameElement.getBoundingClientRect(),
h+=g.top,k+=g.left,d=d.parent;c.top+=h;c.left+=k;c.bottom+=h;c.right+=k}b.relativeToWindow&&(d=this.getElementWindow(a),e=d.pageXOffset||d.document.documentElement.scrollLeft,d=d.pageYOffset||d.document.documentElement.scrollTop,c.top+=d,c.left+=e,c.bottom+=d,c.right+=e);return c},getComputedStyle:function(){return window.getComputedStyle?function(a,b){return(this.getElementWindow(a)||window).getComputedStyle(a,b)}:function(a){var b={};b.el=a;b.getPropertyValue=function(b){var d=/(\-([a-z]){1})/g;
"float"==b&&(b="styleFloat");d.test(b)&&(b=b.replace(d,function(a,b,c){return c.toUpperCase()}));return a.currentStyle[b]?a.currentStyle[b]:a.style[b]?a.style[b]:null};return b}}(),isPageVisible:function(a){var b=!0;this.isAMP()?b=!window.context.hidden:(b=(b=this._getVisibilityEventHidden())&&document[b]?!1:!0)&&this.browser.isIE()&&this.serving.detectServingMode(!0)!=EBG.Adaptors.ServingMode.IFRAME&&(b=b&&(this.focused||a));return b},_getVisibilityEventHidden:function(){var a=null;"undefined"!==
typeof document.hidden?a="hidden":"undefined"!==typeof document.mozHidden?a="mozHidden":"undefined"!==typeof document.msHidden?a="msHidden":"undefined"!==typeof document.webkitHidden&&(a="webkitHidden");return a},getObjKeys:function(a){a=a||{};if(Object.keys)return Object.keys(a);var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b},hasParentElement:function(a,b){a=EBG.isElementOrNode(a)?a:this.getElementById(a);for(b=EBG.isElementOrNode(b)?b:this.getElementById(b);a&&a.parentElement;){if(a.parentElement===
b)return!0;a=a.parentElement}return!1}};EBG.declareClass(EBG.Adaptors.StdWebAdaptor,null);EBG.Adaptors.WebAdaptor=function(){ebO.ffs.CFF_NewMRAID||this._init();EBG.callSuperConstructor(EBG.Adaptors.WebAdaptor,this);EBG.adaptor&&EBG.adaptor.copy(this)};
EBG.Adaptors.WebAdaptor.prototype={_previousWidth:-1,_previousHeight:-1,_screenOrientation:"",scrollBarWidth:0,_isReady:!1,focused:!1,_loadedModules:[],_init:function(){this._sendReady()},isReady:function(){return this._isReady},isSDKDefined:function(){return!1},updateScrollBarWidth:function(){EBG.adaptor.scrollBarWidth=EBG.adaptor.getScrollerWidth()},initInnerModules:function(a,b,c,d,e,g){EBG.callSuperFunction(EBG.Adaptors.WebAdaptor,this,"initInnerModules",[a,b,c,d,e]);this.updateScrollBarWidth();
if(!this.serving)this.serving=EBG.Adaptors.ServingMgr?new EBG.Adaptors.ServingMgr:null;this.serving.noInDapIFFlag=g;this._addEventListener(this.getDisplayWin(),"resize",EBG.adaptor.updateScrollBarWidth)},_pageResizeHandler:function(){this._handleOrientationEvent()},_handleOrientationEvent:function(){this._checkOrientationEvent();EBG.runTimed(this,this._checkOrientationEvent,[],300)},_checkOrientationEvent:function(){if(this.browser.isMobile()&&this._isOrientationChange()){this._setScreenOrientation();
var a=new EBG.Events.Event(EBG.Events.EventNames.SCREEN_ORIENTATION);a.dispatcher=this;a.eventData={screenOrientation:this._screenOrientation};EBG.eventMgr.dispatchEvent(a)}},registerSpecialBrowserEvents:function(){if(this.browser.isIE())this._addEventListener(this.getPageWin(),"focus",this._updateFocused),10>this.browser.getVersion()&&(this._addEventListener(this.getPageWin().document,"focusout",this._updateFocusOut),this._addEventListener(this.getPageWin().document,"focusin",this._updateFocused)),
this.focused=this.focused||"undefined"!=typeof gEBMainWindow&&"undefined"!=typeof gEBMainWindow.EBP&&gEBMainWindow.EBP.focused;EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,this._pageResizeHandler,this));this._updateInitialOrientationValues()},_updateInitialOrientationValues:function(){this.browser.isMobile()&&this._setScreenOrientation(EBG.adaptor.serving._getTopFriendlyIframe(EBG.adaptor.getDisplayWin()))},_updateFocusOut:function(){EBG.runTimed(EBG.adaptor,
function(){if(!(EBG.adaptor.getPageWin().screenTop>-2*EBG.adaptor.getPageWin().screen.availHeight)){var a=new EBG.Events.Event(EBG.Events.EventNames.PAGE_HIDDEN);a.dispatcher=EBG.adaptor;EBG.eventMgr.dispatchEvent(a)}},[],50)},_updateFocused:function(){EBG.adaptor.focused=!0;var a=new EBG.Events.Event(EBG.Events.EventNames.PAGE_VISIBLE);a.dispatcher=EBG.adaptor;EBG.eventMgr.dispatchEvent(a);try{EBG.adaptor._removeEventListener(EBG.adaptor.getPageWin(),"focus",EBG.adaptor._updateFocused),10>EBG.adaptor.browser.getVersion()&&
EBG.adaptor._removeEventListener(EBG.adaptor.getPageWin().document,"focusin",EBG.adaptor._updateFocused)}catch(b){}},_setEvents:function(){EBG.callSuperFunction(EBG.Adaptors.WebAdaptor,this,"_setEvents",[]);this._setEvent(EBG.Events.EventNames.PAGE_SCROLL,"scroll");this._setEvent(EBG.Events.EventNames.PAGE_FOCUS,"focus");this._setEvent(EBG.Events.EventNames.PAGE_BLUR,"blur");var a=this._getVisibilityEventName();"undefined"===typeof document.addEventListener||"undefined"===typeof a||(this._setEvent(EBG.Events.EventNames.PAGE_HIDDEN,
a,!0),this._setEvent(EBG.Events.EventNames.PAGE_VISIBLE,a,!0))},initServingMode:function(a,b,c){b=b?b:!1;switch(a){case EBG.Adaptors.ServingMode.INNER_IFRAME:this.serving.setServingMode(EBG.Adaptors.ServingMode.INNER_IFRAME);break;case -1:this.serving.detectServingMode(!1);break;case 0:(!EBG.isPreview||EBG.isPreview&&EBG.isTestMode)&&c==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME&&!b?this.serving.setServingMode(EBG.Adaptors.ServingMode.FRIENDLY_IFRAME):!EBG.isPreview&&c==EBG.Adaptors.ServingMode.IFRAME&&
!b?this.serving.setServingMode(EBG.Adaptors.ServingMode.TOPMOST_FRIENDLY_IFRAME):b&&this.serving.setServingMode(EBG.Adaptors.ServingMode.SCRIPT);break;case 1:case 2:this.serving.setServingMode(EBG.Adaptors.ServingMode.IFRAME)}},addPlaceHolder:function(a){this.inInnerIframe()&&(this.inject(a,EBG.Adaptors.InjectionMethod.INSERT_BEFORE,this.serving.placementIframe),this.serving.hidePlacementIframe())},getPageWin:function(){return this.serving&&this.serving.pageWin?this.serving.pageWin:window},getDisplayWin:function(){return this.serving&&
this.serving.displayWin?this.serving.displayWin:window},_getDocument:function(){return this.getDisplayWin().document},isCookiesSupported:function(){var a=navigator.cookieEnabled?!0:!1;if("undefined"==typeof navigator.cookieEnabled)if(document.cookie="ebTestcookie",-1!=document.cookie.indexOf("ebTestcookie")){var a=!0,b=new Date;b.setTime(b.getTime()-1E3);document.cookie="ebTestcookie; expires="+b.toGMTString()}else a=!1;return a},inInnerIframe:function(){return this.serving&&this.serving.placementIframe},
inPlacementIframe:function(){return this.serving&&this.serving.servingMode===EBG.Adaptors.ServingMode.IFRAME},setElemStyle:function(a,b,c){a.style[b]=c},setElemAttribute:function(a,b,c){a[b]=c},getClipTag:function(a,b,c,d){return EBG.format("rect({0}px {1}px {2}px {3}px)",a,b,c,d)},clip:function(a,b,c,d,e){a.style.clip=this.getClipTag(b,c,d,e)},unclip:function(a){a.style.clip="rect(auto auto auto auto)"},expand:function(a,b){this.setElemStyle(a,"left",EBG.px(-b.x));this.setElemStyle(a,"top",EBG.px(-b.y));
this.setElemStyle(a,"width",EBG.px(b.width));this.setElemStyle(a,"height",EBG.px(b.height));this.unclip(a)},collapse:function(a,b,c){b=this.getClipParams(b,c);this.clip(a,b.top,b.right,b.bottom,b.left)},resize:function(a,b,c){this.setElemStyle(a,"width",EBG.px(b));this.setElemStyle(a,"height",EBG.px(c))},getClipParams:function(a,b){return{top:a.y,right:a.x+b.width,bottom:a.y+b.height,left:a.x}},getCurrentStyleAttr:function(a,b){var c=null;try{c=a.currentStyle?a.currentStyle[b]:a.ownerDocument.defaultView.getComputedStyle(a,
null).getPropertyValue(b)}catch(d){}if(!c&&"embed"==a.tagName.toLowerCase()&&a.parentNode&&"object"==a.parentNode.tagName.toLowerCase())a=a.parentNode,c=a.currentStyle?a.currentStyle[b]:a.ownerDocument.defaultView.getComputedStyle(a,null).getPropertyValue(b);return c},getViewPortMetrics:function(){return this.getWindowViewPortMetrics()},getWindowViewPortMetrics:function(a){try{var a=a?a:this.getDisplayWin(),b=a.document,c={Height:0,Width:0},d=b.documentMode;if(this.browser.isIE()&&(5==d||!this.browser.isStrictType(b)))c.Width=
b.body.clientWidth,c.Height=b.body.clientHeight;else if(this.browser.isIE())c.Width=b.documentElement.clientWidth,c.Height=b.documentElement.clientHeight;else if(c.Width=a.innerWidth,c.Height=a.innerHeight,"hidden"!=b.body.style.overflow){if(b.body.offsetWidth>c.Width||b.body.scrollWidth>c.Width||0<a.scrollMaxX)c.Height-=this.scrollBarWidth;if(b.body.offsetHeight>c.Height||b.body.scrollHeight>c.Height||0<a.scrollMaxY)c.Width-=this.scrollBarWidth}}catch(e){}return c},getPageMetrics:function(a){try{var b=
a?a.document:this.getDisplayWin().document,a={Height:0,Width:0};a.Height=Math.max(b.body.scrollHeight,b.documentElement.scrollHeight,b.body.offsetHeight,b.documentElement.offsetHeight,b.body.clientHeight,b.documentElement.clientHeight);a.Width=Math.max(b.body.scrollWidth,b.documentElement.scrollWidth,b.body.offsetWidth,b.documentElement.offsetWidth,b.body.clientWidth,b.documentElement.clientWidth);return a}catch(c){}},saveInitialScrollBarState:function(a){a.EBG=a.EBG||{};var b=a.document;a.EBG._scrollBarsInitialState=
null!=a.EBG._scrollBarsInitialState?a.EBG._scrollBarsInitialState:b.body.style.overflow},showScrollBars:function(a){a=a?a:this.getDisplayWin();this.saveInitialScrollBarState(a);a.document.body.style.overflow="auto"},hideScrollBars:function(a){a=a?a:this.getDisplayWin();this.saveInitialScrollBarState(a);a.document.body.style.overflow="hidden"},restoreScrollBarsState:function(a){var a=a?a:this.getDisplayWin(),b=a.document;if(null!=a.EBG._scrollBarsInitialState)b.body.style.overflow=a.EBG._scrollBarsInitialState},
_getCurrentWindow:function(a,b){try{return this.serving.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME?a=!0:b==EBG.Adaptors.ServingMode.IFRAME&&this.browser.isFF()&&(a=!0),a?this.getDisplayWin():top}catch(c){}},getPositioningById:function(a,b,c,d){b=this.serving.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME?!0:b;return this.getPositioningByElement(this.getElementById(a),b,c,d)},getIframePosition:function(){var a={X:0,Y:0};if(EBG.adaptor.serving.detectServingMode(!0)==EBG.Adaptors.ServingMode.IFRAME&&
"undefined"!=typeof this.getDisplayWin().mozInnerScreenX)a.X=this.getDisplayWin().mozInnerScreenX,a.Y=this.getDisplayWin().mozInnerScreenY;return a},getPositioningByElement:function(a,b,c,d){if(!a)return null;var b=this.serving.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME||EBG.isPreview?!0:b,e=a.getBoundingClientRect?a.getBoundingClientRect():null;if(!e)return null;a=Math.round(e.left);e=Math.round(e.top);if(!EBG.isDefined(d)||!d)b=this.getScrollLeftTop(b,c),a+=b.X,e+=b.Y;return{X:a,Y:e}},getScrollLeftTop:function(a,
b){a=b==EBG.Adaptors.ServingMode.IFRAME?!0:a;return EBG.callSuperFunction(EBG.Adaptors.WebAdaptor,this,"getScrollLeftTop",[a,b])},getBodyPositioning:function(a){var b=this.getDisplayWin(),c=this.isCurrWin();(a=EBG.adaptor.getPositioningByElement(b.document.body,!c,a))||(a={X:0,Y:0});return a},isCurrWin:function(){return this.getDisplayWin()===this.getPageWin()},_calculatePositioning:function(){return null},getScrollerWidth:function(){try{if(EBG.adaptor.browser._platform==EBG.adaptor.browser._platformTypes.IPAD||
EBG.adaptor.browser._platform==EBG.adaptor.browser._platformTypes.IPHONE)return 0;var a=null,b=null,c=0,d=0,e=0,a=document.createElement("div");a.style.position="absolute";a.style.top="-1000px";a.style.left="-1000px";a.style.width="100px";a.style.height="50px";a.style.overflow="auto";b=document.createElement("div");b.style.width="100%";b.style.height="200px";a.appendChild(b);document.body.appendChild(a);d=b.offsetWidth;document.body.removeChild(document.body.lastChild);a.style.overflow="hidden";document.body.appendChild(a);
c=b.offsetWidth;document.body.removeChild(document.body.lastChild);return c-d?c-d:0}catch(g){}},getResolution:function(){var a=0;switch(window.screen.width){case 640:a=1;break;case 800:a=2;break;case 1024:a=4;break;case 1152:a=8;break;case 1280:a=16;break;case 1600:a=32;break;case 1400:a=64;break;case 1920:a=128;break;case 1680:a=256;break;case 1366:a=512;break;case 1440:a=1024;break;case 1360:a=2048;break;case 768:a=4096;break;case 1093:a=8192;break;case 960:a=16384;break;case 2560:a=32768}return a},
_handleEvent:function(a){var b=this._logicalEvents[a.type].name;switch(b){case EBG.Events.EventNames.PAGE_HIDDEN:case EBG.Events.EventNames.PAGE_VISIBLE:b=this.isPageVisible()?EBG.Events.EventNames.PAGE_VISIBLE:EBG.Events.EventNames.PAGE_HIDDEN;break;default:EBG.callSuperFunction(EBG.Adaptors.WebAdaptor,this,"_handleEvent",[a]);return}b&&(b=new EBG.Events.Event(b),EBGInfra.isDefinedNotNull(this._logicalEvents[a.type].attr)&&this._prepareLogicalEventData(b,this._logicalEvents[a.type].eventData,this._logicalEvents[a.type].attr),
EBG.isFunc(this._listener)&&this._listener.call(this._listenerBinding,b))},_isOrientationChange:function(){var a=EBG.adaptor.serving._getTopFriendlyIframe(EBG.adaptor.getDisplayWin());return a.innerWidth!==this._previousWidth||a.innerHeight!=this._previousHeight?this._screenOrientation!==(a.innerHeight>=a.innerWidth?EBG.Events.EventNames.PORTRAIT:EBG.Events.EventNames.LANDSCAPE):!1},_setScreenOrientation:function(a){a=a?a:EBG.adaptor.serving._getTopFriendlyIframe(EBG.adaptor.getDisplayWin());this._screenOrientation=
a.innerHeight>=a.innerWidth?EBG.Events.EventNames.PORTRAIT:EBG.Events.EventNames.LANDSCAPE;this._previousWidth=a.innerWidth;this._previousHeight=a.innerHeight},getScreenOrientation:function(a){("boolean"==typeof a?a:1)&&this._setScreenOrientation();return this._screenOrientation},_sendReady:function(){this._isReady=!0;var a=new EBG.Events.Event(EBG.EBMessage.ADAPTOR_READY);a.dispatcher=this;a.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(a))a.timing=EBG.Events.EventTiming.ONTIME,
EBG.eventMgr.dispatchEvent(a)},getMouseCoordinates:function(a){var b={mouseX:0,mouseY:0};if(a)EBG.adaptor.browser.isIE()?(b.mouseX=a.clientX?a.clientX:0,b.mouseY=a.clientY?a.clientY:0):(b.mouseX=a.pageX?a.pageX:0,b.mouseY=a.pageY?a.pageY:0),b.view=a.view;return b},_getVisibilityEventName:function(){var a=null;this.isAMP()&&"undefined"!==typeof window.context.hidden?a="amp:visibilitychange":"undefined"!==typeof document.hidden?a="visibilitychange":"undefined"!==typeof document.mozHidden?a="mozvisibilitychange":
"undefined"!==typeof document.msHidden?a="msvisibilitychange":"undefined"!==typeof document.webkitHidden&&(a="webkitvisibilitychange");return a},getElementWindow:function(a){if(!a)return null;a=a.ownerDocument;return a.defaultView||a.parentWindow||window}};EBG.declareClass(EBG.Adaptors.WebAdaptor,EBG.Adaptors.StdWebAdaptor);EBG.Adaptors=EBG.Adaptors||{};EBG.Adaptors.Browser=function(a,b,c,d,e){this.set(a,b,c,d,e)};
EBG.Adaptors.Browser.prototype={_platform:0,_browserType:0,_browserVer:0,_browserCode:0,_deviceType:0,_browserTypes:EBG.API.BrowserTypes,_platformTypes:EBG.API.PlatformTypes,_deviceTypes:EBG.API.DeviceTypes,set:function(a,b,c,d,e){a=a?a:this._platformTypes.NON_SUPPORTED;b=b?b:this._browserTypes.NON_SUPPORTED;e=e?e:this._browserTypes.NON_SUPPORTED;this._platform=a;this._browserType=b;this._browserVer=c?c:0;this._browserCode=e;this._deviceType=d?d:0},getVersion:function(){return this._browserVer},getDocumentMode:function(){return window.document.documentMode},
isIE:function(){return this._browserType==this._browserTypes.IE||this._browserType==this._browserTypes.AOL},isEdge:function(){return this._browserType==this._browserTypes.EDGE},isStrictType:function(a){var b=!1;this.isIE()&&(b=a?"CSS1Compat"==a.compatMode:"CSS1Compat"==document.compatMode);return b},isFF:function(){return this._browserType==this._browserTypes.FF},isSafari:function(){return this._browserType==this._browserTypes.SAFARI},isChrome:function(){return this._browserType==this._browserTypes.CHROME},
isOpera:function(){return this._browserType==this._browserTypes.OPERA},isMac:function(){return this._platform==this._platformTypes.MAC||this._platform==this._platformTypes.MAC_NEW||this._platform==this._platformTypes.MAC_YOSEMITE},isMobile:function(){var a=!1;if(this._deviceType==this._deviceTypes.MOBILE||this._deviceType==this._deviceTypes.TABLET)a=!0;return a},isiOS:function(){for(var a in this._platformTypes)if(this._platformTypes[a]==this._platform&&a.match(/mac|iphone|ipad|ipod/i))return!0;return!1},
isAndroid:function(){for(var a in this._platformTypes)if(this._platformTypes[a]==this._platform&&0<=a.indexOf("ANDROID"))return!0;return!1},isAndroidNative:function(){return this.isAndroid()&&this.isSafari()},isThirdPartyAllowed:function(){return!this.isSafari()||this.isMobile()},isSpotify:function(){var a=navigator.userAgent||navigator.vendor||window.opera||"";return this.isChrome()&&a.match(/spotify/i)},getEnvironment:function(){var a=navigator.userAgent||navigator.vendor||window.opera;if(EBG.adaptor.browser.isMobile()){if(EBG.adaptor.browser.isiOS()){var b=
window.navigator&&window.navigator.standalone;return!a.match(/safari/i)&&!b?EBG.WebEnvironment.IOS_WEB_VIEW:EBG.WebEnvironment.IOS_MOBILE_BROWSER}return EBG.adaptor.browser.isAndroid()?a.match(/version/i)?EBG.WebEnvironment.ANDROID_WEB_VIEW:EBG.adaptor.browser.isChrome()||EBG.adaptor.browser.isFF()?EBG.WebEnvironment.ANDROID_MOBILE_BROWESR:EBG.WebEnvironment.ANDROID_UNKNOWN:EBG.adaptor.browser.isIE()?EBG.WebEnvironment.OTHER_MOBILE_BROWSER:EBG.WebEnvironment.UNKNOWN}return EBG.WebEnvironment.BROWSER}};
EBG.Adaptors.ServingMode={SCRIPT:"SCRIPT",IFRAME:"IFRAME",FRIENDLY_IFRAME:"FRIENDLY_IFRAME",INNER_IFRAME:"INNER_IFRAME",TOPMOST_FRIENDLY_IFRAME:"TOPMOST_FRIENDLY_IFRAME"};EBG.Adaptors.IframeMode={SERVE:"SERVE",VERIFY:"VERIFY",SERVEANDVERIFY:"SERVEANDVERIFY"};EBG.Adaptors.ServingMgr=function(){this.displayWin=window;this.servingMode=EBG.Adaptors.ServingMode.SCRIPT;this._supportPostMessage=!!window.postMessage};
EBG.Adaptors.ServingMgr.prototype={noInDapIFFlag:null,displayWin:null,pageWin:null,placementIframe:null,_placementIframeAttr:null,servingMode:null,ebO:null,addinEyeRef:null,aieServerRequestPrefix:"/BurstingPipe/adServer.bs?cn=chdm&referrer=",aieServerRequestPrefixVersion:"&cv=2",setDisplayWin:function(a){this.displayWin=a},setPageWin:function(){var a=this.detectServingMode(!0);switch(this.servingMode){case EBG.Adaptors.ServingMode.SCRIPT:switch(a){case EBG.Adaptors.ServingMode.SCRIPT:this.pageWin=
window;break;case EBG.Adaptors.ServingMode.FRIENDLY_IFRAME:this.pageWin=top;break;case EBG.Adaptors.ServingMode.IFRAME:case EBG.Adaptors.ServingMode.INNER_IFRAME:this.pageWin=this.displayWin}break;case EBG.Adaptors.ServingMode.FRIENDLY_IFRAME:this.pageWin=top;break;case EBG.Adaptors.ServingMode.IFRAME:case EBG.Adaptors.ServingMode.TOPMOST_FRIENDLY_IFRAME:case EBG.Adaptors.ServingMode.INNER_IFRAME:this.pageWin=this.displayWin}},setServingMode:function(a){this.servingMode=a;var b=null;switch(a){case EBG.Adaptors.ServingMode.TOPMOST_FRIENDLY_IFRAME:b=
this._getTopFriendlyIframe();break;case EBG.Adaptors.ServingMode.INNER_IFRAME:b=top;break;case EBG.Adaptors.ServingMode.FRIENDLY_IFRAME:b=top;break;case EBG.Adaptors.ServingMode.SCRIPT:this.setDisplayWin(window);this.setPageWin();return}EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_UNLOAD,this._restorePlacementIframe,this));b&&(EBG.isGlobalDef("gstrEbDisplayPos")&&(b=eval("parent."+gstrEbDisplayPos)),this.setDisplayWin(b),this.setPageWin(),b!==window&&this._findPlacementIframe())},
isFIF:function(a){if(this.noInDapIFFlag)return!1;var b="inFIF"in a?a.inFIF:!1;return("inDapIF"in a?a.inDapIF:!1)||b},detectServingMode:function(a){try{var b=EBG.Adaptors.ServingMode.SCRIPT,c=window;if(ebO&&ebO.ffs&&ebO.ffs.CFF_WinWalk)EBG.adaptor.walkUpIframes(function(){if(c!=this)b=EBG.Adaptors.ServingMode.FRIENDLY_IFRAME},function(){b=EBG.Adaptors.ServingMode.IFRAME});else for(;c!==c.parent&&c.self!==c.parent;){var d=null;try{d=EBG.adaptor.getHostName(c.parent)}catch(e){}if(EBGInfra.isDefinedNotNull(d)&&
(EBG.adaptor.getHostName(c)===d||ebO.ffs.CFF_FriendlyEmptyHostName&&""===EBG.adaptor.getHostName(c))||this.isFIF(c))b=EBG.Adaptors.ServingMode.FRIENDLY_IFRAME,c=c.parent;else{b=EBG.Adaptors.ServingMode.IFRAME;break}}if(a)return b;this.setServingMode(b)}catch(g){}},detectServingEnvironment:function(a){a=EBG.isDefinedNotNull(a)?a:this.detectServingMode(!0);if(this.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME||this.servingMode==EBG.Adaptors.ServingMode.IFRAME&&EBG.isDefinedNotNull(this.addinEyeRef))a=
EBG.Adaptors.ServingMode.INNER_IFRAME;var b=this._getTopFriendlyIframe(window);if(window!=b&&b!=top)a=EBG.Adaptors.ServingMode.TOPMOST_FRIENDLY_IFRAME;return a},_getTopFriendlyIframe:function(a){a=a?a:window;if(EBG.adaptor.isSafeFrame())return a;if(ebO&&ebO.ffs&&ebO.ffs.CFF_WinWalk){var b;EBG.adaptor.walkUpIframes(function(){b=this},null,a);a=b}else for(;a!==a.parent&&a.self!==a.parent;){var c=null;try{c=EBG.adaptor.getHostName(a.parent)}catch(d){}if(a.parent&&(EBGInfra.isDefinedNotNull(c)&&(EBG.adaptor.getHostName(a)===
c||ebO.ffs.CFF_FriendlyEmptyHostName&&""===EBG.adaptor.getHostName(a))||this.isFIF(a)))a=a.parent;else break}return a},_restorePlacementIframe:function(){this._placementIframeAttr&&(EBGInfra.mergeObj(this._placementIframeAttr,this.placementIframe,!0),EBGInfra.mergeObj(this._placementIframeAttr.style,this.placementIframe.style,!0))},hidePlacementIframe:function(){var a=this.placementIframe;if(!this._placementIframeAttr)this._placementIframeAttr={width:a.width,height:a.height},this._placementIframeAttr.style=
{width:EBG.adaptor.getCurrentStyleAttr(a,"width"),height:EBG.adaptor.getCurrentStyleAttr(a,"height"),visibility:EBG.adaptor.getCurrentStyleAttr(a,"visibility"),border:EBG.adaptor.getCurrentStyleAttr(a,"border")};a.style.visibility="hidden";a.width=a.height=0;a.style.width=a.style.height=a.style.border="0px"},rehidePlacementIframe:function(){this._placementIframeAttr&&this.hidePlacementIframe()},handleAieServing:function(a){this.ebO=EBG.cloneObj(a);if(EBG.adaptor.browser.isIE()&&9>EBG.adaptor.browser.getVersion())try{delete this.ebO.ut,
delete this.ebO.fru}catch(b){this.ebO.ut="",this.ebO.fru=""}if(EBG.iframeLocation)this._handleAddInEyeServerResponse('{"iflExists":1,"iflCheck":0}');else if(a.aiE&&EBG.isDefined(a.aiE.iflExists))this._handleAddInEyeServerResponse(JSON.stringify(a.aiE));else{var c=encodeURIComponent(document.referrer||document.location.href);c?EBG.adaptor.getDataFromRemoteServer(ebPtcl+a.bs+this.aieServerRequestPrefix+c+this.aieServerRequestPrefixVersion,this._handleAddInEyeServerResponse,this,!0,!1)||this._handleAddInEyeServerResponse('{"iflExists":1,"iflCheck":0}'):
this._handleAddInEyeServerResponse(null)}},_handleAddInEyeServerResponse:function(a,b){var c;try{c=!b&&a?JSON.parse(a):{iflExists:0,iflCheck:1}}catch(d){c={iflExists:0,iflCheck:1}}this.ebO.aiE=c;if(!this.ebO.dmn)this.ebO.dmn=c.Domain?c.Domain:this._ebGetHostName(document.referrer);if(c&&c.iflExists)this.insertInnerIframe(this.ebO.phid,c.iflCheck?EBG.Adaptors.IframeMode.SERVEANDVERIFY:EBG.Adaptors.IframeMode.SERVE);else{this.ebO.ifrm=0;this.ebO.adConfig.showAieDefaultImage=1;var e=new EBG.Events.Event(EBG.Events.EventNames.AIE_LOADED);
e.eventData={loadDefault:this.ebO.adConfig.showAieDefaultImage,currentResponse:this.ebO};e.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(e);c.iflCheck&&this.insertInnerIframe(this.ebO.phid,EBG.Adaptors.IframeMode.VERIFY)}},insertInnerIframe:function(a,b){this._supportPostMessage?(this._initPmMessages(b),this.listenToMessages()):this._startHashProtocol(b);var c={tagName:EBG.Adaptors.TagNames.IFRAME,attributes:{id:"addineyeIframe",src:this._getAddineyeLocation(),style:{display:ebO.ffs.CFF_addineyeDispNone?
"none":"block"},width:"0",height:"0"}};EBG.adaptor.addInlineDOM(c,a);this.addinEyeRef=EBG.adaptor.getElementById("addineyeIframe");this._supportPostMessage||this._sendMessageHashProtocol()},_getAddineyeLocation:function(){var a="eyeblaster/addineyeV2"+("https://"==EBG.protocol?"-secure":"")+".html";this._getTopFriendlyIframe();if(EBG.iframeLocation)a=EBG.iframeLocation;if("http"!=a.substr(0,4)){var b=this.ebO.dmn;if(!b)return"";a=EBG.protocol+b+"/"+a}return a},_buildSecretTagsObj:function(){return{gstrEbPreLoadScripts:EBG.isGlobalDef("gstrEbPreLoadScripts")?
gstrEbPreLoadScripts:void 0,gnEbLowBWLimit:EBG.isGlobalDef("gnEbLowBWLimit")?gnEbLowBWLimit:void 0,gstrEbPreLoadScripts:EBG.isGlobalDef("gstrEbPreLoadScripts")?gstrEbPreLoadScripts:void 0,gfEbInlineBanner:EBG.isGlobalDef("gfEbInlineBanner")?gfEbInlineBanner:void 0,gEbEyeDivRefElement:EBG.isGlobalDef("gEbEyeDivRefElement")?gEbEyeDivRefElement:void 0,gstrEbDisplayPos:EBG.isGlobalDef("gstrEbDisplayPos")?gstrEbDisplayPos:void 0,gnEbMinZIndex:EBG.isGlobalDef("gnEbMinZIndex")?gnEbMinZIndex:void 0,gfEbForceStreaming:EBG.isGlobalDef("gfEbForceStreaming")?
gfEbForceStreaming:void 0,gfEbUseIntFlash:EBG.isGlobalDef("gfEbUseIntFlash")?gfEbUseIntFlash:void 0,gEbfLoadAsAS2:EBG.isGlobalDef("gEbfLoadAsAS2")?gEbfLoadAsAS2:void 0,gEbURLTokens:EBG.isGlobalDef("gEbURLTokens")?gEbURLTokens:void 0}},_startHashProtocol:function(a){this._hashMessages=[];if(a==EBG.Adaptors.IframeMode.VERIFY||a==EBG.Adaptors.IframeMode.SERVEANDVERIFY)this._hashMessages.push(this._buildHashMessages({ebProtocol:ebPtcl,ebBs:this.ebO.bs,addineyeDomain:this.ebO.dmn},EBG.INNERIFRAMEMessage.VERIFY,
a==EBG.Adaptors.IframeMode.VERIFY?EBG.INNERIFRAMEMessage.LASTMSG:EBG.INNERIFRAMEMessage.NOT_LASTMSG));if(a==EBG.Adaptors.IframeMode.SERVE||a==EBG.Adaptors.IframeMode.SERVEANDVERIFY){var a={ebPtcl:ebPtcl,ebBigS:ebBigS,ebResourcePath:this.ebO&&this.ebO.adConfig&&this.ebO.adConfig.resourcePath?this.ebO.adConfig.resourcePath:ebResourcePath,ebRand:ebRand,ebPli:ebPli,ebAdID:ebAdID},b={ptcl:ebPtcl,bs:ebO.bs,adId:ebO.adConfig.adId},c=this._buildSecretTagsObj();this.ebO.adConfig=this.ebO.tn!=EBG.adTypes.VisibilityAd?
null:{tn:ebO.adConfig.tn,rnd:ebO.adConfig.rnd,adId:ebO.adConfig.adId,uid:ebO.adConfig.adId+"_"+ebO.adConfig.rnd};this._hashMessages.push(this._buildHashMessages(b,EBG.INNERIFRAMEMessage.ADCONFIG_REQUEST));this._hashMessages.push(this._buildHashMessages(this.ebO,EBG.INNERIFRAMEMessage.EBO));this._hashMessages.push(this._buildHashMessages(a,EBG.INNERIFRAMEMessage.GLOBALPARAMS,EBG.INNERIFRAMEMessage.NOT_LASTMSG));this._hashMessages.push(this._buildHashMessages(c,EBG.INNERIFRAMEMessage.SECRET_TAGS,EBG.INNERIFRAMEMessage.LASTMSG))}EBG.msgProtocol.postMessage("",
window.location.href,window);EBG.msgProtocol.receiveMessages(this._handleMessagesHashProtocol,10)},_buildHashMessages:function(a,b,c){a.typeObj=b;a.lastMsg=c?c:EBG.INNERIFRAMEMessage.NOT_LASTMSG;a.parentURL=document.location.href;return escape(JSON.stringify(a))},_sendMessageHashProtocol:function(){EBG.msgProtocol.postMessage(EBG.adaptor.serving._hashMessages[0],EBG.adaptor.serving.addinEyeRef.src,EBG.adaptor.serving.addinEyeRef);EBG.adaptor.serving._hashMessages.splice(0,1);0==EBG.adaptor.serving._hashMessages.length&&
EBG.msgProtocol.finishMessaging()},listenToMessages:function(){EBG.pm.bind(EBG.INNERIFRAMEMessage.LOADED,this._handlePostMessage,this)},_ebGetHostName:function(a){var b="",a=a.toLowerCase(),b=7<=a.length&&"http://"==a.substr(0,7)?a.substr(7):8<=a.length&&"https://"==a.substr(0,8)?a.substr(8):a,a=b.indexOf("/");0<a&&(b=b.substr(0,a));return b},_findPlacementIframe:function(){try{var a=this.displayWin,b=window,c=null,d=-1;do{var d=-1,c=null,e=b.parent.frames;if(!EBG.isDefined(e.length))for(var g=b.parent.document.getElementsByTagName(EBG.Adaptors.TagNames.IFRAME),
e=[],f=0;f<g.length;f++)e.push(g[f].contentWindow);for(f=0;f<e.length;f++)try{if(e[f]==b){d=f;c=b;break}}catch(h){}b=b.parent}while(b!=a);if(!(0<=d))throw new exception("ServingMgr._findPlacementIframe","Could not find placement iframe!");b=null;try{if("undefined"!=typeof c.frameElement)b=c.frameElement}catch(k){}if(!b){for(var l=a.document.getElementsByTagName(EBG.Adaptors.TagNames.IFRAME),f=0;f<l.length;f++)l[f].contentWindow==c&&(d=f);if(d>=l.length)throw new exception("ServingMgr._findPlacementIframe",
EBG.format("frames List is too short ({0}). Needed frame is {1}",l.length,d));b=l[d]}this.placementIframe=b}catch(m){}},_handleMessagesHashProtocol:function(a){switch(a.data){case EBG.INNERIFRAMEMessage.CONTINUE_SENDING:EBG.adaptor.serving._sendMessageHashProtocol()}},_handlePostMessage:function(a){a&&a==EBG.INNERIFRAMEMessage.LOADED&&EBG.adaptor.serving._sendInitToInnerIframe()},_sendInitToInnerIframe:function(){for(var a=0;a<EBG.adaptor.serving._pmMessages.length;a++)EBG.pm({target:this.addinEyeRef.contentWindow,
type:EBG.adaptor.serving._pmMessages[a].msgType,data:EBG.adaptor.serving._pmMessages[a].data});EBG.adaptor.serving._pmMessages={}},_initPmMessages:function(a){this._pmMessages=[];(a==EBG.Adaptors.IframeMode.VERIFY||a==EBG.Adaptors.IframeMode.SERVEANDVERIFY)&&this._pmMessages.push({msgType:EBG.INNERIFRAMEMessage.VERIFY,data:{ebProtocol:ebPtcl,ebBs:this.ebO.bs,addineyeDomain:this.ebO.dmn}});if((a==EBG.Adaptors.IframeMode.SERVE||a==EBG.Adaptors.IframeMode.SERVEANDVERIFY)&&EBG.adaptor.serving.ebO)a={ebO:EBG.adaptor.serving.ebO,
ebPtcl:ebPtcl,ebBigS:ebBigS,ebResourcePath:this.ebO&&this.ebO.adConfig&&this.ebO.adConfig.resourcePath?this.ebO.adConfig.resourcePath:ebResourcePath,ebRand:ebRand,secretTagData:this._buildSecretTagsObj(),ebPli:ebPli,ebAdID:ebAdID},this._pmMessages.push({msgType:EBG.INNERIFRAMEMessage.INIT,data:a})}};EBG.Adaptors.FlashDetector=function(){this._init();this._customScript=!!window.ebAdCS};
EBG.Adaptors.FlashDetector.prototype={version:0,checkingBlock:!1,checkedBlock:!1,isBlocked:null,_flashPlayerVersion:null,_detectionPixelTimeout:null,_throttleTimeout:null,_detectionPixelTimeoutDuration:2E3,_init:function(){var a=-1;try{a=(new ActiveXObject("Shockwaveflash.Shockwaveflash.7")).GetVariable("$version"),a=this._splitFlashMajorMinorVersions(a),a=Number(a)}catch(b){}if(-1==a)try{var c=0,d=0,e=0;if(null!=navigator.plugins&&0<navigator.plugins.length){var g=navigator.mimeTypes;if(g&&g["application/x-shockwave-flash"]&&
g["application/x-shockwave-flash"].enabledPlugin&&g["application/x-shockwave-flash"].enabledPlugin.description){var f=g["application/x-shockwave-flash"].enabledPlugin.description.split(" "),h=f[2].split("."),c=h[0],d=h[1],e=f[3];""==e&&(e=f[4]);isNaN(e[0])&&(e=e.substring(1));0<e.indexOf("d")&&(e=e.substring(0,e.indexOf("d")))}a=Number(c+"."+d+e)}}catch(k){}if(!isNaN(a))this.version=a},_splitFlashMajorMinorVersions:function(a){if(a)return a=a.split(" ")[1].split(","),EBG.format("{0}.{1}{2}",a[0],
a[1],a[2])},_handlePixelMessage:function(a){clearTimeout(this._detectionPixelTimeout);this._detectionPixelTimeout=null;this.flashPlayerVersion=a;this.isBlocked=!1;EBG.runTimed(this,this._dispatchFlashDetected,[],10)},_handleDetectionPixelTimeout:function(a){var b=EBG.adaptor.browser.isFF()||EBG.adaptor.isPageVisible(),c=EBG.adaptor.hasHiddenParent(EBG.adaptor.getElementById("ebFlashDetection"));if(b&&a&&!c){this.checkedBlock=!0;this.checkingBlock=!1;a=EBG.adaptor.getDisplayWin();if(a.EBG&&a.EBG!=
EBG&&a.EBG.adaptor.flash&&EBG.isDefinedNotNull(a.EBG.adaptor.flash.flashPlayerVersion))this.flashPlayerVersion=a.EBG.adaptor.flash.flashPlayerVersion;this.isBlocked=!this.flashPlayerVersion;this._dispatchFlashDetected();clearTimeout(this._detectionPixelTimeout);this._detectionPixelTimeout=null}else clearTimeout(this._detectionPixelTimeout),this._detectionPixelTimeout=EBG.runTimed(this,this._handleDetectionPixelTimeout,[b],this._detectionPixelTimeoutDuration)},_dispatchFlashDetected:function(){this.checkedBlock=
!0;this.checkingBlock=!1;var a=new EBG.Events.Event(EBG.Events.EventNames.FLASH_DETECTED);a.dispatcher=this;a.eventData={isBlocked:this.isBlocked,versionStr:this.flashPlayerVersion,versionInt:this.version};EBG.eventMgr.dispatchEvent(a);EBG.adaptor.removeElement("ebFlashDetectionDiv")},_buildRenderPixelJson:function(){var a={play:"true",resId:"ebFlashDetection",resPath:ebBigS+"/Res/Assets/Pixel"+EBG.flashPixelVer+"/pixel.swf",unique:0,wmode:"opaque",tagName:EBG.Adaptors.TagNames.OBJECT,attributes:{id:"ebFlashDetection",
dir:"ltr",name:"ebFlashDetection",style:{position:"absolute",textAlign:"left",width:"1px",height:"1px"},codebase:EBG.format("{0}download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#",EBG.protocol),version:"9,0,0,0"},params:{play:"true",wmode:"opaque",menu:"false",flashVars:"id=ebFlashDetection",allowScriptAccess:"always",allowFullScreen:"true"}};this.isSupportShockwave()?(a.attributes.type="application/x-shockwave-flash",a.attributes.data=a.resPath):(a.attributes.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
a.params.movie=a.resPath);return a},_createScriptTag:function(){var a=EBG.format("function {0}(args)","DoFS_FlashDetectionPixel"),a=a+EBG.format("{ try{ if(!args||args=='null')args=''; return {0}(args);}catch(e){if(window.mmFSExceptionAlert)mmFSExceptionAlert('Command: '+command+'\\nargs: '+args.toString()+'\\n\\nexception in DoFS func:\\n'+e.message)}}","EBG.adaptor.flash._handlePixelMessage");return{tagName:EBG.Adaptors.TagNames.SCRIPT,text:a}},_handleThrottleEvent:function(a){a&&a.state&&(a.state==
EBG.ThrottleStates.THROTTLE||a.state==EBG.ThrottleStates.PAUSE?this._setThrottleState(a):a.state==EBG.ThrottleStates.RESUME?(clearTimeout(this._throttleTimeout),this._setThrottleState(a)):a.state==EBG.ThrottleStates.LOAD&&a.elemId&&a.id&&this._verifyThrottleDetectLocation(a))},_verifyThrottleDetectLocation:function(a){if(a.elemId&&a.id){var b=EBG.adaptor.getBoundingClientRect(EBG.adaptor.getElementById(a.elemId)),c=EBG.adaptor.getElementById(a.id),d=EBG.adaptor.getBoundingClientRect(c);if(b&&d&&EBG.isNumber(b.width)&&
EBG.isNumber(d.width))if(0==b.width||0==b.height)EBG.runTimed(this,this._verifyThrottleDetectLocation,[a],30);else{if(EBG.serializeObject(b)!=EBG.serializeObject(d)){var e=parseInt(c.style.marginTop,10),g=parseInt(c.style.marginLeft,10);c.style.marginTop=EBG.px(e-(d.top-b.top));c.style.marginLeft=EBG.px(g-(d.left-b.left));c.style.width=EBG.px(b.width);c.style.height=EBG.px(b.height)}this._customScript&&(b=(b=a.adUId&&EBG.ads[a.adUId])&&b._CCs&&b._CCs[a.elemId])&&EBG.RichFlashPanelCC&&b instanceof
EBG.RichFlashPanelCC&&EBG.runTimed(this,this._verifyThrottleDetectLocation,[a],250)}}},_setThrottleState:function(a){if(a.adUId){var b=new EBG.Events.Event(EBG.Events.EventNames.THROTTLED),c=a.adUId.split("_")[1];b.dispatcher={_adConfig:{rnd:c,uid:a.adUId}};b.eventData=a;EBG.eventMgr.dispatchEvent(b)}},removeThrottleDetectionSwf:function(a){EBG.adaptor.removeElement("ebFlashThrottleDetection_"+a)},isSupportShockwave:function(){var a=!0;if(EBG.adaptor.browser.isIE()&&11>EBG.adaptor.browser.getVersion()||
10<EBG.adaptor.browser.getVersion()&&9>EBG.adaptor.getDisplayWin().document.documentMode)a=!1;return a},doFlashBlockDetection:function(a){this.checkingBlock=!0;var b={tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:"ebFlashDetectionDiv",style:{width:"0px",height:"0px"}},children:[this._buildRenderPixelJson(),this._createScriptTag()]};EBG.adaptor.inInnerIframe()?EBG.adaptor.inject(b,EBG.Adaptors.InjectionMethod.INSERT_BEFORE,EBG.adaptor.serving.placementIframe):a&&EBG.adaptor.getElementById(a)&&EBG.adaptor.addInlineDOM(b,
a);this._detectionPixelTimeout=EBG.runTimed(this,this._handleDetectionPixelTimeout,[],this._detectionPixelTimeoutDuration)}};EBG.Adaptors.Wallpaper=function(){this._currentBg=this._getCurrentBackground()};
EBG.Adaptors.Wallpaper.prototype={SetBackgroundImage:function(a){var b=EBG.adaptor.getPageWin().document;if(a.imgSrc){if(!a.color)a.color=this._currentBg.color?this._currentBg.color:"transparent";var c=a.color,c=c+(" url('"+a.imgSrc+"') ");a.tiling="repeat"==a.tiling.toLowerCase()||"repeat-x"==a.tiling.toLowerCase()||"repeat-y"==a.tiling.toLowerCase()||"no-repeat"==a.tiling.toLowerCase()?a.tiling.toLowerCase():this._currentBg.tiling?this._currentBg.tiling:"no-repeat";var c=c+(" "+a.tiling),c=a.scrolling?
c+" scroll":c+" fixed",d="";"center"==a.positionX.toLowerCase()||"right"==a.positionX.toLowerCase()||"left"==a.positionX.toLowerCase()?d=a.positionX.toLowerCase():a.positionX="";"center"==a.positionY.toLowerCase()||"top"==a.positionY.toLowerCase()||"bottom"==a.positionY.toLowerCase()?d+=" "+a.positionY.toLowerCase():a.positionY="";if(!a.positionX||!a.positionY)d=b.body.style.backgroundPosition?b.body.style.backgroundPosition:"center top";b.body.style.background=c+(" "+d)}},RemoveBackgroundImage:function(){this._currentBg.imgSrc?
this.SetBackgroundImage(this._currentBg):EBG.adaptor.getPageWin().document.body.style.background=""},_getCurrentBackground:function(){var a=new EBG.Adaptors.Wallpaper.BgData,b=EBG.adaptor.getPageWin().document.body;if(""!=b.style.backgroundImage)a.imgSrc=b.style.backgroundImage.substr(4,b.style.backgroundImage.length-5);if(""!=b.style.backgroundColor)a.color=b.style.backgroundColor;if(""!=b.style.backgroundRepeat)a.tiling=b.style.backgroundRepeat;if(""!=b.style.backgroundAttachment)a.scrolling="fixed"==
b.style.backgroundAttachment?!1:!0;if(""!=b.style.backgroundPosition)posArr=b.style.backgroundPosition.split(" "),a.positionX=posArr[0],a.positionY=posArr[1];return a}};EBG.Adaptors.Wallpaper.BgData=function(){};EBG.Adaptors.Wallpaper.BgData.prototype={color:"",imgSrc:"",tiling:"",positionX:"",positionY:"",scrolling:!1,contentWidth:null};EBG.declareNamespace("Interactions");
EBG.Interactions.SystemInts={CLICK:"_eyeblaster",AD_DURATION:"ebAdDuration",REPLAY:"ebReplay",CLOSE:"ebClose",CLOSE_REM:"ebRemClose",DEFAULT_CLICK:"ebDefaultClick",USER_INTERACTION:"ebUserInteraction",UNIQUE_VIDEO_STARTED:"ebUniqueVideoStarted",DWELL_TIME:"ebDwellTime",DWELL_UNIQUE:"ebUniqueDwell",RICH_FLASH_PLAYED:"ebRichFlashPlayed",INT_DURATION:"ebIntDuration",VISIBILITY_RECORDABLE:"VsR",VISIBILITY_AGENCY_RECORDABLE:"VsRAg",VISIBILITY_ADVERTISER_RECORDABLE:"VsRAd",VISIBILITY_ADVERTISER:"VsAd",
VISIBILITY_AGENCY:"VsAg",VISIBILITY_IAB:"VsIAB",VISIBILITY_ADVERTISER_DURATION:"VsAdDu",VISIBILITY_AGENCY_DURATION:"VsAgDu",VISIBILITY_AVG_AD_SURFACE:"VsAvSu",VISIBILITY_AVG_SCREEN_SHARE:"VsAvSc",REM_DURATION:"ebRemDuration",INTRO_FULL_PLAY:"ebFullPlay",REM_FULL_PLAY:"ebRemFullPlay",SWIPE:"ebSwipe",AD_START:"AdStart",AD_STACKING:"AdStacking",MULTI_BURN:"MultiBurn",AD_COLLISION:"AdCollision",AD_CAROUSEL:"AdCarousel",AD_PARAMS:"AdParams",PLAYER_PARAMS:"plparams",VER_URL:"verURL"};
EBG.Interactions.Categories={SYSTEM:2,VIDEO:1,CUSTOM:0};EBG.Interactions.InitiationTypes={AUTO:"auto",USER:"user"};EBG.Interactions.InteractionTypes={COUNTER:"Counter",TIMER:"Timer"};EBG.Interactions.checkURL=function(a){var b=a.toLowerCase();-1==b.indexOf("http://")&&-1==b.indexOf("https://")&&-1==b.indexOf("ftp://")&&-1==b.indexOf("aim:")&&-1==b.indexOf("mailto:")&&-1==b.indexOf("fb://")&&(a=0==b.indexOf("/")?"http://"+EBG.adaptor.getHostName()+a:"http://"+a);return a};
EBG.Interactions.RemoteServersData=function(){};EBG.Interactions.RemoteServersData.prototype={networkUrl:null,agencyUrl:null};EBG.declareClass(EBG.Interactions.RemoteServersData,null);EBG.Interactions.InteractionData=function(a,b,c){this.reportingName=a;this.adUId=b;this.category=c};EBG.Interactions.InteractionData.prototype={initiationType:EBG.Interactions.InitiationTypes.AUTO,category:EBG.Interactions.Categories.SYSTEM,isPanel:!1};EBG.declareClass(EBG.Interactions.InteractionData,null);
EBG.Interactions.CounterInteractionData=function(a,b,c){EBG.callSuperConstructor(EBG.Interactions.CounterInteractionData,this,[a,c,b]);this.remoteServers=new EBG.Interactions.RemoteServersData};EBG.Interactions.CounterInteractionData.prototype={reportImmediately:!1,countAsClick:!1,remoteServers:null,clickURL:null,numLeftToReport:10,state:null};EBG.declareClass(EBG.Interactions.CounterInteractionData,EBG.Interactions.InteractionData);
EBG.Interactions.TimerInteractionData=function(a,b,c){this.reportingName=a;EBG.callSuperConstructor(EBG.Interactions.TimerInteractionData,this,[a,c,b])};EBG.Interactions.TimerInteractionData.prototype={value:0,startTime:0,idleDuration:0};EBG.declareClass(EBG.Interactions.TimerInteractionData,EBG.Interactions.InteractionData);EBG.Interactions.AggregationInteractionData=function(a,b,c){this.reportingName=a;EBG.callSuperConstructor(EBG.Interactions.AggregationInteractionData,this,[a,c,b])};
EBG.Interactions.AggregationInteractionData.prototype={value:0,isPlaying:!1};EBG.declareClass(EBG.Interactions.AggregationInteractionData,EBG.Interactions.InteractionData);EBG.AutolinaClass=function(){};
EBG.AutolinaClass.prototype={_hostname:"localhost:3000",reportType:{INTERACTION:"INTERACTION",THIRDPARTY:"THIRDPARTY",CLICK:"CLICK"},report:function(a,b){a=this._adapt(a,b);navigator.sendBeacon?EBG.adaptor.reportBeacon(a):EBG.adaptor.reportToRemoteServerUsingImage(a)},_adapt:function(a,b){switch(b){case EBG.Autolina.reportType.THIRDPARTY:return ebPtcl+this._hostname+"/3rdparty?url="+encodeURIComponent(a);case EBG.Autolina.reportType.INTERACTION:return ebPtcl+this._hostname+"/interaction?"+a.split("?")[1];
case EBG.Autolina.reportType.CLICK:return ebPtcl+this._hostname+"/click?url="+encodeURIComponent(a)}},_GET:function(){var a={x:function(){if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;for(var a=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],c,d=0;d<a.length;d++)try{c=new ActiveXObject(a[d]);break}catch(e){}return c},get:function(b,c,d){try{var e=a.x();e.open("GET",b,d);e.onreadystatechange=function(){4==e.readyState&&c&&
c(e.responseText)}}catch(g){}}};return a.get}()};EBG.declareNamespace("Utilities.InteractionUtil");EBG.Utilities.InteractionUtil=function(){};
EBG.Utilities.InteractionUtil.prototype={getBannerRedirectUrl:function(a){if(!a||!a.adConfig)return"";var b=a.adConfig.protocol+EBG.combinePaths(a.adConfig.bsPath,EBG.format("{0}/adServer.bs?cn=brd&Page={1}&PluID={2}&Pos={3}&EyeblasterID={4}",a.adConfig.interactionServer,a.adConfig.page,a.adConfig.pluId,a.adConfig.rnd,a.adConfig.adId));EBGInfra.isDefinedNotNull(a.clickVal)&&(b+="&clk="+a.clickVal);!a.adConfig.isPreview&&!a.isClickTag&&(b+="&sct=1");a.adConfig.autolina&&(b+="&autolina=1");if(a.adConfig.massVersioning){if(a.adConfig.massVersioning.adVersions||
a.adConfig.massVersioning.defaultAdVersion)a.sClickedVersion?b+="&vid="+a.sClickedVersion+"&vcl=1":a.versionToReport&&(b+="&vid="+a.versionToReport);a.adConfig.massVersioning.targetAudienceId&&(b+="&ta="+a.adConfig.massVersioning.targetAudienceId);a.adConfig.massVersioning.deliveryGroupId&&(b+="&dg="+a.adConfig.massVersioning.deliveryGroupId);a.adConfig.massVersioning.versionTargetAudienceId&&(b+="&tav="+a.adConfig.massVersioning.versionTargetAudienceId);a.adConfig.massVersioning.dgTargetAudienceId&&
(b+="&tadg="+a.adConfig.massVersioning.dgTargetAudienceId);a.adConfig.massVersioning.originalDeliveryGroupId&&(b+="&dgo="+a.adConfig.massVersioning.originalDeliveryGroupId)}a.sJumpUrl&&(b+="&rtu="+encodeURIComponent(a.sJumpUrl));a.cvurl&&(b+=EBG.format("&cvurl={0}",encodeURIComponent('"'+a.cvurl.split("|").join('","')+'"')));a.fIsDefClick=EBG.isBool(a.fIsDefClick)?a.fIsDefClick:!1;a.fIsDefClick||(b+="&di=0");EBGInfra.isDefinedNotNull(a.adConfig.sPublisherPlacementId)&&(b+="&pc="+a.adConfig.sPublisherPlacementId);
EBGInfra.isDefinedNotNull(a.adConfig.sID)&&(b+="&sessionid="+a.adConfig.sID);a.adConfig.usercookie&&(b+="&usercookie="+a.adConfig.usercookie);EBGInfra.isDefinedNotNull(a.adConfig.optOut)&&(b+="&OptOut="+a.adConfig.optOut);EBGInfra.isDefinedNotNull(a.adConfig.ncu)&&(b+="&ncu="+encodeURIComponent(a.adConfig.ncu));EBGInfra.isDefinedNotNull(a.adConfig.ebReferrer)&&(b+="&ebReferrer="+encodeURIComponent(a.adConfig.ebReferrer));EBGInfra.isDefinedNotNull(a.adConfig.lineId)&&(b+="&lineid="+encodeURIComponent(a.adConfig.lineId));
EBGInfra.isDefinedNotNull(a.adConfig.diAppId)&&(b+="&diappid="+a.adConfig.diAppId);return b}};EBG.declareClass(EBG.Utilities.InteractionUtil,null);EBG.InteractionUtil=EBG.InteractionUtil||new EBG.Utilities.InteractionUtil;EBG.Interactions.Interaction=function(){};
EBG.Interactions.Interaction.prototype={unique:1,_escapeInteractionName:function(a){a=a.toString();a=a.replace(/\~|\^|\|/ig,"_");return escape(a)},_buildReportFormat:function(a,b,c,d){d||(d=0);return EBG.format("{0}{2}{1}{3}{1}{4}{1}{5}{6}{7}{8}{9}",EBG.Interactions.InteractionManager.charIntDelimeter,EBG.Interactions.InteractionManager.charAdFieldsDelimeter,this._escapeInteractionName(this.interactionData.reportingName),c,d,a,this.unique,b,this.interactionData.category,this.interactionData.isPanel?
1:0)}};EBG.Interactions.CounterInteraction=function(a){EBG.callSuperConstructor(EBG.Interactions.CounterInteraction,this);this.interactionData=a?a:new EBG.Interactions.CounterInteractionData};
EBG.Interactions.CounterInteraction.prototype={type:EBG.Interactions.InteractionTypes.COUNTER,handle:function(a){var b=this.interactionData,c=b.counterJumpUrlData,d=c&&c.tmpData?c.tmpData.isClick:!1,e=c&&c.tmpData?c.tmpData.isProductClick:!1,g=!1,f=!0,h=!1,h="",k=(c&&c.tmpData?c.tmpData.clickUrl:null)||(c?c.jumpUrl:""),l=c&&c.tmpData&&c.tmpData.windowWasOpen?!0:!1,c=!l;this.interactionData.adConfig.ffs.CFF_openWindowParam&&(c=c&&this.interactionData.adConfig.openWindow);this.shouldReportInteraction()?
(this._handleRemoteServers(),b.counterJumpUrlData&&(f=k&&this._isEBClick()?!1:!0,g=k&&(d||this._isEBClick())?!0:!1,(h=d||this._isEBClick())?g?c&&this.handleBRDFlow():(d||e)&&this.reportThirdPartyUrls():c&&k&&(k=EBG.Interactions.checkURL(k),this._openOrRedirect(k))),h=f?this._getReportingData(a,g):""):!l&&k&&(k=EBG.Interactions.checkURL(k),this._openOrRedirect(k));return h},reportThirdPartyUrls:function(){var a=this.interactionData.reportingName.toLowerCase()==EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase(),
b=this.interactionData.counterJumpUrlData,c=[];if(b&&b.tmpData&&b.tmpData.isClick&&(c=this.interactionData.adConfig.clickTrackingUrls,a||this.interactionData.adConfig.showOnlyImage))for(a=0;a<this.interactionData.adConfig.defaultClickTrackingUrls.length;a++)c[c.length]=this.interactionData.adConfig.defaultClickTrackingUrls[a];if(b&&b.tmpData&&b.tmpData.isProductClick&&b.tmpData.clickedVerUrl)c[c.length]=b.tmpData.clickedVerUrl;for(a=0;a<c.length;a++)EBG.adaptor.reportToRemoteServerUsingImage(c[a])},
shouldReportInteraction:function(){var a=!0;0==this.interactionData.numLeftToReport||EBG.isPreview||EBG.isInWorkshop?a=!1:this.interactionData.numLeftToReport--;return a},handleBRDFlow:function(){var a=this.interactionData,b=this.interactionData.counterJumpUrlData,c=EBGInfra.isDefinedNotNull(b)&&b.tmpData?b.tmpData.clickUrl:null,d=c||EBGInfra.isDefinedNotNull(b)&&b.jumpUrl;this._isEBClick()&&(c||(d=""));a=a.reportingName.toLowerCase()==EBG.Interactions.SystemInts.DEFAULT_CLICK.toLowerCase();c=0;b.tmpData.isClick?
c=1:b.tmpData.isProductClick&&(c=2);d=""==d?"":EBG.Interactions.checkURL(d);d=this._getBannerRedirectUrl(d,c,a,b.tmpData.clickedVersion);d=EBG.Interactions.checkURL(d);this._openOrRedirect(d)},_openOrRedirect:function(a){-1==this.interactionData.counterJumpUrlData.target.indexOf(EBG.WindowTarget.BLANK)?(this.interactionData.reportImmediately=!0,EBG.runTimed(this,this._openPage,[a,this.interactionData.counterJumpUrlData],1E3)):this._openPage(a,this.interactionData.counterJumpUrlData)},getClickTagUrl:function(a){var b=
"",a=EBG.isDefined(a)&&""!=a?EBG.Interactions.checkURL(a):void 0;EBG.isPreview?EBG.isInWorkshop?b=EBG.format("ReportPage_{0}.html",HTMLPageVer):(b=this.interactionData.counterJumpUrlData.jumpUrl,4<=b.length&&"http"!=b.substr(0,4)&&(b=EBG.format("{0}{1}",ebPtcl,b))):(b=this._getBannerRedirectUrl(a,null,null,null,!0),b=EBG.format("{0}/ReportPage{1}.html?ebReportURL={2}$$ebImpressionID={3}",ebBigS,EBG.reportPageVer,escape(b),EBG.Ads.Ad.Fn.getRandFromAdUId(this.interactionData.adConfig.uid)),a=-1,EBG.adaptor.browser.isIE()&&
(a=9<=EBG.adaptor.browser.getVersion()?4096:2048,a-=b.length),a=this._getReportPageTrackingUrls(a),b+=a);return b},_getReportPageTrackingUrls:function(a){var b="$$ebTURLs=[";if(-1!=a){if(b.length>=a)return"";a-=b.length}for(var c=this.interactionData.adConfig.clickTrackingUrls,d=0;d<c.length;d++){var e=EBG.format('{0}"{1}"',0!=d?",":"",c[d]);if(-1!=a){if(e.length>=a)break;a-=e.length}b+=e}return b+"]"},_openPage:function(a,b){var c=b.tmpData.clickedVerUrl?encodeURIComponent('"'+b.tmpData.clickedVerUrl.split("|").join('","')+
'"'):"",d=b.tmpData.clickedVerUrl&&!EBG.isPreview&&!EBG.isInWorkshop?a+"&cvurl="+c:a;switch(EBG.adaptor.getRequestMethod(d)){case "GET":EBG.Autolina&&EBG.Autolina.report(d,EBG.Autolina.reportType.CLICK);EBG.adaptor.openPage(d,b);break;case "POST":var e=b.target;if(!(EBG.adaptor.browser.isIE()&&9>=EBG.adaptor.browser.getVersion()))b.target=!b.target||b.target==EBG.WindowTarget.BLANK?"ebReportPage"+parseInt(1E8*Math.random()):b.target,EBG.adaptor.openPage("",b);EBG.runTimed(this,function(){function c(a,
b){var d=document.createElement("input");d.setAttribute("type","hidden");d.setAttribute("name",a);d.setAttribute("value",b);return d}var f=document.createElement("form");f.setAttribute("method","post");f.setAttribute("action",a.substring(0,d.indexOf("?"))+"?cn=brd&ebReferrer="+encodeURIComponent(this.interactionData.adConfig.ebReferrer));f.setAttribute("target",b.target);b.target=e;var h=this._urlQueryStringToJSON(d),k;for(k in h)f.appendChild(c(k,unescape(h[k])));EBG.adaptor.getDisplayWin().document.body.appendChild(f);
f.submit()},[],25);break;default:EBG.adaptor.openPage(d,b)}},_urlQueryStringToJSON:function(a){var b={},c=a.substring(a.indexOf("?")+1);if(!c)return b;for(var a=[],d=0,e=0;e<c.length;e++)switch(c.charAt(e)){case "&":a.push(c.substring(d,e));d=e+1;break;case "$":if("="==c.charAt(e-1)&&"$"==c.charAt(e+1))for(e+=2;!("$"==c.charAt(e)&&"$"==c.charAt(e-1));)e++}a.push(c.substring(d));for(e=0;e<a.length;e++)c=a[e],b[c.substring(0,c.indexOf("="))]=c.substring(c.indexOf("=")+1);return b},_getReportScript:function(a,
b){return'<script type="text/javascript">var clkURLs = ["'+a.join('","')+'"];var reported = false;var cntr = 0; for (var i=0;i<'+a.length+';i++){var img = document.createElement("img");img.onload = img.onerror = function(){cntr++; if (cntr=='+a.length+' && !reported){reported = true; window.location.replace("'+b+'");}};try{img.src = clkURLs[i];}catch(e){cntr++; if (cntr=='+a.length+' && !reported){reported = true; window.location.replace("'+b+'");}}}setTimeout(function(){if (!reported){reported=true;window.location.replace("'+
b+'");}}, 1000);<\/script><body></body>'},_getReportingData:function(a,b){var c=0,d=0;b||(c=this.interactionData.counterJumpUrlData&&this.interactionData.counterJumpUrlData.tmpData.isClick?1:0,d=this.interactionData.initiationType==EBG.Interactions.InitiationTypes.USER?1:0);var e=this.interactionData.value?this.interactionData.value:0;if(EBG.isObj(e)&&this.interactionData.useInteractionsStrPipe){if(this.interactionData.reportingName==EBG.Interactions.SystemInts.AD_PARAMS)e.idx=this.interactionData.numToReport-
this.interactionData.numLeftToReport;e=EBG.serializeObject(e)}c=this._buildReportFormat(c,d,e,a);this.unique=0;return c},_getBannerRedirectUrl:function(a,b,c,d,e){var g=this.interactionData.adConfig,f;if(g.massVersioning&&(g.massVersioning.adVersions||g.massVersioning.defaultAdVersion))f=d?d:EBG.Ads.Ad.Fn.getVersionToReport(g.massVersioning.adVersions);return EBG.InteractionUtil.getBannerRedirectUrl({adConfig:g,sJumpUrl:a,clickVal:b,fIsDefClick:c,sClickedVersion:d,isClickTag:e,versionToReport:f})},
_handleRemoteServers:function(){if(!EBG.isPreview&&this.interactionData.remoteServers){var a=this.interactionData.remoteServers,b=new EBG.Events.Event(EBG.Events.EventNames.INTERACTION_REPORT_REMOTE_SERVERS);b.dispatcher=this;b.timing=EBG.Events.EventTiming.BEFORE;b.eventData={remoteServers:a};EBG.eventMgr.dispatchEvent(b)||(a.networkUrl&&(b=this._replaceRSTokens(a.networkUrl),EBG.adaptor.reportToRemoteServerUsingImage(b)),a.agencyUrl&&(a=this._replaceRSTokens(a.agencyUrl),EBG.adaptor.reportToRemoteServerUsingImage(a)))}},
_replaceRSTokens:function(a){try{a=a.replace(/\[ebInteraction\]/ig,this.interactionData.reportingName),a=a.replace(/\[ebInteractionNum\]/ig,EBG.intMgr.adsData[this.interactionData.adConfig.uid].numOfInteractions)}catch(b){}return a},_isEBClick:function(){return this.interactionData&&(EBG.strEQ(this.interactionData.reportingName,EBG.Interactions.SystemInts.CLICK)||EBG.strEQ(this.interactionData.reportingName,EBG.Interactions.SystemInts.DEFAULT_CLICK))}};
EBG.declareClass(EBG.Interactions.CounterInteraction,EBG.Interactions.Interaction);EBG.Interactions.TimerInteraction=function(a){EBG.callSuperConstructor(EBG.Interactions.TimerInteraction,this);this.interactionData=a?a:new EBG.Interactions.TimerInteractionData};
EBG.Interactions.TimerInteraction.prototype={type:EBG.Interactions.InteractionTypes.TIMER,handle:function(a){var b=this.interactionData.value;this.isRunning()&&(this.stop(),this.start());var b=this.interactionData.value-b,b=0<b?b:0,c=this.interactionData.idleDuration/1E3;this.interactionData.value-=c<=b?c:b;this.interactionData.idleDuration=0;b=EBG.Interactions.InteractionManager.MAX_AD_DURATION_SEC;this.interactionData.value=this.interactionData.value>b?b:this.interactionData.value;this.interactionData.value=
Math.floor(this.interactionData.value);return 0>=this.interactionData.value?!1:this._buildReportFormat(0,0,this.interactionData.value,a,0)},start:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.START_TIMER);a.dispatcher=this;a.timing=EBG.Events.EventTiming.BEFORE;a.eventData={interaction:this};if(!EBG.eventMgr.dispatchEvent(a)){if(!this.isRunning())this.interactionData.startTime=(new Date).getTime(),a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)}},stop:function(){if(this.isRunning()){var a=
new EBG.Events.Event(EBG.Events.EventNames.STOP_TIMER);a.dispatcher=this;a.timing=EBG.Events.EventTiming.BEFORE;a.eventData={interaction:this};if(!EBG.eventMgr.dispatchEvent(a))this.interactionData.value+=this.getElapsedTime()/1E3,this.interactionData.startTime=0,a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER,EBG.eventMgr.dispatchEvent(a)}},getElapsedTime:function(){return(new Date).getTime()-this.interactionData.startTime},update:function(a){var b=new EBG.Events.Event(EBG.Events.EventNames.UPDATE_TIMER);
b.dispatcher=this;b.timing=EBG.Events.EventTiming.BEFORE;b.eventData={interaction:this};if(!EBG.eventMgr.dispatchEvent(b))this.interactionData.value+=a,b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER,EBG.eventMgr.dispatchEvent(b)},clear:function(){this.interactionData.value=0;this.interactionData.startTime=0},increaseIdleDuration:function(a){this.interactionData.idleDuration+=a},isRunning:function(){return 0<this.interactionData.startTime},isFinished:function(){return 0===this.interactionData.startTime&&
0<this.interactionData.value},getValue:function(){return this.interactionData.value},getType:function(){return EBG.DurationInteraction.TIMER}};EBG.declareClass(EBG.Interactions.TimerInteraction,EBG.Interactions.Interaction);EBG.Interactions.IdleManager=function(){this.currentIdleDuration=0;this._startTime=(new Date).getTime();this.intervalId=EBG.setInterval(this,this._checkIfIdle,[],EBG.Interactions.IdleManager.IDLE_INTERVAL)};EBG.Interactions.IdleManager.IDLE_INTERVAL=5E3;
EBG.Interactions.IdleManager.prototype={_totalIdleDuration:0,_lastActiveTimeStamp:0,updateIdleDuration:function(){this.currentIdleDuration=0;var a=(new Date).getTime();if(0!==this._lastActiveTimeStamp)this.currentIdleDuration=a-this._lastActiveTimeStamp,this.currentIdleDuration>EBG.Interactions.IdleManager.IDLE_INTERVAL+2E3&&(this._totalIdleDuration+=this.currentIdleDuration,EBG.intMgr.handleAllTimers(EBG.Interactions.InteractionManager.HandleAllTimersOptions.HANDLE_IDLE))},_checkIfIdle:function(){this.updateIdleDuration();
if((this._lastActiveTimeStamp=(new Date).getTime())-this._startTime-this._totalIdleDuration>1E3*EBG.Interactions.InteractionManager.MAX_AD_DURATION_SEC)EBG.intMgr.unLoadHandler(EBG.Interactions.InteractionManager.HandleAllTimersOptions.REPORT,!1),EBG.eventMgr.dispatchEvent(new EBG.Events.Event(EBG.Events.EventNames.MAX_AD_DURATION)),EBG.clearInterval(this.intervalId)}};EBG.declareClass(EBG.Interactions.IdleManager,null);
EBG.Interactions.StdInteractionManager=function(){this.adsData=EBG.intMgr?EBG.intMgr.adsData:{};this.adsIntQueues=EBG.intMgr?EBG.intMgr.adsIntQueues:{}};
EBG.Interactions.StdInteractionManager.prototype={copy:function(a){this.adsIntQueues=a.adsIntQueues;this.adsData=a.adsData},initAdData:function(a,b){var c=a.uid;this.adsIntQueues[c]=this.adsIntQueues[c]?this.adsIntQueues[c]:[];c=this.adsData[c]={adConfig:a,isUserInteractionOccur:!1,isClickOccur:!1,isProductClicked:{},numOfInteractions:0,delayIntReport:b,videoState:{},assetsTimers:{},clickReportScript:""};c[EBG.Interactions.InteractionTypes.COUNTER]={};c[EBG.Interactions.InteractionTypes.TIMER]={};
c.adConfig.isStdAd||this._addSystemInteractions(a)},allowInteractionReport:function(a){if(this.adsData[a])this.adsData[a].delayIntReport=!1},addInteraction:function(a,b){var c=EBG.isDefinedNotNull(b)?b.toLowerCase():a.interactionData.reportingName.toLowerCase(),d=a.interactionData.adUId,e=new EBG.Events.Event(EBG.Events.EventNames.ADD_INTERACTION);e.eventData=a;e.dispatcher={_adConfig:{rnd:this.adsData[d].adConfig.rnd}};e.timing=EBG.Events.EventTiming.BEFORE;var g=EBG.eventMgr.dispatchEvent(e),f=
this.adsData[d];if(!g){if(!f)return;f[a.type][c]=a;a.interactionData.adConfig=this.adsData[d].adConfig}e.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(e)},getClickTag:function(a){return(a=this._getCounterInteraction(EBG.Interactions.SystemInts.CLICK,a))?a.getClickTagUrl():""},getClickTarget:function(a){var b="_blank";if(!EBG.isPreview&&EBG.isInWorkshop&&(a=this._getCounterInteraction(EBG.Interactions.SystemInts.CLICK,a)))b=a.interactionData.counterJumpUrlData.target;return b},
handleCloseAdParts:function(a,b){if(a&&1==a.fClose){var c=new EBG.Events.Event(EBG.Events.EventNames.CLOSE_AD);c.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(b)}};c.eventData={closeDueToClickthrough:!0};EBG.eventMgr.dispatchEvent(c)}},handleCounterInteraction:function(a,b,c,d,e,g){var f=this._getCounterInteraction(a,b),h=f?f.interactionData:null,k=h?h.counterJumpUrlData:null,l=this.adsData[b],m=l.adConfig.isStdAd,o="",g=EBGInfra.isDefined(g)?g:!0,c=c||0;if(!m&&h)h.initiationType=d?EBG.Interactions.InitiationTypes.USER:
h.initiationType,this._handleUserInteraction(b,h),this._handleSpecialInteractions(a,b,c);if(f&&(a=new EBG.Events.Event(EBG.Events.EventNames.HANDLE_COUNTER_INTERACTION),a.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(b)}},a.timing=EBG.Events.EventTiming.BEFORE,a.eventData={interaction:f},!EBG.eventMgr.dispatchEvent(a))){if(k)k.tmpData=e,k.tmpData.isClick=h.countAsClick&&!l.isClickOccur,l.isClickOccur=k.tmpData.isClick?!0:l.isClickOccur,e=k.tmpData.clickedVersion,k.tmpData.isProductClick=
h.countAsClick&&k.tmpData.clickedVersion&&e&&!l.isProductClicked["V_"+e],k.tmpData.isProductClick&&(l.isProductClicked["V_"+e]=!0);else if(e&&e.value)f.interactionData.value=e.value;o=g?f.handle(c):"";l.numOfInteractions++;o&&(this._handleReportData(b,h,o),this._isReportDataInQueue(b,o)||this.reportInteractionQueues());this.handleCloseAdParts(k,b);a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)}},isInteractionExist:function(a,b,c){if(this.adsData[c]&&this.adsData[c][b])return this.adsData[c][b][a]?
!0:!1},_getCounterInteraction:function(a,b){a=a.toLowerCase();if(this.adsData[b]&&this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER]&&this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER][a])return this.adsData[b][EBG.Interactions.InteractionTypes.COUNTER][a]},getRepScr:function(a){if(this.adsData[a]&&this.adsData[a].clickReportScript)return this.adsData[a].clickReportScript}};EBG.declareClass(EBG.Interactions.StdInteractionManager,null);
EBG.Interactions.InteractionManager=function(){EBG.callSuperConstructor(EBG.Interactions.InteractionManager,this);EBG.intMgr&&EBG.intMgr.copy(this);this.idleManager=new EBG.Interactions.IdleManager;this._timedReport=EBG.isDefined(EBG.intReportTimeout)&&null!=EBG.intReportTimeout&&0<=EBG.intReportTimeout?EBG.intReportTimeout:this._timedReport;this._subscribeToEvents()};EBG.Interactions.InteractionManager.charAdFieldsDelimeter="~";EBG.Interactions.InteractionManager.charIntDelimeter="^";
EBG.Interactions.InteractionManager.intStackLength=7;EBG.Interactions.InteractionManager.MAX_AD_DURATION_SEC=900;EBG.Interactions.InteractionManager.INTERACTION_THRESHOLD_SEC=86400;EBG.Interactions.InteractionManager.HandleAllTimersOptions={REPORT:0,PAUSE:1,HANDLE_IDLE:2};
EBG.Interactions.InteractionManager.prototype={_isUnloadHandled:!1,_pausedTimers:null,_masterOrdinalNumber:null,_seqTimersReportData:{index:-1,intervals:[5,10,20,40,60,120,240]},_timedReport:1E4,startAggregate:function(a,b,c){if(null==this._masterOrdinalNumber)this._masterOrdinalNumber=c;this.startTimer(a,b,c)},startTimer:function(a,b,c){var d=this._getTimerInteraction(a,b);if(d){d.start();if(EBGInfra.isDefined(c)&&EBGInfra.notNull(c))switch(d=this.adsData[b],d=d.assetsTimers[c]?d.assetsTimers[c]:
d.assetsTimers[c]={},a){case EBG.VideoInteraction.VIDEO_PLAY_DURATION:this._startAssetTimer(d,EBG.VideoInteraction.VIDEO_ASSET_DURATION,b,c);break;case EBG.VideoInteraction.FULLSCREEN_DURATION:this._startAssetTimer(d,EBG.VideoInteraction.FULLSCREEN_ASSET_DURATION,b,c)}EBG.isGlobalDef("JSON")}},_handleVideoStarted:function(a,b){var c=new EBG.Events.Event(EBG.Events.EventNames.DWELL_VIDEO_START);c.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(a)}};c.eventData={assetId:b};EBG.eventMgr.dispatchEvent(c)},
_startAssetTimer:function(a,b,c,d){if(!a[b]){var e;null!=this._masterOrdinalNumber?(e=new EBG.Interactions.AggregationInteractionData(b,EBG.Interactions.Categories.VIDEO,c),a[b]=new EBG.Interactions.AggregateInteraction(e)):(e=new EBG.Interactions.TimerInteractionData(b,EBG.Interactions.Categories.VIDEO,c),a[b]=new EBG.Interactions.TimerInteraction(e))}a[b].start();this._handleVideoStarted(c,d)},updateAggregation:function(a,b,c,d){if(null==this._masterOrdinalNumber)this._masterOrdinalNumber=d;var e=
this._getTimerInteraction(a,b);if(e&&(this._masterOrdinalNumber==d&&e.update(c),EBGInfra.isDefined(d)&&EBGInfra.notNull(d)))switch(e=this.adsData[b],e=e.assetsTimers[d]?e.assetsTimers[d]:e.assetsTimers[d]={},a){case EBG.VideoInteraction.VIDEO_PLAY_DURATION:this._updateAssetAggregation(e,EBG.VideoInteraction.VIDEO_ASSET_DURATION,b,c,d);break;case EBG.VideoInteraction.FULLSCREEN_DURATION:this._updateAssetAggregation(e,EBG.VideoInteraction.FULLSCREEN_ASSET_DURATION,b,c,d)}},_updateAssetAggregation:function(a,
b,c,d){a[b]||(c=new EBG.Interactions.AggregationInteractionData(b,EBG.Interactions.Categories.VIDEO,c),a[b]=new EBG.Interactions.AggregateInteraction(c));a[b].update(d)},stopAggregate:function(a,b,c){this._masterOrdinalNumber=null;this.stopTimer(a,b,c)},stopTimer:function(a,b,c){var d=this._getTimerInteraction(a,b),e=this.adsData[b].assetsTimers,g=!0;if(d){if(EBGInfra.isDefined(c)&&EBGInfra.notNull(c)&&e[c])switch(a){case EBG.VideoInteraction.VIDEO_PLAY_DURATION:e[c][EBG.VideoInteraction.VIDEO_ASSET_DURATION].stop();
g=!this._isRunningVideoAsset(b,!1);break;case EBG.VideoInteraction.FULLSCREEN_DURATION:e[c][EBG.VideoInteraction.FULLSCREEN_ASSET_DURATION].stop()}g&&d.stop();if(EBGInfra.isDefined(c)&&EBGInfra.notNull(c))a=new EBG.Events.Event(EBG.Events.EventNames.DWELL_VIDEO_STOP),a.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(b)}},a.eventData={assetId:c},EBG.eventMgr.dispatchEvent(a)}},clearTimer:function(a,b){var c=this._getTimerInteraction(a,b);c&&c.clear()},_isRunningAnyVideoAsset:function(a){return this._isRunningVideoAsset(a,
!1)||this._isRunningVideoAsset(a,!0)},_isRunningVideoAsset:function(a,b){var c=this.adsData[a].assetsTimers,d;for(d in c)if(c.hasOwnProperty(d)){var e=b?"ebFSVideoAssetDuration":"ebVideoAssetDuration";if(c[d][e]&&c[d][e].isRunning())return!0}return!1},updateTimer:function(a,b,c,d){if(a=this._getTimerInteraction(a,b))a.update(c),EBGInfra.isDefined(d)&&EBGInfra.notNull(d)&&this.adsData[b].assetsTimers[d].update(c)},getTimerValue:function(a,b){var c=this._getTimerInteraction(a,b);return c?c.getValue():
0},isTimerRunning:function(a,b){var c=this._getTimerInteraction(a,b);return c?c.isRunning():!1},_handleUserInteraction:function(a,b){if(b.initiationType==EBG.Interactions.InitiationTypes.USER&&!this.adsData[a].isUserInteractionOccur){this.adsData[a].isUserInteractionOccur=!0;var c=new EBG.Events.Event(EBG.Events.EventNames.USER_INTERACTION);c.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(a)}};EBG.eventMgr.dispatchEvent(c);this._reportUserInteraction(a)}},_handlePanelsViewed:function(a,
b){b.isPanel&&b.initiationType==EBG.Interactions.InitiationTypes.USER&&this.handleCounterInteraction(EBG.ExpBaseInteractions.PANELS_VIEWED,a)},_handleReportData:function(a,b,c){b.useInteractionsStrPipe?this._handleDataParams(a,b,c):(this.adsIntQueues[a].push(c),a=this.adsIntQueues[a].length==EBG.Interactions.InteractionManager.intStackLength?!0:!1,(b&&(b.reportImmediately||b.counterJumpUrlData&&b.counterJumpUrlData.tmpData.isClick)||a)&&this.reportInteractionQueues())},_handleDataParams:function(a,
b,c){var b=this._getAdReportData(a),c=encodeURIComponent(c),d=this._getPipeParams(a,!1);this._reportServer(this.adsData[a].adConfig._interactionsStrPipe+"$$"+b+c+"$$"+d,!0)},_handleSpecialInteractions:function(a,b,c){var d=this._getCounterInteraction(a,b),a=d.interactionData;this._handleUserInteraction(b,a);switch(a.reportingName){case EBG.VideoInteraction.STARTED:d.unique&&this._reportUniqueVideoStarted(b);this.adsData[b].isUserInteractionOccur&&this._reportUserInitatedVideo(b,c);break;case EBG.VideoInteraction.FULLSCREEN_START:if(this._isRunningVideoAsset(b,
!1))switch(d=this._getTimerInteraction(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b),d=d.getType(),d){case EBG.DurationInteraction.TIMER:this.startTimer(EBG.VideoInteraction.FULLSCREEN_DURATION,b,c);this.stopTimer(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b,c);break;case EBG.DurationInteraction.AGGREGATE:this.startAggregate(EBG.VideoInteraction.FULLSCREEN_DURATION,b,c),this.stopAggregate(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b,c)}break;case EBG.VideoInteraction.FULLSCREEN_END:if(this._isRunningVideoAsset(b,
!0))switch(d=this._getTimerInteraction(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b),d=d.getType(),d){case EBG.DurationInteraction.TIMER:this.startTimer(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b,c);this.stopTimer(EBG.VideoInteraction.FULLSCREEN_DURATION,b,c);break;case EBG.DurationInteraction.AGGREGATE:this.startAggregate(EBG.VideoInteraction.VIDEO_PLAY_DURATION,b,c),this.stopAggregate(EBG.VideoInteraction.FULLSCREEN_DURATION,b,c)}break;case EBG.VideoInteraction.FULLPLAY:this.stopTimer(EBG.VideoInteraction.VIDEO_PLAY_DURATION,
b,c)}this._handlePanelsViewed(b,a)},handleVideoInteraction:function(a,b,c,d,e){if(EBGInfra.isDefined(c)&&EBGInfra.notNull(c)){var g=this.adsData[b].videoState;g[c]||(g[c]=0);var f=!0,h=EBG.indexOfArray(EBG.VideoQuartiles,a);-1!=h&&(h==g[c]?g[c]++:f=!1);f&&this.handleCounterInteraction(a,b,c,d,e)}},handleAllTimers:function(a,b){if(a==EBG.Interactions.InteractionManager.HandleAllTimersOptions.PAUSE)this._pausedTimers=[];var c=new EBG.Events.Event(EBG.Events.EventNames.COLLECT_TIMERS);c.dispatcher=this;
c.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(c);for(var d in this.adsData)if(this.adsData.hasOwnProperty(d)){var c=this.adsData[d],e=c[EBG.Interactions.InteractionTypes.TIMER];e&&this._handleTimers(e,a,d);if(c.assetsTimers)for(var g in c.assetsTimers)c.assetsTimers.hasOwnProperty(g)&&this._handleTimers(c.assetsTimers[g],a,d,g);c=new EBG.Events.Event(EBG.Events.EventNames.COLLECT_TIMERS);c.dispatcher=this;c.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(c);a===
EBG.Interactions.InteractionManager.HandleAllTimersOptions.REPORT&&(c=0<=this._seqTimersReportData.index,b=EBG.isBool(b)?b:!0,!b&&this.adsData[d].adConfig&&navigator&&navigator.sendBeacon&&!EBG.isMRAID()?this.reportInteractionQueues(b,c,!0):this.reportInteractionQueues(b,c))}},_handleTimers:function(a,b,c,d){for(var e in a)if(a.hasOwnProperty(e)){var g=a[e];if(g.isRunning()||g.isFinished())switch(b){case EBG.Interactions.InteractionManager.HandleAllTimersOptions.REPORT:var f=new EBG.Events.Event(EBG.Events.EventNames.HANDLE_TIMER_INTERACTION);
f.dispatcher={_adConfig:{rnd:EBG.Ads.Ad.Fn.getRandFromAdUId(c)}};f.timing=EBG.Events.EventTiming.BEFORE;f.eventData={interaction:g};if(EBG.eventMgr.dispatchEvent(f))return;(g=g.handle(d))&&this.adsIntQueues[c].push(g);f.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(f);break;case EBG.Interactions.InteractionManager.HandleAllTimersOptions.PAUSE:g.stop();this._pausedTimers.push(g);break;case EBG.Interactions.InteractionManager.HandleAllTimersOptions.HANDLE_IDLE:g.increaseIdleDuration(this.idleManager.currentIdleDuration)}}},
pauseAllTimers:function(){return this.handleAllTimers(EBG.Interactions.InteractionManager.HandleAllTimersOptions.PAUSE,!0)},resumeAllTimers:function(){if(null!=this._pausedTimers){for(var a=0;a<this._pausedTimers.length;a++)this._pausedTimers[a].start();this._pausedTimers=null}},reportInteractionQueues:function(a,b,c){if(!(EBG.getTime()>EBG.Interactions.InteractionManager.INTERACTION_THRESHOLD_SEC)){var a=EBG.isBool(a)?a:!0,b=EBG.isBool(b)?b:!1,d={},e={},g;for(g in this.adsData)if(this.adsData.hasOwnProperty(g)){var f=
this.adsIntQueues[g];if(!this.adsData[g].delayIntReport)for(;f.length;){for(var h=this._getAdReportData(g),k=this.adsData[g].adConfig._interactionPipe,l=0,m=this._isUnloadHandled?f.length:EBG.Interactions.InteractionManager.intStackLength,o=0;o<f.length&&o<m;o++)h+=f[o],l++;for(o=0;o<l;o++)f.shift();this._isUnloadHandled?(l=d[k]?d[k]:"",""!=l&&(l+="|"),e[k]||(e[k]=this._getPipeParams(g,b)),l+=h,d[k]=l):this._reportServer(k+h+this._getPipeParams(g,b),a,c)}}for(var p in d)this._reportServer(p+d[p]+
(e[p]?e[p]:""),a,c)}},_reportServer:function(a,b,c){if(!EBG.isPreview||EBG.isGlobalDef("gfEbForceReportInt"))c?EBG.adaptor.reportBeacon(a):EBG.adaptor.reportToRemoteServer(a,b),EBG.Autolina&&EBG.Autolina.report(a,EBG.Autolina.reportType.INTERACTION)},_isReportDataInQueue:function(a,b){for(var c=!1,d=this.adsIntQueues[a],e=0;e<d.length;e++)if(d[e]===b){c=!0;break}return c},_getPipeParams:function(a,b){var c="",d=this.adsData[a].adConfig.usercookie;d&&(c+=EBG.format("&usercookie={0}",d));(d=this.adsData[a].adConfig.optOut)&&
(c+=EBG.format("&OptOut={0}",d));b&&(c+=EBG.format("&iseq={0}",this._seqTimersReportData.index));EBG.isGlobalDef("gfEbForceReportInt")&&(c+="&pr=1");c+=EBG.format("&rnd={0}",Math.random());EBG.adaptor.flash&&(c+=EBG.format("&flv={0}",EBG.adaptor.flash.version));EBG.isDefined(EBG.adaptor.getResolution)&&(c+=EBG.format("&res={0}",EBG.adaptor.getResolution()));EBGInfra.isDefinedNotNull(this.adsData[a].adConfig.diAppId)&&(c+="&diappid="+this.adsData[a].adConfig.diAppId);return c},_getAdReportData:function(a){var b=
this.adsData[a].adConfig,c=EBG.Interactions.InteractionManager.charAdFieldsDelimeter;return EBG.format("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}",EBG.Ads.Ad.Fn.getAdIdFromAdUId(a),c,b.page,c,b.pluId,c,b.massVersioning.targetAudienceId,c,b.massVersioning.deliveryGroupId,c,EBG.Ads.Ad.Fn.getVersionToReport(b.massVersioning.adVersions),c,this.adsData[a].adConfig.sID)},_addSystemInteractions:function(a){var a=a.uid,b=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.USER_INTERACTION,
EBG.Interactions.Categories.SYSTEM,a);b.numLeftToReport=1;this.addInteraction(new EBG.Interactions.CounterInteraction(b));b=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.UNIQUE_VIDEO_STARTED,EBG.Interactions.Categories.VIDEO,a);b.numLeftToReport=1;this.addInteraction(new EBG.Interactions.CounterInteraction(b));b=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.DWELL_UNIQUE,EBG.Interactions.Categories.SYSTEM,a);b.reportImmediately=!0;b.numLeftToReport=
1;this.addInteraction(new EBG.Interactions.CounterInteraction(b));b=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.REPLAY,EBG.Interactions.Categories.SYSTEM,a);this.addInteraction(new EBG.Interactions.CounterInteraction(b));a=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.RICH_FLASH_PLAYED,EBG.Interactions.Categories.SYSTEM,a);a.numLeftToReport=1;this.addInteraction(new EBG.Interactions.CounterInteraction(a))},_reportUserInitatedVideo:function(a,b){this.handleVideoInteraction(EBG.VideoInteraction.USER_INITIATED_VIDEO,
a,b)},_reportUserInteraction:function(a){this.handleCounterInteraction(EBG.Interactions.SystemInts.USER_INTERACTION,a)},_reportUniqueVideoStarted:function(a){this.handleCounterInteraction(EBG.Interactions.SystemInts.UNIQUE_VIDEO_STARTED,a)},reportDwellUnique:function(a,b){b&&this.handleCounterInteraction(EBG.Interactions.SystemInts.DWELL_UNIQUE,a,null,!1)},reportRichFlashPlayed:function(a){this.handleCounterInteraction(EBG.Interactions.SystemInts.RICH_FLASH_PLAYED,a)},reportReplay:function(a){this.handleCounterInteraction(EBG.Interactions.SystemInts.REPLAY,
a,0,EBG.ActionType.USER)},_getTimerInteraction:function(a,b){a=a.toLowerCase();if(this.adsData[b]&&this.adsData[b][EBG.Interactions.InteractionTypes.TIMER]&&this.adsData[b][EBG.Interactions.InteractionTypes.TIMER][a])return this.adsData[b][EBG.Interactions.InteractionTypes.TIMER][a]},_subscribeToEvents:function(){EBG.adaptor.supportsPageLoadEvents()?(EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_BEFORE_UNLOAD,this.unLoadHandler,this)),EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_UNLOAD,
this.unLoadHandler,this)),EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_HIDE,this.unLoadHandler,this)),EBG.setInterval(this,this.reportInteractionQueues,[],this._timedReport)):this._setNextTimerSeq(!0)},_handleAllTimersSeq:function(){var a=EBG.adaptor.browser.isMobile();EBG.adaptor.supportsPageLoadEvents();this.reportInteractionQueues(!a);this._pausedTimers||(this.handleAllTimers(EBG.Interactions.InteractionManager.HandleAllTimersOptions.REPORT,!a),this.resumeAllTimers());
this._setNextTimerSeq(!1)},_setNextTimerSeq:function(a){a="undefined"!=typeof a&&a?this._seqTimersReportData.index=0:++this._seqTimersReportData.index;a<this._seqTimersReportData.intervals.length&&EBG.runTimed(this,this._handleAllTimersSeq,[],1E3*this._seqTimersReportData.intervals[a])},unLoadHandler:function(){if(!this._isUnloadHandled)this._isUnloadHandled=!0,this.handleAllTimers(EBG.Interactions.InteractionManager.HandleAllTimersOptions.REPORT,!1)},getAdDuration:function(a){var b=0;(a=this._getTimerInteraction(EBG.Interactions.SystemInts.AD_DURATION,
a))&&(b=a.getElapsedTime());return b}};EBG.declareClass(EBG.Interactions.InteractionManager,EBG.Interactions.StdInteractionManager);EBG.DataProfile={GENERAL:"general",SERVING:"serving",USERINFO:"userInfo",PLATFORM:"platform",FRAUD:"fraud",VISIBILITY:"visibility",ERROR:"error"};
EBG.DataPipe=function(a,b){this._profile=this._buildProfile(b||this._defaultProfile);this._duration=0;this._firstTickDelay=5E3;this._serverPipeUrl=a;this._sendData=!1;EBG.setInterval(this,function(){this._duration++},[],1E3);EBG.setInterval(this,function(){this._observedHandler()},[],100);b&&b.length&&EBG.runTimed(this,this._tick,[],this._firstTickDelay)};
EBG.DataPipe.prototype={_data:{general:{}},_observedObjects:[],_tickCount:0,_tickDelay:1,_maxTicks:1,_completeProfile:{general:{sid:!0,dur:!0,time:!1,adid:!1,frmt:!1,cs:!1},serving:{prtcl:!1,dmn:!1,url:!1,vurl:!1,srvmd:!1,aie:!1,imapp:!1,aorg:!1},userInfo:{geo:!1,ip:!1},platform:{os:!1,osv:!1,ua:!1,brsrc:!1,brsrv:!1,brsrt:!1,flsv:!1,scrw:!1,scrh:!1,scrl:!1,fh:!1,fw:!1,env:!1,mraid:!1,mraidw:!1,skype:!1},fraud:{bot:!1,injct:!1,stack:!1},visibility:{wvsb:!1,wvrf:!1,vsbp:!1,pct:!1,scrsr:!1,loc:!1,vsr:!1,
vsri:!1,uvsr:!1,vsiab:!1,uvsiab:!1,mmac:!1,mmad:!1},error:{errnum:!1,errmsg:!1,errfunc:!1,errpos:!1}},_defaultProfile:{general:{adid:!1,sid:!0,dur:!0}},_buildProfile:function(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=EBG.cloneObj(this._completeProfile[a[c]]);EBG.mergeObj(this._defaultProfile,b,!1);return b},_clear:function(){for(var a in this._profile){var b=this._profile[a],c=void 0;for(c in b)!this._profile[a][c]&&this._data[a]&&(this._data[a][c]=null,delete this._data[a][c])}},_post:function(){var a=
{x:function(){if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;for(var a=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],c,d=0;d<a.length;d++)try{c=new ActiveXObject(a[d]);break}catch(e){}return c},post:function(b,c,d){try{var e=a.x();e.open("POST",b,!0);e.onreadystatechange=function(){4==e.readyState&&d&&d(e.responseText)};e.setRequestHeader("Content-type","application/x-www-form-urlencoded");e.send(JSON.stringify(c))}catch(g){}}};
return a.post}(),_tick:function(){++this._tickCount;this.flush();this._tickCount<this._maxTicks&&(EBG.runTimed(this,this._tick,[],1E3*Math.pow(2,this._tickDelay)),this._tickDelay++)},enableSend:function(){if(!this._sendData)this._sendData=!0},send:function(a,b,c){c=c||{};if(this._profile[a]){this._data[a]=this._data[a]||{};for(var d in b)d in this._profile[a]&&(this._data[a][d]=encodeURIComponent(b[d]));if(c.constant)for(d in this._data[a])this._profile[a][d]=!0;c.flush&&this.flush()}},flush:function(){if(this._sendData){this._data.general.dur=
this._duration;var a={},b;for(b in this._data)for(var c in this._data[b])a[c]=this._data[b][c];this._post(this._serverPipeUrl,a);this._clear()}},watch:function(a,b,c,d,e){if(this._profile[a]&&c){var g=this;Object.observe?Object.observe(c,function(f){for(var h=0;h<f.length;h++)if(f[h].name===d){var k={};k[b]=c[d].toString();g.send(a,k,e)}}):this._observedObjects.push({ns:a,key:b,value:c[d],obj:c,prop:d,options:e})}},_observedHandler:function(){for(var a=0;a<this._observedObjects.length;a++){var b=
this._observedObjects[a];if(b.obj[b.prop]!==b.value){b.value=b.obj[b.prop];var c={};c[key]=b.obj[b.prop].toString();this.send(ns,c,b.options)}}}};EBG.DataPipeManager=function(a,b){this._default=b;this._dpUrl=a};
EBG.DataPipeManager.prototype={_pipes:{},createPipe:function(a,b){var c=new EBG.DataPipe(this._dpUrl,b||this._default);c.send(EBG.DataProfile.GENERAL,{sid:a});this._pipes[a]=c},getPipe:function(a){this._pipes[a]||this.createPipe(a);return this._pipes[a]},send:function(a,b,c,d){(a=this._pipes[a])&&a.send(b,c,d)}};EBG.declareNamespace("Positioning");EBG.Positioning.PositionManager=function(){};
EBG.Positioning.PositionManager.prototype={isVisibile:function(a,b,c){try{return 0<this.calculateVisibilityPercentage(a,b,c)?!0:!1}catch(d){}},calculateVisibilityPercentage:function(a,b,c,d,e,g,f){try{var h=0,k=0,l=0,m=!(EBG.adaptor.getDisplayWin()!=top&&f==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME),o=EBG.adaptor.getScrollLeftTop(m,f),p=EBG.adaptor.getViewPortMetrics(m,g,f),n=this.calculateRightBottowCoordinate(o,p.Width,p.Height),r=EBG.adaptor.getPositioningById(a,!m,f);if(null!=r){a={X:0,Y:0};try{!m&&
window.frameElement&&(a=EBG.adaptor.getPositioningByElement(window.frameElement,!1,f))}catch(s){a={X:0,Y:0}}r.X+=a.X;r.Y+=a.Y;"undefined"!=typeof d&&(r.X+=d);"undefined"!=typeof e&&(r.Y+=e);var t=this.calculateRightBottowCoordinate(r,b,c),l=b*c,k=this.calculateVisibleArea(o,n,r,t),h=l?k/l:0}return h}catch(q){}},calculateRightBottowCoordinate:function(a,b,c){var d={X:0,Y:0};d.X=a.X+b;d.Y=a.Y+c;return d},calculateVisibleArea:function(a,b,c,d){try{var e=0,g=0;if(c.Y==d.Y&&c.X==d.X||b.X<=a.X||b.Y<=a.Y)return 0;
c.X<=a.X&&a.X<=d.X?e=b.X<=d.X?b.X-a.X:d.X-a.X:a.X<=c.X&&c.X<=b.X&&(e=d.X>=b.X?b.X-c.X:d.X-c.X);c.Y<=a.Y&&a.Y<=d.Y?g=b.Y<=d.Y?b.Y-a.Y:d.Y-a.Y:a.Y<=c.Y&&c.Y<=b.Y&&(g=d.Y>=b.Y?b.Y-c.Y:d.Y-c.Y);return e*g}catch(f){}},getFullRectWithClip:function(a,b){var c=null,c=EBG.adaptor.getDisplayWin()===EBG.adaptor.getPageWin(),d=null;if(a){var c=EBG.adaptor.getPositioningByElement(a,!c,b),d={width:a.offsetWidth,height:a.offsetHeight},e=a.style.clip,g=0,f=0,h=d.height,k=d.width;""!=e&&(e=e.substring(e.indexOf("(")+
1).replace(/,/g,"").replace(/ /g,""),e=e.split("px"),f=parseInt(e[0]),k=parseInt(e[1]),h=parseInt(e[2]),g=parseInt(e[3]));d.left=c.X+g;d.top=c.Y+f;d.width-=d.width-k;d.width-=g;d.height-=d.height-h;d.height-=f;d.right=d.left+d.width;d.bottom=d.top+d.height}return d},isOverlapping:function(a,b,c){if(!a||0==a.offsetWidth&&0==a.offsetHeight||!b||0==b.offsetWidth&&0==b.offsetHeight)return!1;a=EBG.posHelper.getFullRectWithClip(a,c);b=EBG.posHelper.getFullRectWithClip(b,c);return!a||!b||a.bottom<b.top||
a.top>b.bottom||a.right<b.left||a.left>b.right?!1:!0}};EBG.declareClass(EBG.Positioning.PositionManager,null);EBG.declareNamespace("RichModules");EBG.RichModules.BasicVisibilityProvider=function(a,b,c){this._resObjId=a;this._res=EBG.adaptor.getElementById(a);this._adConfig=this.adConfig=b;this._options=c||{};this._subscribeToEvents();this._trackElementLocation()};EBG.RichModules.BasicVisibilityProvider._isAvailable=function(){return!1};
EBG.RichModules.BasicVisibilityProvider.prototype={name:"Basic",_isStarted:!1,_calculateVisibilityPercentage:function(){return 0},_getViewPortMetrics:function(){return null},_dispatchCheckVisibility:function(a){if(this._isStarted){var b=new EBG.Events.Event(EBG.Events.EventNames.VISIBILITY_CHECK);b.dispatcher=this;b.eventData=a;if(EBG.isObj(this._options.customData))b.eventData.customData=this._options.customData;b.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(b)}},_dispatchVisibilityHidden:function(){var a=
new EBG.Events.Event(EBG.Events.EventNames.VISIBILITY_HIDDEN);a.dispatcher=this;a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(a)},_subscribeToEvents:function(){var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.EXPAND,function(a){a.eventData.props&&a.eventData.props.asset.id==this._resObjId&&this._trackElementLocation()},this);a.timing=EBG.Events.EventTiming.ONTIME;a.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd};EBG.eventMgr.subscribeToEvent(a)},updateResourceObjId:function(a){this._adConfig.ffs.CFF_TrackElementWatcher&&
EBG.elementWatcher.unwatch(null,this._res,this);this._resObjId=a;this._res=EBG.adaptor.getElementById(a);this._trackElementLocation()},_isVisible:function(){return!1},_calculateVisibilityResult:function(){var a={};try{a.assetId=this._resObjId,a.percentage=this._calculateVisibilityPercentage(),a.viewPort=this._getViewPortMetrics()}catch(b){}return a},start:function(){this._isStarted=!0},_trackElementLocation:function(){if(this._adConfig.ffs.CFF_TrackElementWatcher)(this._res=EBG.adaptor.getElementById(this._resObjId))?
EBG.elementWatcher.watch(this._res,this._elemWatcherCallback,this,null,{clip:!0,relativeToWindow:!1}):EBG.runTimed(this,this._trackElementLocation,[],500);else{if(this._intervalHandler)clearInterval(this._intervalHandler),this._intervalHandler=null;if(this._res=EBG.adaptor.getElementById(this._resObjId)){var a=this,b=EBG.adaptor.getBoundingClientRect(this._res,{clip:!0});if(b)this._intervalHandler=EBG.setInterval(this,function(){var c=EBG.adaptor.getBoundingClientRect(a._res,{clip:!0});if(b&&!c)a.onElementMoved(),
a._trackElementLocation();else for(var d in c)if(c[d]!=b[d]){b=c;a.onElementMoved();break}},[],200)}else EBG.runTimed(this,this._trackElementLocation,[],500)}},_elemWatcherCallback:function(a){this.onElementMoved();null==a&&this._trackElementLocation()},_triggerVisibilityCheck:function(){this._dispatchCheckVisibility(this._calculateVisibilityResult())},onElementMoved:function(){}};EBG.declareClass(EBG.RichModules.BasicVisibilityProvider,null);EBG.declareNamespace("RichModules");
EBG.RichModules.GeometricVisibilityProvider=function(a,b,c){EBG.callSuperConstructor(EBG.RichModules.GeometricVisibilityProvider,this,[a,b,c])};
EBG.RichModules.GeometricVisibilityProvider.prototype={name:"Geometric",_focusOnResourceElem:null,_justReceivedFocusOnPage:null,_reachedMaxAdDuration:!1,_calculateVisibilityPercentage:function(a){try{if(!EBG.adaptor.isPageVisible(this.adConfig.isInstream))return 0;var a=a||{},b=this._getAssetRect(a.resourceObjId||this._resObjId),c=this._getViewPortRect();b.top+=~~a.offsetY;b.bottom+=~~a.offsetY;b.left+=~~a.offsetX;b.right+=~~a.offsetX;if(EBG.isDefined(a.width))b.width=a.width,b.right=b.left+a.width;
if(EBG.isDefined(a.height))b.height=a.height,b.bottom=b.top+a.height;if(this._intersect(b,c)){var d=this._overlap(c,b);this._visibleRect=d;return~~(100*(d.width*d.height/(b.width*b.height)))}return 0}catch(e){return 0}},_getAssetRect:function(a){a=EBG.isElementOrNode(a)?a:EBG.adaptor.getElementById(a);(a=EBG.adaptor.getBoundingClientRect(a,{clip:!0,relativeToTop:!0}))||(a={top:0,bottom:0,left:0,right:0,width:0,height:0});return a},_getViewPortMetrics:function(){var a=EBG.adaptor._getCurrentWindow(void 0,
this.adConfig.actualServingMode),b=EBG.adaptor.getWindowViewPortMetrics(a);if(EBG.adaptor.browser.isFF()&&"undefined"!=typeof a.outerWidth&&EBG.adaptor.serving.detectServingMode(!0)==EBG.Adaptors.ServingMode.IFRAME&&("undefined"==typeof this.adConfig||!EBG.isDefined(this.adConfig.UiVz)||!this.adConfig.UiVz)&&!EBG.iframeLocation&&"undefined"!=typeof this.adConfig&&this.adConfig.aiE&&!this.adConfig.aiE.iflExists)b.Width=a.outerWidth,b.Height=a.outerHeighth,EBG.isDefined(a.scrollMaxX)&&0<a.scrollMaxX&&
EBG.isDefined(EBG.adaptor.scrollBarWidth)&&0<EBG.adaptor.scrollBarWidth&&(b.Height-=EBG.adaptor.scrollBarWidth),EBG.isDefined(a.scrollMaxY)&&0<a.scrollMaxY&&EBG.isDefined(EBG.adaptor.scrollBarHeight)&&0<EBG.adaptor.scrollBarHeight&&(b.Width-=EBG.adaptor.scrollBarHeight);return b},_getViewPortRect:function(){var a=this._getViewPortMetrics();return{top:0,left:0,right:a.Width,bottom:a.Height}},_overlap:function(a,b){var c={top:-1,right:-1,bottom:-1,left:-1};if(!this._intersect(a,b))return c;c.top=Math.max(a.top,
b.top);c.left=Math.max(a.left,b.left);c.right=Math.min(a.right,b.right);c.bottom=Math.min(a.bottom,b.bottom);c.width=c.right-c.left;c.height=c.bottom-c.top;return c},_intersect:function(a,b){return!(b.left>a.right||b.right<a.left||b.top>a.bottom||b.bottom<a.top)},_isVisible:function(a){var a=a||{},b=EBG.adaptor.getBoundingClientRect(this._res,{clip:!0});return!!this._calculateVisibilityPercentage({resourceObjId:a.resourceObjId||this._resObjId,width:a.width||b.width,height:a.height||b.height,offsetX:a.offsetX||
this.adConfig.offsetX,offsetY:a.offsetY||this.adConfig.offsetY,isUIVZ:a.isUIVZ||this.adConfig.UiVz,actualServingMode:a.actualServingMode||this.adConfig.actualServingMode})},_subscribeToEvents:function(){try{EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"_subscribeToEvents");EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,this._pageResizeHandler,this));EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_SCROLL,
this._pageScrollHandler,this));if(!EBG.adaptor._getVisibilityEventName()||EBG.adaptor.browser.isAndroidNative()&&4.4>EBG.adaptor.browser.getVersion())EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_FOCUS,this._pageFocusHandler,this)),EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_BLUR,this._pageBlurHandler,this)),this._subscribeToElementEvents();var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_HIDDEN,
this._pageHiddenHandler,this);a.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(a);a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_VISIBLE,this._pageVisibleHandler,this);a.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(a);EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EventNames.RICH_FLASH_PLAYED,this.onChange,this))}catch(b){}},_subscribeToElementEvents:function(){var a=this,b=function(){a._resourceBlurHandler()},c=new EBG.Events.EventSubscription("focus",
function(){a._resourceFocusHandler()},this);c.isElementEvent=!0;c.elementId=this._resObjId;EBG.eventMgr.subscribeToEvent(c);if(EBG.adaptor.browser.isIE()&&this.actualServingMode!=EBG.Adaptors.ServingMode.SCRIPT)c=new EBG.Events.EventSubscription("blur",b,this),c.isElementEvent=!0,c.elementId=this._resObjId,EBG.eventMgr.subscribeToEvent(c)},updateResourceObjId:function(a){EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"updateResourceObjId",[a]);EBG.adaptor._getVisibilityEventName()||
this._subscribeToElementEvents()},_pageVisibleHandler:function(){this._triggerVisibilityCheck()},_pageHiddenHandler:function(){this._dispatchVisibilityHidden();this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&this._dispatchCheckVisibility({percentage:0,viewPort:this._getViewPortMetrics()})},_resourceFocusHandler:function(){this._focusOnResourceElem=!0;EBG.runTimed(this,function(){this._focusOnResourceElem=!1},[],60);this._pageFocusHandler()},_resourceBlurHandler:function(){EBG.runTimed(this,
function(){!this._justReceivedFocusOnPage&&!this._focusOnResourceElem&&this._pageBlurHandler()},[],30)},_pageFocusHandler:function(){this._justReceivedFocusOnPage=!0;EBG.runTimed(this,function(){this._justReceivedFocusOnPage=!1},[],60);this._triggerVisibilityCheck()},_pageBlurHandler:function(){EBG.runTimed(this,function(){!this._justReceivedFocusOnPage&&!this._getAdHasFocus()&&this._pageHiddenHandler()},[],30)},_getAdHasFocus:function(){for(var a=this._getAllAdVisibilityProviders(),b=0;b<a.length;b++)if(a[b]._focusOnResourceElem)return!0;
return!1},_getAllAdVisibilityProviders:function(){var a=[],b=EBG.ads[this._adConfig.uid],c;for(c in b)b.hasOwnProperty(c)&&b[c]instanceof EBG.RichModules.VisibilityManager&&b[c]._visibilityProvider&&a.push(b[c]._visibilityProvider);return a},_pageScrollHandler:function(){this._triggerVisibilityCheck()},_pageResizeHandler:function(){if(!this._resizeTimeOut){var a=this;this._resizeTimeOut=setTimeout(function(){a._resizeTimeOut=null;a._triggerVisibilityCheck()},100)}},_maxAdDurationHandler:function(){this._reachedMaxAdDuration=
!0},start:function(){EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"start");var a=3;(function(){a--&&(this._triggerVisibilityCheck(),EBG.runTimed(this,arguments.callee,[],1E3))}).apply(this)},onElementMoved:function(){EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,this,"onElementMoved");this._triggerVisibilityCheck()},onChange:function(){this._triggerVisibilityCheck()},_calculateVisibilityResult:function(){var a=EBG.callSuperFunction(EBG.RichModules.GeometricVisibilityProvider,
this,"_calculateVisibilityResult");a.visibleRect=this._visibleRect;return a}};EBG.declareClass(EBG.RichModules.GeometricVisibilityProvider,EBG.RichModules.BasicVisibilityProvider);
EBG.RichModules.MouseVisibilityProvider=function(a,b,c){EBG.callSuperConstructor(EBG.RichModules.MouseVisibilityProvider,this,[a,b,c]);try{this._subscribeToEvents();this._scrollWidth=EBG.adaptor.getScrollerWidth();var d=this.adConfig.displayWin||EBG.adaptor.getDisplayWin();this._screenResolution={width:d.screen.availWidth,height:d.screen.availHeight};this._screenOriginalResolution={width:d.screen.availWidth,height:d.screen.availHeight};if(!this._browserStateSupported())this._resolutionBaseScreenSize=
this._resolutionToScreenSize(this._screenResolution),this._resourceInitialPosition={top:d.screenTop,left:d.screenLeft};this._resourceFullSize=this.adConfig.width*this.adConfig.height;this._mouseMoveEventInvoker()}catch(e){}};
EBG.RichModules.MouseVisibilityProvider.prototype={name:"Mouse",_isStarted:!1,_resObj:null,_lastViewPort:null,_resourceRect:null,_resourceFullSize:null,_screenResolution:null,_screenOriginalResolution:null,_screenInitialPosition:{top:0,left:0},_resolutionBaseScreenSize:null,_intervalId:null,_calculateVisibilityPercentage:function(){if(!this._isReady)return-1;var a=this._getViewPortRect(),b=this._resourceRect;if(!a||!b)return-1;var c=0;EBG.adaptor.isPageVisible()&&(c=100*(EBG.posHelper.calculateVisibleArea({X:a.left,
Y:a.top},{X:a.right,Y:a.bottom},{X:b.left,Y:b.top},{X:b.right,Y:b.bottom})/this._resourceFullSize));return c},_calcResourceRect:function(a){var b;if(8==EBG.adaptor.browser._browserVer&&8==EBG.adaptor.browser.getDocumentMode()){var c=(b=EBG.adaptor.getElementById(this._resObjId))&&b.getBoundingClientRect?b.getBoundingClientRect():{top:0,left:0};b=a.screenY-(a.clientY-c.top);a=a.screenX-(a.clientX-c.left)}else b=a.screenY-a.offsetY,a=a.screenX-a.offsetX;return{top:b,left:a,bottom:b+this.adConfig.height,
right:a+this.adConfig.width}},_getViewPortRect:function(){var a=null,b=this._getWindowRect();b&&(a={top:0>b.top?0:b.top,left:0>b.left?0:b.left,bottom:b.bottom>this._screenResolution.height?this._screenResolution.height:b.bottom,right:b.right>this._screenResolution.width?this._screenResolution.width:b.right});return a},_getWindowRect:function(){var a=null,b=this.adConfig.displayWin||EBG.adaptor.getDisplayWin();if(this._browserStateSupported())var a=this._isFullScreen(b),c=!a?6:0,d=b.screenX+c,e=b.screenY+
70,a={top:e,left:d,bottom:e+b.outerHeight-this._scrollWidth-(!a?70:0),right:d+b.outerWidth-this._scrollWidth+c};else this._resolutionBaseScreenSize&&(b=this._getUnsupportedWindowTopLeft(b),a={top:b.top,left:b.left,bottom:b.top+this._resolutionBaseScreenSize.height,right:b.left+this._resolutionBaseScreenSize.width});return a},_getUnsupportedWindowTopLeft:function(a){var b={top:this._screenInitialPosition.top,left:this._screenInitialPosition.left},c=0<a.screenLeft?a.screenLeft:0,d=c-this._resourceInitialPosition.left,
e=(0<d?this._screenOriginalResolution.width-this._resourceInitialPosition.left%this._screenOriginalResolution.width:this._resourceInitialPosition.left%this._screenOriginalResolution.width)+1,g=0;if(Math.abs(d)>e&&0<=c&&c<this._screenResolution.width)g=(1+Math.floor(Math.abs(Math.abs(d)-e)/this._screenOriginalResolution.width))*this._screenOriginalResolution.width,b.left=0>d?b.left-g:b.left+g;a=0<a.screenTop?a.screenTop:0;d=a-this._resourceInitialPosition.top;e=(0<d?this._screenOriginalResolution.height-
this._resourceInitialPosition.top%this._screenOriginalResolution.height:this._resourceInitialPosition.top%this._screenOriginalResolution.height)+1;if(Math.abs(d)>e&&0<=a&&a<this._screenResolution.height)g=(1+Math.floor(Math.abs(Math.abs(d)-e)/this._screenOriginalResolution.height))*this._screenOriginalResolution.height,b.top=0>d?b.top-g:b.top+g;return b},_isFullScreen:function(a){return!this._browserStateSupported()?!0:a.screenX+a.outerWidth==this._screenOriginalResolution.width},_getViewPortMetrics:function(){var a=
this._getViewPortRect();return a?{Width:a.right-a.left,Height:a.bottom-a.top}:null},_isVisible:function(){return!!this._calculateVisibilityPercentage()},_mouseMoveEventInvoker:function(){if((this._resObj=this._resObj?this._resObj:EBG.adaptor.getElementById(this._resObjId))&&this._resObj.parentNode&&this._resObj.parentNode.fireEvent){var a=this;this._resObj.parentNode.attachEvent("onmousemove",function(b){var c=a._calcResourceRect(b),d=a._getViewPortRect();if(!a._resourceRect)a._screenInitialPosition.left=
Math.floor(b.screenX/a._screenOriginalResolution.width)*a._screenOriginalResolution.width,a._screenInitialPosition.top=Math.floor((50<b.screenY?b.screenY-50:0)/a._screenOriginalResolution.height)*a._screenOriginalResolution.height;a._handleMultipleScreen(b);a._handleRecievedData(c,d)});this._intervalId=EBG.setInterval(this._resObj.parentNode,function(){this.fireEvent("onmousemove")},[],200)}else EBG.runTimed(this,this._mouseMoveEventInvoker,[],100)},_handleMultipleScreen:function(a){var b=this._getWindowRect();
if(b){if(a.screenY>this._screenOriginalResolution.height){var c=b.bottom>a.screenY?b.bottom:a.screenY;if(this._screenResolution.height<c)this._screenResolution.height=c}if(a.screenX>this._screenOriginalResolution.width&&(a=b.right>a.screenX?b.right:a.screenX,this._screenResolution.width<a))this._screenResolution.width=a}},_handleRecievedData:function(a,b){if(!this._resourceRect||this._checkRectanglesDifferent(this._resourceRect,a,1)||this._checkRectanglesDifferent(this._lastViewPort,b,1))this._resourceRect=
a,this._lastViewPort=b,this._triggerCalculation()},_checkRectanglesDifferent:function(a,b,c){for(var d in a)if(a.hasOwnProperty(d)&&Math.abs(a[d]-b[d])>c)return!0;return!1},_subscribeToEvents:function(){EBG.callSuperFunction(EBG.RichModules.BasicVisibilityProvider,this,"_subscribeToEvents")},_resolutionToScreenSize:function(a){var b={width:a.width,height:a.height};1680==a.width&&1050==a.height?b={width:1444,height:806}:1366==a.width&&768==a.height?b={width:1173,height:562}:1360==a.width&&768==a.height?
b={width:1167,height:562}:1280==a.width&&1024==a.height?b={width:1097,height:785}:1280==a.width&&960==a.height?b={width:1097,height:730}:1152==a.width&&864==a.height?b={width:985,height:645}:1024==a.width&&768==a.height?b={width:875,height:562}:800==a.width&&600==a.height&&(b={width:680,height:416});return b},_triggerCalculation:function(){if(this._isReady||this._isStarted&&this._resourceRect)this._isReady=!0,this._dispatchCheckVisibility(this._calculateVisibilityResult())},_browserStateSupported:function(){return 9<=
EBG.adaptor.browser._browserVer&&9<=EBG.adaptor.browser.getDocumentMode()},updateResourceObjId:function(a){this._resObj=null;this._intervalId&&EBG.clearInterval(this._intervalId);EBG.callSuperFunction(EBG.RichModules.MouseVisibilityProvider,this,"updateResourceObjId",[a]);this._mouseMoveEventInvoker()},start:function(){EBG.callSuperFunction(EBG.RichModules.MouseVisibilityProvider,this,"start");this._isStarted=!0;this._triggerCalculation()}};
EBG.declareClass(EBG.RichModules.MouseVisibilityProvider,EBG.RichModules.BasicVisibilityProvider);EBG.declareNamespace("RichModules");
EBG.RichModules.VisibilityManager=function(a,b,c){this._adConfig=this.adConfig=a;this._resObjId=b;this._res=EBG.adaptor.getElementById(b);this.actualServingMode=this.adConfig.actualServingMode;this._averageLastCalcTime=(new Date).getTime();this._options=c||{};this._isPanel=this._options.isPanel;this._createIntMgrWrapper();this._dpm=EBG.dataPipeMgr.getPipe(this.adConfig.sID);if(this._adConfig.ffs.CFF_DisableFlashPixel)this._availableVisibilityProviders="GeometricVisibilityProvider,SafeFrameVisibilityProvider,IntersectionObserverVisibilityProvider,MouseVisibilityProvider,GridVisibilityProvider,FFVisibilityProvider,MraidVisibilityProvider".split(",");
if(this._shouldInitialize())(this._visibilityProviderName=this._getVisibilityProvider(this._resObjId,this.adConfig))?(this._adConfig.visibility.isAvailable=!0,EBG.RichModules[this._visibilityProviderName]?this._init():EBG.adaptor.loadModule(this._visibilityProviderName,a,this._init,this)):(this._adConfig.visibility.isAvailable=!1,this._dpm.send(EBG.DataProfile.VISIBILITY,{uvsr:3,vsbp:0}))};EBG.RichModules.VisibilityManager.ThreholdType={IAB:0,Agency:1,Advertiser:2};
EBG.RichModules.VisibilityManager.VisibilityPollingTimer=1E3;EBG.RichModules.VisibilityManager.VisibilityCheckInterval=200;
EBG.RichModules.VisibilityManager.prototype={adConfig:null,_resObjId:null,_visibilityData:null,_visRecordable:!1,_lastMilestoneCheckTime:0,_totalMilestoneCountTime:0,_checkVisibilityMilestones:[{milestone:1,interval:100},{milestone:5,interval:1E3},{milestone:10,interval:5E3},{milestone:15,interval:5E3}],_lastVisPercentage:0,_lastVisViewPort:null,_averageVisibility:0,_averageScreenShare:0,_averageAdDuration:0,_averageLastCalcTime:null,_adCoveragePercentage:0,actualServingMode:EBG.Adaptors.ServingMode.SCRIPT,
_visibilityProvider:null,_availableVisibilityProviders:"GeometricVisibilityProvider,SafeFrameVisibilityProvider,IntersectionObserverVisibilityProvider,MouseVisibilityProvider,GridVisibilityProvider,FlashVisibilityProvider,FFVisibilityProvider,MraidVisibilityProvider".split(","),_visibilityProviderName:null,_providersAvailability:{GeometricVisibilityProvider:function(a){var b=!0,c=a.actualServingMode==EBG.Adaptors.ServingMode.IFRAME,d=EBG.Initializer._getAdClass({tn:a.templateName}),e=!d.requiresIframeBust&&
!a.UiVz,d=d.requiresIframeBust&&!EBG.iframeLocation&&a.aiE&&!a.aiE.iflExists;if(c&&(e||d)||a.ffs.CFF_MRAIDVis&&EBG.adaptor.isInApp())b=!1;return b},IntersectionObserverVisibilityProvider:function(a){return window.IntersectionObserver&&(EBG.adaptor.browser.isChrome()&&51<=EBG.adaptor.browser.getVersion()||EBG.adaptor.browser.isOpera()||EBG.adaptor.browser.isSpotify())||a.ffs.CFF_AMPIntersection&&a.actualServingMode==EBG.Adaptors.ServingMode.IFRAME&&window.context&&context.observeIntersection&&EBG.isFunc(context.observeIntersection)&&
"Html5ExpBanner"!=a.templateName},FlashVisibilityProvider:function(a){if(EBG.adaptor.flash&&9<=EBG.adaptor.flash.version){if(EBG.adaptor.browser.isChrome())return a.ffs.CFF_EnableFlashProvider;if(EBG.adaptor.browser.isEdge()&&!a.isInstream)return!0}return!1},FFVisibilityProvider:function(a){return a.actualServingMode==EBG.Adaptors.ServingMode.IFRAME&&EBG.isDefined(window.mozInnerScreenY)&&EBG.isDefined(window.mozInnerScreenX)},GridVisibilityProvider:function(){var a=!1,b=EBG.adaptor.browser.getDocumentMode()||
5;EBG.adaptor.browser.isIE()&&10<b&&(a=!0);return a},MouseVisibilityProvider:function(){var a=!1,b=EBG.adaptor.browser.getDocumentMode()||5;EBG.adaptor.browser.isIE()&&11>b&&11>EBG.adaptor.browser._browserVer&&(a=!0);return a},SafeFrameVisibilityProvider:function(){return!!EBG.adaptor.isSafeFrame()},MraidVisibilityProvider:function(a){var b=a.actualServingMode==EBG.Adaptors.ServingMode.IFRAME;return a.ffs.CFF_MRAIDVis&&EBG.adaptor.isInApp()&&!b?(a.UiVz=!1,!0):!1}},_init:function(a){this._visibilityProvider=
new (a||window).EBG.RichModules[this._visibilityProviderName](this._resObjId,this._adConfig,this._options);this._dpm.send(EBG.DataProfile.VISIBILITY,{vsr:1,vsbp:this.getVisibilityProviderNum()});this._initializeVisibilityData();this._subscribeToEvents();this._visRecordable=!0;this._reportVisibilityRecordable();a=function(){this._visibilityProvider.start()};this.adConfig.adStarted?a.apply(this):(a=new EBG.Events.EventSubscription(EBG.Events.EventNames.AD_START,a,this),a.timing=EBG.Events.EventTiming.ONTIME,
EBG.eventMgr.subscribeToEvent(a))},_createIntMgrWrapper:function(){var a=function(){};this._intMgrWrapper={};for(var b=["handleCounterInteraction","updateTimer","startTimer","stopTimer","clearTimer"],c=0;c<b.length;c++)this._intMgrWrapper[b[c]]=this._options.muteInteractions?a:function(a){return function(){return EBG.intMgr[a].apply(EBG.intMgr,arguments)}}(b[c])},checkVisibility:function(a){a=a?EBG.cloneObj(a):{};if(!EBG.isDefined(a.percentage)||!EBG.isNumber(a.percentage))a.percentage=this.calculateVisibilityPercentage();
if(EBG.isDefinedNotNull(a.percentage)&&0<=a.percentage){if(!("viewPort"in a))a.viewPort=this.getViewPortMetrics();if(this._adCoveragePercentage)a.percentage=Math.max(a.percentage-this._adCoveragePercentage,0);this._res=EBG.adaptor.getElementById(this._resObjId);if(this.adConfig.ffs.CFF_hideShowBanner)try{for(var b=this._res;b;){if("hidden"===b.style.visibility){a.percentage=0;break}b=b.parentElement}}catch(c){}this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&this._calculateAverages(a);
for(var d in EBG.RichModules.VisibilityManager.ThreholdType)EBG.RichModules.VisibilityManager.ThreholdType.hasOwnProperty(d)&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[d]]&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[d]].isActive&&this._execCheckVisibility(a.percentage,EBG.RichModules.VisibilityManager.ThreholdType[d])}},updateResourceObjId:function(a){if(this._visibilityProvider&&a)this._collectTimersHandler(),this._resObjId=a,this._res=EBG.adaptor.getElementById(a),
this._visibilityProvider.updateResourceObjId(a)},_shouldInitialize:function(){var a=EBG.Initializer._getAdClass({tn:this.adConfig.templateName});return this.adConfig.actualServingMode==EBG.Adaptors.ServingMode.IFRAME&&!a.requiresIframeBust&&this.adConfig.UiVz&&(!this.adConfig.ffs.CFF_MRAIDVis||!EBG.adaptor.isInApp())?(this.adConfig.visibility.mode==EBG.VisibilityMode.DEFAULT_MODE?this._dpm.send(EBG.DataProfile.VISIBILITY,{uvsr:1}):this._dpm.send(EBG.DataProfile.VISIBILITY,{uvsr:2}),!1):!0},_getVisibilityProvider:function(a,
b){for(var c=0;c<this._availableVisibilityProviders.length;c++){var d=this._availableVisibilityProviders[c];if(this._providersAvailability[d]&&this._providersAvailability[d](b))return d}return null},calculateVisibilityPercentage:function(a,b,c,d,e,g,f){var h=0;EBG.adaptor.isPageVisible(this.adConfig.isInstream)?this._visibilityProvider&&(h=this._visibilityProvider._calculateVisibilityPercentage({resourceObjId:a,width:b,height:c,offsetX:d,offsetY:e,isUIVZ:g,actualServingMode:f})):h=0;return h},isVisibile:function(a,
b,c){var d=!1;if(EBG.adaptor.isPageVisible(this.adConfig.isInstream)&&this._visibilityProvider)try{d=!!this._visibilityProvider._isVisible({resourceObjId:a,width:b,height:c})}catch(e){}return d},getViewPortMetrics:function(){var a=null;this._visibilityProvider&&(a=this._visibilityProvider._getViewPortMetrics());return a},_subscribeToEvents:function(){try{var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.VISIBILITY_CHECK,this._visibilityCheckHandler,this);a.dispatcherFilters={"adConfig.rnd":this.adConfig.rnd};
a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(a);if(this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE)a=new EBG.Events.EventSubscription(EBG.Events.EventNames.COLLECT_TIMERS,this._collectTimersHandler,this),a.timing=EBG.Events.EventTiming.BEFORE,EBG.eventMgr.subscribeToEvent(a);var b=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_HIDDEN,this._stopTimersHandler,this);b.isDocumentEvent=!this._adConfig.isAMP;EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription(EBG.Events.EventNames.VISIBILITY_HIDDEN,
this._stopTimersHandler,this);EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription(this._isPanel?"P":""+EBG.Events.EventNames.AD_STACKING,this._adStackingHandler,this);b.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd};EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription(EBG.Events.EventNames.EXPAND,function(a){(a.eventData==this.adConfig.panelName||a.eventData.props&&a.eventData.props.asset.id==this._resObjId||a.eventData.props&&a.eventData.props.panel.id==this._resObjId)&&
this.checkVisibility()},this);b.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd};b.timing=EBG.Events.EventTiming.AFTER;EBG.eventMgr.subscribeToEvent(b);b.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.subscribeToEvent(b);if(this.adConfig.ffs.CFF_hideShowBanner)b=new EBG.Events.EventSubscription(EBG.Events.EventNames.ELEMENT_SHOWN,function(){this.checkVisibility()},this),b.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd},b.timing=EBG.Events.EventTiming.AFTER,EBG.eventMgr.subscribeToEvent(b),
b=new EBG.Events.EventSubscription(EBG.Events.EventNames.ELEMENT_HIDDEN,function(){this.checkVisibility()},this),b.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd},b.timing=EBG.Events.EventTiming.AFTER,EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription(EBG.Events.EventNames.COLLAPSE,function(a){(a.eventData==this.adConfig.panelName||a.eventData.props&&a.eventData.props.asset.id==this._resObjId||a.eventData.props&&a.eventData.props.panel.id==this._resObjId)&&this.stopMeasureVisibility()},
this);b.timing=EBG.Events.EventTiming.BEFORE;b.dispatcherFilters={"_adConfig.rnd":this.adConfig.rnd};EBG.eventMgr.subscribeToEvent(b)}catch(c){}},_adStackingHandler:function(a){this._adCoveragePercentage=a.eventData.percentage;this.checkVisibility()},_visibilityCheckHandler:function(a){EBG.isDefined(a)&&EBG.isDefined(a.eventData)&&a.dispatcher===this._visibilityProvider&&this.checkVisibility(a.eventData)},_initializeVisibilityData:function(){this._visibilityData=[];this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.IAB]=
{minSurface:this.adConfig.visibility.iabMinSurface,minDuration:this.adConfig.visibility.iabMinDuration,minLargeSurface:this.adConfig.visibility.iabMinLargeSurface,minLargeDuration:this.adConfig.visibility.iabMinLargeDuration,visibilityInteraction:this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_IAB),durationInteraction:null,isActive:this.adConfig.visibility.mode!=EBG.VisibilityMode.DEFAULT_MODE,durationNeeded:!1,timeOutFlag:null,reported:!1};this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.Agency]=
{minSurface:this.adConfig.visibility.agencyMinSurface,minDuration:this.adConfig.visibility.agencyMinDuration,visibilityInteraction:this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AGENCY),durationInteraction:this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION),isActive:this.adConfig.visibility.mode!=EBG.VisibilityMode.DEFAULT_MODE&&!!this.adConfig.visibility.agencyMinDuration,durationNeeded:this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&
!!this.adConfig.visibility.agencyMinDuration,timeOutFlag:null,reported:!1};this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType.Advertiser]={minSurface:this.adConfig.visibility.advertiserMinSurface,minDuration:this.adConfig.visibility.advertiserMinDuration,visibilityInteraction:this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER),durationInteraction:this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION),isActive:this.adConfig.visibility.mode==
EBG.VisibilityMode.ENHANCED_MODE&&!this._isPanel&&!!this.adConfig.visibility.advertiserMinDuration,durationNeeded:this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&!!this.adConfig.visibility.advertiserMinDuration,timeOutFlag:null,reported:!1}},_adjustPanelIntName:function(a){return this._isPanel?"P"+a:a},_isLargeBanner:function(){var a=EBG.adaptor.getBoundingClientRect(this._res,{clip:!0});return!!a&&242500<=a.width*a.height},_checkMilestone:function(){var a=+new Date,b=this._getNextMilestone();
if(b)this._lastMilestoneCheckTime&&(this._totalMilestoneCountTime+=a-this._lastMilestoneCheckTime),this._lastMilestoneCheckTime=50<=this._lastVisPercentage?a:0,this._totalMilestoneCountTime>1E3*b.milestone&&(this._checkMilestonesPassed(),b=this._getNextMilestone()),b&&EBG.runTimed(this,this._checkMilestone,[],b.interval)},_checkMilestonesPassed:function(){var a=this._getNextMilestone();if(a&&this._totalMilestoneCountTime>1E3*a.milestone){this._checkVisibilityMilestones.shift();var b=new EBG.Events.Event(EBG.Events.EventNames.VISIBILITY_MILESTONE);
b.dispatcher=this;b.eventData={milestone:a.milestone,currentTime:this._totalMilestoneCountTime};b.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(b);this._checkMilestonesPassed()}},_getNextMilestone:function(){return this._checkVisibilityMilestones&&0<this._checkVisibilityMilestones.length?this._checkVisibilityMilestones[0]:null},_execCheckVisibility:function(a,b){try{var c,d,e=this._visibilityData[b];e.minLargeSurface&&this._isLargeBanner()?(c=e.minLargeSurface,d=e.minLargeDuration):
(c=e.minSurface,d=e.minDuration);this.adConfig.ffs.CFF_MMIntegration&&e.visibilityInteraction==EBG.Interactions.SystemInts.VISIBILITY_IAB&&this._checkMilestone();a>=c?!e.reported&&!e.timeOutFlag?e.timeOutFlag=EBG.runTimed(this,function(){e.timeOutFlag=null;this._dpm.send(EBG.DataProfile.VISIBILITY,{vsiab:1});this._intMgrWrapper.handleCounterInteraction(e.visibilityInteraction,this.adConfig.uid);e.durationNeeded&&e.durationInteraction&&(this._intMgrWrapper.updateTimer(e.durationInteraction,this.adConfig.uid,
d),this._intMgrWrapper.startTimer(e.durationInteraction,this.adConfig.uid));e.reported=!0},[],1E3*d):e.reported&&e.durationNeeded&&e.durationInteraction&&this._intMgrWrapper.startTimer(e.durationInteraction,this.adConfig.uid):(this._dpm.send(EBG.DataProfile.VISIBILITY,{uvsiab:1}),this._stopDurationTimeout(b),e.durationInteraction&&this._stopDurationCounting(b))}catch(g){}},_stopDurationTimeout:function(a){if(this._visibilityData[a].timeOutFlag)clearTimeout(this._visibilityData[a].timeOutFlag),this._visibilityData[a].timeOutFlag=
null},_stopDurationCounting:function(a){this._visibilityData[a].durationNeeded&&this._visibilityData[a].durationInteraction&&this._intMgrWrapper.stopTimer(this._visibilityData[a].durationInteraction,this.adConfig.uid)},_reportVisibilityRecordable:function(){var a=this.adConfig.visibility.mode==EBG.VisibilityMode.BASIC_MODE||this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE;a&&this.adConfig.visibility.iabMinDuration&&(this._intMgrWrapper.handleCounterInteraction(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE),
this.adConfig.uid),this._dpm.send(EBG.DataProfile.VISIBILITY,{vsri:1}));a&&this.adConfig.visibility.agencyMinDuration&&this._intMgrWrapper.handleCounterInteraction(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE),this.adConfig.uid);this.adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&!this._isPanel&&this.adConfig.visibility.advertiserMinDuration&&this._intMgrWrapper.handleCounterInteraction(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE),
this.adConfig.uid)},_collectTimersHandler:function(){this._intMgrWrapper.clearTimer(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE),this.adConfig.uid);this._intMgrWrapper.clearTimer(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE),this.adConfig.uid);this._calculateAverages({percentage:this._lastVisPercentage,viewPort:this._visibilityProvider._getViewPortMetrics()});this._intMgrWrapper.updateTimer(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE),
this.adConfig.uid,this._averageVisibility);this._intMgrWrapper.updateTimer(this._adjustPanelIntName(EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE),this.adConfig.uid,this._averageScreenShare)},_stopTimersHandler:function(){for(var a in EBG.RichModules.VisibilityManager.ThreholdType)EBG.RichModules.VisibilityManager.ThreholdType.hasOwnProperty(a)&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[a]]&&this._visibilityData[EBG.RichModules.VisibilityManager.ThreholdType[a]].isActive&&
(this._stopDurationTimeout(EBG.RichModules.VisibilityManager.ThreholdType[a]),this._stopDurationCounting(EBG.RichModules.VisibilityManager.ThreholdType[a]))},stopMeasureVisibility:function(){this._collectTimersHandler();if(this._adConfig.ffs.CFF_PanelVisResetOnCollapse)this._lastVisPercentage=0;this._stopTimersHandler()},getVisibilityProviderNum:function(){var a={None:0,Geometric:1,SafeFrame:2,Mouse:3,Grid:4,Flash:5,FF:6,Mraid:7,AddingEye:8,Basic:9,InteractionObserver:10};return this._visibilityProvider?
a[this._visibilityProvider.name]||-1:a.None},_calculateAverages:function(a){var b=(new Date).getTime()-this._averageLastCalcTime;if(1E3<b&&0<this._lastVisPercentage){this._averageVisibility=(this._averageVisibility*this._averageAdDuration+this._lastVisPercentage*b)/(this._averageAdDuration+b);if(this._lastVisViewPort&&this._lastVisViewPort.Width&&this._lastVisViewPort.Height){var c=this._lastVisViewPort.Width*this._lastVisViewPort.Height,d=EBG.adaptor.getBoundingClientRect(this._res,{clip:!0})||{width:0,
height:0};this._averageScreenShare=(this._averageScreenShare*this._averageAdDuration+100*(this._lastVisPercentage*(d?d.width*d.height:0)/100/c)*b)/(this._averageAdDuration+b)}this._averageAdDuration+=b}this._lastVisPercentage=a.percentage;this._lastVisViewPort=a.viewPort;this._averageLastCalcTime=(new Date).getTime()}};EBG.declareClass(EBG.RichModules.VisibilityManager,null);EBG.declareNamespace("RichModules");EBG.RichModules.Animator=function(a){this._adConfig=a};
EBG.RichModules.Animator=function(){(!window.ebO||!ebO.ffs||!ebO.ffs.CFF_AnimatorWatcher)&&EBG.setInterval(this,this._watchElementPolling,[],100)};
EBG.RichModules.Animator.prototype={_adaptiveProperties:"top,left,bottom,right,width,height,clip,opacity".split(","),_clipRegex:/rect\((.*?)px(.*?)px(.*?)px(.*?)px\)/g,_animatingElements:{},_watchedElementsList:[],_isSubscribed:!1,EasingFunctions:{linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return a*(2-a)},easeInOutQuad:function(a){return 0.5>a?2*a*a:-1+(4-2*a)*a},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return--a*a*a+1},easeInOutCubic:function(a){return 0.5>
a?4*a*a*a:(a-1)*(2*a-2)*(2*a-2)+1},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return 1- --a*a*a*a},easeInOutQuart:function(a){return 0.5>a?8*a*a*a*a:1-8*--a*a*a*a},easeInQuint:function(a){return a*a*a*a*a},easeOutQuint:function(a){return 1+--a*a*a*a*a},easeInOutQuint:function(a){return 0.5>a?16*a*a*a*a*a:1+16*--a*a*a*a*a}},TransitionEasing:{ease:"ease",linear:"linear",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out"},animate:function(a,b,c,d){if(a&&b){if(EBG.isDefined(b.delay)){var e=
b.delay,b=EBG.cloneObj(b);delete b.delay;b.animationId=b.animationId||Date.now();EBG.runTimed(this,this.animate,[a,b,c,d],e);return b.animationId}if(EBG.isArray(a)){for(var g=[],e=0;e<a.length;e++)g.push(this.animate(a[e],b,c,d));return g}a.id&&this._animatingElements[a.id]&&b.abortPrevious&&this.abortAllElementAnimations(a.id);var g=this._getOriginalValues(a),f=b.animationId||Date.now();if(b.init&&EBG.isObj(b.init)){var e=this._adaptProperties(g,b.init),h;for(h in e)g[h]=this._recalculateProperyValue(h,
e[h],g,1)}if(b.reverse)for(var k=EBG.cloneObj(g),l=this._adaptProperties(k,b),e=0;e<this._adaptiveProperties.length;e++){h=this._adaptiveProperties[e];var m=l[h];EBG.isDefined(m)&&(g[h]=this._recalculateProperyValue(h,m,k,1),b[h]=k[h])}if(EBG.isObj(g))for(h in g)if(EBG.isDefined(b[h])||b.init&&EBG.isDefined(b.init[h]))a.style[h]=this._adjustStyle(h,g[h]);this._shouldUseTransitionAnimation(a,g,b)?this._CSSAnimate(f,a,g,b,c,d):this._JSAnimate(f,a,g,b,c,d);this._subscribeToEvents();return f}},_handleResizeOrScroll:function(a){var b=
[],c;for(c in this._animatingElements)if(this._animatingElements.hasOwnProperty(c)){var d=this._animatingElements[c];if(this.isAnimating(c))for(e in d)d[e].isRunning&&d[e].usesViewportRelative&&d[e].shouldHandleResizeScroll&&b.push(d[e]);else if(d)for(var e in d)d.hasOwnProperty(e)&&d[e].isNewestPerElement&&d[e].shouldHandleResizeScroll&&b.push(d[e])}0<b.length&&(!window.ebO||!ebO.ffs||!ebO.ffs.CFF_AnimatorWatcher?this._watchElementPolling():EBG.elementWatcher.checkNow());for(i=0;i<b.length;i++)if(c=
b[i],d=EBG.adaptor.getElementById(c.elementId)){if(!c.isRunning&&!c.usesViewportRelative||c.posTypeX==EBG.PanelPositionType.BANNER_RELATIVE_PIXELS&&c.posTypeY==EBG.PanelPositionType.BANNER_RELATIVE_PIXELS||void 0==c.posTypeX&&void 0==c.posTypeY)c.origin=this._getOriginalValues(d);e=this._adaptProperties(c.origin,EBG.cloneObj(c.properties));if(c.isRunning){if(a.name==EBG.Events.EventNames.PAGE_SCROLL&&c.usesViewportRelativePositioning)c.shouldHandleScrolledViewport=!0;(!window.ebO||!ebO.ffs||!ebO.ffs.CFF_JSViewportScroll||
!(!1===c.isCSSAnimation&&c.usesViewportRelativePositioning&&a.name==EBG.Events.EventNames.PAGE_SCROLL))&&EBG.mergeObj(e,c.styleProps,!0);if(a.name==EBG.Events.EventNames.PAGE_RESIZE)c.shouldHandleResizedViewport=!0}else{var g={};if(c.properties.isPanel&&EBG.isDefined(c.properties.clip))g.clip=this._recalculateProperyValue("clip",e.clip,c.origin,1),d.style.clip=this._adjustStyle("clip",g.clip);else for(var f in e)g[f]=this._recalculateProperyValue(f,e[f],c.origin,1),d.style[f]=this._adjustStyle(f,
g[f])}}},_JSAnimate:function(a,b,c,d,e,g){var f=this._createAnimationRecord(b.id,a,d,!1),h,k,l=new EBG.Events.Event(EBG.Events.EventNames.ANIMATION);l.dispatcher={animationId:a,module:this};l.eventData={customData:d.customData||{},element:b,elementId:b.id,style:EBG.cloneObj(c),progress:0,finished:!1,aborted:!1,time:0,animationId:a,loop:!!d.loop};l.timing=EBG.Events.EventTiming.BEFORE;if(EBG.eventMgr.dispatchEvent(l))this.abort(a,b.id);else{d.alignToElement&&this._watchElement(d.alignToElement,f,function(a,
e,f){c.left+=a.left-e.left;c.top+=a.top-e.top;for(var a=["top","left"],e={},g=0;g<a.length;g++){var k=a[g];EBG.isDefined(d[k])?(e[k]=this._recalculateProperyValue(k,d[k],c,p(h)),b.style[k]=this._adjustStyle(k,e[k])):b.style[k]=this._adjustStyle(k,c[k])}f.styleChange=e},this);f.isRunning=!0;var m=Date.now(),o=EBG.isDefined(d.duration)?d.duration:1E3,p=d.easing?EBG.isFunc(d.easing)?d.easing:this.EasingFunctions[d.easing]||this.EasingFunctions[this._transitionToJSEasing(d.easing)]||this.EasingFunctions.linear:
this.EasingFunctions.linear,n=this,r=!!d.loop,s=1E3/(d.fps||48),t=d.alignToElement,d=this._adaptProperties(c,d);f.styleProps=d;f.origin=c;f.startTime=m;f.easing=p;(function(){k=Date.now()-m;h=k/(o||1);var q={};h=Math.min(h,1);var w={};if(f.prevScroll)w=EBG.adaptor.getScrollLeftTop(!1,f.actualServingMode),w.top=w.Y-f.prevScroll.Y,w.left=w.X-f.prevScroll.X,f.prevScroll.Y=w.Y,f.prevScroll.X=w.X;c=f.origin;f.shouldHandleResizedViewport=!1;for(var u in d)w[u]&&(c[u]+=w[u]),q[u]=n._recalculateProperyValue(u,
d[u],c,p(h)),b.style[u]=n._adjustStyle(u,q[u]);EBG.mergeObj(c,q,!1);l.eventData={customData:d.customData||{},element:b,elementId:b.id,style:EBG.cloneObj(q),progress:h,finished:1===h,aborted:!!f.abort,time:k,animationId:a,loop:!!d.loop,alignedStyle:f.alignedStyle};l.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(l)&&n.abort(a,b.id);if(1>h&&!f.abort)setTimeout(arguments.callee,s);else if(l.timing=EBG.Events.EventTiming.AFTER,l.eventData.aborted=f.abort,EBG.eventMgr.dispatchEvent(l),
t&&n._unwatchElement(t),r&&!f.abort)m=Date.now(),setTimeout(arguments.callee,s);else{f.isRunning=!1;var x=null;if(EBG.isPercentage(f.properties.width)||EBG.isPercentage(f.properties.height)||EBG.isPercentage(f.properties.maxWidth)||EBG.isPercentage(f.properties.maxHeight)||EBG.isPercentage(f.properties.left)||EBG.isPercentage(f.properties.top)||window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip&&f.properties.clip&&5<f.properties.clip.indexOf("%")){var v="posTypeX,posTypeY,width,maxWidth,height,maxHeight,left,top".split(",");
window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip&&v.push("clip");x=EBG.filterObject(f.properties,function(a,b){return-1<EBG.indexOfArray(v,b)},this)}EBG.isDefinedNotNull(f.posTypeX)&&(q.posTypeX=f.posTypeX);EBG.isDefinedNotNull(f.posTypeY)&&(q.posTypeY=f.posTypeY);if(!f.properties.clip||5>f.properties.clip.indexOf("%")||window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip)f.shouldHandleResizeScroll=!1;e&&setTimeout(function(){e.apply(g||n,[b,q,x])},1)}})()}},_CSSAnimate:function(a,b,c,d,e,g){var f=this._createAnimationRecord(b.id,
a,d,!0),h=new EBG.Events.Event(EBG.Events.EventNames.ANIMATION);h.dispatcher={animationId:a,module:this};h.eventData={customData:d.customData||{},element:b,elementId:b.id,style:EBG.cloneObj(c),progress:0,finished:!1,aborted:!1,time:0,animationId:a,loop:!!d.loop};h.timing=EBG.Events.EventTiming.BEFORE;if(EBG.eventMgr.dispatchEvent(h))this.abort(a,b.id);else{var k,l,m;d.alignToElement&&this._watchElement(d.alignToElement,f,function(a,e,f){var g=s?EBG.isFunc(s)?s:this.EasingFunctions[s]||this.EasingFunctions[this._transitionToJSEasing(s)]||
this.EasingFunctions.linear:this.EasingFunctions.linear;b.style[this._getTransitionPropertyName()]="";this.a=b.offsetHeight;e={left:e.left-e.left,top:e.top-e.top};c.left+=e.left;c.top+=e.top;m=this._adaptProperties(c,d);f.styleProps=m;for(var h in a)if(~"topleftbottomright".indexOf(h)&&!~EBG.indexOfArray(m,h)){var n=a[h];f.usesViewportRelativePositioning?("top"==h&&f.posTypeY==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE&&f.shouldHandleScrolledViewport&&(n-=(EBG.isDefined(e[h])?e[h]:0)*g(k)),
"left"==h&&f.posTypeX==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE&&f.shouldHandleScrolledViewport&&(n-=(EBG.isDefined(e[h])?e[h]:0)*g(k)),"top"==h&&f.posTypeY==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE&&!f.shouldHandleScrolledViewport&&(n+=(EBG.isDefined(e[h])?e[h]:0)*g(k)),"left"==h&&f.posTypeX==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE&&!f.shouldHandleScrolledViewport&&(n+=(EBG.isDefined(e[h])?e[h]:0)*g(k))):n+=EBG.isDefined(e[h])?e[h]:0;f.shouldHandleScrolledViewport=
!1;b.style[h]=this._adjustStyle(h,n)}this.a=b.offsetHeight;this._updateTransitionStyle(b,p,o-l,s);this._setElementEndStyle(b,c,m)},this);m=this._adaptProperties(c,d);f.isRunning=!0;var o=EBG.isDefined(d.duration)?d.duration:1E3,p=EBG.filterArray(this._adaptiveProperties,function(a){return EBG.isDefined(m[a])});this._getTransitionPropertyName();var n=this,r=!!d.loop,s=d.easing?this.TransitionEasing[d.easing]:this.TransitionEasing.ease,t=1E3/(d.fps||48);if(m.clip&&("auto"==b.style.clip||""==b.style.clip))b.style.clip=
this._recalculateProperyValue("clip",m.clip,c,0);this.a=b.offsetHeight;this._updateTransitionStyle(b,p,o,s);var q=Date.now();f.styleProps=m;f.origin=c;f.startTime=q;f.easing=s;this._setElementEndStyle(b,c,m);(function(){l=Date.now()-q;k=l/(o||1);k=Math.min(k,1);if(f.shouldHandleResizedViewport||f.shouldHandleScrolledViewport)f.shouldHandleResizedViewport=!1,f.shouldHandleScrolledViewport=!1,n._updateTransitionStyle(b,p,o-l,s),n._setElementEndStyle(b,f.origin,f.styleProps);for(var m={},u=EBG.adaptor.getComputedStyle(b),
x=0;x<n._adaptiveProperties.length;x++){var v=n._adaptiveProperties[x];m[v]="clip"==v?u[v]:1*u[v].replace(/[^\d\.\-]/g,"")}EBG.mergeObj(c,m,!1);h.eventData={customData:d.customData||{},element:b,elementId:b.id,style:EBG.cloneObj(m),progress:k,finished:1===k,aborted:!!f.abort,time:l,animationId:a,loop:r,alignedStyle:f.alignedStyle};h.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(h)&&n.abort(a,b.id);if(1>k&&!f.abort)setTimeout(arguments.callee,t);else{h.timing=EBG.Events.EventTiming.AFTER;
h.eventData.aborted=f.abort;EBG.eventMgr.dispatchEvent(h);d.alignToElement&&n._unwatchElement(d.alignToElement);b.style[n._getTransitionPropertyName()]="";f.isRunning=!1;var y=null;if(EBG.isPercentage(f.properties.width)||EBG.isPercentage(f.properties.height)||EBG.isPercentage(f.properties.maxWidth)||EBG.isPercentage(f.properties.maxHeight)||EBG.isPercentage(f.properties.left)||EBG.isPercentage(f.properties.top)||window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip&&f.properties.clip&&5<f.properties.clip.indexOf("%")){var z=
"posTypeX,posTypeY,width,maxWidth,height,maxHeight,left,top".split(",");window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip&&z.push("clip");y=EBG.filterObject(f.properties,function(a,b){return-1<EBG.indexOfArray(z,b)},this)}EBG.isDefinedNotNull(f.posTypeX)&&(m.posTypeX=f.posTypeX);EBG.isDefinedNotNull(f.posTypeY)&&(m.posTypeY=f.posTypeY);if(!f.properties.clip||5>f.properties.clip.indexOf("%")||window.ebO&&ebO.ffs&ebO.ffs.CFF_CCClip)f.shouldHandleResizeScroll=!1;e&&setTimeout(function(){e.apply(g||n,[b,m,y])},
1);if(r&&!f.abort){n.a=b.offsetHeight;for(v in c)v in d&&(b.style[v]=n._adjustStyle(v,c[v]));EBG.runTimed(n,n._CSSAnimate,[a,b,c,d],0)}}})()}},_setElementEndStyle:function(a,b,c){for(var d in c)a.style[d]=this._adjustStyle(d,this._recalculateProperyValue(d,c[d],b,1))},_shouldUseTransitionAnimation:function(a,b,c){a=this.supportsCSSTransitions();c=!c.easing||!EBG.isFunc(c.easing)&&(c.easing in EBG.Animation.TransitionEasing||/cubic-bezier\(.*?,.*?,.*?,.*?\)/g.test(c.easing));return a&&c},_transitionToJSEasing:function(a){return{ease:EBG.Animation.Easing.easeInOutQuint,
linear:EBG.Animation.Easing.linear,easeIn:EBG.Animation.Easing.easeInCubic,easeOut:EBG.Animation.Easing.easeInOutCubic,easeInOut:EBG.Animation.Easing.easeInOutCubic}[a]},_updateTransitionStyle:function(a,b,c,d){this.transitionProperty=this.transitionProperty||this._getTransitionPropertyName();EBG.isArray(b)||(b=EBG.filterArray(this._adaptiveProperties,function(a){return EBG.isDefined(b[a])}));for(var e="",g=0;g<b.length;g++)e+=(g?", ":"")+b[g]+" "+c+"ms "+d;a.style[this.transitionProperty]=e},_adjustStyle:function(a,
b){return-1!=="topleftbottomrightwidthheight".indexOf(a)?b+"px":b},_isRectCSS:function(a){this._clipRegex.lastIndex=0;return this._clipRegex.test(a)},_getRectCSSValues:function(a){this._clipRegex.lastIndex=0;return this._clipRegex.exec(a)},_getOriginalValues:function(a){var b=EBG.adaptor.getBoundingClientRect(a,{clip:!1,relativeToWindow:!0}),a=EBG.adaptor.getComputedStyle(a);b.clip=a.getPropertyValue("clip");b.opacity=1*(a.getPropertyValue("opacity")||1);return b},_recalculateProperyValue:function(a,
b,c,d){switch(a){case "clip":var e=function(a){return 1*a.trim().replace(",","")},a=this._isRectCSS(c[a])?this._getRectCSSValues(c[a]):this._getRectCSSValues("rect(0px,"+c.width+"px,"+c.height+"px,0px)"),b=this._getRectCSSValues(b);return"rect("+(e(a[1])+e(b[1])*d)+"px,"+(""+(e(a[2])+e(b[2])*d))+"px,"+(""+(e(a[3])+e(b[3])*d))+"px,"+(""+(e(a[4])+e(b[4])*d))+"px)";default:return c[a]+b*d}},_adaptProperties:function(a,b){for(var c={},d=["maxWidth","maxHeight"].concat(this._adaptiveProperties),d=EBG.filterArray(d,
function(a){return EBG.isDefined(b[a])}),e=["height","width"],g=0;g<e.length;g++){var f=EBG.indexOfArray(d,e[g]);0<f&&(d.splice(f,1),d.unshift(e[g]))}for(var g=0;g<d.length;g++){var f=d[g],h=b[f];if("clip"===f){if(5<a[f].indexOf("%")){var k=null;for(j=0;j<e.length;j++)a[e[j]]&&(k=k||{},k[e[j]]=a[e[j]]);a[f]=EBG.geometry.resolveClipPercentages(a[f],k)}if(5<h.indexOf("%")){k=null;for(j=0;j<e.length;j++)c[e[j]]?(k=k||{},k[e[j]]=c[e[j]]+a[e[j]]):a[e[j]]&&(k=k||{},k[e[j]]=a[e[j]]);h=EBG.geometry.resolveClipPercentages(h,
k)}var k=function(a){return 1*a.trim().replace(",","")},l=this._isRectCSS(a[f])?this._getRectCSSValues(a[f]):this._getRectCSSValues("rect(0px,"+a.width+"px,"+a.height+"px,0px)"),h=this._isRectCSS(h)?this._getRectCSSValues(h):l;c[f]="rect("+(k(h[1])-k(l[1]))+"px,"+(""+(k(h[2])-k(l[2])))+"px,"+(""+(k(h[3])-k(l[3])))+"px,"+(""+(k(h[4])-k(l[4])))+"px)"}else if("string"===EBG.typeOf(h))if(1<h.length&&"="==h.charAt(1))c[f]=h.substr(2).replace(/[^\d\.\-]/g,"")*("+"===h.charAt(0)?1:-1);else if(EBG.isPercentage(h)){switch(f){case "width":case "height":h=
1*h.replace(/[^\d\.\-]/g,"");h=EBG.geometry.getPercentOfViewport(h)[f];h-=a[f];break;case "maxWidth":k=a.width/a.height;h=EBG.geometry.calculateMaxWidth(h,k,c.height+a.height);h-=a.width;c.width||(f="width");break;case "maxHeight":k=a.width/a.height;h=EBG.geometry.calculateMaxHeight(h,k,c.width+a.width);h-=a.height;c.height||(f="height");break;case "top":h=1*h.replace(/[^\d\.\-]/g,"");k=this._recalculateProperyValue("height",c.height,a,1);h=EBG.geometry.translateCoords({top:h,height:k,refElem:{top:a.top}},
{from:EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE,to:EBG.PanelPositionType.BANNER_RELATIVE_PIXELS}).top;break;case "left":h=1*h.replace(/[^\d\.\-]/g,""),k=this._recalculateProperyValue("width",c.width,a,1),h=EBG.geometry.translateCoords({left:h,width:k,refElem:{left:a.left}},{from:EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE,to:EBG.PanelPositionType.BANNER_RELATIVE_PIXELS}).left}c[f]=h}else h=1*h.replace(/[^\d\.\-]/g,""),"maxHeight"==f&&(k=a.width/a.height,h=EBG.geometry.calculateMaxHeight(h,
k,c.width+a.width),c.height||(f="height")),"maxWidth"==f&&(k=a.width/a.height,h=EBG.geometry.calculateMaxWidth(h,k,c.height+a.height),c.width||(f="width")),c[f]=h-a[f];else"left"==f&&EBG.isDefined(b.posTypeX)?(k=this._recalculateProperyValue("width",c.width,a,1),h=EBG.geometry.translateCoords({left:h,width:k,refElem:{left:a.left}},{from:b.posTypeX,to:EBG.PanelPositionType.BANNER_RELATIVE_PIXELS}).left,c[f]=h):"top"==f&&EBG.isDefined(b.posTypeY)?(k=this._recalculateProperyValue("height",c.height,a,
1),h=EBG.geometry.translateCoords({top:h,height:k,refElem:{top:a.top}},{from:b.posTypeY,to:EBG.PanelPositionType.BANNER_RELATIVE_PIXELS}).top,c[f]=h):c[f]=h-a[f]}return c},isAnimating:function(a){if(a=this._animatingElements[a])for(var b in a)if(a[b].isRunning)return!0;return!1},abortAllElementAnimations:function(a){var b=this._animatingElements[a];if(b)for(var c in b)this.abort(c,a)},getAnimationRecord:function(a,b){if(!b)for(b in this._animatingElements)if(this._animatingElements[b][a])break;return b?
this._animatingElements[b][a]:null},abort:function(a,b,c){c=c||{};if(record=this.getAnimationRecord(a,b)){record.abort=!0;record.shouldHandleResizeScroll=!1;if(a=EBG.adaptor.getElementById(record.elementId))if(record.isCSSAnimation){if(b=this._getOriginalValues(a),a.style[this._getTransitionPropertyName()]="",this.a=a.offsetHeight,!c.jumpToEndOnAbort&&!record.properties.jumpToEndOnAbort)for(var d in b)EBG.isDefined(record.styleProps[d])&&(a.style[d]=this._adjustStyle(d,b[d]))}else(c.jumpToEndOnAbort||
record.properties.jumpToEndOnAbort)&&this._setElementEndStyle(a,record.origin,record.styleProps);return!0}return!1},_createAnimationRecord:function(a,b,c,d){this._animatingElements[a]=this._animatingElements[a]||{};var e=this._animatingElements[a];e[b]={};e[b].properties=EBG.cloneObj(c,!0);e[b].isCSSAnimation=d;e[b].elementId=a;e[b].properties.duration=EBG.isDefined(c.duration)?c.duration:1E3;e[b].shouldHandleResizeScroll=!1;e[b].actualServingMode=EBG.Adaptors.ServingMode.SCRIPT;for(var g in c)if(c.hasOwnProperty(g)){a=
c[g];if(EBG.isPercentage(a)){e[b].usesViewportRelative=!0;if("top"==g)e[b].posTypeY=EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE;if("left"==g)e[b].posTypeX=EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE}if("top"==g||"left"==g||"width"==g||"height"==g||"maxWidth"==g||"maxHeight"==g)e[b].shouldHandleResizeScroll=!0;else if("clip"==g&&5<a.indexOf("%"))e[b].shouldHandleResizeScroll=!0,e[b].usesViewportRelative=!0}if(EBG.isDefined(c.posTypeX))e[b].posTypeX=c.posTypeX;if(EBG.isDefined(c.posTypeY))e[b].posTypeY=
c.posTypeY;if(e[b].posTypeX==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE||e[b].posTypeX==EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS||e[b].posTypeY==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE||e[b].posTypeY==EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS)e[b].usesViewportRelativePositioning=!0,e[b].actualServingMode=EBG.adaptor.serving.detectServingMode(!0),e[b].prevScroll=EBG.adaptor.getScrollLeftTop(!1,e.actualServingMode);for(var f in e)if(e.hasOwnProperty(f))e[f].isNewestPerElement=
f==b;return e[b]},supportsCSSTransitions:function(){var a=document.createElement("p").style;return"transition"in a||"WebkitTransition"in a||"MozTransition"in a||"msTransition"in a||"OTransition"in a},_getTransitionPropertyName:function(){for(var a=document.createElement("div").style,b=["webkitTransition","transition"],c=0;c<b.length;c++)if(b[c]in a)return b[c]},_watchElementPolling:function(){for(var a=0;a<this._watchedElementsList.length;a++){var b=this._watchedElementsList[a],c=EBG.adaptor.getBoundingClientRect(b.element,
{clip:!0,relativeToWindow:b.relativeToWindow});b.record.alignedStyle=c;if(c.left!==b.previousRect.left||c.top!==b.previousRect.top)b.callback&&b.callback.apply(b.binding||window,[c,b.previousRect,b.record]),b.previousRect=c}},_watchElement:function(a,b,c,d){if(c)if(window.ebO&&ebO.ffs&&ebO.ffs.CFF_AnimatorWatcher){var e={clip:!0,relativeToWindow:!b.usesViewportRelativePositioning},g=["top","left"];EBG.elementWatcher.watch(a,c,d,b,e,g);g="top,left,bottom,right,width,height".split(",");EBG.elementWatcher.watch(a,
function(a,b,c){c.alignedStyle=a},this,b,e,g)}else this._watchedElementsList.push({element:a,record:b,previousRect:EBG.adaptor.getBoundingClientRect(a,{clip:!0,relativeToWindow:!b.usesViewportRelativePositioning}),callback:c,binding:d,relativeToWindow:!b.usesViewportRelativePositioning})},_unwatchElement:function(a){if(window.ebO&&ebO.ffs&&ebO.ffs.CFF_AnimatorWatcher)EBG.elementWatcher.unwatch(void 0,a);else for(var b=0;b<this._watchedElementsList.length;b++)if(this._watchedElementsList[b].element==
a){this._watchedElementsList.splice(b,1);break}},_subscribeToEvents:function(){if(!this._isSubscribed){var a=this._handleResizeOrScroll,b=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_RESIZE,a,this);EBG.eventMgr.subscribeToEvent(b);a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_SCROLL,a,this);EBG.eventMgr.subscribeToEvent(a);this._isSubscribed=!0}}};EBG.declareNamespace("RichModules");EBG.RichModules.Geometry=function(){};
EBG.RichModules.Geometry.prototype={_clipRegex:/rect\((.*?)px(.*?)px(.*?)px(.*?)px\)/g,_clipPercentRegex:/rect\(([0-9]+%?)(?:px)?[,]?([0-9]+%?)(?:px)?[,]?([0-9]+%?)(?:px)?[,]?([0-9]+%?)(?:px)?[,]?\)/g,getViewport:function(){var a=EBG.adaptor.getWindowViewPortMetrics();if(a)a.width=a.Width,a.height=a.Height;return a},getPercentOfViewportWidth:function(a){EBG.isNumber(a)||(a=1*a.replace(/[^\d\.\-]/g,""));return this.getViewport().Width*a/100},getPercentOfViewportHeight:function(a){EBG.isNumber(a)||
(a=1*a.replace(/[^\d\.\-]/g,""));return this.getViewport().Height*a/100},getPercentOfViewport:function(a){EBG.isNumber(a)||(a=1*a.replace(/[^\d\.\-]/g,""));var b=EBG.cloneObj(this.getViewport());b.width=b.Width=b.Width*a/100;b.height=b.Height=b.Height*a/100;return b},calculateMaxHeight:function(a,b,c){var d=parseInt(a,10);EBG.isPercentage(a)&&(d=this.getPercentOfViewportHeight(d));return Math.min(c/b,d)},calculateMaxWidth:function(a,b,c){var d=parseInt(a,10);EBG.isPercentage(a)&&(d=this.getPercentOfViewportWidth(d));
return Math.min(b*c,d)},translateCoords:function(a,b,c){var d={},e=["left","top","right","bottom"],g=["width","height","width","height"],f=["X","Y","X","Y"],h;for(h in a){var k=EBG.indexOfArray(e,h);if(-1<k){var l=g[k],m=a[h],k=f[k],o;if(b.from==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE||b.from==EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS||b.to==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE||b.to==EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS)c=c||EBG.adaptor.serving.detectServingMode(!0),
o=EBG.adaptor.getScrollLeftTop(!1,c);switch(b.from){case EBG.PanelPositionType.PAGE_RELATIVE_PERCENTAGE:var p=0;a[l]?(p=this.getViewport()[l]-a[l],m=0<p?Math.round(p*m/100):0):m=this.getViewport()[l]*m/100;break;case EBG.PanelPositionType.BANNER_RELATIVE_PIXELS:var n;a.refElem&&(n=EBG.isElementOrNode(a.refElem)?EBG.adaptor.getBoundingClientRect(a.refElem,{relativeToWindow:!0}):a.refElem);EBG.isDefined(n[h])&&(m+=n[h]);break;case EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE:a[l]?(p=this.getViewport()[l]-
a[l],m=0<p?Math.round(p*m/100):0):m=this.getViewport()[l]*m/100;if("top"==h||"bottom"==h)m+=o.Y;else if("left"==h||"right"==h)m+=o.X;break;case EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS:if("top"==h||"bottom"==h)m+=o.Y;else if("left"==h||"right"==h)m+=o.X}switch(b.to){case EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE:a[l]&&(p=this.getViewport()[l]-a[l],m=0!=p?Math.round(100*((m-o[k])/p)):0);"top"==h?m-=o.Y:"left"==h&&(m-=o.X);break;case EBG.PanelPositionType.BANNER_RELATIVE_PIXELS:a.refElem&&
(n=EBG.isElementOrNode(a.refElem)?EBG.adaptor.getBoundingClientRect(a.refElem,{relativeToWindow:!0}):a.refElem);EBG.isDefined(n[h])&&(m-=n[h]);break;case EBG.PanelPositionType.PAGE_RELATIVE_PERCENTAGE:a[l]&&(p=this.getViewport()[l]-a[l],m=0!=p?Math.round(100*(m/p)):0);break;case EBG.PanelPositionType.VIEWPORT_RELATIVE_PIXELS:"top"==h?m-=o.Y:"left"==h&&(m-=o.X)}d[h]=m}}return d},resolveClipPercentages:function(a,b){if(this._isRectCSS(a)){for(var c=this._getRectCSSValues(a),d=[null,"top","right","bottom",
"left"],e="rect(",g=1;4>=g;g++){var f=c[g];switch(d[g]){case "top":case "bottom":EBG.isPercentage(f)&&(b&&EBG.isNumber(b.height)?(f=1*f.replace(/[^\d\.\-]/g,""),f=b.height*f/100):f=this.getPercentOfViewportHeight(f));break;case "left":case "right":EBG.isPercentage(f)&&(b&&EBG.isNumber(b.width)?(f=1*f.replace(/[^\d\.\-]/g,""),f=b.width*f/100):f=this.getPercentOfViewportWidth(f))}f=Math.round(f);e=e+f+"px";e=4>g?e+",":e+")"}return e}return null},_isRectCSS:function(a){this._clipPercentRegex.lastIndex=
0;return this._clipPercentRegex.test(a)},_getRectCSSValues:function(a){this._clipPercentRegex.lastIndex=0;return this._clipPercentRegex.exec(a)}};EBG.declareNamespace("RichModules");EBG.RichModules.ElementWatcher=function(){};
EBG.RichModules.ElementWatcher.prototype={_watchedElementsList:[],_count:0,_bannerLocationObserver:null,_pollingInterval:100,_intervalId:null,_rateControlledCheck:null,_isRunning:!1,forcePolling:!1,_start:function(){if(!this._isRunning){this._isRunning=!0;if(window.MutationObserver){this._rateControlledCheck=EBG.throttle(this._check,this._pollingInterval,{leading:!0});var a=this._check.bind(this),b=this;this._bannerLocationObserver=new MutationObserver(function(){window.requestAnimationFrame?window.requestAnimationFrame(a):
b._rateControlledCheck()});this._bannerLocationObserver.observe(EBG.adaptor.getDisplayWin().document,{attributes:!0,attributeOldValue:!0,childList:!0,characterData:!0,subtree:!0})}if(!window.MutationObserver||this.forcePolling)this._intervalId&&clearInterval(this._intervalId),this._intervalId=EBG.setInterval(this,this._check,[],this._pollingInterval)}},_stop:function(){this._intervalId&&clearInterval(this._intervalId);this._bannerLocationObserver&&this._bannerLocationObserver.disconnect();this._isRunning=
!1},_check:function(){for(var a=0;a<this._watchedElementsList.length;a++){var b=this._watchedElementsList[a],c=EBG.adaptor.getBoundingClientRect(b.element,{clip:b.options.clip,relativeToWindow:b.options.relativeToWindow});if(c)for(var d=0;d<b.filters.length;d++){if(c[b.filters[d]]!==b.previousRect[b.filters[d]]){b.callback&&(d=[c,b.previousRect,b.callbackArg],b.callback.apply(b.binding||window,d));b.previousRect=c;break}}else b.callback&&(d=[c,b.previousRect,b.callbackArg],b.callback.apply(b.binding||
window,d)),this.unwatch(b.subscriptionId)}},setPollingInterval:function(a){this._pollingInterval=a||100},checkNow:function(){this._check()},watch:function(a,b,c,d,e,g){var f=null;if(a&&b&&(this._start(),EBG.isArray(g)||(g=["left","top","width","height"]),f=this._validate({element:a,callbackArg:d,callback:b,binding:c,options:e,filters:g}),!1===f))this._watchedElementsList.push({element:a,callbackArg:d,previousRect:EBG.adaptor.getBoundingClientRect(a,{clip:!!e.clip,relativeToWindow:!!e.relativeToWindow}),
callback:b,binding:c,options:e,filters:g,subscriptionId:++this._count}),f=this._count;return f},_validate:function(a){var b=EBG.filterArray(this._watchedElementsList,function(b){return EBG.objMatch(a,b)},this);return 0==b.length?!1:b[0].subscriptionId},unwatch:function(a,b,c){this._watchedElementsList=EBG.filterArray(this._watchedElementsList,function(d){return EBG.isDefinedNotNull(a)&&a==d.subscriptionId||b&&d.element==b||d.binding==c?!1:!0},this);0==this._watchedElementsList.length&&this._stop()}};
EBG.declareNamespace("RichModules");
EBG.RichModules.AdStackingDetector=function(a,b){this._adConfig=a;this._isFriendlyIframe=this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME||this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.TOPMOST_FRIENDLY_IFRAME&&window.frameElement;this._isPanel=b;this._elementsIds=[];this._validElementParents=[];this._visibilityEvent={};this._placeholderDiv=EBG.adaptor.getElementById(this._adConfig.placeHolderId);if(this._shouldInitialize()){this._validElementParents.push(a.placeHolderId);EBG.Const.OUTER_DIV&&
this._validElementParents.push(EBG.Const.OUTER_DIV);var c=new EBG.Events.EventSubscription(EBG.Events.EventNames.VISIBILITY_CHECK,this._handleVisibilityEvent,this);c.dispatcherFilters={"adConfig.rnd":this._adConfig.rnd};c.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(c);this._adConfig.adStarted?this._start():(c=new EBG.Events.EventSubscription(EBG.Events.EventNames.AD_START,function(){this._start()},this),c.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.subscribeToEvent(c))}};
EBG.RichModules.AdStackingDetector.prototype={_analyzeInterval:200,_densityFactor:5,_prevPercentage:0,_minThresholdForAdStacking:50,_interactionThreshold:100,_generatePointsGrid:function(a){for(var b=[],c=(a.height-2)/this._densityFactor,a=(a.width-2)/this._densityFactor,d=0;d<=this._densityFactor;d++)for(var e=0;e<=this._densityFactor;e++)b.push({x:Math.round(a*d),y:Math.round(c*e)});return b},_handleVisibilityEvent:function(a){if(~EBGInfra.indexOfArray(this._elementsIds,a.dispatcher._resObjId))this._visibilityEvent=
EBG.cloneObj(a.eventData)},_shouldInitialize:function(){if(this._adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE&&this._adConfig.actualServingMode!=EBG.Adaptors.ServingMode.IFRAME)return this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME&&window.parent!==top?!1:!0},_start:function(){EBG.setInterval(this,this._analyze,[],this._analyzeInterval)},_analyze:function(){if("hidden"!=this._placeholderDiv.style.visibility){var a=this._calculateConcealmentPercentage();if(!this._adStackingReported&&
a.visible>=this._interactionThreshold&&this._visibilityEvent.percentage>=this._minThresholdForAdStacking)EBG.intMgr.handleCounterInteraction((this._isPanel?"P":"")+EBG.Interactions.SystemInts.AD_STACKING,this._adConfig.uid),this._adStackingReported=!0;if(a.full!=this._prevPercentage){this._prevPercentage=a.full;var b=new EBG.Events.Event(this._isPanel?"P":""+EBG.Events.EventNames.AD_STACKING);b.eventData={intName:(this._isPanel?"P":"")+EBG.Interactions.SystemInts.AD_STACKING,percentage:a.full};b.dispatcher=
this;b.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(b))b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER,EBG.eventMgr.dispatchEvent(b)}}},_calculateConcealmentPercentage:function(){var a={full:0,visible:0};try{if(!this._elementsIds.length)return a;var b=EBG.adaptor.serving._getTopFriendlyIframe(this._adConfig.displayWin||EBG.adaptor.getDisplayWin()),c=EBG.adaptor.getElementById(this._assetId),d=EBG.adaptor.getBoundingClientRect(c,{clip:!0,relativeToTop:!0});if(!c||!c.offsetWidth||
!c.offsetHeight||EBG.isDefined(this._visibilityEvent.assetId)&&this._visibilityEvent.assetId!=this._assetId)return a;var e=this._visibilityEvent.visibleRect,c=e||d;if(!c||0==c.width||0==c.height)return a;this._grid=this._generatePointsGrid(c);for(var g=0,f=0;f<this._grid.length;f++){var h=this._grid[f];h.x+=Math.floor(c.left)+1;h.y+=Math.floor(c.top)+1;var k=b.document.elementFromPoint(h.x,h.y);if(k&&(!k.id||-1==EBG.indexOfArray(this._elementsIds,k.id)))(!this._isFriendlyIframe||k!=window.frameElement)&&
!this._hasValidParent(k)&&!this._isElementTransparent(k)&&g++}var l=e?e.width*e.height/(d.width*d.height):1,m=Math.round(100*(g/this._grid.length));return{full:Math.ceil(m*l),visible:m}}catch(o){return a}},addElementId:function(a,b){-1==EBGInfra.indexOfArray(this._elementsIds,a)&&this._elementsIds.push(a);if(b)this._assetId=a,this._visibilityEvent={}},_invisibleProperties:{visibility:"hidden",display:"none",opacity:function(a){return 0==1*a},"-moz-opacity":function(a){return EBG.adaptor.browser.isFF()&&
0==1*a},"-khtml-opacity":function(a){return EBG.adaptor.browser.isSafari()&&0==1*a},filter:function(a){return EBG.adaptor.browser.isIE()&&10>EBG.adaptor.browser.getVersion()&&-1!=EBG.indexOfArray(["alpha(opacity=0)","progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"],a)},"background-color":function(a,b,c){var d=function(a){var b=a.replace(/^\s+|\s+$/g,"").match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return b&&0==1*b[4]||"transparent"==a},e=b.innerText||b.textContent,g=
EBG.adaptor.browser.isIE()&&9>EBG.adaptor.browser.getVersion(),c=c.getPropertyValue("color");return d(a)&&-1==EBG.indexOfArray("object,canvas,video,source,track,iframe,embed,img".split(","),b.tagName.toLowerCase())&&(!e||!g&&d(c))}},_isElementTransparent:function(a){var b=EBG.adaptor.getComputedStyle(a),c=this._invisibleProperties,d,e;for(e in c){var g=b.getPropertyValue(e);if(g)for(var f=EBG.isArray(c[e])?c[e]:[c[e]],h=0;h<f.length;h++)if(d=EBG.isFunc(f[h])?f[h](g,a,b):g==f[h])return!0}return!1},
_hasValidParent:function(a){if(!a)return!1;for(var b=a.id;a.parentElement;){if(a.parentElement.id&&-1!=EBG.indexOfArray(this._validElementParents,a.parentElement.id))return this.addElementId(b,!1),!0;a=a.parentElement}return!1}};EBG.declareClass(EBG.RichModules.AdStackingDetector,null);EBG.Interactions.DwellTimeManager=function(a){this._adConfig=a;this._defaultPanelName=this._adConfig.panelName};
EBG.Interactions.DwellTimeManager.prototype={_state:{idle:0,start:1,stop:2,panelOpenMouseOver:3,videoPlay:4,videoPlayMouseOut:5,panelOpenMouseOut:6,idlePanelOpen:7,idleVideoPlay:8},_idleTimeLimit:700,_curState:0,_numOfOpenPanels:0,_isMouseOverAd:!1,_wasMouseOverAd:!1,_isUserInteractionOccur:!1,_isVideoPlay:!1,_isVideoAutoReplay:!1,_mouseTimeoutId:0,_autoShownPanels:[],_videosToTrack:[],_defaultMovieNum:1,_dwellUniqueNeedsToBeReported:!0,init:function(){this._subscribeToEvents()},_subscribeToAdEvent:function(a,
b,c){a=new EBG.Events.EventSubscription(a,b,this);if(c)a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};EBG.eventMgr.subscribeToEvent(a)},_subscribeToEvents:function(){this._subscribeToAdEvent(EBG.Events.EventNames.MOUSE_OVER,this._handleMouseOverAd,!0);this._subscribeToAdEvent(EBG.Events.EventNames.MOUSE_OUT,this._handleMouseOutOfAd,!0);this._subscribeToAdEvent(EBG.Events.EventNames.DWELL_VIDEO_START,this._handleVideoPlay,!0);this._subscribeToAdEvent(EBG.Events.EventNames.DWELL_VIDEO_STOP,
this._handleVideoStop,!0);this._subscribeToAdEvent(EBG.Events.EventNames.USER_INTERACTION,this._handleUserInteraction,!0);this._subscribeToAdEvent(EBG.Events.EventNames.EXPAND,this._handlePanelOpen,!0);this._subscribeToAdEvent(EBG.Events.EventNames.COLLAPSE,this._handlePanelClose,!0);this._subscribeToAdEvent(EBG.Events.EventNames.FULL_SCREEN_START,this._handlePanelOpen,!0);this._subscribeToAdEvent(EBG.Events.EventNames.FULL_SCREEN_END,this._handlePanelClose,!0)},_handleMouseThreshold:function(){this._mouseTimeoutId=
null;EBG.intMgr.updateTimer(EBG.Interactions.SystemInts.DWELL_TIME,this._adConfig.uid,this._idleTimeLimit/1E3);switch(this._curState){case this._state.idle:this._isMouseOverAd?this._start():this._stop();break;case this._state.idleVideoPlay:this._isMouseOverAd?this._videoPlay():this._videoPlayMouseOut();break;case this._state.idlePanelOpen:this._isMouseOverAd?this._panelOpenMouseOver():this._panelOpenMouseOut()}},_handleUserInteraction:function(){if(this._wasMouseOverAd)switch(this._isUserInteractionOccur=
!0,this._curState){case this._state.idle:this._start();break;case this._state.idleVideoPlay:this._videoPlay();break;case this._state.idlePanelOpen:this._panelOpenMouseOver()}},_handleVideoPlay:function(a){a=a.eventData.assetId||this._defaultMovieNum;if(this._isMouseOverAd)switch(this._videosToTrack.push(a),this._isVideoPlay=!0,this._reportUserInitatedVideo(a),this._curState){case this._state.idle:this._idleVideoPlay();break;case this._state.idlePanelOpen:break;case this._state.idleVideoPlay:break;
case this._state.start:this._videoPlay();this._reportUserInitatedVideo(a);break;case this._state.stop:this._isVideoAutoReplay||(this._videoPlayMouseOut(),this._reportUserInitatedVideo(a));break;case this._state.videoPlayMouseOut:this._stop();this._isVideoAutoReplay=!0;break;default:this._isVideoAutoReplay||this._reportUserInitatedVideo(a)}},_handleVideoStop:function(a){a=EBGInfra.indexOfArray(this._videosToTrack,a.eventData.assetId);if(-1!==a&&(this._videosToTrack.splice(a,1),!(0<this._videosToTrack.length)))switch(this._isVideoPlay=
this._isVideoAutoReplay=!1,this._curState){case this._state.videoPlay:this._isMouseOverAd?0<this._numOfOpenPanels?this._panelOpenMouseOver():this._start():0<this._numOfOpenPanels?this._panelOpenMouseOut():this._stop();break;case this._state.videoPlayMouseOut:0<this._numOfOpenPanels?this._panelOpenMouseOut():this._stop();break;case this._state.idleVideoPlay:this._idle()}},_handleMouseOverAd:function(){this._wasMouseOverAd=this._isMouseOverAd=!0;this._isVideoAutoReplay=!1;this._checkRecentAutoPanelOpen();
switch(this._curState){case this._state.idle:case this._state.idlePanelOpen:case this._state.idleVideoPlay:this._startMouseTimer();break;case this._state.stop:this._isVideoPlay?this._videoPlay():this._start();break;case this._state.panelOpenMouseOut:this._panelOpenMouseOver();break;case this._state.videoPlayMouseOut:this._videoPlay()}},_checkRecentAutoPanelOpen:function(){if(this._curState==this._state.idle)for(var a=(new Date).getTime(),b=this._autoShownPanels.length-1;0<=b;b--){var c=this._autoShownPanels[b];
300>=a-c.showtime&&(this._autoShownPanels.splice(b,1),this.handlePanelOpen(c.name))}},_handleMouseOutOfAd:function(){this._isMouseOverAd=!1;switch(this._curState){case this._state.idle:case this._state.idleVideoPlay:case this._state.idlePanelOpen:this._clearMouseTimer();break;case this._state.start:this._stop();break;case this._state.videoPlay:this._videoPlayMouseOut();break;case this._state.panelOpenMouseOver:this._panelOpenMouseOut()}},_handlePanelOpen:function(a){var b=a.eventData.props&&a.eventData.props.panel.name||
this._defaultPanelName;if(!this._wasMouseOverAd||a.dispatcher.expandedBy==EBG.ActionType.AUTO)this._onAutoShowPanel(b);else switch(this._numOfOpenPanels++,this._curState){case this._state.start:this._panelOpenMouseOver();break;case this._state.stop:this._panelOpenMouseOut();break;case this._state.idle:this._idlePanelOpen();break;case this._state.videoPlay:this._panelOpenMouseOver()}},_onAutoShowPanel:function(a){this._addAutoShownPanel({name:a||this._defaultPanelName,showtime:(new Date).getTime()})},
_addAutoShownPanel:function(a){0<=this._getAutoShownPanelIdx(a.name)||(this._autoShownPanels[this._autoShownPanels.length]=a)},_getAutoShownPanelIdx:function(a){for(var a=a||this._defaultPanelName,b=-1,c=0;c<this._autoShownPanels.length;c++)if(this._autoShownPanels[c].name==a){b=c;break}return b},_handlePanelClose:function(a){var b="",b="FullScreen"==a.eventData?a.eventData:a.eventData.props&&a.eventData.props.panel?a.eventData.props.panel.name:this._defaultPanelName,a=this._getAutoShownPanelIdx(b);
if(0<=a)this._autoShownPanels.splice(a,1);else{this._numOfOpenPanels--;if(0>this._numOfOpenPanels)this._numOfOpenPanels=0;if(0==this._numOfOpenPanels)switch(this._curState){case this._state.panelOpenMouseOver:this._isVideoPlay?this._videoPlay():this._start();break;case this._state.panelOpenMouseOut:this._isVideoPlay?this._videoPlayMouseOut():this._stop();break;case this._state.idlePanelOpen:this._idle()}}},_startMouseTimer:function(){if(!this._mouseTimeoutId){var a=this;this._mouseTimeoutId=setTimeout(function(){a._handleMouseThreshold()},
this._idleTimeLimit)}},_clearMouseTimer:function(){clearTimeout(this._mouseTimeoutId);this._mouseTimeoutId=null},_isIdleMode:function(){return this._curState==this._state.idle||this._curState==this._state.idlePanelOpen||this._curState==this._state.idleVideoPlay},_idle:function(){if(this._isIdleMode())this._curState=this._state.idle},_start:function(){this._curState=this._state.start;this._startTimer()},_stop:function(){this._curState=this._state.stop;this._endTimer()},_idlePanelOpen:function(){if(this._isIdleMode())this._curState=
this._state.idlePanelOpen},_panelOpenMouseOver:function(){this._curState=this._state.panelOpenMouseOver;this._startTimer()},_videoPlay:function(){this._curState=this._state.videoPlay;this._startTimer()},_videoPlayMouseOut:function(){this._curState=this._state.videoPlayMouseOut;this._startTimer()},_panelOpenMouseOut:function(){this._curState=this._state.panelOpenMouseOut;this._startTimer()},_idleVideoPlay:function(){if(this._isIdleMode())this._curState=this._state.idleVideoPlay},_reportUserInitatedVideo:function(a){var b=
new EBG.Events.Event(EBG.Events.EventNames.USER_INITIATED_VIDEO);b.dispatcher=this;b.eventData={assetId:a};EBG.eventMgr.dispatchEvent(b)},_isTimeOverLimit:function(){return this._isTimerStarted()?(this._endTimer(),EBG.intMgr.getTimerValue(EBG.Interactions.SystemInts.DWELL_TIME,this._adConfig.uid)>this._idleTimeLimit/1E3):!1},_isTimerStarted:function(){return EBG.intMgr.isTimerRunning(EBG.Interactions.SystemInts.DWELL_TIME,this._adConfig.uid)},_resetTimer:function(){EBG.intMgr.updateTimer(EBG.Interactions.SystemInts.DWELL_TIME,
this._adConfig.uid,0)},_startTimer:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.DWELL_UNIQUE);a.dispatcher=this;a.eventData={firstTime:this._dwellUniqueNeedsToBeReported,adUId:this._adConfig.uid};EBG.eventMgr.dispatchEvent(a);this._dwellUniqueNeedsToBeReported=!1;EBG.intMgr.startTimer(EBG.Interactions.SystemInts.DWELL_TIME,this._adConfig.uid)},_endTimer:function(){EBG.intMgr.stopTimer(EBG.Interactions.SystemInts.DWELL_TIME,this._adConfig.uid)}};EBG.declareNamespace("Ads");
EBG.Ads.Ad=function(a){this._adConfig=a;this._adConfig.isStdAd=this._isStdAd();this.startTime=(new Date).getTime()/1E3;this._updateURLs();this._subscribeEventTriggeringURLs();this._adConfig.reportDelayedImpression&&this._adConfig.ffs.CFF_NewDelayedImpression&&EBG.adaptor.loadModule("DelayedImpression",this._adConfig,function(a){this.delayedImpressionModule=new (a||window).EBG.Modules.DelayedImpression(this._adConfig);this._handleDelayedImpressionReport()},this);EBG.ads[a.uid]=this;this._show();this.placeHolderElement?
this._handleMultiBurn():this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this._handleMultiBurn,EBG.Events.EventTiming.ONTIME);this._dpm=EBG.dataPipeMgr.getPipe(this._adConfig.sID);this._sendInitAdInformation()};
EBG.Ads.Ad.prototype={resizePlaceHolder:!0,checkingThrottle:!1,_throttleState:null,_adConfig:null,_adChoice:null,_cdiReason:0,_showOnlyDefaultImg:!1,_banner:{divId:"",resId:"",width:0,height:0},_hasDefaultImageInteraction:!1,_isStdAd:function(){return!0},_subscribeEventTriggeringURLs:function(){if(this._adConfig.eventTrackingURLs){this._adConfig.eventTrackingURLs=this._eventTrackingURLsAdapter(this._adConfig.eventTrackingURLs);for(var a in this._adConfig.eventTrackingURLs)this._subscribeToAdEvent(a,
this._handleEventTrackingURLs,EBG.Events.EventTiming.ONTIME)}},_eventTrackingURLsAdapter:function(a){function b(b){c.ebVideoInteraction=c.ebVideoInteraction||[];c.ebVideoInteraction.push({filter:{"eventData.intName":b},urls:a[d]})}var c={},d;for(d in a)switch(d){case "vidStart":b(EBG.VideoInteraction.STARTED);break;case "vid25Played":b(EBG.VideoInteraction.PERCENT_25_PLAYED);break;case "vid50Played":b(EBG.VideoInteraction.PERCENT_50_PLAYED);break;case "vid75Played":b(EBG.VideoInteraction.PERCENT_75_PLAYED);
break;case "vidFullyPlayed":b(EBG.VideoInteraction.FULLPLAY)}return c},_handleEventTrackingURLs:function(a){for(var b=this._adConfig.eventTrackingURLs[a.name],c=0;c<b.length;c++){var d=b[c];if(d.filter)for(var e in d.filter)EBG.valueFromPath(a,e)==d.filter[e]&&this._reportImpressionTrackingURLs(d.urls);else this._reportImpressionTrackingURLs(d.urls)}},_counterInteractionHandler:function(a){try{var b=a.eventData.intName;if(!b)b=EBG.Interactions.SystemInts.CLICK;a.eventData.clickUrl=this._replaceURLTokens(a.eventData.clickUrl);
a.eventData.clickedVerUrl=this._replaceURLTokens(a.eventData.clickedVerUrl);EBG.intMgr.handleCounterInteraction(b,this._adConfig.uid,0,null,a.eventData,"undefined"!=typeof a.eventData.handleClickInt?a.eventData.handleClickInt:!0)}catch(c){}},_versionTrackingImpressionHandler:function(a){try{a.eventData.impTrackingUrls&&this._reportImpressionTrackingURLs(a.eventData.impTrackingUrls)}catch(b){}},_reportImpressionTrackingURLs:function(a){if(!EBG.isPreview)for(var b=0;b<a.length;b++){var c=a[b];c&&(c=
this._replaceURLTokens(c),EBG.Autolina&&EBG.Autolina.report(c,EBG.Autolina.reportType.THIRDPARTY),EBG.adaptor.reportToRemoteServerUsingImage(c))}},_show:function(){var a=!this._canShow()||this._adConfig.showOnlyImage||this._adConfig.showAieDefaultImage;this._adConfig.ffs.CFF_ShowInUnfriendly?a=!this._canShow()||this._adConfig.showOnlyImage:this._cdiReason=this._adConfig.showAieDefaultImage?4:this._cdiReason;this._adConfig.defaultImageDisplayed=!(!a||!this._adConfig.defaultImagePath);var b=this._adConfig.showOnlyImage;
this._verifyPlaceHolder();var c=new EBG.Events.Event(EBG.Events.EventNames.SHOW_AD);c.dispatcher=this;c.timing=EBG.Events.EventTiming.BEFORE;c.eventData={isDefaultImage:this._adConfig.defaultImageDisplayed};EBG.eventMgr.dispatchEvent(c);b!==this._adConfig.showOnlyImage&&(a=!this._canShow()||this._adConfig.showOnlyImage||this._adConfig.showAieDefaultImage);this._subscribeToEvents();EBG.intMgr.initAdData(this._adConfig,this._adConfig.reportDelayedImpression||this._adConfig.isInstream?!0:!1);this._addSystemInteractions();
EBG.AdChoice&&EBG.AdChoice.AdChoiceManager?(this._adChoice=new EBG.AdChoice.AdChoiceManager(this._adConfig),this._adChoice.init()):this._adConfig.AcIncludeMarker&&EBG.adaptor.loadModule("AdChoice",this._adConfig,function(a){this._adChoice=new (a||window).EBG.AdChoice.AdChoiceManager(this._adConfig);this._adChoice.init()},this);(b=EBG.adaptor.getElementById(this._adConfig.placeHolderId))&&this.resizePlaceHolder&&"undefined"!=typeof this._adConfig.display&&EBG.adaptor.setElemStyle(b,"display",this._adConfig.display);
if(a)if(this._adConfig.defaultImagePath){if(!this._adConfig.imageOnly)a=new EBG.Events.Event(EBG.Events.EventNames.DEFAULT_IMPRESSION),a.eventData={impTrackingUrls:this._adConfig.defaultImpTrackingUrls},a.dispatcher=this,a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.dispatchEvent(a);this._subscribeToAdEvent(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,this._terminateShow,EBG.Events.EventTiming.AFTER);this._showOnlyDefaultImg=!0;this.checkAndShowDefaultImage(this.showDefaultImage)}else this._reportImpression(!0);
else this._showOnlyDefaultImg=!1,this._addVideoInteractions(),this._addCustomInteractions(),this._adConfig.useHtmlConvertor&&this._subscribeToAdEvent(EBG.Events.EventNames.ADD_CREATIVES,this._terminateShow,EBG.Events.EventTiming.AFTER),this._addCreatives(),this._adConfig.useHtmlConvertor||this._terminateShow()},_terminateShow:function(a){var b=this.placeHolderElement=EBG.adaptor.getElementById(this._adConfig.placeHolderId);if(b&&this.resizePlaceHolder){var c=this._adConfig.isInstream&&this._adConfig.ffs.CFF_ResponsiveInstream?
"100%":EBG.px(this._adConfig.width),d=this._adConfig.isInstream&&this._adConfig.ffs.CFF_ResponsiveInstream?"100%":EBG.px(this._adConfig.height);EBG.adaptor.setElemStyle(b,"width",c);EBG.adaptor.setElemStyle(b,"height",d);EBG.adaptor.setElemStyle(b,"margin","0px auto")}b=new EBG.Events.Event(EBG.Events.EventNames.SHOW_AD);b.dispatcher=this;b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;b.eventData={isDefaultImage:a?!0:!1};EBG.eventMgr.dispatchEvent(b)},_verifyPlaceHolder:function(){!EBG.adaptor.getElementById(this._adConfig.placeHolderId)&&
!document.body&&document.write('<img style="width:0;height:0"></img>');return EBG.adaptor.getElementById(this._adConfig.placeHolderId)},_canShow:function(){return!0},_onPlayHandler:function(){this._adConfig.arrOnPlayEvents&&this._executeEvents(this._adConfig.arrOnPlayEvents)},_onDownloadHandler:function(){this._adConfig.arrOnStartDnlEvents&&this._executeEvents(this._adConfig.arrOnStartDnlEvents)},_collectUrl:function(){if(!EBG.isPreview&&this._adConfig.shouldCollectUrl)try{EBG.adaptor.reportToRemoteServer(EBG.format("{0}{1}/BurstingPipe/adServer.bs?cn=curl&ai={2}&url=$${3}$$",
EBG.protocol,this._adConfig.bsPath,this._adConfig.adId,top.document.URL))}catch(a){}},_executeEvents:function(a){for(var b,c,d=0;d<a.length;d++)switch(c=this._replaceURLTokens(a[d].url),a[d].typeId){case 3:b="ebPlayScript"+d;EBG.adaptor.writeScript(EBG.adaptor.generateElementId(b,this._adConfig.uid),c,this._adConfig.placeHolderId);break;case 5:b="ebDnlScript"+d;EBG.adaptor.writeScript(EBG.adaptor.generateElementId(b,this._adConfig.uid),c,this._adConfig.placeHolderId);break;case 4:b="ebPlayIFR"+d;
EBG.adaptor.writeReportingIFrame(EBG.adaptor.generateElementId(b,this._adConfig.uid),c,this._adConfig.placeHolderId);break;case 6:b="ebDnlIFR"+d,EBG.adaptor.writeReportingIFrame(EBG.adaptor.generateElementId(b,this._adConfig.uid),c,this._adConfig.placeHolderId)}},_addSystemInteractions:function(){try{var a=this._adConfig.interactions[EBG.Interactions.SystemInts.CLICK];if(a){var b=EBG.Interactions.Categories.SYSTEM;this._adConfig.interactions[EBG.Interactions.SystemInts.DEFAULT_CLICK]?this._hasDefaultImageInteraction=
!0:this._adConfig.interactions[EBG.Interactions.SystemInts.DEFAULT_CLICK]=EBG.cloneObj(a);this._addCounterInteraction(EBG.Interactions.SystemInts.CLICK,b);this._addCounterInteraction(EBG.Interactions.SystemInts.DEFAULT_CLICK,b)}if((!EBG.Ads.StdBanner||!(this instanceof EBG.Ads.StdBanner))&&(!EBG.Ads.WallpaperAd||!(this instanceof EBG.Ads.WallpaperAd)))this._addCounterInteraction(EBG.Interactions.SystemInts.AD_START,b,!0,1),this._addCounterInteraction(EBG.Interactions.SystemInts.AD_STACKING,b,!1,1),
this._addCounterInteraction(EBG.Interactions.SystemInts.MULTI_BURN,b,!1,1),this._addCounterInteraction(EBG.Interactions.SystemInts.AD_COLLISION,b,!1,1),this._addCounterInteraction(EBG.Interactions.SystemInts.AD_CAROUSEL,b,!1,1),this._adConfig.adParamsEnabled&&this._addCounterInteraction(EBG.Interactions.SystemInts.AD_PARAMS,b,!1,5,null,null,!0),this._adConfig.verUrlEnabled&&this._addCounterInteraction(EBG.Interactions.SystemInts.VER_URL,b,!1,1,null,null,!0)}catch(c){}},_addCounterInteraction:function(a,
b,c){var d=this._adConfig.interactions[a],b=new EBG.Interactions.CounterInteractionData(a,b,this._adConfig.uid);b.initiationType=d.nInitiated?EBG.Interactions.InitiationTypes.USER:EBG.Interactions.InitiationTypes.AUTO;b.countAsClick=d.fClick;if(d.agencyURL)b.remoteServers.agencyUrl=d.agencyURL;if(d.networkURL)b.remoteServers.networkUrl=d.networkURL;this._adjustClickTarget(a);b.counterJumpUrlData=d;b.reportImmediately=c?!0:!1;a=new EBG.Interactions.CounterInteraction(b);EBG.intMgr.addInteraction(a)},
_addVideoInteractions:function(){},_addCustomInteractions:function(){},_adjustClickTarget:function(a){var a=this._adConfig.interactions[a],b;switch(a.target){case 0:b=EBG.WindowTarget.SELF;break;case 2:b=EBG.WindowTarget.TOP;break;default:b=EBG.WindowTarget.BLANK}a.target=b},_subscribeToEvents:function(){this._adConfig.interactionsToReport&&this._subscribeToAdEvent(EBG.Events.EventNames.ADD_INTERACTION,this._handleInteractionsSubscription,EBG.Events.EventTiming.BEFORE);this._subscribeToAdEvent(EBG.EBMessage.CLICKTHROUGH,
this._counterInteractionHandler);this._subscribeToAdEvent(EBG.EBMessage.VERSION_TRACKING_IMPRESSION,this._versionTrackingImpressionHandler);this._subscribeToAdEvent(EBG.Events.EventNames.DEFAULT_IMPRESSION,this._versionTrackingImpressionHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.DEFAULT_CLICK,this._counterInteractionHandler);this._subscribeToAdEvent(EBG.Events.EventNames.ADD_CREATIVES,this._onAddCreativesHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,
this._onDownloadHandler,EBG.Events.EventTiming.ONTIME);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this._onPlayHandler,EBG.Events.EventTiming.AFTER);this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this._collectUrl,EBG.Events.EventTiming.AFTER);this._adConfig.adParamsEnabled&&this._subscribeToAdEvent(EBG.Events.EventNames.AD_START,this._reportAdParams,EBG.Events.EventTiming.AFTER);this._subscribeToAdEvent(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR,this._notifyInteractionManager);var a=
new EBG.Events.EventSubscription(EBG.Events.EventNames.ELEMENT_LOADED,function(a){a.eventData.adUId==this._adConfig.uid&&this._triggerAdStart()},this);a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(a);this._subscribeToAdEvent(EBG.Events.EventNames.THROTTLED,this._handleCreativeThrottled)},_handleInteractionsSubscription:function(a){try{var b=a.eventData.interactionData.reportingName;return this._adConfig.interactionsToReport&&this._adConfig.interactionsToReport[b]?!0:!1}catch(c){}},
_onAddCreativesHandler:function(a){(!a||!a.eventData||!(a.eventData.creativeType&&a.eventData.creativeType==EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE))&&this._checkForCreativeThrottling();try{if(!EBG.Initializer._getAdClass({tn:this._adConfig.templateName}).requiresIframeBust||this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.SCRIPT){var b=a.dispatcher._adConfig.placeHolderId;if(b){var c=(this._adConfig.displayWin||EBG.adaptor.getDisplayWin()).document.getElementById(b);if(c)c.style.backgroundImage=
"",c.onclick=function(){}}}}catch(d){}},_checkForCreativeThrottling:function(){for(cc in this._CCs)this._CCs.hasOwnProperty(cc)&&this._CCs[cc].detectThrottling&&(this._CCs[cc].detectThrottling(),this._subscribeToAdEvent(EBG.Events.EventNames.MOUSE_OVER,this._stopPollingForThrottle,EBG.Events.EventTiming.ONTIME))},_stopPollingForThrottle:function(a){var b=!0;if(a&&a.eventData&&a.eventData.target&&a.eventData.target.children){for(var c in this._CCs)this._CCs.hasOwnProperty(c)&&(a.eventData.target.children[c]&&
this._CCs[c].stopPollingForThrottle&&this._CCs[c].stopPollingForThrottle(),this._CCs[c].isPollingForThrottle&&!0==this._CCs[c].isPollingForThrottle&&(b=!1));if(b)a=new EBG.Events.EventSubscription(EBG.Events.EventNames.MOUSE_OVER,this._stopPollingForThrottle,this),a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd},a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.unsubscribeFromEvent(a)}},_onAdCreativesAdded:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.AD_CREATIVES_ADDED);a.dispatcher=
this;EBG.eventMgr.dispatchEvent(a)},_updateURLs:function(){for(var a=this._adConfig.clickTrackingUrls,b=0;b<a.length;b++)a[b]=this._replaceURLTokens(a[b]);var a=this._adConfig.interactions,c;for(c in a)if(a.hasOwnProperty(c))a[c].agencyURL=this._replaceURLTokens(a[c].agencyURL),a[c].networkURL=this._replaceURLTokens(a[c].networkURL),a[c].jumpUrl=this._replaceURLTokens(a[c].jumpUrl)},_handleMultiBurn:function(){this._reportMultiBurn(this._checkMultiBurn())},_checkMultiBurn:function(){var a={isAdCarousel:!1,
isAdCollision:!1,isMultiBurn:!1},b=this._adConfig.advertiserId,c=this._adConfig.placementId,d=this._adConfig.uid;try{var e=this._adConfig.ffs.CFF_WinWalk?EBG.adaptor.getTopAccessibleWindow(!1):EBG.getTopAccessibleWindow(!1);e.ebAds=e.ebAds||{};for(var g in e.ebAds){var f=e.ebAds[g];if(d!=f._adConfig.uid&&f.placeHolderElement){if(!f.removed)try{if(0==f.placeHolderElement.getClientRects().length)f.removed=!0}catch(h){f.removed=!0}if(f.removed){var k=(new Date).getTime()/1E3-f.startTime;if(!a.isAdCarousel&&
10<k&&150>k)a.isAdCarousel=!0}else if(!a.isMultiBurn&&c===f._adConfig.placementId)a.isMultiBurn=!0;else if(!a.isMultiBurn&&!a.isAdCollision&&b&&b===f._adConfig.advertiserId)a.isAdCollision=!0}}}catch(l){}return a},_reportMultiBurn:function(a){a.isMultiBurn?EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.MULTI_BURN,this._adConfig.uid):a.isAdCollision&&EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.AD_COLLISION,this._adConfig.uid);a.isAdCarousel&&EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.AD_CAROUSEL,
this._adConfig.uid)},_reportAdParams:function(){if(EBG.intMgr.isInteractionExist(EBG.Interactions.SystemInts.AD_PARAMS.toLowerCase(),EBG.Interactions.InteractionTypes.COUNTER,this._adConfig.uid))if(EBG.adaptor.isPageLoaded()){if(this._adConfig.adParamsEnabled){var a=this._getServingModeNum(),b=this._getBannerLocation(),b=b&&b.X+"x"+b.Y,c=!this.visibilityMgr?0:this.visibilityMgr.getVisibilityProviderNum(),d=this._adConfig.width+"x"+this._adConfig.height,e=this._getAdCodeBase(),g=EBG.adaptor.browser.getEnvironment(),
a={ifr:a,loc:b,vsbp:c,size:d,cb:e,env:g};if(this._adConfig.mmAuctionId&&this._adConfig.mmAdvertiserId)a.mmac=this._adConfig.mmAuctionId,a.mmad=this._adConfig.mmAdvertiserId;EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.AD_PARAMS,this._adConfig.uid,0,!1,{value:a})}}else this._subscribeToAdEvent(EBG.Events.EventNames.PAGE_LOAD,this._reportAdParams)},_getBannerLocation:function(a){if(a&&EBG.isNumber(a.X)&&EBG.isNumber(a.Y))if(this._adConfig.ffs.CFF_WinWalk){var b,c=function(){b=EBG.adaptor.getPositioningByElement(this.frameElement);
a.X+=b.X;a.Y+=b.Y};EBG.adaptor.walkUpIframes(function(){this.location.ancestorOrigins?this.location.ancestorOrigins[0]&&this.location.ancestorOrigins[0]==this.location.origin&&this.frameElement&&c.call(this):this.frameElement&&c.call(this)},null,EBG.adaptor.getDisplayWin())}else if(this._adConfig.actualServingMode&&this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME)for(var d=EBG.adaptor.getDisplayWin();d!==d.parent&&d.self!==d.parent;)b=EBG.adaptor.getPositioningByElement(d.frameElement),
a.X+=b.X,a.Y+=b.Y,d=d.parent;return a},_getAdCodeBase:function(a){a=EBG.isDefined(a)?a:0;this._showOnlyDefaultImg&&(a=0);1==a&&this._adConfig.hasConverter&&this._adConfig.useHtmlConvertor&&(a=3);return a},_getServingModeNum:function(){var a={SCRIPT:0,FRIENDLY_IFRAME:1,IFRAME:2,INNER_IFRAME:3,TOPMOST_FRIENDLY_IFRAME:4};if(!EBG.adaptor.serving)return-1;var b=EBG.adaptor.serving.detectServingEnvironment(this._adConfig.actualServingMode);return EBG.isDefined(a[b])?a[b]:-1},_getTemplateNameNum:function(){return{Html5StdBanner:0,
Html5Banner:1,Html5SEBanner:2,Html5ExpBanner:3,Html5PoliteBanner:4,StdBanner:5,Banner:6,SingleExpBanner:7,ExpBanner:8,Visibility:9,FloatingAd:10,FloatingAdWithReminder:11,Tracking:12}[this._adConfig.templateName]||-1},getAdId:function(){return this._adConfig.adId},_replaceURLTokens:function(a){var b=this._adConfig;try{a&&(a=a.replace(/\[%random%\]/ig,b.rnd),a=a.replace(/\[ebRandom\]/ig,b.rnd),a=a.replace(/\[timestamp\]/ig,b.rnd),a=a.replace(/\[%tp_adid%\]/ig,b.adId),a=a.replace(/\[%tp_flightid%\]/ig,
b.placementId),a=a.replace(/\[%tp_campaignid%\]/ig,b.campaignId));if(!a||!b.sUrlTokens)return a;if(!EBG.isObj(b.objURLTokens))b.oURLTokens=this._pairsToObj(b.sUrlTokens,"$$");for(var c in b.oURLTokens)b.oURLTokens.hasOwnProperty(c)&&(a=a.replace(RegExp("\\[%"+c+"%\\]","ig"),b.oURLTokens[c]))}catch(d){}return a},_pairsToObj:function(a,b){for(var c={},d=unescape(a).split(b),e=0;e<d.length;e++)try{if(d[e]){var g=d[e].indexOf("="),f=d[e].substr(0,g),h=d[e].substr(g+1);c[f]=escape(h)}}catch(k){}return c},
_subscribeToAdEvent:function(a,b,c){a=new EBG.Events.EventSubscription(a,b,this);a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd};if(c)a.timing=c;EBG.eventMgr.subscribeToEvent(a);return a},_getCDIUrl:function(a){var b=a&&a.defaultImagePath?a.defaultImagePath:null,b=EBG.format("{0}{1}/{2}/adServer.bs?cn=cdi&ai={3}&p={4}&pluid={5}&ru={6}&pc={7}&brt={8}&pltype={9}&sessionid={10}&dir={11}&ord={12}",EBG.protocol,this._adConfig.bsPath,this._adConfig.interactionServer,this._adConfig.adId,this._adConfig.page,
this._adConfig.pluId,EBG.isDefinedNotNull(b)&&""!=b?b:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.defaultImagePath),this._adConfig.sPublisherPlacementId,EBG.adaptor.browser._browserCode,EBG.adaptor.browser._platform,this._adConfig.sID,this._cdiReason,this._adConfig.rnd),c=this._adConfig.massVersioning.targetAudienceId;c&&(b+=EBG.format("&ta={0}",c));(c=this._adConfig.massVersioning.deliveryGroupId)&&(b+=EBG.format("&dg={0}",c));a&&a.versionId?b+=EBG.format("&vid={0}",a.versionId):
this._adConfig.massVersioning.adVersions&&(a=this._removePrefixFromVersions(),b+=EBG.format("&vid={0}",a));EBGInfra.isDefinedNotNull(this._adConfig.diAppId)&&(b+="&diappid="+this._adConfig.diAppId);return b},_removePrefixFromVersions:function(){var a="",b=this._adConfig.massVersioning.adVersions;if(b){for(var a=[],b=b.split(","),c=0;c<b.length;c++){var d=b[c].indexOf("_");a.push(-1==d?b[c]:b[c].substring(0,d))}a=a.join()}return a},buildJSONImgObj:function(a,b){var c=EBG.format(a+"_{0}",this._adConfig.uid);
return{tagName:EBG.Adaptors.TagNames.IMG,attributes:{id:c,src:b,width:this._adConfig.width,height:this._adConfig.height,style:{width:this._adConfig.width,height:this._adConfig.height},title:this._adConfig.title?this._adConfig.title:"",onload:EBG.format('(function(e) { var event = new EBG.Events.Event(EBG.Events.EventNames.ELEMENT_LOADED);event.dispatcher = this;event.eventData = { DOMEvent: e, elementId: "{0}", adUId:"{1}" };event.timing = EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(event);} )(typeof arguments != "undefined" ? arguments[0] : null);',
c,this._adConfig.uid)}}},setImageClick:function(a,b,c,d,e){a.attributes.onclick=EBG.format('EBG.ads["'+this._adConfig.uid+'"].onImageClick("{0}", {1},"{2}", "{3}", "{4}", "{5}")',this._adConfig.uid,b,a.attributes.id,c,d,e);EBG.mergeObj({cursor:"pointer; cursor: hand"},a.attributes.style)},_addDefaultImgRequest:function(){this.checkAndShowDefaultImage(this.showDefaultImage)},checkAndShowDefaultImage:function(a){var b="",c=".xml",d=!0;if(EBG.isDefinedNotNull(this._adConfig.svJSON)||EBG.isDefinedNotNull(this._adConfig.sv3CatalogMap)||
this._adConfig.massVersioning.versionFullPath)c=".json",d=!1;if(EBG.isDefinedNotNull(this._adConfig.massVersioning)&&""!=this._adConfig.massVersioning.defaultAdVersion&&""!=this._adConfig.massVersioning.adBasePath){b=this._adConfig.massVersioning.defaultAdVersion;b=0<this._adConfig.massVersioning.massVersionFolderDivider?EBG.Ads.Ad.Fn.fixMVPathString(b,this._adConfig.massVersioning.massVersionFolderDivider):b;if(this._adConfig.massVersioning.versionFullPath)b=b.p;b=EBG.combinePaths(this._adConfig.massVersioning.adBasePath,
b+c);b=this._adConfig.massVersioning.versionFullPath?EBG.combinePaths("//"+this._adConfig.sHost,b):EBG.combinePaths(this._adConfig.resourcePath,b)}c=d?this._readMassVersionInfo:this._readJsonVersionInfo;(!b||!EBG.adaptor.getDataFromRemoteServer(b,c,this,!0,d))&&a.apply(this)},subscribeToStandardElementEvents:function(){},showDefaultImage:function(a){var b=!this._adConfig.imageOnly||this._hasDefaultImageInteraction,c="";this._adConfig.showOnlyImage||this._adConfig.imageOnly||this._adConfig.reportDelayedImpression?
c=a&&a.isValid?a.defaultImagePath:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.defaultImagePath):(c=a&&a.isValid?this._getCDIUrl(a):this._getCDIUrl(),this._adConfig.massVersioning.adVersions="");var c=this.buildJSONImgObj("ebDefaultImg",c),d=a&&a.isValid&&a.jumpUrl?a.jumpUrl:b?this._adConfig.interactions[EBG.Interactions.SystemInts.DEFAULT_CLICK].jumpUrl:this._adConfig.interactions[EBG.Interactions.SystemInts.CLICK].jumpUrl;d&&this.setImageClick(c,b,d,a&&a.isValid?a.selectedVersion:
"",a&&a.isValid?a.thirdPartyClks:"");a&&a.thirdPartyImps&&a.thirdPartyImps.length&&this._reportImpressionTrackingURLs(a.thirdPartyImps);a=new EBG.Events.Event(EBG.Events.EventNames.ADD_CREATIVES);a.dispatcher=this;a.eventData={tagsObj:c,assetId:c.attributes.id,isPanel:!1,creativeType:EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE};a.timing=EBG.Events.EventTiming.BEFORE;d=EBG.eventMgr.dispatchEvent(a);if(!d&&(b=new EBG.Events.Event(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE),
b.eventData={assetId:c.attributes.id},b.dispatcher=this,b.timing=EBG.Events.EventTiming.BEFORE,d=EBG.eventMgr.dispatchEvent(b),!d)){var d=EBG.adaptor._getTags(c),e=EBG.adaptor.getElementById(this._adConfig.placeHolderId);EBG.adaptor.setInnerHtml(e,d);this._defaultImgResId=c.attributes.id;this.subscribeToStandardElementEvents(this._defaultImgResId);b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(b);a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)}},
_triggerAdStart:function(a){if(!(this._shouldWaitForTriggerAdStart()&&!(EBGInfra.isDefined(a)&&a.name===EBG.EBMessage.TRIGGER_AD_START)||this._adConfig.adStarted))if(this._adConfig.adStarted=!0,a=new EBG.Events.Event(EBG.Events.EventNames.AD_START),a.eventData={intName:EBG.Interactions.SystemInts.Ad_START},a.dispatcher=this,a.timing=EBG.Events.EventTiming.BEFORE,!EBG.eventMgr.dispatchEvent(a))this._shouldFireAdStart()&&EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.AD_START,this._adConfig.uid),
a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER,EBG.eventMgr.dispatchEvent(a)},_shouldFireAdStart:function(){var a=!1;if(this._adConfig.isInstream){if(this._adConfig.isInstreamVisibility||this._adConfig.isInstreamVerification)a=!0}else if(this._adConfig.displayVerification||this._adConfig.visibility.mode==EBG.VisibilityMode.BASIC_MODE||this._adConfig.visibility.mode==EBG.VisibilityMode.ENHANCED_MODE)a=!0;return a},_shouldWaitForTriggerAdStart:function(){return!1},_readJsonVersionInfo:function(a){var b=
JSON.parse(a),a=this._adConfig.massVersioning.defaultAdVersion&&this._adConfig.massVersioning.defaultAdVersion.indexOf&&this._adConfig.massVersioning.defaultAdVersion.indexOf("_"),c="",c=this._adConfig.massVersioning.defaultAdVersion&&this._adConfig.massVersioning.defaultAdVersion.v?this._adConfig.massVersioning.defaultAdVersion.v:-1==a?this._adConfig.massVersioning.defaultAdVersion:this._adConfig.massVersioning.defaultAdVersion.substring(0,a),a={isValid:!!b.DefaultImage,jumpUrl:b.ClickthroughURL?
b.ClickthroughURL:"",defaultImagePath:b.DefaultImage?b.DefaultImage:"",selectedVersion:c,thirdPartyImps:b.ThirdPartyImpressionURL?this._parseUrlValue(b.ThirdPartyImpressionURL):[],thirdPartyClks:b.ThirdPartyClickthroughURL?this._parseUrlValue(b.ThirdPartyClickthroughURL):[],versionId:b.versionId?b.versionId:0};if(a.isValid&&EBG.isNumber(b.DefaultImage)&&(a.isValid=!1,b=this._adConfig.assets,c="ebMovie"+a.defaultImagePath,EBG.isDefinedNotNull(b[c].dsPath)))a.defaultImagePath=EBG.isInWorkshop?b[c].dsPath:
EBG.combinePaths(this._adConfig.resourcePath,b[c].dsPath),a.isValid=!0;(this._showOnlyDefaultImg?this.showDefaultImage:this._showImgAsCreative).apply(this,[a])},_readMassVersionInfo:function(a){var b={isValid:!1,jumpUrl:"",defaultImagePath:"",selectedVersion:"",thirdPartyImps:[],thirdPartyClks:[]};try{if(EBG.isDefined(a)&&null!=a){var c=a.documentElement.attributes.getNamedItem("productClickThrough"),d=a.documentElement.attributes.getNamedItem("DefaultImage"),e=a.documentElement.attributes.getNamedItem("ThirdPartyImps"),
g=a.documentElement.attributes.getNamedItem("ThirdPartyClickThrough"),f=this._adConfig.massVersioning.defaultAdVersion.indexOf("_"),b={isValid:null!=d&&""!=d.value,jumpUrl:null!=c?c.value:"",defaultImagePath:null!=d?d.value:"",selectedVersion:-1==f?this._adConfig.massVersioning.defaultAdVersion:this._adConfig.massVersioning.defaultAdVersion.substring(0,f),thirdPartyImps:e&&e.value?this._parseUrlValue(e.value):[],thirdPartyClks:g&&g.value?this._parseUrlValue(g.value):[]};if(b.isValid&&EBG.isNumber(b.defaultImagePath)){b.isValid=
!1;var h=this._adConfig.assets,k="ebMovie"+b.defaultImagePath;if(EBG.isDefinedNotNull(h[k].dsPath))b.defaultImagePath=EBG.isInWorkshop?h[k].dsPath:EBG.combinePaths(this._adConfig.resourcePath,h[k].dsPath),b.isValid=!0}}(this._showOnlyDefaultImg?this.showDefaultImage:this._showImgAsCreative).apply(this,[b])}catch(l){this.showDefaultImage(b)}},_parseUrlValue:function(a){for(var b=[],a=a.split("\u007f"),c=0;c<a.length;c++)for(var d=a[c].split("|"),e=0;e<d.length;e++)b.push(d[e]);return b},_sendInitAdInformation:function(){this._dpm.send(EBG.DataProfile.GENERAL,
{frmt:this._getTemplateNameNum(),cs:this._adConfig.customScripts});if(EBG.adaptor.browser.isMobile()){var a={};if(this._adConfig.ffs.CFF_DataPipeUserAgent)a.ua=window.navigator.userAgent;if(this._adConfig.actualServingMode&&this._adConfig.actualServingMode==EBG.Adaptors.ServingMode.SCRIPT)a.scrl=~~(window.innerWidth>document.documentElement.clientWidth),a.fh=~~(window.innerHeight===this._adConfig.height),a.fw=~~(window.innerWidth===this._adConfig.width);0<Object.getOwnPropertyNames(a).length&&this._dpm.send(EBG.DataProfile.PLATFORM,
a)}a=this._getServingModeNum();this._dpm.send(EBG.DataProfile.SERVING,{srvmd:a});this._adConfig.MRAID&&this._dpm.send(EBG.DataProfile.PLATFORM,{mraid:1});"undefined"!=typeof mraid&&this._dpm.send(EBG.DataProfile.PLATFORM,{mraidw:1})},_switchAssetsAfterThrottle:function(){},_handleCreativeThrottled:function(a){if(a.eventData)if(a.eventData.state&&a.eventData.state==EBG.ThrottleStates.RESUME)clearTimeout(this._throttleTimeout),this._throttleState=EBG.ThrottleStates.RESUME;else if(a.eventData.state&&
a.eventData.state==EBG.ThrottleStates.POLLED&&a.dispatcher._adConfig.uid==this._adConfig.uid)this._switchAssetsAfterThrottle(),EBG.adaptor.flash.removeThrottleDetectionSwf(this._adConfig.uid);else if(this.visibilityMgr&&a.eventData.id){if(this.visibilityMgr.isVisibile()){var b=EBG.adaptor.getElementById(a.eventData.id),b=b&&EBG.adaptor.getBoundingClientRect(b);this._throttleState==EBG.ThrottleStates.THROTTLE&&(!b||0<b.width&&0<b.height)?(this._switchAssetsAfterThrottle(),EBG.adaptor.flash.removeThrottleDetectionSwf(this._adConfig.uid)):
this._throttleTimeout=EBG.runTimed(this,this._handleCreativeThrottled,[a],1E3)}else this._subscribeToAdEvent(EBG.Events.EventNames.PAGE_SCROLL,this._checkIfStillThrottled);this._throttleState=EBG.ThrottleStates.THROTTLE}},_checkIfStillThrottled:function(a){if(a){if(this.visibilityMgr&&!this._throttleTimeout&&this._throttleState==EBG.ThrottleStates.THROTTLE&&this.visibilityMgr.isVisibile())this._throttleTimeout=EBG.runTimed(this,this._checkIfStillThrottled,[],1E3)}else{if(this._throttleState==EBG.ThrottleStates.THROTTLE&&
this.visibilityMgr&&this.visibilityMgr.isVisibile())this._switchAssetsAfterThrottle(),EBG.adaptor.flash.removeThrottleDetectionSwf(this._adConfig.uid),a=new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_SCROLL,this._checkIfStillThrottled,this),a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd},a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.unsubscribeFromEvent(a);clearTimeout(this._throttleTimeout);this._throttleTimeout=null;if(this._throttleState==EBG.ThrottleStates.RESUME)a=
new EBG.Events.EventSubscription(EBG.Events.EventNames.PAGE_SCROLL,this._checkIfStillThrottled,this),a.dispatcherFilters={"_adConfig.rnd":this._adConfig.rnd},a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.unsubscribeFromEvent(a)}},dispatchCustomEvent:function(a,b,c,d){a=new EBG.Events.Event(a);a.dispatcher=d;a.eventData={assetId:b};a.timing=c;return EBG.eventMgr.dispatchEvent(a)},_notifyInteractionManager:function(a){var b={};if(a&&a.eventData)b=a.eventData;b.elapsedTime="";if(EBG.intMgr.getAdDuration)b.elapsedTime=
EBG.intMgr.getAdDuration(this._adConfig.uid);EBG.adaptor.notifyIntMonitor(a.eventData)},onImageClick:function(a,b,c,d,e,g){try{var f=b?new EBG.Events.Event(EBG.Events.EventNames.DEFAULT_CLICK):new EBG.Events.Event(EBG.EBMessage.CLICKTHROUGH);f.eventData=b?{intName:EBG.Interactions.SystemInts.DEFAULT_CLICK}:{intName:EBG.Interactions.SystemInts.CLICK};if(EBG.isDefined(d))f.eventData.clickUrl=d;if(EBG.isDefined(e))f.eventData.clickedVersion=e;if(EBG.isDefined(g))f.eventData.clickedVerUrl=g;f.dispatcher=
EBG.ads[a];EBG.eventMgr.dispatchEvent(f);if(EBG.adaptor.intMonitorExist()){var h=new EBG.Events.Event(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR);h.eventData={command:EBG.EBMessage.CLICKTHROUGH,args:"",objName:c,adId:EBG.Ads.Ad.Fn.getAdIdFromAdUId(a)};EBG.eventMgr.dispatchEvent(h)}}catch(k){}}};EBG.declareClass(EBG.Ads.Ad,null);
EBG.Ads.Ad.Fn={getAdIdFromAdUId:function(a){return a.split("_")[0]},getRandFromAdUId:function(a){return a.split("_")[1]},getVersionToReport:function(a){var b=a;a&&a.v?b=a.v:b.indexOf&&(b=-1<a.indexOf(",")?"m":-1<a.indexOf("_")?a.substr(0,a.indexOf("_")):a);return b},getAdVersions:function(a){for(var b="",a=a.adVersions.split(","),c=0;c<a.length;c++)b&&(b+=","),b+=a[c];return b},fixMVPathString:function(a,b){if(0<b)for(var c=a.split(","),d="",e="",g,f,h,k=0;k<c.length;k++)h=c[k],g="",EBG.isDefinedNotNull(h.match("_"))&&
(g=h.substr(h.indexOf("_"))),h=parseInt(h),f=parseInt(h/b),h=f+g+"/"+h,d+=e+h,""==e&&(e=",");return d},_handlePageResizeOrScroll:function(){}};EBG.Ads.RichAd=function(a){this._downloadMode=a.dlm;EBG.callSuperConstructor(EBG.Ads.RichAd,this,[a])};
EBG.Ads.RichAd.prototype={isInFullScreenMode:!1,visibilityMgr:null,videoLoaderDrivers:[],_wallpaper:null,_registeredToMouseMove:!1,_mouseMoveTimeOut:null,_creativeContainerReadyHandled:!1,_isStdAd:function(){return!1},_subscribeToEvents:function(){try{EBG.callSuperFunction(EBG.Ads.RichAd,this,"_subscribeToEvents"),EBG.adaptor.isPageLoaded()?EBG.runTimed(this,this._handlePageLoaded,[],0):this._subscribeToAdEvent(EBG.Events.EventNames.PAGE_LOAD,this._handlePageLoaded),this._subscribeToAdEvent(EBG.EBMessage.NOTIFIED_INTERACTION,
this._notifiedInteractionHandler),this._subscribeToAdEvent(EBG.EBMessage.VIDEO_INTERACTION,this._videoInteractionHandler),this._subscribeToAdEvent(EBG.EBMessage.USER_ACTION_COUNTER,this._counterInteractionHandler),this._subscribeToAdEvent(EBG.EBMessage.AUTOMATIC_EVENT_COUNTER,this._counterInteractionHandler),this._subscribeToAdEvent(EBG.EBMessage.START_TIMER,this._startTimerHandler),this._subscribeToAdEvent(EBG.EBMessage.STOP_TIMER,this._stopTimerHandler),this._subscribeToAdEvent(EBG.EBMessage.START_VIDEO_TIMER,
this._startTimerVideoHandler),this._subscribeToAdEvent(EBG.EBMessage.STOP_VIDEO_TIMER,this._stopTimerHandler),this._subscribeToAdEvent(EBG.EBMessage.UPDATE_TIMER,this._updateTimerHandler),this._subscribeToAdEvent(EBG.EBMessage.START_VIDEO,this._startAggregateHandler),this._subscribeToAdEvent(EBG.EBMessage.STOP_VIDEO,this._stopAggregateHandler),this._subscribeToAdEvent(EBG.EBMessage.UPDATE_VIDEO_DURATION,this._updateAggregationTimeHandler),this._subscribeToAdEvent(EBG.EBMessage.INIT_VIDEO_LOADER,this._initVideoLoaderHandler),
this._subscribeToAdEvent(EBG.EBMessage.VIDEO_LOAD,this._videoLoadHandler),this._subscribeToAdEvent(EBG.EBMessage.VIDEO_FS_OPEN,this._videoFSOpenHandler),this._subscribeToAdEvent(EBG.EBMessage.VIDEO_FS_CLOSE,this._videoFSCloseHandler),this._subscribeToAdEvent(EBG.EBMessage.VIDEO_FS_AUTO_CLOSE,this._videoFSAutocloseHandler),this._subscribeToAdEvent(EBG.EBMessage.SET_STATE,this._setStateInCreativeState),this._subscribeToAdEvent(EBG.EBMessage.RESET_STATE,this._setStateInCreativeState),this._subscribeToAdEvent(EBG.Events.EventNames.MOUSE_MOVE_NEEDED,
this._mouseMoveNeededHandler,EBG.Events.EventTiming.BEFORE),this._subscribeToAdEvent(EBG.Events.EventNames.SHOW_AD,this.adCreativesAddedHandler,EBG.Events.EventTiming.AFTER),this._subscribeToAdEvent(EBG.Events.EventNames.ADD_CREATIVES,this.addCreativesHandler,EBG.Events.EventTiming.ONTIME),this._subscribeToAdEvent(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,this.addCreativesHandler,EBG.Events.EventTiming.ONTIME),this._subscribeToAdEvent(EBG.Events.EventNames.DWELL_UNIQUE,this._dwellUniqueEventHandler,
EBG.Events.EventTiming.ONTIME),this._subscribeToAdEvent(EBG.Events.EventNames.RICH_FLASH_PLAYED,this._richFlashPlayedEventHandler,EBG.Events.EventTiming.ONTIME),this._subscribeToAdEvent(EBG.EBMessage.SHOW_DEFAULT_IMAGE,this._addDefaultImgRequest),this._adConfig.ffs.CFF_NewDelayedImpression||(this._subscribeToAdEvent(EBG.Events.EventNames.CREATIVE_CONTAINER_READY,this._handleDelayedImpressionReport,EBG.Events.EventTiming.AFTER),this._subscribeToAdEvent(EBG.Events.EventNames.ADD_BANNER_PRELOAD_IMAGE_CREATIVE,
this._handleDelayedImpressionReport,EBG.Events.EventTiming.AFTER),this._subscribeToAdEvent(EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,this._handleDelayedImpressionReport,EBG.Events.EventTiming.AFTER)),this._dwellTimeManager=new EBG.Interactions.DwellTimeManager(this._adConfig),this._dwellTimeManager.init(),this._adConfig.bgImgSrc&&(this._subscribeToAdEvent(EBG.Events.EventNames.CLOSE_AD,this._removeBackgroundImage),this._subscribeToAdEvent(EBG.Events.EventNames.PAGE_UNLOAD,this._removeBackgroundImage))}catch(a){}},
_handlePageLoaded:function(){},_handleDelayedImpressionReport:function(){this._adConfig.delayedImpParams&&(this._reportImpression(),this._clearDelayedImpData());(this._adConfig.impressionTrackingURLs||0<this._adConfig.impressionTrackingURLs)&&this._reportImpressionTrackingURLs(this._adConfig.impressionTrackingURLs);EBG.intMgr.allowInteractionReport(this._adConfig.uid)},_clearDelayedImpData:function(){this._adConfig.delayedImpParams=null},_reportImpression:function(a){var b=EBGInfra.isDefined(this._adConfig.page)&&
""!=this._adConfig.page?1:0,b=EBG.format("{0}{1}/{2}/adServer.bs?cn=display&code=10&PluID={3}&EyeblasterID={4}&Page={5}&WebPageSource={6}&ForceDisplay={7}&Resolution={8}&sessionid={9}&Optout={10}&usercookie={11}",EBG.protocol,this._adConfig.bsPath,this._adConfig.appPool,this._adConfig.pluId,this._adConfig.adId,this._adConfig.page,b,EBG.isPreview?1:0,EBG.adaptor.getResolution(),this._adConfig.sID,this._adConfig.optOut,this._adConfig.usercookie);this._adConfig.delayedImpParams&&(b+=this._adConfig.delayedImpParams);
a&&(b+="&isBlank=1");EBG.adaptor.flash&&(b+="&FlashVersion="+EBG.adaptor.flash.version);this._adConfig.massVersioning.targetAudienceId&&(b+="&ta="+this._adConfig.massVersioning.targetAudienceId);this._adConfig.massVersioning.deliveryGroupId&&(b+="&dg="+this._adConfig.massVersioning.deliveryGroupId);this._adConfig.massVersioning.subDeliveryGroupId&&(b+="&sdg="+this._adConfig.massVersioning.subDeliveryGroupId);this._adConfig.defaultImageDisplayed&&(b+="&di=1");this._adConfig.defaultImageReason&&(b+=
"&dir="+this._adConfig.defaultImageReason);this._adConfig.massVersioning.adVersions&&(b+="&vid="+this._removePrefixFromVersions());EBGInfra.isDefinedNotNull(this._adConfig.diAppId)&&(b+="&diappid="+this._adConfig.diAppId);b+="&ord="+Math.random();EBG.adaptor.reportToRemoteServer(b,!0)},_mouseMoveNeededHandler:function(){if(!this._registeredToMouseMove){var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.MOUSE_MOVE,this._mouseMoveHandler,this);a.isDocumentEvent=!0;EBG.eventMgr.subscribeToEvent(a);
this._registeredToMouseMove=!0}},_mouseMoveHandler:function(a){try{if(!this._mouseMoveTimeOut){var b=this;b._mouseMoveTimeOut=setTimeout(function(){b._mouseMoveTimeOut=null;for(var c in b._CCs)if(b._CCs.hasOwnProperty(c)&&b._CCs[c]._registeredToMouseMove){var e={},e=EBG.adaptor.getMouseCoordinates(a.eventData);b._CCs[c]._handleMouseMove(e)}},100)}}catch(c){}},_dwellUniqueEventHandler:function(a){EBG.intMgr.reportDwellUnique(this._adConfig.uid,a.eventData.firstTime)},_richFlashPlayedEventHandler:function(){EBG.intMgr.reportRichFlashPlayed(this._adConfig.uid)},
addCreativesHandler:function(a){try{this._adConfig.bgImgSrc&&this._changeBackgroundImage(),this._updateVisibilityManagerData(a.eventData),this._updateAdStackingData(a.eventData)}catch(b){}},_updateVisibilityManagerData:function(a){if(a.isPanel){this.visibilityMgrPanelCollection=this.visibilityMgrPanelCollection||{};var b=!(this._panels&&this._panels[a.panelName]&&this._panels[a.panelName].visibilityIntEnabled||1==EBG.adaptor.getObjKeys(this._adConfig.panels).length);this.visibilityMgrPanelCollection[a.assetId]||
(this.visibilityMgrPanelCollection[a.assetId]=new EBG.RichModules.VisibilityManager(this._adConfig,a.assetId,{isPanel:!0,muteInteractions:b,customData:{panelName:a.panelName}}))}else this.visibilityMgr?this.visibilityMgr.updateResourceObjId(a.assetId):this.visibilityMgr=new EBG.RichModules.VisibilityManager(this._adConfig,a.assetId)},_updateAdStackingData:function(a){if(a.isPanel){if(this._panels&&1==EBG.adaptor.getObjKeys(this._adConfig.panels).length){if(!this._adStackingDetectorPanel)this._adStackingDetectorPanel=
new EBG.RichModules.AdStackingDetector(this._adConfig,!0);this._adStackingDetectorPanel.addElementId(a.assetId,!0)}}else{if(!this._adStackingDetector)this._adStackingDetector=new EBG.RichModules.AdStackingDetector(this._adConfig,!1);this._adStackingDetector.addElementId(a.assetId,!0)}},_addPreloadImg:function(){this._preloadImgResId=this._addImgAsCreative("ebPreloadImg",EBG.isInWorkshop?this._adConfig.preloadImagePath:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.preloadImagePath),EBG.Events.EventNames.ADD_BANNER_PRELOAD_IMAGE_CREATIVE)},
_addImgAsCreative:function(a,b,c,d){a=this.buildJSONImgObj(a,d&&d.isValid?d.defaultImagePath:b);(b=d&&d.isValid?d.jumpUrl:this._adConfig.interactions[EBG.Interactions.SystemInts.CLICK].jumpUrl)&&this.setImageClick(a,!1,b,d&&d.isValid?d.selectedVersion:"",d&&d.isValid?d.thirdPartyClks:"");b=new EBG.Events.Event(EBG.Events.EventNames.ADD_CREATIVES);b.dispatcher=this;b.eventData={tagsObj:a,assetId:a.attributes.id,isPanel:!1,creativeType:c};b.timing=EBG.Events.EventTiming.BEFORE;var e=EBG.eventMgr.dispatchEvent(b);
if(e||(e=this.dispatchCustomEvent(c,a.attributes.id,EBG.Events.EventTiming.BEFORE,this)))return a.attributes.id;var e=EBG.adaptor._getTags(a),g=EBG.adaptor.getElementById(this._adConfig.placeHolderId);if(this._richShown)return null;var f=EBG.adaptor.getElementById("emptyDiv"+this._banner.divId);d&&f?EBG.adaptor.setInnerHtml(f,e):EBG.adaptor.setInnerHtml(g,e);this.subscribeToStandardElementEvents(a.attributes.id);b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(b);this.dispatchCustomEvent(c,
a.attributes.id,EBG.Events.EventTiming.ONTIME_AND_AFTER,this);return a.attributes.id},_showImgAsCreative:function(a){if(!this._richShown)this._defaultImgResId=this._addImgAsCreative("ebDefaultImg",EBG.isInWorkshop?this._adConfig.defaultImagePath:EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.defaultImagePath),EBG.Events.EventNames.ADD_BANNER_DEFAULT_IMAGE_CREATIVE,a)},adCreativesAddedHandler:function(){try{this._startTimer(EBG.Interactions.SystemInts.AD_DURATION)}catch(a){}},getAdLocationOnPage:function(){var a=
this.getAdOffset();if(null==a)return a;var b=EBG.adaptor.getWindowViewPortMetrics(this._adConfig.displayWin||EBG.adaptor.getDisplayWin());return{isAdOnLeft:a.X+this._adConfig.width/2<b.Width/2,isAdOnTop:a.Y+this._adConfig.height/2<b.Height/2}},getAdOffset:function(){return null},getVideoLoaderDriver:function(a,b){for(var b=b.replace(/\./ig,"/"),c=0;c<this.videoLoaderDrivers.length;c++){var d=this.videoLoaderDrivers[c];if(d.data.res.id==a&&d.data.apiPath==b)return this.videoLoaderDrivers[c]}return null},
_initVideoLoaderHandler:function(a){a.eventData.apiPath=a.eventData.apiPath.replace(/\./ig,"/");a.eventData.res=EBG.adaptor.getElementById(a.flashResId);a.eventData.ad=this;this.videoLoaderDrivers.push(new EBG.Video.VideoLoaderDriver(a.eventData))},_videoLoadHandler:function(a){a.eventData.apiPath=a.eventData.apiPath.replace(/\./ig,"/");this.getVideoLoaderDriver(a.flashResId,a.eventData.apiPath).load(a.eventData)},_startAggregateHandler:function(a){try{EBG.intMgr.isInteractionExist(EBG.VideoInteraction.FULLSCREEN_DURATION.toLowerCase(),
EBG.Interactions.InteractionTypes.TIMER,this._adConfig.uid)||(this._addAggregateInteraction(EBG.VideoInteraction.FULLSCREEN_DURATION,EBG.Interactions.Categories.VIDEO),this._addAggregateInteraction(EBG.VideoInteraction.VIDEO_PLAY_DURATION,EBG.Interactions.Categories.VIDEO));var b=a.eventData.intName,c=this._getAssetIdFromEvent(a);EBG.intMgr.startAggregate(b,this._adConfig.uid,c)}catch(d){}},_updateAggregationTimeHandler:function(a){try{var b=a.eventData.intName,c=parseInt(a.eventData.deltalDuration),
d=this._getAssetIdFromEvent(a);EBG.intMgr.updateAggregation(b,this._adConfig.uid,c,d)}catch(e){}},_stopAggregateHandler:function(a){try{var b=a.eventData.intName,c=this._getAssetIdFromEvent(a);EBG.intMgr.stopAggregate(b,this._adConfig.uid,c)}catch(d){}},_startTimerVideoHandler:function(a){try{EBG.intMgr.isInteractionExist(EBG.VideoInteraction.FULLSCREEN_DURATION.toLowerCase(),EBG.Interactions.InteractionTypes.TIMER,this._adConfig.uid)||(this._addTimerInteraction(EBG.VideoInteraction.FULLSCREEN_DURATION,
EBG.Interactions.Categories.VIDEO),this._addTimerInteraction(EBG.VideoInteraction.VIDEO_PLAY_DURATION,EBG.Interactions.Categories.VIDEO))}catch(b){}this._startTimerHandler(a)},_startTimerHandler:function(a){try{var b=a.eventData.intName,c=this._getAssetIdFromEvent(a);this._startTimer(b,c)}catch(d){}},_stopTimerHandler:function(a){try{var b=a.eventData.intName,c=this._getAssetIdFromEvent(a);this._stopTimer(b,c)}catch(d){}},_getAssetIdFromEvent:function(a){var b=EBGInfra.isDefined(a.eventData.assetId)?
a.eventData.assetId:null;if((!EBGInfra.isDefined(b)||!EBGInfra.notNull(b))&&a.eventData.ebmovie)if(b=0,"0"!=a.eventData.ebmovie){a=EBG.format("ebMovie{0}",a.eventData.ebmovie);if(this._adConfig.assets&&this._adConfig.assets[a])b=this._adConfig.assets[a].assetID;if(this._adConfig.bestAsset&&this._adConfig.bestAsset[a])b=this._adConfig.bestAsset[a].assetID}return b},_updateTimerHandler:function(a){try{var b=a.eventData.intName,c=a.eventData.timerValue;if("ebintduration"==b)b=EBG.Interactions.SystemInts.INT_DURATION,
c/=1E3;this._updateTimer(b,c)}catch(d){}},_startTimer:function(a,b){EBG.intMgr.startTimer(a,this._adConfig.uid,b)},_stopTimer:function(a,b){EBG.intMgr.stopTimer(a,this._adConfig.uid,b)},_updateTimer:function(a,b){EBG.intMgr.updateTimer(a,this._adConfig.uid,b)},_notifiedInteractionHandler:function(a){try{if(a.eventData.name==EBG.Interactions.SystemInts.PLAYER_PARAMS)a.eventData.value.env=EBG.adaptor.browser.getEnvironment();EBG.intMgr.handleCounterInteraction(a.eventData.name,this._adConfig.uid,0,
!1,a.eventData)}catch(b){}},_videoInteractionHandler:function(a){try{var b=a.eventData,c=this._getAssetIdFromEvent(a),d=b.userInitiated?b.userInitiated:!1,e;if(b.intName==EBG.VideoInteraction.STARTED&&this.visibilityMgr&&this.visibilityMgr.calculateVisibilityPercentage()>=this._adConfig.visibility.iabMinSurface)this._handleVideoVisibilityChangeSub=this._subscribeToAdEvent(EBG.Events.EventNames.VISIBILITY_CHECK,function(a){if(a.eventData.percentage<this._adConfig.visibility.iabMinSurface)this._videoRemainedVisible=
!1,EBG.eventMgr.unsubscribeFromEvent(this._handleVideoVisibilityChangeSub)},EBG.Events.EventTiming.ONTIME),this._videoRemainedVisible=!0;EBGInfra.hasOwnValue(EBG.VideoQuartiles,b.intName,!0)&&this._videoRemainedVisible&&(e={value:1});b.intName==EBG.VideoInteraction.FULLPLAY&&this._handleVideoVisibilityChangeSub&&EBG.eventMgr.unsubscribeFromEvent(this._handleVideoVisibilityChangeSub);EBG.intMgr.handleVideoInteraction(b.intName,this._adConfig.uid,c,d,e)}catch(g){}},_videoFSOpenHandler:function(a){this.isInFullScreenMode=
!0;a={eventData:{assetId:this._adConfig.FSMovie.assetID,userInitiated:!0,intName:"ebFSStart"}};this._videoInteractionHandler(a);a=new EBG.Events.Event(EBG.Events.EventNames.FULL_SCREEN_START);a.dispatcher=this;a.eventData="FullScreen";EBG.eventMgr.dispatchEvent(a)},_videoFSCloseHandler:function(){this.isInFullScreenMode=!1;var a={eventData:{assetId:this._adConfig.FSMovie.assetID,userInitiated:!0,intName:"ebFSEnd"}};a.eventData.assetId=this._adConfig.FSMovie.assetID;this._videoInteractionHandler(a);
a=new EBG.Events.Event(EBG.Events.EventNames.FULL_SCREEN_END);a.dispatcher=this;a.eventData="FullScreen";EBG.eventMgr.dispatchEvent(a)},_videoFSAutocloseHandler:function(){},_addSystemInteractions:function(){EBG.callSuperFunction(EBG.Ads.RichAd,this,"_addSystemInteractions");try{var a=EBG.Interactions.Categories.SYSTEM;this._addTimerInteraction(EBG.Interactions.SystemInts.INT_DURATION,a);this._addTimerInteraction(EBG.Interactions.SystemInts.AD_DURATION,a);this._addTimerInteraction(EBG.Interactions.SystemInts.DWELL_TIME,
a);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE,a,!1,1);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE,a,!1,1);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE,a,!1,1);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER,a,!1,1);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_AGENCY,a,!1,1);this._addCounterInteraction(EBG.Interactions.SystemInts.VISIBILITY_IAB,
a,!1,1);this._addTimerInteraction(EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION,a);this._addTimerInteraction(EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION,a);this._addTimerInteraction(EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE,a);EBG.adaptor.isInApp()||this._addTimerInteraction(EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE,a);this._adConfig.playerParamsEnabled&&this._addCounterInteraction(EBG.Interactions.SystemInts.PLAYER_PARAMS,a,!1,5,null,null,!0)}catch(b){}},
_addCounterInteraction:function(a,b,c,d,e,g,f){var h=this._adConfig.interactions[EBG.isDefinedNotNull(g)?g:a],k=new EBG.Interactions.CounterInteractionData(a,b,this._adConfig.uid);if(e)k.isPanel=!0;h?EBG.callSuperFunction(EBG.Ads.RichAd,this,"_addCounterInteraction",[a,b,c]):(k.initiationType=EBG.Interactions.InitiationTypes.AUTO,k.numLeftToReport=k.numToReport=d?d:k.numLeftToReport,k.reportImmediately=c?!0:!1,k.useInteractionsStrPipe=f?!0:!1,a=new EBG.Interactions.CounterInteraction(k),EBG.intMgr.addInteraction(a,
g))},_addTimerInteraction:function(a,b,c){a=new EBG.Interactions.TimerInteractionData(a,b,this._adConfig.uid);if(c)a.isPanel=c;c=new EBG.Interactions.TimerInteraction(a);EBG.intMgr.addInteraction(c)},_addAggregateInteraction:function(a,b,c){a=new EBG.Interactions.AggregationInteractionData(a,b,this._adConfig.uid);if(c)a.isPanel=c;c=new EBG.Interactions.AggregateInteraction(a);EBG.intMgr.addInteraction(c)},_addVideoInteractions:function(){try{this._addVideoInteraction(EBG.VideoInteraction.STARTED),
this._addVideoInteraction(EBG.VideoInteraction.PERCENT_25_PLAYED),this._addVideoInteraction(EBG.VideoInteraction.PERCENT_50_PLAYED),this._addVideoInteraction(EBG.VideoInteraction.PERCENT_75_PLAYED),this._addVideoInteraction(EBG.VideoInteraction.FULLPLAY),this._addVideoInteraction(EBG.VideoInteraction.MUTE,!0),this._addVideoInteraction(EBG.VideoInteraction.UNMUTE,!0),this._addVideoInteraction(EBG.VideoInteraction.UNMUTED),this._addVideoInteraction(EBG.VideoInteraction.PAUSE,!0),this._addVideoInteraction(EBG.VideoInteraction.REPLAY,
!0),this._addVideoInteraction(EBG.VideoInteraction.SLIDER_DRAGGED,!0),this._addVideoInteraction(EBG.VideoInteraction.FULLSCREEN_START,!0),this._addVideoInteraction(EBG.VideoInteraction.FULLSCREEN_END,!0),this._addVideoInteraction(EBG.VideoInteraction.FULLSCREEN_MUTE,!0),this._addVideoInteraction(EBG.VideoInteraction.FULLSCREEN_PAUSE,!0),this._addVideoInteraction(EBG.VideoInteraction.USER_INITIATED_VIDEO,!1,1)}catch(a){}},_addVideoInteraction:function(a,b,c){a=new EBG.Interactions.CounterInteractionData(a,
EBG.Interactions.Categories.VIDEO,this._adConfig.uid);a.initiationType=b?EBG.Interactions.InitiationTypes.USER:EBG.Interactions.InitiationTypes.AUTO;if(c)a.numLeftToReport=c;b=new EBG.Interactions.CounterInteraction(a);EBG.intMgr.addInteraction(b)},_addCustomInteractions:function(){try{var a=this._adConfig.interactions,b;for(b in a)if(a.hasOwnProperty(b)){var c=EBG.intMgr.adsData[this._adConfig.uid];switch(a[b].type){case 0:c.Counter.hasOwnProperty(b)||b!==EBG.Interactions.SystemInts.CLICK&&b!==EBG.Interactions.SystemInts.DEFAULT_CLICK&&
this._addCounterInteraction(b,EBG.Interactions.Categories.CUSTOM);break;case 1:c.Timer.hasOwnProperty(b)||this._addTimerInteraction(b,EBG.Interactions.Categories.CUSTOM)}}}catch(d){}},subscribeToStandardElementEvents:function(a){var b=new EBG.Events.EventSubscription("mouseover",this._handleMouseEvent,this);b.isElementEvent=!0;b.elementId=a;EBG.eventMgr.subscribeToEvent(b);b=new EBG.Events.EventSubscription("mouseout",this._handleMouseEvent,this);b.isElementEvent=!0;b.elementId=a;EBG.eventMgr.subscribeToEvent(b)},
_handleMouseEvent:function(a){var b=a.currentTarget?a.currentTarget:a.srcElement,c=a.relatedTarget?a.relatedTarget:null,d="",e=b.id,g=e.lastIndexOf("_")+1,f="",f=b.id.split("_"),h=f.length,f=f[h-2]+"_"+f[h-1],f=EBGInfra.isDefined(f)?f:"";g&&(d=e.substring(g));e="mouseover"==a.type?new EBG.Events.Event(EBG.Events.EventNames.MOUSE_OVER):new EBG.Events.Event(EBG.Events.EventNames.MOUSE_OUT);if(!("mouseout"==a.type&&EBGInfra.isDefined(EBG.ads[f])&&EBG.ads[f].isInFullScreenMode))e.dispatcher={_adConfig:{rnd:d}},
e.eventData={target:b,relatedTarget:c},EBG.eventMgr.dispatchEvent(e)},_verifyPlaceHolder:function(){EBG.callSuperFunction(EBG.Ads.RichAd,this,"_verifyPlaceHolder")||EBG.adaptor.addPlaceHolder({tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:this._adConfig.placeHolderId,dir:"ltr"},children:null})},_changeBackgroundImage:function(){this._wallpaper=new EBG.Adaptors.Wallpaper;var a=new EBG.Adaptors.Wallpaper.BgData;a.imgSrc=EBG.combinePaths(this._adConfig.resourcePath,this._adConfig.bgImgSrc);a.tiling=
this._adConfig.bgRepeat;a.scrolling=this._adConfig.bgIgnoreScrolling;a.positionX=this._adConfig.bgPosX;a.positionY=this._adConfig.bgPosY;this._wallpaper.SetBackgroundImage(a)},_removeBackgroundImage:function(){this._wallpaper&&this._wallpaper.RemoveBackgroundImage()},_setStateInCreativeState:function(a){this._adConfig.optOut||(a=EBG.format("{0}{1}/{2}/adServer.bs?cn=SetState&CampaignID={3}&StateValue={4}&ord={5}",EBG.protocol,this._adConfig.bsPath,"BurstingPipe",this._adConfig.campaignId,a.eventData.stateValue?
a.eventData.stateValue:"",EBG.getRandomNumber()),EBG.adaptor.reportToRemoteServer(a,!0,!0))}};EBG.declareClass(EBG.Ads.RichAd,EBG.Ads.Ad);
EBG.Ads.RichBannerHtml5=function(a){this._updateAdConfig(a);if(EBG.AdaptiveUtils&&a.adaptiveAd||a.isInstream&&a.ffs.CFF_ResponsiveInstream){this._adConfig=a;this._verifyPlaceHolder();var b=EBG.adaptor.getElementById(a.placeHolderId),c=a.width&&EBG.isNumber(a.width)?a.width+"px":"100%",d=a.height&&EBG.isNumber(a.height)?a.height+"px":"100%";this.resizePlaceHolder=!1;EBG.adaptor.setElemStyle(b,"width",c);EBG.adaptor.setElemStyle(b,"height",d);if(!a.isInstream)this._adaptiveUtils=new EBG.AdaptiveUtils(a),
this._adaptiveUtils.updateAdConfig(),this._adaptiveUtils.subscribeToEvents()}EBG.callSuperConstructor(EBG.Ads.RichBannerHtml5,this,[a])};EBG.Ads.RichBannerHtml5.requiresIframeBust=!1;
EBG.Ads.RichBannerHtml5.prototype={_isClickOccur:!1,_CCs:{},_banner:{divId:"",resId:"",width:0,height:0},_canShow:function(){var a=!1;this._adConfig.adHtmlPath?EBG.adaptor.browser.isIE()&&!this._adConfig.isPreview?(a=(this._adConfig.displayWin||EBG.adaptor.getDisplayWin()).document.documentMode,a=9==a&&this._adConfig.isSafeFrame?!1:8<a):a=!0:this._adConfig.imageOnly=!0;return a},_updateAdConfig:function(a){this._updateSVJSON(a)},_updateSVJSON:function(a){var b=EBG.isGlobalDef("ebAdXmlPath")?ebAdXmlPath:
"";if(b&&a.svJSON)a.svPreview=b;if(a.sv3CatalogMap&&a.massVersioning&&a.massVersioning.adVersions&&""!=a.massVersioning.adVersions)versions=0<a.massVersioning.massVersionFolderDivider?EBG.Ads.Ad.Fn.fixMVPathString(a.massVersioning.adVersions,a.massVersioning.massVersionFolderDivider):a.massVersioning.adVersions,a.versions=versions;if(a.massVersioning&&a.massVersioning.versionFullPath&&(a.versions=a.massVersioning.adVersionsObject?a.massVersioning.adVersionsObject.p:"",b=EBG.isGlobalDef("ebAdJson")?
ebAdJson:null))a.versionPreviewJson=b},_subscribeToEvents:function(){EBG.callSuperFunction(EBG.Ads.RichBannerHtml5,this,"_subscribeToEvents");this._subscribeToAdEvent(EBG.EBMessage.CLICKTHROUGH,this._updateAssetsWithClick);this._subscribeToAdEvent(EBG.EBMessage.SWIPE,function(){EBG.intMgr.handleCounterInteraction(EBG.Interactions.SystemInts.SWIPE,this._adConfig.uid)});this._subscribeToAdEvent(EBG.EBMessage.DISPOSE,function(){var a=new EBG.Events.Event(EBG.Events.EventNames.PAGE_UNLOAD);EBG.eventMgr.dispatchEvent(a)});
this._shouldWaitForTriggerAdStart()&&this._subscribeToAdEvent(EBG.EBMessage.TRIGGER_AD_START,this._triggerAdStart);this._adConfig.isInstream&&this._subscribeToAdEvent(EBG.EBMessage.ALLOW_INTERACTION_REPORTING,function(){EBG.intMgr.allowInteractionReport(this._adConfig.uid)})},_updateAssetsWithClick:function(a){this._isClickOccur=!0;clickedProductId=a&&a.eventData&&a.eventData.isProductClick&&a.eventData.clickedVersion?a.eventData.clickedVersion:null;var a={clickOccur:!0,clickedProductId:clickedProductId},
b;for(b in this._CCs)this._CCs.hasOwnProperty(b)&&this._CCs[b].updateClick(a)},_writeCreativeElements:function(){var a=EBG.adaptor.generateElementId("BannerDiv",this._adConfig.uid),b={tagName:EBG.Adaptors.TagNames.DIV,attributes:{id:a,dir:"ltr",style:{}},children:this._bannerCC.buildCreativeContainerJson()};if("undefined"!=typeof this._adConfig.display)b.attributes.style.display=this._adConfig.display;var c=new EBG.Events.Event(EBG.Events.EventNames.ADD_CREATIVES);c.dispatcher=this;c.eventData={tagsObj:b,
assetId:b.children[0]?b.children[0].attributes.id:this._bannerCC.iframeId,isPanel:!1,creativeType:EBG.Events.EventNames.ADD_HTML5_MAIN_CREATIVE};c.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(c))EBG.adaptor.addInlineDOM(b,this._adConfig.placeHolderId),this.bannerDivId=a,this._banner.divId=a,this._banner.width=this._adConfig.width,this._banner.height=this._adConfig.height,c.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.dispatchEvent(c),this.subscribeToStandardElementEvents(a),
c.timing=EBG.Events.EventTiming.AFTER,EBG.eventMgr.dispatchEvent(c)},_addCreatives:function(){this._loadBanner()},_loadBanner:function(){this._bannerCC=new EBG.IFrameCC(this._adConfig,{clickOccur:this._isClickOccur});this._bannerCC.iframeId=EBG.adaptor.generateElementId("BannerIFrame",this._adConfig.uid);this._CCs[this._bannerCC.iframeId]=this._bannerCC;this._bannerCC.setAssetCreativeParams();this._writeCreativeElements()},_shouldWaitForTriggerAdStart:function(){if(!0===this._adConfig.isInstream)return!0},
_addSystemInteractions:function(){EBG.callSuperFunction(EBG.Ads.RichBannerHtml5,this,"_addSystemInteractions");if(EBG.adaptor.browser.isMobile())try{var a=new EBG.Interactions.CounterInteractionData(EBG.Interactions.SystemInts.SWIPE,EBG.Interactions.Categories.SYSTEM,this._adConfig.uid);a.initiationType=EBG.Interactions.InitiationTypes.USER;var b=new EBG.Interactions.CounterInteraction(a);EBG.intMgr.addInteraction(b,EBG.Interactions.SystemInts.SWIPE)}catch(c){}},_getBannerLocation:function(){var a;
if(this._bannerCC&&this._bannerCC.iframeId)a=EBG.adaptor.getPositioningById(this._bannerCC.iframeId,!0,this._adConfig.actualServingMode);else if(this._preloadImgResId)a=EBG.adaptor.getPositioningById(this._preloadImgResId);else return null;return EBG.callSuperFunction(EBG.Ads.RichBannerHtml5,this,"_getBannerLocation",[a])},_getAdCodeBase:function(){return EBG.callSuperFunction(EBG.Ads.RichBannerHtml5,this,"_getAdCodeBase",[2])},_switchAssetsAfterThrottle:function(){},_shouldCheckIfFlashBlocked:function(){return!1}};
EBG.declareClass(EBG.Ads.RichBannerHtml5,EBG.Ads.RichAd);EBG.declareNamespace("CreativeContainer");EBG.CreativeContainer=function(a){this._adConfig=a};EBG.declareClass(EBG.CreativeContainer,null);EBG.declareNamespace("IFrameCC");
EBG.IFrameCC=function(a,b){EBG.callSuperConstructor(EBG.IFrameCC,this,[a]);this._isClickOccur=b.clickOccur;this._isEBInitialized=!1;this._isDocLoaded=!1;this._iframe=null;this.iframeId=null;this._isReqInitReceived=!1;this._assetCreativeParams=null;this._subscribeToEvents();this.pm=EBG.pm;this.useFriendlyIframe=this._adConfig.isSafeFrame||this._adConfig.isSkype;this._registerToEvents();this._listenToMessages();this._videoAssetsActive=[]};
EBG.IFrameCC.prototype={_isContentLoading:!1,_videoAssetsActive:null,isAssetFullyLoaded:function(){return this._isEBInitialized&&this._isDocLoaded},_subscribeToEvents:function(){if(!EBG.adaptor.isReady()){var a=new EBG.Events.EventSubscription(EBG.EBMessage.ADAPTOR_READY,this._checkSendInit,this);a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(a)}a=new EBG.Events.EventSubscription(EBG.Events.EventNames.MESSAGE_CREATIVE,function(a){!a.eventData.msgType||!a.eventData.msgData||a.eventData.assetId&&
this.iframeId!=a.eventData.assetId||this._sendMessage(a.eventData.msgType,a.eventData.msgData)},this);a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(a)},isEBInitialized:function(){return this._isEBInitialized},isDocLoaded:function(){return this._isDocLoaded},updateClick:function(a){this._isClickOccur=a.clickOccur;this._sendMessage(EBG.EBMessage.UPDATE_CLICK,a)},setAssetCreativeParams:function(){if(this._adConfig.AdCreativeParams)this._assetCreativeParams=this._adConfig.AdCreativeParams},
_handleMessage:function(a,b){if(this._iframe)if(this._iframe.contentWindow){if(b.source===this._iframe.contentWindow){var c=JSON.parse(b.data);if(c)switch(c.type){case EBG.EBMessage.REQ_INIT:this._isReqInitReceived=!0;(EBG.adaptor.isReady()||!EBG.adaptor.isSDKDefined())&&this._sendInitToCreative();break;case EBG.EBMessage.INITDONE:this._handleInitDone();break;case EBG.EBMessage.GET_ENVIROMENT:this._sendAdKitData(c.type);break;case EBG.EBMessage.CLOSE_AD:this._dispatchCloseAdEvent();break;default:this._handleGeneralMessage(c)}}}else EBG.runTimed(this,
this._handleMessage,[a,b],20);else this._getIframeElement(),EBG.runTimed(this,this._handleMessage,[a,b],20)},_handleGeneralMessage:function(a){var b=new EBG.Events.Event(a.type);b.dispatcher=this;if(a.data&&(b.eventData=a.data,b.eventData&&b.eventData.command))this[b.eventData.command](b.eventData);EBG.eventMgr.dispatchEvent(b);this.handleIntMonitor(a)},handleIntMonitor:function(a){if(EBG.adaptor.intMonitorExist()){var b=new EBG.Events.Event(EBG.EBMessage.NOTIFY_INTERACTION_MONITOR);b.eventData=this._createIntMonitorObj(a);
EBG.eventMgr.dispatchEvent(b)}},_handleInitDone:function(){this._isContentLoading=!1;this._isEBInitialized=!0;var a=new EBG.Events.Event(EBG.Events.EventNames.CREATIVE_CONTAINER_READY);a.dispatcher=this;a.eventData=this.iframeId;EBG.eventMgr.dispatchEvent(a);if(EBG.adaptor.isPageLoaded())a=new EBG.Events.Event(EBG.Events.EbEventNames.PAGE_LOAD),a.dispatcher=this,this._handleEvents(a)},_saveAssetSrc:function(a){a.src=this.iframeId},_registerVideo:function(a){-1==EBGInfra.indexOfArray(this._videoAssetsActive,
a.assetId)&&this._videoAssetsActive.push(a.assetId)},_unregisterVideo:function(a){if(0<this._videoAssetsActive.length)var b=EBGInfra.indexOfArray(this._videoAssetsActive,a.assetId);this._videoAssetsActive.splice(b,1)},notifyDocLoaded:function(a){this._isDocLoaded=!0;this._saveAssetSrc(a)},getWidth:function(){return this._adConfig.width?this._adConfig.width:this.getActualSize().width},getHeight:function(){return this._adConfig.height?this._adConfig.height:this.getActualSize().height},getActualSize:function(){var a=
EBG.adaptor.getElementById(this.iframeId);return a?EBG.adaptor.getBoundingClientRect(a):{width:0,height:0}},getAdPartsData:function(){var a={type:EBG.adParts.BANNER,adkitConfigUrl:this._adConfig.assets["config.js"]?this._adConfig.resourcePath+this._adConfig.assets["config.js"].dsPath:""};a.width=a.containerWidth=this.getWidth();a.height=a.containerHeight=this.getHeight();return a},_sendAdKitData:function(a){var b=EBG.cloneObj(this._adConfig.adKitData),c=EBG.ads&&this._adConfig&&this._adConfig.uid&&
EBG.ads[this._adConfig.uid]?EBG.ads[this._adConfig.uid]._adaptiveUtils:null;if(c){b.adParts=b.adParts||{};b.adParts.type=EBG.adParts.BANNER;b.adParts.adkitConfigUrl=this._adConfig.assets["config.js"]?this._adConfig.resourcePath+this._adConfig.assets["config.js"].dsPath:"";var c=c.getAsset(),d=this.getActualSize();if(c)b.adParts.name=c.name,b.adParts.width=c.width,b.adParts.height=c.height;if(d)b.adParts.containerWidth=d.width,b.adParts.containerHeight=d.height,b.actualWidth=d.width,b.actualHeight=
d.height}else b.adParts=this.getAdPartsData(),b.adParts.width=this._adConfig.originalWidth||b.adParts.width,b.adParts.height=this._adConfig.originalHeight||b.adParts.height;if(this._adConfig.expansionParams)b.adParts.expansionParams=this._adConfig.expansionParams;this._sendMessage(a,b)},_createIntMonitorObj:function(a){var b="";if(a)switch(a.type){case EBG.EBMessage.VIDEO_INTERACTION:a.data&&(b=EBG.format("'{0}',{1}",a.data.intName,a.data.ordinalNum));break;case EBG.EBMessage.EXPAND:case EBG.EBMessage.COLLAPSE:b=
this._handleSpecialInt(a);break;default:b=a.data.intName}return{command:a.type,args:b,objName:this.iframeId,adId:this._adConfig.adId}},_handleSpecialInt:function(a){var b="";switch(a.type){case EBG.EBMessage.EXPAND:b=a.data&&EBGInfra.isDefinedNotNull(a.data.panelName)?a.data.panelName:"";b+=a.data&&EBGInfra.isDefinedNotNull(a.data.actionType)&&""!=a.data.actionType?","+a.data.actionType:",User";break;case EBG.EBMessage.COLLAPSE:b=a.data&&EBGInfra.isDefinedNotNull(a.data.panelName)?a.data.panelName:
""}return b},_listenToMessages:function(){for(var a in EBG.EBMessage)EBG.EBMessage.hasOwnProperty(a)&&(a=EBG.EBMessage[a],EBG.pm.bind(a,this._handleMessage,this,this._adConfig.displayWin||EBG.adaptor.getDisplayWin()))},_UnbindMessages:function(){for(var a in EBG.EBMessage)EBG.EBMessage.hasOwnProperty(a)&&(a=EBG.EBMessage[a],EBG.pm.unbind(a,this._handleMessage))},_sendMessage:function(a,b){this._iframe&&(this.useFriendlyIframe?EBG.runTimed(this,function(){this._iframe.contentWindow.EBG.pm.dispatch(a,
b,window,this._iframe.contentWindow)},[],1):EBG.pm({target:this._iframe.contentWindow,type:a,data:b}))},_handleEvents:function(a){this._isEBInitialized&&this._sendMessage(a.name,a.eventData)},_registerToEvents:function(){for(var a in EBG.Events.EbEventNames)EBG.Events.EbEventNames.hasOwnProperty(a)&&EBG.eventMgr.subscribeToEvent(new EBG.Events.EventSubscription(EBG.Events.EbEventNames[a],this._handleEvents,this))},_dispatchCloseAdEvent:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.CLOSE_AD);
a.dispatcher=this;a.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.dispatchEvent(a)},_checkSendInit:function(){this._isReqInitReceived&&this._sendInitToCreative()},_sendInitToCreative:function(){if(this._adConfig){var a={assetCreativeParams:this._assetCreativeParams,clickOccur:this._isClickOccur,clickedProductIds:this._getClickedProductIDs(),adConfig:this._adConfig,ffs:EBG.serverResponses[this._adConfig.uid].ffs,dsBasePath:this._adConfig.resourcePath,events:EBG.Events.EbEventNames,assetId:this.iframeId,
browserData:{browserTypes:EBG.adaptor.browser._browserTypes,browserType:EBG.adaptor.browser._browserType,browserVer:EBG.adaptor.browser.getVersion(),isMobile:EBG.adaptor.browser.isMobile(),isIOS:EBG.adaptor.browser.isiOS(),isAndroid:EBG.adaptor.browser.isAndroid(),isAndroidNative:EBG.adaptor.browser.isAndroidNative()}};this._sendMessage(EBG.EBMessage.INIT,a)}},_getIframeElement:function(){var a=EBG.adaptor.getElementById(this.iframeId);a?(this._iframe=a,this.useFriendlyIframe&&!this._isContentLoading&&
this._loadContentToIframe(this.getIframePath())):EBG.runTimed(this,this._getIframeElement,[],20)},_loadContentToIframe:function(a){this._isContentLoading=!0;var b=a.split("/");b.pop();var b=b.join("/")+"/",c=a.match(/\?.*$/)[0],d=this._adConfig.adKitData;d.adParts=this.getAdPartsData();var e=this;this._getAssetHtmlContent(a,function(a){a?(a='<base href="'+b+'"/>'+a,e._iframe.contentWindow.document.open("text/html","replace"),e._iframe.contentWindow.ebSafeFrame={pm:function(a){a&&EBG.runTimed(e,function(){e.pm.dispatch(a.type,
a.data,e._iframe.contentWindow,a.target)},[],1)},sendMessage:function(a){this.pm(a)},getClickTagUrl:function(){return EBG.intMgr.getClickTag(e._adConfig.uid)},getAdKitData:function(){return{data:JSON.stringify({data:d,type:EBG.EBMessage.GET_ENVIROMENT}),source:window}}},e._iframe.contentWindow.ebQueryString=c,e._iframe.contentWindow.document.write(a),setTimeout(function(){e._iframe.contentWindow.document.close()},200)):e._isContentLoading=!1})},_getAssetHtmlContent:function(a,b){EBG.adaptor.getDataFromRemoteServer(a,
function(a){b(a)},this,!0,!1)},_buildIfrmSrc:function(a){a=EBG.format("{0}?v={1}",EBG.combinePaths(this._adConfig.resourcePath,a),EBG.html5Ver);this._adConfig.ffs.CFF_EBLoaderNew&&this._adConfig.useAsyncEBLoader&&(a+="&n=1");this._adConfig.isInstream&&this._adConfig.ffs.CFF_EBVpaidVersion&&this._adConfig.moduleInfo&&this._adConfig.moduleInfo.vpaidVersionHtml5&&(a+="&vpaidV="+this._adConfig.moduleInfo.vpaidVersionHtml5);this._adConfig.pluId&&(a+="&plu="+this._adConfig.pluId,this._adConfig.sHost&&(a+=
"&sHost="+this._adConfig.sHost));this._adConfig.isInstream&&(a+="&nonCached="+EBG.protocol+this._adConfig.sms);this._adConfig.isClickTag&&(a=EBG.format("{0}&clickTag={1}",a,escape(EBG.intMgr.getClickTag(this._adConfig.uid))));EBG.isPreview&&(a=EBG.format("{0}&isPreview={1}",a,"1"));return a},buildCreativeContainerJson:function(){var a=this.useFriendlyIframe?this.getFriendlyIframePath():this.getIframePath(),a={tagName:EBG.Adaptors.TagNames.IFRAME,attributes:{id:this.iframeId,name:this.iframeId,src:a,
onload:EBG.format('(function(e) { var event = new EBG.Events.Event(EBG.Events.EventNames.ELEMENT_LOADED);event.dispatcher = this;event.eventData = { DOMEvent: e, elementId: "{0}", adUId:"{1}" };event.timing = EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(event);} )(typeof arguments != "undefined" ? arguments[0] : null);',this.iframeId,this._adConfig.uid),width:this._adConfig.width?this._adConfig.width:"100%",height:this._adConfig.height?this._adConfig.height:"100%",allowfullscreen:!0}};
this._getIframeElement();return[a]},getIframePath:function(){return this._buildIfrmSrc(this._adConfig.adHtmlPath)},getFriendlyIframePath:function(){var a,b="";if(EBG.adaptor.browser.isIE()&&11>EBG.adaptor.browser.getVersion()){try{if((a=EBG.adaptor.inject({tagName:EBG.Adaptors.TagNames.IFRAME,attributes:{id:"ebSampleIFrame"+this._adConfig.rnd,src:"",width:1,height:1,allowfullscreen:!0,visibility:"hidden",display:"none"}},EBG.Adaptors.InjectionMethod.APPEND,EBG.adaptor.getElementById(this._adConfig.placeHolderId)))&&
a.contentWindow)a.contentWindow.document.open("text/html","replace"),a.contentWindow.document.stam={}}catch(c){b="javascript:'<script>window.onload=function(){document.write(\\'<script>document.domain=\\\""+document.domain+"\\\";<\\\\/script>\\');document.close();};<\/script>'"}a&&a.parentElement&&a.parentElement.removeChild(a)}return b},_getClickedProductIDs:function(){return this._adConfig.uid&&EBG.intMgr.adsData[this._adConfig.uid]&&EBG.intMgr.adsData[this._adConfig.uid].isProductClicked?EBG.intMgr.adsData[this._adConfig.uid].isProductClicked:
{}},sendPanelFrequencyInfo:function(a){this._sendMessage(EBG.EBMessage.PANEL_FREQUENCY,{disableCreativeExpand:!a})}};EBG.declareClass(EBG.IFrameCC,EBG.CreativeContainer);EBG.declareNamespace("BWDetection");
EBG.BWDetection={checked:!1,checking:!1,speed:0,_adjustment:0.75,_images:[{path:EBG.format("{0}{1}micro.gif",ebPtcl,ebO.sms),bytes:51,start:null,end:null},{path:EBG.format("{0}{1}micro.gif",ebPtcl,ebO.sms),bytes:51,start:null,end:null},{path:EBG.format("{0}{1}bw_image.png",ebPtcl,ebO.sms),bytes:43677,start:null,end:null}],_loaded:0,_loadImage:function(a){this._images[a].start=(new Date).getTime();var b=new Image,c=Math.random();b.onload=function(){EBG.BWDetection._imageLoaded(a)};b.src=this._images[a].path+
"?rnd="+c},_imageLoaded:function(a){this._images[a].end=(new Date).getTime();this._loaded++;this._loaded==this._images.length&&this._calculateSpeed()},_dispatchEvent:function(){var a=new EBG.Events.Event(EBG.Events.EventNames.BANDWITH_DETECTED);a.dispatcher=this;a.eventData=this.speed;EBG.eventMgr.dispatchEvent(a)},_calculateSpeed:function(){var a=Math.min(this._images[0].end-this._images[0].start,this._images[1].end-this._images[1].start),b=this._images[2].end-this._images[2].start,c=b,d=this._images[2].bytes;
b>a&&(c=b-a,d-=this._images[0].bytes);this.speed=Math.round(8*(d/(c/1E3)/1024))*this._adjustment;if(Infinity==this.speed)this.speed=25E3;this.checked=!0;this.checking=!1;this._dispatchEvent()},init:function(){this.checking=!0;this._loadImage(0);this._loadImage(1);this._loadImage(2);var a=this;setTimeout(function(){if(!a.checked)a.speed=56,a.checked=!0,a.checking=!1,a._dispatchEvent()},5E3)}};var tempExtensionHook=ebO.extensionHooks;
try{ebO.extensionHooks.splice(0,0,function(a,b){function c(){EBG.Interactions.checkURL=function(a){if(a){var b=a.toLowerCase();b.match("^[^?]*:.*")||(a="http://"+b);return a}}}EBG.getFeatureFlagValue(b.ffs,"CFF_DeepLink")&&c()})}catch(e$$96){ebO.extensionHooks=tempExtensionHook}
try{ebO.extensionHooks.splice(0,0,function(a,b){function c(){b.ffs.CFF_NewMRAID=!0;var a=new EBG.Events.EventSubscription(EBG.Events.EventNames.CREATE_ADAPTOR,function(a){a.eventData.currentClass.prototype.getRequestMethod=function(a){if(EBG.adaptor.browser.isMobile()&&b.ffs.CFF_ForceGET)return"GET";var c=EBG.adaptor.browser.isMobile()&&b.ffs.CFF_URLThreshold?4E3:2E3;return this.browser.isIE()&&6==this.browser.getVersion()||this.isInApp()?"GET":a.length>c?"POST":"GET"}});a.timing=EBG.Events.EventTiming.BEFORE;
EBG.eventMgr.subscribeToEvent(a)}(b.ffs.CFF_ForceGET||b.ffs.CFF_URLThreshold||81==b.pluId)&&c()})}catch(e$$97){ebO.extensionHooks=tempExtensionHook}tempExtensionHook=ebO.extensionHooks;
try{ebO.extensionHooks.splice(0,0,function(a,b){function c(){b.adConfig.UiVz=!1;if(EBG.Adaptors&&EBG.Adaptors.ServingMgr&&EBG.Adaptors.ServingMgr.prototype)EBG.Initializer._initServingMode=function(a){var b=this._getAdClass(a);a.requiresIframeBust=b.requiresIframeBust;var c=EBGInfra.isDefined(EBG.adaptor.serving)?EBG.adaptor.serving.detectServingMode(!0):null;if(EBG.adaptor.isSafeFrame())a.ifrm=0,a.adConfig.UiVz=!1;else{if(b.requiresIframeBust){if(!a.ifrm||a.soi)a.ifrm=0;if(a.innerIframe)a.ifrm=EBG.Adaptors.ServingMode.INNER_IFRAME;
EBG.adaptor.initServingMode(a.ifrm,!1,c)}else if(a.ifrm=0,b!=EBG.Ads.StdBanner&&b!=EBG.Ads.StdBannerHtml5&&(EBG.adaptor.initServingMode(a.ifrm,!b.requiresIframeBust,c),c==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME))try{document.close()}catch(d){}if(EBG.adaptor.inPlacementIframe()||!b.requiresIframeBust&&!a.innerIframe&&c==EBG.Adaptors.ServingMode.IFRAME&&!EBG.adaptor.isSkype()&&b!=EBG.Ads.StdBanner&&b!=EBG.Ads.StdBannerHtml5&&!EBG.adaptor.isSafeFrame())if(b.requiresIframeBust||a.IABBV||a.IABEV||a.invVis)a.ifrm=
1,b=new EBG.Events.EventSubscription(EBG.Events.EventNames.AIE_LOADED,this._handleAieLoad,this),b.dispatcherFilters={"_adConfig.rnd":a.rnd,"_adConfig.templateName":a.tn},b.timing=EBG.Events.EventTiming.BEFORE,EBG.eventMgr.subscribeToEvent(b),EBG.adaptor.serving.handleAieServing(a)}},EBG.Adaptors.ServingMgr.prototype.checkAie=function(a,c,d){EBG.serverResponses=EBG.serverResponses||{};EBG.serverResponses[a.adConfig.uid]||(EBG.serverResponses[a.adConfig.uid]=a);d.ebO=EBG.cloneObj(a);if(EBG.adaptor.browser.isIE()&&
9>EBG.adaptor.browser.getVersion())try{delete d.ebO.ut,delete d.ebO.fru}catch(h){d.ebO.ut="",d.ebO.fru=""}EBG.iframeLocation?c.apply(d,['{"iflExists":1,"iflCheck":0}']):EBG.isDefinedNotNull(b.aiE)&&EBG.isDefinedNotNull(b.aiE.iflExists)?c.apply(d,[JSON.stringify(b.aiE)]):(a=encodeURIComponent(document.referrer||document.location.href))?EBG.adaptor.getDataFromRemoteServer(ebPtcl+b.bs+this.aieServerRequestPrefix+a+this.aieServerRequestPrefixVersion,this._handleAddInEyeServerResponse,this,!0,!1)||c.apply(d,
['{"iflExists":1,"iflCheck":0}']):c.apply(d)},EBG.Adaptors.ServingMgr.prototype.handleAieServing=function(a){this.checkAie(a,this._handleAddInEyeServerResponse,this)},EBG.Adaptors.ServingMgr.prototype._handleAddInEyeServerResponse=function(a,b){var c;try{c=!b&&a?JSON.parse(a):{iflExists:0,iflCheck:1}}catch(d){c={iflExists:0,iflCheck:1}}EBG.serverResponses[this.ebO.adConfig.uid].aiE=c;this.ebO.aiE=c;if(!this.ebO.dmn)this.ebO.dmn=c.Domain?c.Domain:this._ebGetHostName(document.referrer);if(this.ebO.requiresIframeBust&&
c&&c.iflExists)this.insertInnerIframe(this.ebO.phid,c.iflCheck?EBG.Adaptors.IframeMode.SERVEANDVERIFY:EBG.Adaptors.IframeMode.SERVE);else{if(this.ebO.requiresIframeBust)this.ebO.adConfig.showAieDefaultImage=1;this.ebO.ifrm=0;var k=new EBG.Events.Event(EBG.Events.EventNames.AIE_LOADED);k.eventData={loadDefault:!0,currentResponse:this.ebO};k.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(k);c.iflCheck&&this.insertInnerIframe(this.ebO.phid,EBG.Adaptors.IframeMode.VERIFY)}};if(EBG.RichModules&&
EBG.RichModules.VisibilityManager){var a=function(){return!0};EBG.RichModules.BasicVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.GeometricVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.GeometricVisibilityProvider._isAvailable=function(a){return(a.actualServingMode!=EBG.Adaptors.ServingMode.IFRAME||EBG.adaptor.serving.servingMode==EBG.Adaptors.ServingMode.INNER_IFRAME)&&!(a.ffs.CFF_MRAIDVis&&EBG.adaptor.isInApp())};EBG.RichModules.MouseVisibilityProvider.prototype.shouldReportRecordable=
a;EBG.RichModules.MouseVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.GridVisibilityProvider.prototype.shouldReportRecordable=a;if(EBG.RichModules.MraidVisibilityProvider)EBG.RichModules.MraidVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.FlashVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.SafeFrameVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.FFVisibilityProvider.prototype.shouldReportRecordable=a;EBG.RichModules.VisibilityManager.prototype._availableVisibilityProviders=
[EBG.RichModules.GeometricVisibilityProvider,EBG.RichModules.SafeFrameVisibilityProvider,EBG.RichModules.AddingEyeProvider,EBG.RichModules.MouseVisibilityProvider,EBG.RichModules.GridVisibilityProvider,EBG.RichModules.FlashVisibilityProvider,EBG.RichModules.FFVisibilityProvider,EBG.RichModules.MraidVisibilityProvider];a=EBG.RichModules.VisibilityManager.prototype;EBG.RichModules.VisibilityManager=function(a,b,c){this.adConfig=a;this._resObjId=b;this._res=EBG.adaptor.getElementById(b);this.actualServingMode=
this.adConfig.actualServingMode;this._averageLastCalcTime=(new Date).getTime();this._isPanel=c;this._dpm=EBG.dataPipeMgr.getPipe(this.adConfig.sID);if(this._shouldInitialize())(this._visibilityProvider=this._getVisibilityProvider(this._resObjId,this.adConfig))?(this._dpm.send(EBG.DataProfile.VISIBILITY,{vsr:1,vsbp:this.getVisibilityProviderNum()}),this._initializeVisibilityData(),this._subscribeToEvents(),a=function(){this._visibilityProvider.shouldReportRecordable()&&this._reportVisibilityRecordable();
this._visibilityProvider.start()},this.adConfig.adStarted?a.apply(this):(a=new EBG.Events.EventSubscription(EBG.Events.EventNames.AD_START,a,this),a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.subscribeToEvent(a))):this._dpm.send(EBG.DataProfile.VISIBILITY,{uvsr:3})};EBG.RichModules.VisibilityManager.ThreholdType={IAB:0,Agency:1,Advertiser:2};EBG.RichModules.VisibilityManager.VisibilityPollingTimer=1E3;EBG.RichModules.VisibilityManager.prototype=a;EBG.RichModules.VisibilityManager.prototype._shouldInitialize=
function(){EBG.Initializer._getAdClass({tn:this.adConfig.templateName});return this.adConfig.visibility.mode==EBG.VisibilityMode.DEFAULT_MODE?!1:!0}}}EBG.getFeatureFlagValue(b.ffs,"CFF_RemoveUivz")&&c()})}catch(e$$100){ebO.extensionHooks=tempExtensionHook}EBG.declareNamespace("Initializer");
EBG.Initializer={initialize:function(){var a=null,b;void 0!==b&&b||(a=EBG.Initializer._getCurrentServerResponse(a),EBG.Initializer._initGlobals(a),EBG.Initializer._callExtensionHooks(a),EBG.Initializer._initAdaptor(a),EBG.Initializer._initManagers(a),EBG.Initializer._initDisplayAd(a));return a},_initManagers:function(a){var b=new EBG.Events.Event(EBG.Events.EventNames.INIT_MANAGERS);b.eventData={"_adConfig.rnd":a.rnd};b.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(b);EBG.Initializer._initInteractionManager(a);
EBG.Initializer._initAnimationManager(a);EBG.Initializer._initDataPipeManager(a);(!~a.tn.toLowerCase().indexOf("html5")||!a.ffs.CFF_Html5Shrink)&&EBG.Initializer._initPositioningHelper();EBG.Initializer._initGeometryHelper();EBG.Initializer._initElementWatcher();b.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(b)},_initDisplayAd:function(a){EBG.Initializer._updateAdConfig(a);a.ffs.CFF_ClientDITest&&a.diParams&&EBG.adaptor.loadModule(ebBigS+"UserProviders"+ebO.uipv+"/SizmekDI.js",
a.adConfig,function(){var b=a.diParams;b.cookie=encodeURIComponent(a.adConfig.usercookie);b.sID=a.adConfig.sID;b.bt=a.bt;b.bv=a.bv;b.plt=a.plt;(new EBGUIP.SizmekDI({},b)).post("//dh.serving-sys.com/samurai/collect/di")},this);this._sendInitialDataPipeData(a);if(EBG.Initializer._shouldInitAd(a)){if(EBG.isDefined(EBG.adaptor.getDisplayWin().EBG))try{EBGInfra.mergeObj(EBG,EBG.adaptor.getDisplayWin().EBG,!1)}catch(b){EBG.adaptor.getDisplayWin().EBG=EBG}else EBG.adaptor.getDisplayWin().EBG=EBG;a.ffs.CFF_SingleTag&&
(a.adConfig.customJSVars&&a.adConfig.customJSVars.mdProgFormatID&&a.adConfig.customJSVars.mdProgEnable||a.adConfig.singleTagProgrammatic)?EBG.adaptor.loadModule("ProgrammaticSettingsMgr",a.adConfig,function(b){(new (b||window).EBG.Modules.ProgrammaticSettingsMgr(a.adConfig)).getSettings(function(){EBG.Initializer._initAd(a)},this)},this):EBG.Initializer._initAd(a)}},_shouldInitAd:function(a){return a.innerIframe||0==a.ifrm||-1==a.ifrm&&EBG.adaptor.serving&&EBG.adaptor.serving.servingMode!=EBG.Adaptors.ServingMode.IFRAME},
_getCurrentServerResponse:function(){for(var a=0,b;a<ebOArr.length;){if((b=ebOArr[a])&&this._getAdClass(b)){ebOArr.splice(a,1);break}a++}return b},_initGlobals:function(a){var b=navigator.userAgent.toLowerCase(),c=a.adConfig;EBG.isOfflineDemo=!!window.gEbfOfflineDemo;if("/"==a.resPath.charAt(a.resPath.length-1)&&"/"==a.resPath.charAt(a.resPath.length-2))a.resPath=a.resPath.substring(0,a.resPath.length-1);EBG.resourcePath=a.resPath;c.rnd=a.rnd;c.uid=EBG.format("{0}_{1}",c.adId,c.rnd);c.resourcePath=
a.resPath;c.ffs=a.ffs;c.modulesDir=unescape(ebBigS)+"Modules"+a.modv+"/";EBG.sms=c.sms=a.sms||"";EBG.fcsVirtualPath=a.fvp||"";EBG.pluId=a.pi;EBG.dataCapture=EBG.bs=a.bs;EBG.protocol=ebPtcl;EBG.reportPageVer=a.rpv;EBG.html5Ver=a.html5v;EBG.flashPixelVer=a.vfp;EBG.intReportTimeout=a.irt||null;EBG.isMSNMessenger=(-1<b.indexOf("msn messenger")||-1<b.indexOf("windows live messenger"))&&window==parent;EBG.isIMBanner=window.gfEbExpBanerIM||window.gfEbExpBannerIM;EBG.isPreview=a.pr;EBG.isTestMode=a.tm;EBG.isInWorkshop=
window.gEbFlyLocal;EBG.iframeLocation=a.ifl||window.gstrEbIframeLocation;EBG.minZIndex=a.z||window.gnEbMinZIndex||1E4;EBG.eyeDivRefElement=window.gEbEyeDivRefElement;if(a.adConfig&&a.adConfig.isInstream||a.ffs&&a.ffs.CFF_DisableUiVz)a.adConfig.UiVz=!1;EBG.eventMgr=EBG.eventMgr||new EBG.Events.EventManager;b=a.ffs&&a.ffs.CFF_WinWalk?EBG.Adaptors.StdWebAdaptor._getTopAccessibleWindow(!1):EBG.getTopAccessibleWindow(!1);b.ebAds=b.ebAds||{};EBG.ads=b.ebAds;EBG.serverResponses=EBG.serverResponses||{};if((b=
c.adHtmlPath)&&a.h5mi)c.adKitData={paths:{cachedScript:ebBigS,nonCachedScript:ebPtcl+a.sms,folderRoot:ebResourcePath+b.substring(0,b.lastIndexOf("/")+1)},version:a.h5mi.adkitversion}},_initServingMode:function(a){var b=this._getAdClass(a),c=a.adConfig;a.requiresIframeBust=b.requiresIframeBust;var d=EBG.adaptor.serving?EBG.adaptor.serving.detectServingMode(!0):null;if(EBG.adaptor.isSafeFrame())a.ifrm=0,c.UiVz=!1;else if(b.requiresIframeBust){if(a.innerIframe)a.ifrm=EBG.Adaptors.ServingMode.INNER_IFRAME;
if(!a.ifrm||a.soi)a.ifrm=0;EBG.adaptor.initServingMode(a.ifrm,!1,d);if(EBG.adaptor.inPlacementIframe())b=new EBG.Events.EventSubscription(EBG.Events.EventNames.AIE_LOADED,this._handleAieLoad,this),b.dispatcherFilters={"_adConfig.rnd":a.rnd},b.timing=EBG.Events.EventTiming.BEFORE,EBG.eventMgr.subscribeToEvent(b),EBG.adaptor.serving.handleAieServing(a)}else if(a.ifrm=0,b!=EBG.Ads.StdBanner&&b!=EBG.Ads.StdBannerHtml5){EBG.adaptor.initServingMode(a.ifrm,!b.requiresIframeBust,d);if(d==EBG.Adaptors.ServingMode.FRIENDLY_IFRAME){c.UiVz=
!1;try{document.close()}catch(e){}}if(d==EBG.Adaptors.ServingMode.SCRIPT)c.UiVz=!1}else c.UiVz=!1},_handleAieLoad:function(a){a.eventData.loadDefault&&a.eventData.currentResponse.tn!=EBG.adTypes.VisibilityAd&&(EBG.Initializer._initManagers(a.eventData.currentResponse),EBG.Initializer._initDisplayAd(a.eventData.currentResponse))},_callExtensionHooks:function(a){if(a.extensionHooks)for(;0!==a.extensionHooks.length;)a.extensionHooks.pop().apply(null,[a.adConfig,a])},getRichestAdaptor:function(){return EBG.Adaptors.WebAdaptor||
EBG.Adaptors.StdWebAdaptor},getRichestInteractionManager:function(){return EBG.Interactions.InteractionManager||EBG.Interactions.StdInteractionManager},_initAdaptor:function(a){var b=this.getRichestAdaptor(),c=new EBG.Events.Event(EBG.Events.EventNames.CREATE_ADAPTOR);c.eventData={currentClass:b};c.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(c);if(!EBG.adaptor||EBG.adaptor.constructor.toString()!==c.eventData.currentClass.toString())b=new c.eventData.currentClass,EBG.adaptor=b;
c.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(c);EBG.adaptor.initInnerModules(a.plt,a.bt,a.bv,a.dt,a.bc,!!a.adConfig.ffs.CFF_NoInDapIF);this._initServingMode(a);EBG.adaptor.registerSpecialBrowserEvents();EBG.eventMgr.attachToAdaptor();try{a.ffs.CFF_NewMRAID&&this._handleMRAIDLoad(a,function(){this._dispatchAdaptorReady()},this)}catch(d){console.log(d.message)}},_handleMRAIDLoad:function(a,b,c){var d=null,e=this,g=function(){d&&EBG.clearInterval(d);a.adConfig.openWindow=
!1;var f=EBG.adaptor.getElementById(a.phid);if(f){f.style.visibility="hidden";var g=EBG.runTimed(this,function(){f.style.visibility="visible"},[],400)}var l=new EBG.Events.EventSubscription(EBG.Events.EventNames.SHOW_AD,function(a){EBG.runTimed(this,function(){if(a.dispatcher._banner&&a.dispatcher._banner.divId)EBG.adaptor.getElementById(a.dispatcher._banner.divId).style.left=EBG.px(0)},[],0)});l.timing=EBG.Events.EventTiming.AFTER;EBG.eventMgr.subscribeToEvent(l);EBG.adaptor.loadModule("MRAIDUtil",
a.adConfig,function(){EBG.clearInterval(g);EBG.MRAIDUtil=new EBG.MRAIDUtil(a.adConfig,b,c)},e)};if(EBG.isMRAID())g();else if(a.ffs.CFF_ForceLoadMRAID&&EBG.adaptor.browser.isMobile()){var f=document.createElement("script");f.src="mraid.js";f.onload=g;EBG.getBigScript().parentElement.appendChild(f);d=EBG.runTimed(c,b,[],250)}else this._dispatchAdaptorReady()},_dispatchAdaptorReady:function(){if(!EBG.adaptor._isReady){EBG.adaptor._isReady=!0;var a=new EBG.Events.Event(EBG.EBMessage.ADAPTOR_READY);a.dispatcher=
this;a.timing=EBG.Events.EventTiming.BEFORE;if(!EBG.eventMgr.dispatchEvent(a))a.timing=EBG.Events.EventTiming.ONTIME,EBG.eventMgr.dispatchEvent(a)}},_initInteractionManager:function(a){newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_INT_MGR);newEvent.eventData={currentClass:this.getRichestInteractionManager()};newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if(!EBG.intMgr||EBG.intMgr.constructor.toString()!=newEvent.eventData.currentClass.toString())a=
new newEvent.eventData.currentClass(a),EBG.intMgr=a;newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)},_initAnimationManager:function(a){try{if(EBG.RichModules&&EBG.RichModules.AnimationManager){newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_ANIM_MGR);newEvent.eventData=EBG.RichModules.AnimationManager;newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if(!EBG.animationMgr)EBG.animationMgr=new newEvent.eventData;
if(!EBG.animator&&EBG.RichModules&&EBG.RichModules.Animator)EBG.animator=new EBG.RichModules.Animator(a.adConfig);newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)}}catch(b){}},_initDataPipeManager:function(a){var b,c=!1,d=!1,e=!1;if("https://"!=EBG.protocol||a.ffs.CFF_DataPipeHttps){if(a.ffs.CFF_DataPipeAlways)e=d=!0;else if((c=this._getNumericDataFromFlag(a.ffs,"CFF_DataPipeGeneral"))&&Math.floor(1E4*Math.random())+1<=100*c)e=d=!0;if(d||a.ffs.CFF_DataPipeAllErrors)b=
["general","platform","serving","visibility","error"]}a.dpu=a.dpu||"//dh.serving-sys.com/samurai/collect/events";EBG.dataPipeMgr=new EBG.DataPipeManager(a.dpu,b);e&&EBG.dataPipeMgr.getPipe().enableSend()},_initMMIntegration:function(){this.MMInt=new EBG.MMInt(this,"display")},_initGeometryHelper:function(){try{if(EBG.RichModules&&EBG.RichModules.Geometry){var a=new EBG.Events.Event(EBG.Events.EventNames.CREATE_GEOMETRY_HELPER);a.eventData=EBG.RichModules.Geometry;a.timing=EBG.Events.EventTiming.BEFORE;
EBG.eventMgr.dispatchEvent(a);if(!EBG.geometry)EBG.geometry=new a.eventData;a.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(a)}}catch(b){}},_initElementWatcher:function(){try{if(EBG.RichModules&&EBG.RichModules.ElementWatcher&&!EBG.elementWatcher)EBG.elementWatcher=new EBG.RichModules.ElementWatcher}catch(a){}},_getNumericDataFromFlag:function(a,b){for(var c in a)if(0==c.indexOf(b)&&a[c]){var d=parseFloat(c.substr(b.length).replace("_","."));if(!isNaN(d))return d}return 0},
_initPositioningHelper:function(){try{if(EBG.Positioning&&EBG.Positioning.PositionManager){newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_POSITIONING_HELPER);newEvent.eventData=EBG.Positioning.PositionManager;newEvent.timing=EBG.Events.EventTiming.BEFORE;EBG.eventMgr.dispatchEvent(newEvent);if(!EBG.posHelper)EBG.posHelper=new newEvent.eventData;newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent)}}catch(a){}},_initAd:function(a){try{var b=this._getAdClass(a),
c=a.adConfig;newEvent=new EBG.Events.Event(EBG.Events.EventNames.CREATE_AD);newEvent.eventData={currentClass:b,adConfig:c};newEvent.timing=EBG.Events.EventTiming.BEFORE;newEvent.dispatcher={_adConfig:{rnd:c.rnd,uid:c.uid}};EBG.eventMgr.dispatchEvent(newEvent);new newEvent.eventData.currentClass(c);newEvent.timing=EBG.Events.EventTiming.ONTIME_AND_AFTER;EBG.eventMgr.dispatchEvent(newEvent);EBG.adaptor.getDisplayWin().EBG.ads[c.uid]||(EBG.adaptor.getDisplayWin().EBG.ads[c.uid]=EBG.ads[c.uid]);if(EBG.BWDetection&&
window.gEBMainWindow&&gEBMainWindow.EBP)if(gEBMainWindow.EBP.ebBW&&gEBMainWindow.EBP.ebBW.checked)EBG.BWDetection.speed=gEBMainWindow.EBP.ebBW.speed,EBG.BWDetection.checked=!0;else if(gEBMainWindow.EBP.BW&&gEBMainWindow.EBP.BW.checked)EBG.BWDetection.speed=gEBMainWindow.EBP.BW.speed,EBG.BWDetection.checked=!0;if(c.pckAssets){var b=0,d;for(d in c.pckAssets)c.pckAssets.hasOwnProperty(d)&&b++;if(0<b&&!EBG.BWDetection.checked)c.bwApplied=!0,EBG.BWDetection.init();c.BWD=EBG.BWDetection}}catch(e){if(a.ffs.CFF_DataPipeErrors||
a.ffs.CFF_DataPipeAllErrors){c="_initAd";d="none";if(e.stack)d=e.stack.match(/((.*)@|at(.*)).*:(\d+:\d+)/),d.length=5,c=d[2]||d[3],d=d[4];a.ffs.CFF_DataPipeAllErrors&&this._dpm.enableSend();this._dpm.send(EBG.DataProfile.ERROR,{errmsg:e.message,errfunc:c,errpos:d})}}},_getAdClass:function(a){var b;switch(a.tn){case EBG.adTypes.Image:b=EBG.Ads.ImageEx;break;case EBG.adTypes.RichBannerHtml5:b=EBG.Ads.RichBannerHtml5;break;case EBG.adTypes.PoliteBannerHtml5:b=EBG.Ads.PoliteBannerHtml5;break;case EBG.adTypes.SEBannerHtml5:b=
EBG.Ads.SEBannerHtml5;break;case EBG.adTypes.ExpBannerHtml5:b=EBG.Ads.ExpBannerHtml5;break;case EBG.adTypes.StdBannerHtml5:b=EBG.Ads.StdBannerHtml5;break;case EBG.adTypes.StdBanner:b=a.IABBV||a.IABEV?EBG.Ads.StdBannerEx:EBG.Ads.StdBanner;break;case EBG.adTypes.Banner:b=EBG.Ads.RichBanner;break;case EBG.adTypes.SingleExpBanner:b=EBG.Ads.SingleExpBanner;break;case EBG.adTypes.ExpBanner:b=EBG.Ads.ExpBanner;break;case EBG.adTypes.VisibilityAd:b=EBG.Ads.VisibilityAd;break;case EBG.adTypes.FloatingAd:b=
EBG.Ads.Floating;break;case EBG.adTypes.FloatingAdWithRem:b=EBG.Ads.FloatingWithReminder;break;case EBG.adTypes.TrackingAd:b=EBG.Ads.TrackingAd;break;case EBG.adTypes.WallpaperAd:b=EBG.Ads.WallpaperAd}return b},_updateAdConfig:function(a){var b=a.adConfig;b.sHost=window.sHost;b.nonSecureResourcePath=window.ebNSRP;EBG.serverResponses[b.uid]||(EBG.serverResponses[b.uid]=a);b.placeHolderId=a.phid;b.sUrlTokens=a.ut;if(a.element_id)b.element_id=a.element_id;var c=EBG.adaptor.getPageWin();if(c=EBG.getPageUrl(c))b.ebReferrer=
c;b.html5supported=a.html5Enabled;b.useHtmlConvertor=b.html5supported&&window.ebUseHtml5;b.autolina=a.autolina||0;if(b.autolina&&EBG.AutolinaClass)try{EBG.Autolina=new EBG.AutolinaClass}catch(d){}b.preloadCustomScript=window.ebAdCS;b.actualServingMode=EBG.adaptor.serving?EBG.adaptor.serving.detectServingMode(!0):null;if(a.ffs.CFF_RemoveUivz)EBG.adaptor.focused=b.focused?b.focused:EBG.adaptor.focused;if(a.ffs.CFF_ServingMode)b.displayWin=EBG.adaptor.getDisplayWin(),b.pageWin=EBG.adaptor.getPageWin();
b._interactionServer=a.is||"BurstingPipe";b._interactionPipe=EBG.combinePaths(EBG.protocol+a.bs,b._interactionServer+"/adServer.bs?cn=int&iv=2&int=");b._interactionsStrPipe=EBG.combinePaths(EBG.protocol+a.bs,b._interactionServer+"/adServer.bs?cn=int&iv=2&interactionsStr=");if(b.expandDynamic)b.showSinglePanel=1;if(!b.clickTrackingUrls)b.clickTrackingUrls=[];if(a.ncu)b.clickTrackingUrls.push(a.ncu),b.ncu=a.ncu;if(!b.defaultImpTrackingUrls)b.defaultImpTrackingUrls=[],b.defaultClickTrackingUrls=[];if(a.dctu)b.defaultClickTrackingUrls=
a.dctu;if(a.ditu)b.defaultImpTrackingUrls=a.ditu;b.delayedImpParams=a.delayedImpParams;b.impressionTrackingURLs=[];if(a.itu&&0<a.itu.length)b.impressionTrackingURLs=a.itu;window.gEbBAd&&(gEbBAd.playRS&&gEbBAd.playRS.strNUrl&&b.impressionTrackingURLs.push(gEbBAd.playRS.strNUrl),gEbBAd.strNImpUrl&&b.impressionTrackingURLs.push(gEbBAd.strNImpUrl));b.imageOnly=!1;b.page=escape(a.p.replace(/\~|\^|\|/ig,"_"));b.massVersioning={targetAudienceId:a.ta&&"-1"!=a.ta?a.ta:"",deliveryGroupId:a.dg&&"-1"!=a.dg?a.dg:
"",subDeliveryGroupId:a.sdg&&"-1"!=a.sdg?a.sdg:"",adVersions:a.av||"",defaultAdVersion:a.avd||"",adBasePath:a.abp||"",massVersionFolderDivider:a.mvfd||0,versionTargetAudienceId:a.tav&&"-1"!=a.tav?a.tav:"",dgTargetAudienceId:a.tadg&&"-1"!=a.tadg?a.tadg:"",originalDeliveryGroupId:a.dgo&&"-1"!=a.dgo?a.dgo:""};if(0<=b.massVersioning.adVersions.indexOf("/")||0<=b.massVersioning.defaultAdVersion.indexOf("/")){if(b.massVersioning.defaultAdVersion)b.massVersioning.defaultAdVersion=JSON.parse(b.massVersioning.defaultAdVersion);
if(b.massVersioning.adVersions)b.massVersioning.adVersionsObject=JSON.parse(b.massVersioning.adVersions),b.massVersioning.adVersions=b.massVersioning.adVersionsObject.v;b.massVersioning.versionFullPath=!0}if(a.soi)b.showOnlyImage=a.soi,b.massVersioning.adVersions=b.massVersioning.defaultAdVersion;if(EBGInfra.isDefinedNotNull(a.diAppId))b.diAppId=a.diAppId;b.reportDelayedImpression=a.rdi||0;b.defaultImageReason=a.dir||"";b.mobileSDK=a.sdk||"";b.isOfflineDemo=EBG.isOfflineDemo;if("undefined"==typeof b.openWindow)b.openWindow=
!0;this._updateAdConfigToHandleOpenWindow(a);b.bigSDir=unescape(ebBigS);b.imagesDir=unescape(ebBigS)+"Res/Images"+a.imgv+"/";b.arrOnStartDnlEvents=a.osde;b.arrOnPlayEvents=a.ope;b.isGeoStrict=0!=a.igs?1:0;b.geoData=a.geo?a.geo:{};c=a.oo||0;EBG.adaptor.optOut=b.optOut=window.gEbFOptOut||c;EBG.adaptor.histLen=b.histLen=a.hl||30;b.sPublisherPlacementId=a.ppi||"";b.width=b.width||"";b.height=b.height||"";if(b.isInstream&&b.ffs.CFF_ResponsiveInstream)b.originalWidth=b.width,b.originalHeight=b.height,b.width=
"",b.height="";b.adHtmlOptions?(b.width=a.adw||b.width,b.height=a.adh||b.height,b.defaultWidth=a.w||b.width,b.defaultHeight=a.h||b.height,b.adaptiveAd=!0):(b.width=a.w||b.width,b.height=a.h||b.height);b.shouldCollectUrl=a.cu||0;b.sID=a.sid||"";b.dlm=a.dlm||3;b.testImp=!!a.t;b.usercookie=a.usercookie||"";b.visibility={};c=b.visibility;c.mode=EBG.VisibilityMode.DEFAULT_MODE;if(a.IABEV||a.insVis)c.mode=EBG.VisibilityMode.ENHANCED_MODE;else if(a.IABBV)c.mode=EBG.VisibilityMode.BASIC_MODE;c.iabMinSurface=
a.IABMS;c.iabMinDuration=a.IABMD;c.agencyMinSurface=a.AgMS;c.agencyMinDuration=a.AgMD;c.advertiserMinSurface=a.AdMS;c.advertiserMinDuration=a.AdMD;c.iabMinLargeSurface=30;c.iabMinLargeDuration=a.IABMD;b.isInstreamVisibility=!!a.insVis;b.isInstreamVerification=!!a.insVer;b.displayVerification=!!a.disVer;b.mmAuctionId=a.mmac;b.mmAdvertiserId=a.mmad;b.ffs.CFF_MMIntegration&&c.mode!=EBG.VisibilityMode.DEFAULT_MODE&&b.mmAdvertiserId&&b.mmAuctionId&&EBG.adaptor.loadModule("MMInt",b,this._initMMIntegration,
b);if(b.panels){c=!1;1==EBG.adaptor.getObjKeys(b.panels).length&&(c=!0);for(var e in b.panels)if(b.panels.hasOwnProperty(e))b.panels[e].visibilityIntEnabled=c}if(e=b.interactionsToReport)if(e[EBG.Interactions.SystemInts.AD_START]=EBG.Interactions.SystemInts.AD_START,e[EBG.Interactions.SystemInts.AD_STACKING]=EBG.Interactions.SystemInts.AD_STACKING,e[EBG.Interactions.SystemInts.MULTI_BURN]=EBG.Interactions.SystemInts.MULTI_BURN,e[EBG.Interactions.SystemInts.AD_COLLISION]=EBG.Interactions.SystemInts.AD_COLLISION,
e[EBG.Interactions.SystemInts.AD_CAROUSEL]=EBG.Interactions.SystemInts.AD_CAROUSEL,e.visibility&&(e[EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE]=EBG.Interactions.SystemInts.VISIBILITY_RECORDABLE,e[EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE]=EBG.Interactions.SystemInts.VISIBILITY_AGENCY_RECORDABLE,e[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_RECORDABLE,e[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER,
e[EBG.Interactions.SystemInts.VISIBILITY_AGENCY]=EBG.Interactions.SystemInts.VISIBILITY_AGENCY,e[EBG.Interactions.SystemInts.VISIBILITY_IAB]=EBG.Interactions.SystemInts.VISIBILITY_IAB,e[EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION]=EBG.Interactions.SystemInts.VISIBILITY_ADVERTISER_DURATION,e[EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION]=EBG.Interactions.SystemInts.VISIBILITY_AGENCY_DURATION,e[EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE]=EBG.Interactions.SystemInts.VISIBILITY_AVG_AD_SURFACE,
!EBG.adaptor.isInApp()))e[EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE]=EBG.Interactions.SystemInts.VISIBILITY_AVG_SCREEN_SHARE;b.adParamsEnabled=b.displayVerification||b.isInstreamVerification||!!a.ap;b.playerParamsEnabled=b.isInstreamVerification||!!a.pp;b.verUrlEnabled=b.isInstreamVerification||!!a.verUrl;if(b.defaultFlashName&&!b.defaultFlashPath)b.defaultFlashPath=b.imagesDir+"BannerAssets/"+b.defaultFlashName;b.offsetX=a.offsetX||0;b.offsetY=a.offsetY||0;b.adChoice={};b.adChoice.certificationProgram=
a.AcCP;b.adChoice.customUrl=a.CAcURL;b.adChoice.includeMarker=b.AcIncludeMarker;b.adChoice.iconPosition=parseInt(b.AcIconPosition);if(a.wm)b.wmode=a.wm.toLowerCase();if(!b.pushDownConfig&&"none"!=a.disp)b.display=a.disp||"inline";b.disableAutoExpand=a.dex||0;b.aiE=a.aiE||{};b.appPool=a.appPool||"BurstingPipe";b.interactionServer=a.is||"BurstingPipe";b.advertiserId=a.advid;b.moduleInfo=a.h5mi||{};try{if(window.gEbBAd){if(gEbBAd.panelsWMode)b.panelsWMode=gEbBAd.panelsWMode;if(gEbBAd.strWmode)b.wmode=
gEbBAd.strWmode.toLowerCase()}}catch(g){}if(EBG.adaptor.isSafeFrame()){b.isSafeFrame=!0;b.expandDynamic=0;for(var f in b.panels){e=b.panels[f];try{var h=$sf.ext.geom();if(e.posType==EBG.PanelPositionType.PAGE_RELATIVE_PERCENTAGE||e.posType==EBG.PanelPositionType.VIEWPORT_RELATIVE_PERCENTAGE)e.xPos=Math.round((h.win.w-e.width)*(e.xPos/100)),e.yPos=Math.round((h.win.h-e.height)*(e.yPos/100));e.posType!=EBG.PanelPositionType.BANNER_RELATIVE_PIXELS&&(e.xPos-=h.self.l,e.yPos-=h.self.t)}catch(k){e.xPos=
0,e.yPos=0}e.posType=EBG.PanelPositionType.BANNER_RELATIVE_PIXELS}}if(EBG.adaptor.isAMP())b.isAMP=!0,b.expandDynamic=0;if(EBG.adaptor.isSkype()&&(b.isSkype=!0,!a.ffs.CFF_SkypeDynamic))b.expandDynamic=0;b.isInApp=EBG.adaptor.isInApp();b.locationPolling=this._setLocationPolling(b.locationPolling)},_setLocationPolling:function(a){0<a?(a=Math.min(a,100),a=Math.max(a,10)):a=0;return a},_updateAdConfigToHandleOpenWindow:function(a){var b=a.adConfig;b.bsPath=b.dataCapture=a.bs;b.pluId=EBG.pluId;b.protocol=
EBG.protocol;if(EBGInfra.isDefined(a.lid))b.lineId=a.lid;b.isPreview=!!a.pr},_sendInitialDataPipeData:function(a){var b=a.adConfig;this._dpm=EBG.dataPipeMgr.getPipe(b.sID);this._dpm.send(EBG.DataProfile.GENERAL,{adid:b.adId,time:+new Date});this._dpm.send(EBG.DataProfile.PLATFORM,{os:EBG.adaptor.browser._platform,brsrc:EBG.adaptor.browser._browserCode,brsrv:EBG.adaptor.browser._browserVer,brsrt:EBG.adaptor.browser._browserType,env:EBG.adaptor.browser.getEnvironment()});EBG.adaptor.isSkype()&&this._dpm.send(EBG.DataProfile.PLATFORM,
{skype:1});this._dpm.send(EBG.DataProfile.VISIBILITY,{wvsb:~~(b.isInstreamVisibility||b.visibility.mode!=EBG.VisibilityMode.DEFAULT_MODE),wvrf:~~(b.isInstreamVerification||b.displayVerification)});b.mmAuctionId&&b.mmAdvertiserId&&this._dpm.send(EBG.DataProfile.VISIBILITY,{mmac:b.mmAuctionId,mmad:b.mmAdvertiserId});b=window&&window.location&&window.location.href?window.location.href.substr(0,50):"";this._dpm.send(EBG.DataProfile.SERVING,{url:b});if(a.ffs&&a.ffs.CFF_VVAncestorOrigins&&window.location.ancestorOrigins&&
EBG.isFunc(window.URL)&&(a=window.location.ancestorOrigins,0<a.length)){for(var a=Math.min(3,a.length),b="",c=0;c<a;c++)b+="null"==location.ancestorOrigins[c]?"null":(new URL(location.ancestorOrigins[c])).hostname,c+1<a&&(b+="$");b=b.substr(0,74);this._dpm.send(EBG.DataProfile.SERVING,{aorg:b})}}};
try{var currentResponse=EBG.Initializer.initialize();if(currentResponse.adConfig.UiVz&&!currentResponse.requiresIframeBust&&(currentResponse.IABBV||currentResponse.IABEV)&&!EBG.adaptor.isSafeFrame()&&"Visibility"!=currentResponse.tn){var vizClone=EBG.cloneObj(currentResponse);vizClone.tn=vizClone.adConfig.templateName="Visibility";vizClone.ifrm=2;vizClone.soi=0;ebOArr[ebOArr.length]=vizClone;var newEbSrc=ebSrc.replace(currentResponse.tn,vizClone.tn),newEbSrc=newEbSrc.replace(/ex(debug|_api|)\.js/ig,
".js"),newScript=document.createElement("SCRIPT");newScript.src=newEbSrc;vizClone.ebSrc=newEbSrc;if(currentResponse.adConfig.adStarted){var target=document.getElementById(vizClone.phid);target&&target.appendChild(newScript)}else{var sub=new EBG.Events.EventSubscription(EBG.Events.EventNames.AD_START,function(){var a=document.getElementById(vizClone.phid);a&&a.appendChild(newScript)},this);sub.timing=EBG.Events.EventTiming.ONTIME;EBG.eventMgr.subscribeToEvent(sub)}}}catch(e$$110){};
