// Copyright TagMan Ltd 2012: T 3.00 V tags/tm-3.1.1 C Fri Feb 17 20:54:09 2012
//
// Copyright © 2012 TagMan. All rights reserved. V tags/tm-3.1.1 R 7292 C 2011-07-21 14:52:34
(function(i,m){function k(a,b,d){if(arguments.length<2){c.util.log("`account` and `id` arguments are required","error");for(var e in this)delete this[e]}else{d=d||{};this.param=d.param||{};this.account=a;this.id=this.baseId=b;this.tags=[];this._setOptions(d);this.host=this.host.replace(/^(?:https?:)?\/\//i,"");this.log=new c.Log(c.logOptions||d.log);this.log.container=this;if(d.tags){if(d.tags instanceof c.Tag)d.tags=[d.tags];this.addTags.apply(this,d.tags)}(this.debugMode=d.debugMode||false)&&this.log.setDebugMode();
d.statRate&&this.log.setStatTypeRate("container",d.statRate);if(!d.waitTest)c.waitLatency=c.POLL_INTERVAL;this.blockCalls=0}}function s(){c.doTags(c.position.WINDOW_LOADED)}var B=function(){return true},o=i.document;o.head||o.getElementsByTagName("head");var v,c=i.TMAN||(i.TMAN={});c.version=3.1;c.startTime||(c.startTime=new Date);c.blockingTime=0;c.currentPosition=0;c.syncSafe=false;c._secure=location.protocol=="https:";c.MAX_BLOCK_CALLS=100;c.getPageLoadTime=function(){return new Date-c.startTime};
c.waitTest||(c.waitTest=false);c.isTimedOut=function(){return false};c.POLL_INTERVAL=c.POLL_INTERVAL||100;c.MAX_COOKIE_LENGTH=4E3;if(!c.util)c.util={elements:0,K:function(a){return a},extend:function(a,b){for(var d in b)a[d]=b[d];return a},isInIframe:function(){return i.top!=i?1:0},createImage:function(a){(new Image).src=a},append:function(a,b){if(!a.id)a.id="tmap_"+c.util.elements++;if(b){var d=c.load.onLoad;if("onreadystatechange"in a)a.onreadystatechange=function(){if(a.readyState==="complete"||
a.readyState==="loaded"){a.onload=a.onerror=a.onreadystatechange=null;d.call(a,true)}};a.onload=function(){d.call(a,true)};a.onerror=function(){d.call(a,false)};b.url||(b.url=a.src||a.data);b.id||(b.id=a.id);a.tagman={};a.tagman.handle=c.load.start(b);a.tagman.errorOK=b.errorOK?true:false;if(b.tag&&b.tag instanceof c.Tag)a.tagman.tag=b.handle;b.element=a}if(o.body)if(c.client.isBodyAppendSafe())o.body.appendChild(a);else{var e="TMAN_"+c.position.getName(c.currentPosition);e=o.getElementById(e)||o.getElementById("TMAN_BOTTOM_BODY");
if(!e){e=o.getElementsByTagName("div");if(e.length>0)e=e[e.length-1];else if(a.nodeName=="SCRIPT")e=o.getElementsByTagName("script")[0].parentNode;else return false}e.insertBefore(a,null)}else{e=o.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}return a.id},appendIframe:function(a,b,d){var e=o.createElement("iframe");if(b){e.width="18px";e.height="18px"}else{e.width="0";e.height="0"}e.style.cssText="position:absolute;left:-999em;top:0";e.src=a;return c.util.append(e,d)},appendObject:function(a,
b){var d=o.createElement("object");d.width=d.height=1;d.style.display="none";d.data=a;return c.util.append(d,b)},appendDiv:function(a,b){if(!a){c.util.log("id compulsary for call to appendDiv, request ignored","error");return false}var d=o.createElement("div");d.id=a;if(b)d.innerHTML=b;else d.style.display="none";return c.util.append(d)},appendCSS:function(a){var b=o.getElementsByTagName("head")[0];if(!a||!b)return false;var d=o.createElement("link");d.id="tmcss_"+c.util.elements++;d.rel="stylesheet";
d.type="text/css";d.href=a;d.media="screen";b.appendChild(d);return d.id},appendScript:function(a,b,d){var e=o.createElement("script");if(b)e.text=a;else e.src=a;return c.util.append(e,d)},log:function(a,b){if(typeof c._containers!="undefined"&&c._containers[0]&&c.Log&&c._containers[0].log instanceof c.Log)c._containers[0].log.error(a,b||"warning");else if((c.util.cookie("tmDebug")!==null||location.host==="127.0.0.1"||location.protocol==="file:")&&typeof console==="object"&&console.log)console.log("TagMan Init ["+
b+"]:"+a)},getUID:function(){function a(){for(var b="",d=16;d--;)b+="abcdef0123456789".charAt(Math.floor(Math.random()*16));return b}c.uid=a();return a}(),getProtocol:function(){return location.protocol==="https:"?"https://":"http://"},appendImage:function(a,b){var d=o.createElement("img");d.src=a;d.style.width=d.style.height=1;d.style.cssText="position:absolute;left:-999em;top:0;border:0;";return c.util.append(d,b)},killById:function(a){c.util.log("attempting to kill id "+a,"debug");if(!c.client.canKill())return false;
try{var b=o.getElementById(a),d="src data text".split(" "),e=0,f,h;if(!b){c.util.log("element "+a+" not found, unable to kill","error");return false}for(;f=d[e++];)if(f in b||e==d.length){if((h=c.client[f+"Replacement"](b))!==false){c.util.log("****** killById("+a+") - setting "+f+" of "+b.nodeName+" to "+h,"debug");b[f]=h}return true}}catch(g){c.util.log("error attempting to kill id "+a+":"+g.message,"debug")}c.util.log("***** removing node from dom: "+a+" / "+b.nodeNamei,"debug");b.parentNode&&
b.parentNode.removeChild(b);return true},decode:function(a){return decodeURIComponent(a)},encode:function(a){return encodeURIComponent(a)},writeImage:function(a,b,d,e){if(c.isDomReady&&!c.syncSafe){c.util.log("ignoring unsafe attempt to document.write image ["+a+"]","error");return false}var f="tmim_"+c.util.elements++;b='<img id="'+f+'" src="'+a+'" width="'+(b||1)+'" height="'+(d||1)+'" border="0"'+(b?"":' style="position:absolute;top:0;left:-999em"');if(e){b+=" onload=\"TMAN.load.onLoadById('"+
f+"', true);\" onerror=\"TMAN.load.onLoadById('"+f+"', false);\" />";e.url=a;e.id=f;c.load.start(e)}else b+=" />";c.util.log("writing "+f+": ["+a+"]","debug");o.write(b);return f},writeJS:function(a,b){return c.util.writeScript(a,!b)},writeScript:function(a,b,d){if(c.isDomReady&&!c.syncSafe){c.util.log("ignoring unsafe attempt to document.write script [ "+a+" ]","error");return false}var e="tmjs_"+ +c.util.elements++;c.util.log("writing "+e+": ["+a+"]","debug");var f='<script id="'+e+'"';if(b)f+=
">"+a;else{f+=' src="'+a+'"';if(d){f+=" onload=\"TMAN.load.onLoadById('"+e+"', true);\" onerror=\"TMAN.load.onLoadById('"+e+"', false);\">";d.url=a;d.id=e;c.load.start(d)}else f+=">"}f+="<\/script>";o.write(f);return e},ghostwriteScript:function(a,b,d){var e=o.createElement("script");e.type="text/deferscript";if(b)e.text=a;else e.defersrc=a;if(d&&d.onLoad)e.done=d.onLoad;return c.util.append(e)},writeIframe:function(a,b,d){if(!c.syncSafe){c.util.log("ignoring attempt to document.write iframe ["+a+
"] after dom ready","error");return false}var e="tmif_"+c.util.elements++,f='<iframe id="'+e+'" src="'+a+'" style="position:absolute;top:0;left:-999em" ';f+=b?'width="18px" height="18px"':'width="0" height="0"';if(d){f+=" onload=\"TMAN.load.onLoadById('"+e+"', true);\" onerror=\"TMAN.load.onLoadById('"+e+"', false);\">";d.url=a;d.id=e;c.load.start(d)}else f+=">";c.util.log("writing "+e+": ["+a+"]","debug");o.write(f+"</iframe>");return e},parseKeyValue:function(a,b,d,e){b=RegExp("([^=]+?)=([^"+b+
"]*?)(?:"+b+"\\s*|$)","g");var f={},h;e=d?e||c.util.decode:c.util.K;if(a.charAt(0)==="?")a=a.slice(1);for(;h=b.exec(a);){d=e(h[1]);h=e(h[2]);if(f[d]){if(typeof f[d]==="string")f[d]=[f[d]];f[d].push(h)}else f[d]=h}return f},setKeyValue:function(a,b,d,e,f,h){h=f?h||c.util.encode:c.util.K;d=h(b)+"="+h(d);a=a.replace(RegExp("(^|"+e+"\\s*|\\?)"+h(b)+"=[^"+e+"]*?("+e+"\\s*|$)","g"),function(g,q,n){return q+d+n});return a.indexOf(d)<0?a+e+d:a},forEach:function(){function a(h,g){for(var q in this)b.call(this,
q)&&h.call(g,this[q],q,this)}var b={}.hasOwnProperty,d="hasOwnProperty.isPrototypeOf.propertyIsEnumerable.toLocaleString.toString.valueOf".split("."),e=d.length,f;for(f in{toString:true})if(f==="toString")return a;return function(h,g){a.call(this,h,g);for(var q=0,n;q<e;++q)if(b.call(this,n=d[q]))h.call(g,this[n],n,this)}}(),cookie:function(a,b,d){if((a+b).length>c.MAX_COOKIE_LENGTH)if(a.length>c.MAX_COOKIE_LENGTH){c.util.log("key exceeds "+c.MAX_COOKIE_LENGTH+" chars, unable to set: "+a,"warning");
return false}else{c.util.log("attempt to set/get cookie "+a+"beyond"+c.MAX_COOKIE_LENGTH+" chars"+b,"warning");b=b.substr(0,c.MAX_COOKIE_LENGTH-a.length)}if(arguments.length>1&&(b===null||typeof b!=="object")){d=c.util.extend({},d);if(b===null)d.expires=-1;if(typeof d.expires==="number"){var e=d.expires,f=d.expires=new Date;f.setDate(f.getDate()+e)}return o.cookie=[encodeURIComponent(a),"=",d.raw?String(b):encodeURIComponent(String(b)),d.expires?"; expires="+d.expires.toUTCString():"",d.path?"; path="+
d.path:"",d.domain?"; domain="+d.domain:"",d.secure?"; secure":""].join("")}d=b||{};f=d.raw?function(h){return h}:decodeURIComponent;return(e=RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)").exec(o.cookie))?f(e[1]):null},scramble:function(a){if(a==null)return null;if(a.length==0)return a;for(var b=[1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d="",e="4!\"#$1&'()*+,-./0123456789:2<3>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}".split(d),
f=a.length,h=0;h<f;h++){var g=(a.charAt(h).charCodeAt(0)+h+62)%94;if(b[g])d+="%";d+=e[g]}return d},unscramble:function(a){if(a==null)return null;if(a.length==0)return a;for(var b=0,d="",e=a.length,f=0,h;f<e;f++){h=a.charAt(f);if(h=="%"){f++;h=a.charAt(f);if(h=="4")h=" ";else if(h=="3")h="=";else if(h=="2")h=";";else if(h=="1")h="%";else{f--;continue}}d+=String.fromCharCode((156+h.charCodeAt(0)-b++%94)%94+32)}return d},loadScriptOnce:function(a,b,d){b=b||{};if(c.load.isLoadedByURL(a)){typeof b.onLoad===
"function"&&b.onLoad(true);return true}else if(c.load.isLoadingByURL(a)){if(typeof b.onLoad==="function"||typeof b.onError==="function"){d=c.load.getElementHandlerByURL(a);typeof b.onLoad==="function"&&d._addOnLoad(b.onLoad)}return false}else if(c.load.isDeadByURL(a))if(typeof b.error==="function"){b.onError();return false}b.url=a;if(d)c.client.useDelayedWrite()?c.hack.addDelayedWrite(function(){c.util.writeScript(a,false,b)},true):c.util.writeScript(a,false,b);else c.util.appendScript(a,false,b)},
isBody:function(){return o.body||o.getElementsByTagName("head")[0]},preCacheScript:function(a,b){b=b||{};if(c.load.isLoadedByURL(a)){typeof b.onLoad==="function"&&b.onLoad(true);return true}else if(c.load.isLoadingByURL(a)){var d=c.load.getElementHandlerByURL(a);typeof b.onLoad==="function"&&d._addOnLoad(b.onLoad);return false}else if(c.load.isDeadByURL(a))return false;if(typeof c.client.preCacheType!=="function")return false;else{if(!c.util.isBody()&&!c.client.canHeadPrecache)return false;b.url=
a;b.errorOK=true;return c.util["append"+(c.client.preCacheType()==="object"?"Object":"Image")](a,b)}},arrayIndexOf:function(a,b){if(typeof a==="object"&&a.length)if(typeof a.indexOf==="function")return a.indexOf(b);else for(var d=a.length;d--;)if(a[d]===b)return d;return-1}};this.TMAN||(this.TMAN={});if(!c.date)c.date=function(){function a(b,d){var e=new Date,f=d?"getUTC":"get";e=new Date(e[f+"FullYear"](),e[f+"Month"](),e[f+"Date"]()+(b||0));return d?new Date(e-e.getTimezoneOffset()*6E4):e}return{today:function(b){return a(b)},
todayUTC:function(b){return a(b,true)}}}();this.JSON||(JSON={});(function(){function a(p){return p<10?"0"+p:p}function b(p){f.lastIndex=0;return f.test(p)?'"'+p.replace(f,function(x){var l=q[x];return typeof l==="string"?l:"\\u"+("0000"+x.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+p+'"'}function d(p,x){var l,r,w,E,A=h,D,j=x[p];if(j&&typeof j==="object"&&typeof j.toJSON==="function")j=j.toJSON(p);if(typeof n==="function")j=n.call(x,p,j);switch(typeof j){case "string":return b(j);case "number":return isFinite(j)?
String(j):"null";case "boolean":case "null":return String(j);case "object":if(!j)return"null";h+=g;D=[];if(Object.prototype.toString.apply(j)==="[object Array]"){E=j.length;for(l=0;l<E;l+=1)D[l]=d(l,j)||"null";w=D.length===0?"[]":h?"[\n"+h+D.join(",\n"+h)+"\n"+A+"]":"["+D.join(",")+"]";h=A;return w}if(n&&typeof n==="object"){E=n.length;for(l=0;l<E;l+=1)if(typeof n[l]==="string"){r=n[l];if(w=d(r,j))D.push(b(r)+(h?": ":":")+w)}}else for(r in j)if(Object.prototype.hasOwnProperty.call(j,r))if(w=d(r,j))D.push(b(r)+
(h?": ":":")+w);w=D.length===0?"{}":h?"{\n"+h+D.join(",\n"+h)+"\n"+A+"}":"{"+D.join(",")+"}";h=A;return w}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,g,q={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;if(typeof JSON.stringify!=="function")JSON.stringify=function(p,x,l){var r;g=h="";if(typeof l==="number")for(r=0;r<l;r+=1)g+=" ";else if(typeof l==="string")g=l;if((n=x)&&typeof x!=="function"&&(typeof x!=="object"||typeof x.length!=="number"))throw Error("JSON.stringify");return d("",
{"":p})};if(typeof JSON.parse!=="function")JSON.parse=function(p,x){function l(w,E){var A,D,j=w[E];if(j&&typeof j==="object")for(A in j)if(Object.prototype.hasOwnProperty.call(j,A)){D=l(j,A);if(D!==m)j[A]=D;else delete j[A]}return x.call(w,E,j)}var r;p=String(p);e.lastIndex=0;if(e.test(p))p=p.replace(e,function(w){return"\\u"+("0000"+w.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(p.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){r=eval("("+p+")");return typeof x==="function"?l({"":r},""):r}throw new SyntaxError("JSON.parse");}})();c.POLL_INTERVAL||(c.POLL_INTERVAL=100);c.ElementHandler=function(a){if(!a||!a.url||!a.id){c.util.log("ElementHandler expects url & id options","Error");return false}this.url=a.url;this.elementId=a.id;this.element=a.element;var b=this;this.startTime=+new Date;this.timeOut=a.timeOut||false;this.tag=a.tag||m;this.timeOut&&this._addShouldKill(function(){return b.getTime()>=
b.timeOut});typeof a.shouldKill=="function"&&this._addShouldKill(a.shouldKill);typeof a.onLoad=="function"&&this._addOnLoad(a.onLoad);this.shouldPoll()&&c.load.startPolling()};c.ElementHandler.prototype={_finish:function(a){if(!this.endTime){this.endTime=+new Date;this.loaded=a||false;typeof this._onLoad==="function"&&this._onLoad(a);this._shouldKill=false;c.load.finishedLoading(this)}},shouldPoll:function(){return typeof this._shouldKill=="function"||c.client.useReadyState()},poll:function(){if(!this.element&&
this.elementId)try{this.element=o.getElementById(this.elementId)}catch(a){}if(this.element&&c.client.useReadyState())if(this.element.readyState&&this.element.readyState!="loading"&&this.element.readyState!=="uninitialized")this._finish(this.element.readyState=="complete"||this.element.readyState=="loaded");!this.endTime&&typeof this._shouldKill=="function"&&this._shouldKill()&&this.kill()},getTime:function(){return(this.endTime||+new Date)-this.startTime},_shouldKill:false,kill:function(){if(!this.endTime){c.util.killById(this.elementId);
this.shouldKill=false;this._finish(false)}},_addOnLoad:function(a){typeof a!=="function"&&c.util.log("_addOnLoad requires function received "+typeof a);if(this._onLoad){var b=this._onLoad;this._onLoad=function(d){b(d);a.call(this,d)};return true}else this._onLoad=a},_addShouldKill:function(a){if(typeof this._shouldKill=="function"){var b=this._shouldKill;this._shouldKill=function(){return b.call(this)||a.call(this)}}else this._shouldKill=a}};c.load=function(){function a(g){for(var q=d.slice(),n=q.length,
p=false;n&&n--;){q[n].poll();p=true}!g&&!p&&c.load.stopPolling();return p}function b(g,q,n){if(typeof q!="object")if(typeof d=="object"&&typeof e=="object")return b(g,d,n)||b(g,e,n);else{c.util.logError("TNAN.load._done,_queue are not arrays","critical");return false}for(var p=q.length;p&p--;)if(g&&q[p].url==g||n&&q[p].elementId==n)return q[p];return false}var d=[],e=[],f=false,h=false;return{start:function(g){if(!g)return false;g=new c.ElementHandler(g);d.push(g);return g},startPolling:function(){if(!h){f=
setInterval(a,c.POLL_INTERVAL);h=true}return true},stopPolling:function(){if(h){for(var g=d.length;g--;)if(d[g].shouldPoll())return false;h=false;f=!!clearInterval(f)}return true},isPolling:function(){return f!==false},getElementHandlerByURL:function(g,q){return b(g,q,false)},getElementHandlerById:function(g,q){return b(0,q,g)},finishedLoading:function(g){g||c.util.log("loadElement not supplied to finishedLoading","error");e.push(g);d.splice(c.util.arrayIndexOf(d,g),1);h&&c.load.stopPolling()},isLoadingByURL:function(g){c.load.poll(true);
return c.load.getElementHandlerByURL(g,d)?true:false},isLoadedByURL:function(g){c.load.poll(true);if(g=c.load.getElementHandlerByURL(g,e))return g.loaded;return false},getLoadTimeByURL:function(g){if(g=c.load.getElementHandlerByURL(g,e))return g.getTime();return false},getLoadTimeById:function(g){if(g=c.load.getElementHandlerById(g,e))return g.getTime();return false},isDeadByURL:function(g){if(g=c.load.getElementHandlerByURL(g,e))return!g.loaded;return false},isDeadById:function(g){if(g=c.load.getElementHandlerById(0,
e,g))return!g.loaded;return false},isLoadingById:function(g){c.load.poll(true);return c.load.getElementHandlerById(g,d)?true:false},isLoadedById:function(g){c.load.poll(true);return(g=c.load.getElementHandlerById(g,e))&&g.loaded||false},onLoadById:function(g,q){var n=c.load.getElementHandlerById(g);if(n){n._finish(q);return true}return false},onLoadByURL:function(g,q){var n=c.load.getElementHandlerByURL(g);if(n){n._finish(q);return true}return false},onLoad:function(g){if(this===i){c.util.log("onLoad expects to be called in element context, use call(this,success)",
"error");return false}this.tagman.handle.endTime||this.tagman.handle._finish(g||this.tagman.errorOK)},reset:function(){d=[];e=[];c.load.stopPolling()},poll:a}}();c.remoteLogURL=(location.protocol==="file:"?"http:":"")+"//stats.tagman.com/";c.Log=function(a){this._options=a||(a={});var b=a.logRate||(a.isConsoleDebug?{debug:0,info:100,warning:0,error:100,fatal:100}:{}),d,e=this._messageTypes.length;for(this._doLogging={};e--;){d=this._messageTypes[e];this._doLogging[d]=this._level(b[d])}this._throwErrors=
a.throwErrors||a.isConsoleDebug?{debug:false,info:false,warning:false,error:true,fatal:true}:{};b=a.statRate||{};this._doStats={};for(e=this._statTypes.length;e--;){d=this._statTypes[e];this._doStats[d]=this._level(b[d])}this._logContainerStart=a.quietMode?false:true;this.writeRemotely()};c.Log.prototype={_messageTypes:["debug","info","warning","error","fatal"],_statTypes:["tag","container","parameter"],_level:function(a){a=a||0;var b;b=a?a===100?true:c.num.doSample(a)?true:false:false;return{sampleRate:a,
display:b}},displayOut:(c.util.cookie("tmDebug")!==null||location.host==="127.0.0.1")&&typeof console==="object"&&console.log,setLogLevelRate:function(a,b){if(typeof a==="undefined"||typeof b==="undefined")this.error("level and rate must be defined","error");else this._doLogging[a]=this._level(b)},setStatTypeRate:function(a,b){if(typeof a==="undefined"||typeof b==="undefined")this.error("type and rate must be defined","error");else this._doStats[a]=this._level(b)},writeRemotely:function(){var a,b;
for(a in this._doStats)if(this._doStats[a].sampleRate){b=true;break}this.writeRemotely=!!(!this.isConsoleDebug&&c.remoteLogURL&&b)},getLogging:function(a){return this._doLogging[a.toLowerCase()].display},getLogRate:function(a){return this._doLogging[a.toLowerCase()].sampleRate},getStats:function(a){return this._doStats[a.toLowerCase()].display},getStatsRate:function(a){return a&&(a=a.toLowerCase())in this._doStats?this._doStats[a].sampleRate:0},setDebugMode:function(){for(var a,b=this._messageTypes.length;b--;){a=
this._messageTypes[b];this._doLogging[a]=this._level(100)}this.displayOut=typeof console!=="undefined"&&console.log?true:false;this.writeRemotely=false;return true},_write:function(a,b){b=b?b.toLowerCase():this._messageTypes[0];var d="TagMan("+b+"):[ "+a+" ]";if(this.getLogging(b)){this.displayOut&&this.display(d);this.writeRemotely&&this.remoteWrite({lv:c.util.arrayIndexOf(this._messageTypes,b),me:a,sr:this.getLogRate(b)},"lm")}return d},display:function(a){this.displayOut&&console.log(decodeURIComponent(a))},
remoteWrite:function(a,b){if(!this.writeRemotely||!a)return false;this.containerStart();a.id=a.id||c.uid;a.ac=a.ac||this.container.account;a.po=typeof a.po!=="undefined"?a.po:c.currentPosition;var d=c.remoteLogURL+b+"?"+c.String.objectToQuery(a);c.util.appendImage(d);return d},message:function(a,b){this._write(a,b)},error:function(a,b){var d=this._write(a,b);if(this._throwErrors[b.toLowerCase()])throw Error(d);},containerStart:function(a){if(!this._logContainerStart)return false;this._logContainerStart=
false;a=a||this._options||{};for(var b=0,d=0,e;e=this._statTypes[d++];)b=Math.max(b,this.getStatsRate(e));a={rf:a.rf||location.href,sp:a.sp||c.currentPosition,as:a.as||this.container.async?1:0,bi:a.bi||this.container.baseId,ci:a.ci||this.container.id,br:a.br||c.client.getBrowser(),os:a.os||c.client.getOS(),sr:a.sr||b,lp:a.lp||this.container.isLandingPageDisabled()?1:0};this.writeRemotely?this.display(this.remoteWrite(a,"cs").substr(c.remoteLogURL.length)):this.display(c.String.objectToQuery(a));return true},
tagEnd:function(a){if(a&&!(a instanceof c.Tag))a=this.container.getTagById(a);!a instanceof c.Tag&&this.error("tagEnd required a TMAN.Tag or valid Id");if(this.getStats("tag")){a={ti:a.id,tb:a.loadTime(),tl:c.isTimedOut()?"p":this.container.isTimedOut()?"c":a.isTimedOut()?"t":a.isRunOnceActive()?"r":m,sr:this.getStatsRate("tag")};this.writeRemotely?this.display(this.remoteWrite(a,"te").substr(c.remoteLogURL.length)):this.display(c.String.objectToQuery(a))}},containerEnd:function(a){a=a||{};for(var b=
"",d="",e=this.container.tags.length,f;e--;){f=this.container.tags[e];if(f.isExecuted())b+=","+f.id;else d+=","+f.id}a={sr:a.sr||this.getStatsRate("container"),tl:a.tl||b.substr(1),tk:a.tk||d.substr(1),bt:a.cb||c.blockingTime,tp:a.tp||c.getPageLoadTime(),bc:a.bc||this.container.blockCalls,wl:a.wl||c.waitLatency||m};this.writeRemotely?this.display(this.remoteWrite(a,"ce").substr(c.remoteLogURL.length)):this.display(c.String.objectToQuery(a))},containerParams:function(){for(var a in this.container.param);
this.getStatsRate("container");this.writeRemotely?this.display(this.remoteWrite(this.container.param,"cp")):this.display(c.String.objectToQuery(this.container.param));return false}};v=c.storage=function(){function a(j){return{get:function(t,u){var C=j.getItem(e+t);return!C?null:(C=w(C.toString()),C.expiry<=new Date)?this.remove(t):C[u?l:r]},set:function(t,u,C){if(u===null)return this.remove(t);j.setItem(e+t,E({expiry:b(C||f),data:u}));return u},remove:function(t){j.removeItem(e+t);return null},clear:function(){for(var t=
0,u=RegExp("^"+e),C;t<j.length;)if(u.test(C=j.key(t)))j.removeItem(C);else t++}}}function b(j){return typeof j=="number"?(new Date).getTime()+(j|0)*1E3:j instanceof Date?j.getTime():(new Date).getTime()+f*1E3}var d,e="__test",f=1800,h,g="localStorage globalStorage userData cookies".split(" "),q=0,n,p,x=location.hostname,l="expiry",r="data",w=JSON.parse,E=JSON.stringify,A={get:function(j,t){return d.get(j,t)},set:function(j,t,u){return d.set(j,t,u)},remove:function(j){return d.remove(j)},clear:function(){return d.clear()},
getExpiry:function(j){return!arguments.length?f:d.get(j,true)},setExpiry:function(j,t){var u;if(arguments.length===2)return(u=this.get(j))!==null?this.set(j,u,t):u;if(arguments.length===1)f=A._expiry=j|0},store:function(j,t,u){if(t===null)return this.remove(j);if(arguments.length==1)return this.get(j);if(arguments.length>1)return this.set(j,t,u)},setType:function(j){var t=g.join(",");if(j&&t.indexOf(j)>-1&&j in A&&h!=j){d=A[this._type=h=j];d.init&&d.init();return true}return false},getType:function(){return h},
_prefix:e,_expiry:f,cookies:{get:function(j,t){var u=o.cookie.match(RegExp("(?:^|; )"+e+j+"=([^;]+)"));return u&&w(decodeURIComponent(u[1]))[t?l:r]||null},set:function(j,t,u){if(t===null)u=-1E9;u=b(u||f);j=[e+j+"="+encodeURIComponent(E({expiry:u,data:t})),"path=/"];j.push("expires="+(new Date(u)).toUTCString());o.cookie=j.join("; ");return t},remove:function(j){return this.set(j,null)},clear:function(){for(var j=o.cookie.split(";"),t,u=0,C=RegExp("(?:^| )"+e+"([^ =;]+)=([^;]+)");t=j[u++];)if(t=t.match(C))this.remove(t[1])}}};
for(;q<2&&(n=g[q++]);)try{p=n=="globalStorage"?i[n][x+(x.indexOf(".")<0?".localdomain":"")]:i[n];if(p.getItem&&p.setItem&&p.removeItem)A[n]=a(p)}catch(D){}if(o.documentElement.addBehavior)A.userData=function(){var j,t,u=function(y){return y.replace(/[^0-9a-zA-Z-_.]+/g,"-")},C=function(){j.setAttribute("tman-keys",E(t));j.save("tman-keys")};return{init:function(){var y=o.head||o.getElementsByTagName("head")[0]||o.documentElement;j=this._element=o.createElement("div");j.addBehavior("#default#userdata");
j.style.display="none";y.insertBefore(j,y.firstChild);j.load("tman-keys");t=(y=j.getAttribute("tman-keys"))&&w(y)||{}},set:function(y,M,J){if(M===null)return this.remove(y);j.setAttribute(y=u(y),E({expiry:b(J||f),data:M}));t[y]=1;C();return M},get:function(y,M){var J=j.getAttribute(y=u(y));return!J?null:(J=w(J),J.expiry<=new Date)?this.remove(y):J[M?l:r]},remove:function(y){j.removeAttribute(y=u(y));delete t[y];C();return null},clear:function(y){for(y in t){j.removeAttribute(y);delete t[y]}C()},save:C,
_suffix:""}}();for(q=0;n=g[q++];)if(A.setType(n))break;return A}();c.session={_isActive:{},isActive:function(a,b,d){return typeof c.session._isActive[a]==="boolean"?c.session._isActive[a]:c.session._isActive[a]=c.session.setSession(a,b,d)},setSession:function(a,b,d){if(!b||!d)return false;var e="TMLA_"+a,f=v.get(e);v.set(e,Math.floor(d/1E3));return c.session._isActive[a]=!(!f||b+f<new Date/1E3)},_getSession:function(a,b){var d=v.get("TMLA_"+a);return!(!d||b+d<new Date/1E3)}};if(!c.String){c.String=
function(a){this.value=a};c.String.prototype={replaceIfMatch:function(a,b){var d=this.value.match(a);if(!d){this.value="";return this}d=d[0];if(!b){this.value=d;return this}this.value=d.replace(a,b);return this},replace:function(a,b){this.value=this.value.replace(a,b);return this},toString:function(){return this.value},callIfMatch:function(a){for(var b=1,d=arguments.length;b<d;b++)if(this.value.match(arguments[b]))return a()}};c.String.escape=function(a){return escape(a).replace(/\//g,"%2F")};c.String.doubleEscape=
function(a,b){var d=c.String.escape(c.String.escape(a));return b?d.replace(RegExp("^(.{1,"+b+"})(?:%25.*|$)"),"$1"):d};c.String.getParam=function(a,b){return a&&b&&c.util.parseKeyValue(a,"&",false)[b]};c.String.setParam=function(a,b,d){var e=c.util.parseKeyValue(a||"?","&",false);e[b]=d;return(a.charAt(0)==="?"?"?":"")+c.String.objectToQuery(e)};c.String.objectToQuery=function(a){typeof a!="object"&&c.util.log("objectToQuery not passed object: "+a,"debug");var b=[],d;for(d in a)b.push("&",encodeURIComponent(d),
"=",encodeURIComponent(a[d]));return b.slice(1).join("")};c.String.queryToObject=function(a){return c.util.parseKeyValue(a||"?","&",true)};c.String.subString=function(a,b,d){var e="".substr;return d?e.call(a||"",b,d):e.call(a||"",b)};c.String.regEx=function(a,b){if(a&&b){var d=RegExp(b).exec(a);if(d){d.splice(0,1);return d.join("")}}return""};c.String.isFound=function(a,b){if(a&&b)return a.indexOf(b)==-1?0:1;return 0};c.String.printR=function(a,b){var d=[],e=Array(b?++b:b=1).join("\t");if(a==null)d.push(e,
a===null?"null":"undefined","<br>");else switch(typeof a){case "function":case "string":a=(""+a).replace(/</g,"&lt;").replace(/(\r\n|\n|\r)/g,"$1"+e);case "boolean":case "number":d.push(e,a,"<br>");break;default:if(a.length){d.push(e,"ArrayObject<br>");for(var f=0,h=a.length;f<h;++f)d.push(e,"[",f,"] ",c.String.printR(a[f],b).toString().replace(/^\s+/,""),"<br>")}else{d.push(e,a.name||"Generic"," Object<br>");for(f in a)d.push(e,"['",f,"'] ",c.String.printR(a[f],b).toString().replace(/^\s+/,""),"<br>")}}return d.join("").replace(/<br><br>/g,
"<br>")};c.String.getStem=function(a,b){if(a&&b){var d="";b=","+b+",";for(var e=a.split("/"),f=e.length*-1,h=0;h<e.length;h+=1){if(b.indexOf(","+h+",")>-1||b.indexOf(","+f+",")>-1){if(d)d+="/";d+=e[h]}f+=1}return d}};c.String.trim=function(a){a=a.replace(/^\s\s*/,"");for(var b=/\s/,d=a.length;b.test(a.charAt(--d)););return a.slice(0,d+1)}}if(typeof c=="undefined")c={};c.StringBuilder=function(){function a(){}var b=Array.prototype.join;a.prototype={constructor:a,length:0,push:Array.prototype.push,
append:Array.prototype.push,size:function(){return this.toString().length},toString:function(){return b.call(this,"")}};return a}();if(!c.num)c.num={getCacheBuster:function(a){return(Math.random()+"").substr(2,a)},doSample:function(a){return(Math.random()*100<=(a||0))>>0}};(function(){function a(l){if((l=b(l))&&l.innerHTML)try{Function(l.innerHTML)()}catch(r){LEVU.LE('Error in `evaluateScript`. Script contents: "'+l.innerHTML+'"',"Error")}}function b(l){for(var r=o.getElementsByTagName("script"),
w=r.length;w--;)if(r[w].src.indexOf("/"+l)>-1)return r[w];return""}function d(l){var r=b(l);if(r){var w=r.src.indexOf("/"+l+"?");if(w>-1)return r.src.substr(w+l.length+2)}return""}function e(l,r){if(!c.syncSafe){c.util.log("Attempt to added delayed write when not syncSafe: "+l,"error");return false}if(!c.client.useDelayedWrite()){if(!l){c.util.log("addDelayedWrite called without code argument","error");return}typeof l==="function"?c.util.writeScript("("+l.toString()+")();",true):c.util.writeScript(l,
true);return true}r?n.unshift(l):n.push(l);c.util.log("Adding to "+(r?"start":"end")+" of delayed write queue of size ("+n.length+" inc) : "+l.toString(),"debug");f();return true}function f(){if(n.length&&!p){c.util.log("delayed write block "+x+" inserted","debug");var l=c.util.getProtocol(),r;if(l==="file://")l="http://127.0.0.1";else{r=l==="https://"?q:g;l=l+r}typeof LEVU=="undefined"?c.util.writeJS(l+"/js/TMAN.hack.WDW.js",1):c.util.writeJS(l+"/js/LEVU.WDW.xjs",1);p=true}}function h(){p=false;
var l=n.length,r;if(n.length){r=n.shift();c.util.log("delayed write executing block "+x++ +" : "+r.toString(),"debug");typeof r==="function"?r():c.util.writeScript(r,true)}l>1&&f()}var g="res.levexis.com",q="sec.levexis.com",n=[],p=false,x=1;if(!c.hack)c.hack={evalScript:a,findScript:b,getScriptParams:d,addDelayedWrite:e,initDelayedWrite:f,writeDelayedWrite:h,WDW:h}})();var K=function(){var a=function(){};a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},
context:{},render:function(b,d,e,f){if(!f){this.context=d;this.buffer=[]}if(!this.includes("",b))if(f)return b;else{this.send(b);return}b=this.render_pragmas(b);b=this.render_section(b,d,e);if(f)return this.render_tags(b,d,e,f);this.render_tags(b,d,e,f)},send:function(b){b!=""&&this.buffer.push(b)},render_pragmas:function(b){if(!this.includes("%",b))return b;var d=this;return b.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag),function(e,f,h){if(!d.pragmas_implemented[f])throw{message:"This implementation of mustache doesn't understand the '"+
f+"' pragma"};d.pragmas[f]={};if(h){e=h.split("=");d.pragmas[f][e[0]]=e[1]}return""})},render_partial:function(b,d,e){b=this.trim(b);if(!e||e[b]===m)throw{message:"unknown_partial '"+b+"'"};if(typeof d[b]!="object")return this.render(e[b],d,e,true);return this.render(e[b],d[b],e,true)},render_section:function(b,d,e){if(!this.includes("#",b)&&!this.includes("^",b))return b;var f=this;return b.replace(RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+
"\\s*","mg"),function(h,g,q,n){h=f.find(q,d);if(g=="^")return!h||f.is_array(h)&&h.length===0?f.render(n,d,e,true):"";else if(g=="#")return f.is_array(h)?f.map(h,function(p){return f.render(n,f.create_context(p),e,true)}).join(""):f.is_object(h)?f.render(n,f.create_context(h),e,true):typeof h==="function"?h.call(d,n,function(p){return f.render(p,d,e,true)}):h?f.render(n,d,e,true):""})},render_tags:function(b,d,e,f){var h=this,g=function(){return RegExp(h.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+h.ctag+
"+","g")},q=g(),n=function(x,l,r){switch(l){case "!":return"";case "=":h.set_delimiters(r);q=g();return"";case ">":return h.render_partial(r,d,e);case "{":return h.find(r,d);default:return h.escape(h.find(r,d))}};b=b.split("\n");for(var p=0;p<b.length;p++){b[p]=b[p].replace(q,n,this);f||this.send(b[p])}if(f)return b.join("\n")},set_delimiters:function(b){b=b.split(" ");this.otag=this.escape_regex(b[0]);this.ctag=this.escape_regex(b[1])},escape_regex:function(b){if(!arguments.callee.sRE)arguments.callee.sRE=
RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return b.replace(arguments.callee.sRE,"\\$1")},find:function(b,d){b=this.trim(b);var e;if(d[b]===false||d[b]===0||d[b])e=d[b];else if(this.context[b]===false||this.context[b]===0||this.context[b])e=this.context[b];if(typeof e==="function")return e.apply(d);if(e!==m)return e;return""},includes:function(b,d){return d.indexOf(this.otag+b)!=-1},escape:function(b){b=String(b===null?"":b);return b.replace(/&(?!\w+;)|["'<>\\]/g,function(d){switch(d){case "&":return"&amp;";
case "\\":return"\\\\";case '"':return"&quot;";case "'":return"&#39;";case "<":return"&lt;";case ">":return"&gt;";default:return d}})},create_context:function(b){if(this.is_object(b))return b;else{var d=".";if(this.pragmas["IMPLICIT-ITERATOR"])d=this.pragmas["IMPLICIT-ITERATOR"].iterator;var e={};e[d]=b;return e}},is_object:function(b){return b&&typeof b=="object"},is_array:function(b){return Object.prototype.toString.call(b)==="[object Array]"},trim:function(b){return b.replace(/^\s*|\s*$/g,"")},
map:function(b,d){if(typeof b.map=="function")return b.map(d);else{for(var e=[],f=b.length,h=0;h<f;h++)e.push(d(b[h]));return e}}};return{name:"mustache.js",version:"0.3.1-dev",to_html:function(b,d,e,f){var h=new a;if(f)h.send=f;h.render(b,d,e);if(!f)return h.buffer.join("\n")}}}();this.TMAN=this.TMAN||{};c.onDomReady=c.onDomReady||function(){function a(q){e?q():f.push(q)}function b(){if(!e){e=true;if(c.conf&&c.conf.param)c.conf.param.tmdom=1;for(clearInterval(g);f.length;)f.shift()();if(typeof h.readyState!==
"string")h.readyState="complete"}}function d(){/^(?:loaded|complete)$/i.test(h.readyState)&&b()}var e=false,f=[],h=o,g=0;a.isReady=function(){return e};switch(true){case !!h.addEventListener:h.addEventListener("DOMContentLoaded",b,false);i.addEventListener("load",b,false);h.addEventListener("readystatechange",d,false);break;case !!h.attachEvent:h.attachEvent("onreadystatechange",d,false);i.attachEvent("onload",b,false);case i.frameElement==null&&!+"\u000b1":g=setInterval(function(){try{h.documentElement.doScroll("left")}catch(q){return}b()},
15)}g||(g=setInterval(d,c.POLL_INTERVAL||100));c.isDomReady=false;a(function(){c.isDomReady=true});return a}();c.session={_isActive:{},isActive:function(a,b,d){return typeof c.session._isActive[a]==="boolean"?c.session._isActive[a]:c.session._isActive[a]=c.session.setSession(a,b,d)},setSession:function(a,b,d){if(!b||!d)return false;var e="TMLA_"+a,f=v.get(e);v.set(e,Math.floor(d/1E3));return c.session._isActive[a]=!(!f||b+f<new Date/1E3)},_getSession:function(a,b){var d=v.get("TMLA_"+a);return!(!d||
b+d<new Date/1E3)}};c.conf={host:"gslb.tagman.com",async:false,tagsBlockingTimeout:0,sessionTimeout:0,bootstrap:true,enableJSCall:true,campaign:true,serverCall:"",landingPageContainer:false,storageType:"local",version:2.5,cdn:"res.levexis.com",waitService:"wt.tagman.com",statRate:0,statPosition:32};k.prototype={_setOptions:function(a){this._setOptionsFromDefault("async bootstrap campaign cdn enableJSCall host landingPageContainer serverCall sessionTimeout statPosition statRate storageType tagsBlockingTimeout version waitService".split(" "),
a,c.conf)},_setOptionsFromDefault:function(a,b,d){for(var e=0,f;f=a[e++];)this[f]=f in b?b[f]:d[f]},addTags:function(){Array.prototype.push.apply(this.tags,arguments);for(var a=0,b;b=arguments[a++];){b.account=this.account;b.container=this;if(b.requiredScripts.length&&b.async&&!b.executeRequiredScripts){this.log.error("async scripts must execute required scripts, setting flag for tag "+b.id+" to execute","warning");b.executeRequiredScripts=true}if(c._secure!==b.secure){b.setTimedOut("security");this.log.error("tag + "+
b.id+" timed out as TMAN._secure ("+c._secure+") does not match tag.secure ("+b.secure+").","warning")}}},addParams:function(a){for(var b in a)this.param[b]=a[b]},getParams:function(){return this.param},getTagById:function(a){for(var b=this.tags.length;b--;)if(this.tags[b].id==a)return this.tags[b]},isTimedOut:function(){if(this.tagsBlockingTimeout)return c.blockingTime>=this.tagsBlockingTimeout;return false},isLandingPageDisabled:function(){return!!(this.landingPageContainer&&c.session.isActive(this.account))},
setSession:function(){return c.session.setSession(this.account,this.sessionTimeout,this.initTime)},isActive:function(){return c.session.isActive(this.account,this.sessionTimeout,this.initTime)},_performServerCall:function(){return false},fetchTagDefinitions:function(a,b){c.tagLibrary.fetchTagDefinitions(this.account,a,b)},initTagsFromMapping:function(){c.tagLibrary.initTagsFromMapping(this.account)},getHighestTagId:function(){return c.tagLibrary.getHighestTagId(this.account)}};c.Container=k;c._containers=
[];c.addContainer=function(a){if(arguments.length>2&&!(arguments[0]instanceof c.Container))a=new c.Container(arguments[0],arguments[1],arguments[2]);if(!a instanceof c.Container){c.util.log("container not passed to addContainer","fatal");return false}else if(c.getContainerByName(a.account)){c.util.log("container already exists for "+a.account,"fatal");return false}c._containers.push(a);a.initTime=+new Date;a.storageType==="cookie"&&v.setType("cookies");a.log.containerStart();a.setSession();if(a.campaign&&
typeof c.Track==="function")a.track=new c.Track(a,a.options);if(typeof c.tm2initialise==="function"){c.tm2initialise(a);c.tm2initialise=null}else a.serverCall&&a._performServerCall();return true};c.addParams=function(a,b){c.getContainerByName(a).addParams(b)};c.getParams=function(a){if(!a){c.util.log("TMAN.getParams requires a container or container name","error");return false}if(typeof a==="string")a=c.getContainerByName(a);if(!a){c.util.log("Container does not exist. Can't retrieve params for it.",
"error");return false}return a.param};c.doTags=function(a,b){var d=c.currentPosition<a;c.currentPosition=a;c.syncSafe=typeof b=="boolean"?b?false:true:c.isDomReady?false:true;for(var e=0,f=c._containers.length;e<f;e++)if(c._containers[e].isLandingPageDisabled())c._containers[e].log.error("doTags("+a+") disabled due to landing page","info");else if(c._containers[e].isTimedOut()){c._containers[e].log.error("doTags("+a+") disabled due to container blocking timeout","info");c.currentPosition===c._containers[e].statPosition&&
c._containers[e].log.containerEnd()}else{c.currentPosition===c._containers[e].statPosition&&c._containers[e].log.containerEnd();var h=c._containers[e].tags;c.util.log("running doTags for "+c._containers[e].account+" @ position "+a+" (syncSafe = "+c.syncSafe+")","debug");for(var g=h.length;g&&g--;){h[g].preloadResources();if(h[g].movable)h[g].position<=a&&h[g].execute();else h[g].position==a&&h[g].execute()}}if(d){d="TMAN.doTags("+c.currentPosition+","+(c.syncSafe?"false":"true")+");";c.syncSafe?c.hack.addDelayedWrite(d):
setTimeout(d,c.POLL_INTERVAL*2)}else c.syncSafe&&c.hack.addDelayedWrite("TMAN.syncSafe = false;");return true};c.getContainerByName=function(a){for(var b=c._containers.length;b--;)if(c._containers[b].account===a)return c._containers[b]};c.getParam=function(a,b){if(arguments.length<2){c.util.log("TMAN.getParam requires 2 parameters","error");return false}if(typeof b==="string")b=c.getContainerByName(b);if(!b instanceof c.Container){c.util.log("Container does not exist. Can't retrieve param for it.",
"error");return false}return(typeof b.param[a]==="function"?b.param[a]():b.param[a])||""};c.addParam=function(a,b){if(!c._containers||!c._containers[0]instanceof c.Container)return false;var d={};d[a]=b;c._containers[0].addParams(d);return true};c.reset=function(){c._containers=[];c.load.reset();c.blockingTime=0};c.position={PRE_HEAD:0,TOP_HEAD:1,BOTTOM_HEAD:2,TOP_BODY:3,BOTTOM_BODY:31,DOM_COMPLETE:32,WINDOW_LOADED:33,END:64};c.position.getName=function(a){for(var b in c.position)if(c.position[b]==
a)return b;return false};if(i.addEventListener)i.addEventListener("load",s,false);else i.attachEvent&&i.attachEvent("onload",s);c.POLL_INTERVAL||(c.POLL_INTERVAL=100);c.Tag=function(a,b){if(arguments.length<1)c.util.log("`code` argument is required","error");else{b||(b={});this.id=b.id||c.getTagId();this.code=a;this.position=typeof b.position!=="undefined"?b.position:0;this.async="async"in b?b.async:false;this.movable="movable"in b?b.movable:true;this.canExecute=typeof b.canExecute==="undefined"?
B:typeof b.canExecute==="function"?b.canExecute:function(){return b.canExecute};this.timeout=typeof b.timeout!="undefined"?b.timeout:0;this.pageLoadTimeout=b.pageLoadTimeout||false;if(typeof b.secure=="undefined")this.secure=location.protocol=="https:";else if(typeof b.secure!="boolean"){c.util.log("TAG.secure should be a boolean for id "+this.id,"error");this.secure=b.secure=="false"?false:true}else this.secure=b.secure;if("runOnce"in b)this.runOnce=typeof b.runOnce==="number"?new Date+b.runOnce*
1E3:c.date.today(1);this.executeRequiredScripts="executeRequiredScripts"in b?b.executeRequiredScripts:false;this.requiredScripts=b.requiredScripts&&(this.executeRequiredScripts||c.client.canPrecache(c.position.TOP_HEAD))?typeof b.requiredScripts!=="object"?[b.requiredScripts]:b.requiredScripts:[];this._requiredScriptsLoadResults={};this._loaded=this._executed=false}};c.getTagId=function(a){return function(){if(a>125){c.util.logError("getTagId reached 125 ascii limit, specify id on new tag","error");
return""}return String.fromCharCode(a++)}}(65);c.Tag.prototype={logError:function(a,b){if(this.container&&this.container.log)this.container.log.error(a,b);else if(c.util&&c.util.log)c.util.log(a,b);else return false;return true},execute:function(){this.checkTimedOut("page");if(!(this.isExecuted()||this.isTimedOut()))if(!this.async&&this.container.isTimedOut()){this.setTimedOut("container");this.logError("container timedout tag (id: "+this.id+")","debug")}else if(this.canExecute())if(!this.async&&
!c.syncSafe)this.logError("Aborting attempt to execute sync tag ("+this.id+") when not safe.","warning");else if(this.isReadyToExecute())if(this.isRunOnceActive())this.logError("runOnce tag (id: "+this.id+") ignored as timeout not expired.","message");else{this.starttimeoutTimer();this.logError("Executing tag (id: "+this.id+")","debug");this._injectTag();this._executed=true;this.runOnce&&this.setRunOnceActive();this.async&&this.logFinished()}else{if(!this.async&&c.client.canWait())if(this.timeout!=
0)c.blockTag(this.id,this.account);else this.movable?this.logError("tag "+this.id+" not ready to execute, movable so reattempt later","debug"):this.setTimedOut("tag")}else this.logError("canExecute not satisfied for tag (id: "+this.id+")","debug")},logFinished:function(){var a=new Date;this._executionTime=this.startTime?a-this.startTime:0;this.logError(this.id+" end time "+a.getTime(),"debug");c.blockingTime+=this._executionTime;this.container.log.tagEnd(this)},starttimeoutTimer:function(){if(this.timeout&&
!this._timedOut===m){var a=this;this._timedOut=false;this.logError("Starting timer of ("+this.timeout+"ms) for tag (id: "+this.id+")","debug");setTimeout(function(){this._executed||a.logError("Timer alarm and tag "+a.id+" not yet executed","debug");a.setTimedOut()},this.timeout)}},setStartTime:function(){if(!("startTime"in this)){this.startTime=+new Date;this.logError(this.id+" start time "+this.startTime,"debug")}},_injectTag:function(){if(this.async)c.util.appendScript(this.getCode(),true);else{var a=
this.getCode();this.startTime||(a="TMAN.getTag('"+this.id+"','"+this.container.account+"').setStartTime();"+a);if(c.String.trim(a).substr(-1)!=";")a+=";";a+="\n";a+="TMAN.hack.addDelayedWrite( \"TMAN.getTag('"+this.id+"','"+this.container.account+"').logFinished();\",true);";c.hack.addDelayedWrite(a,true)}},getCode:function(){var a=this.account;return this.code.replace(/\{\{(.*?)\}\}/g,function(b,d){return c.getParam(d,a)})},isExecuted:function(){return this._executed},checkTimedOut:function(){if(this._timedOut)return true;
else if(this._executed)return false;if((!this.timeOutType||this.timeOutType=="page")&&this.pageLoadTimeout&&c.getPageLoadTime()>this.pageLoadTimeout)this.setTimedOut("page");else if((!this.timeOutType||this.timeOutType=="tag")&&this.timeout!==false)this.getElapsed()>this.timeout&&this.setTimedOut("tag");return this._timedOut||false},isTimedOut:function(){return this._timedOut||false},getElapsed:function(){if(!this.startTime)return 0;if(!this._executed&&!this._timedOut)this._executionTime=new Date-
this.startTime;return this._executionTime},setTimedOut:function(a){this._timedOut=true;this._timeoutType=this._timeoutType||a||"tag";if(!this.isExecuted()){this.logError("Tag "+this.id+" timed out ("+this._timeoutType+") after "+this.getElapsed()+"ms","warning");this.logFinished();c.load.poll(true)}},isReadyToExecute:function(){for(var a=this.requiredScripts.length;a&&a--;)if(!this._requiredScriptsLoadResults[this.requiredScripts[a]])return false;return true},_getTagRunOnceUID:function(){return"TMRO_"+
this.container.account+this.id},setRunOnceActive:function(){this.runOnce&&v.set(this._getTagrunOnceUID(),{LR:+new Date})},isRunOnceActive:function(){if(!this.runOnce)return false;var a=v.get(this._getTagRunOnceUID());if(!a)return false;return new Date-a.LR<this.runOnce},preloadResources:function(){if(!(!this.requiredScripts.length||this.startedPreload||!this.executeRequiredScripts&&(this.async||!c.client.canPrecache(c.currentPosition)))){this.startedPreload=true;for(var a=this.requiredScripts.length;a--;)this.preloadResource(this.requiredScripts[a])}},
preloadResource:function(a){var b;this._requiredScriptsLoadResults[a]=false;if(this.executeRequiredScripts){this.logError("preloading ["+a+"] for tag "+this.id+" at pos "+c.currentPosition,"debug");b=c.util.loadScriptOnce}else{this.logError("precaching ["+a+"] for tag "+this.id+" at pos "+c.currentPosition,"debug");b=c.util.preCacheScript}b(a,{tag:this,onLoad:function(d){c.util.log("onload call for "+this.url+":"+this.tag.id+" (success: "+d+")");if(!(this instanceof c.ElementHandler))throw Error("oops wrong context");
if(d){this.tag.logError("Loaded ["+this.url+"] for tag "+this.tag.id,"debug");this.tag._requiredScriptsLoadResults[this.url]=true;if(c.client.isExecSafeOnload()||this.tag.async)this.tag.execute()}},shouldKill:function(){return this.tag?this.tag.checkTimedOut():this.checkTimedOut()},onError:function(){return this.tag?this.tag.SetTimedOut("error"):this.SetTimedOut("error")}},!this.async&&this.position<=c.currentPosition&&this.timeout===false)},isRequiredScriptLoaded:function(a){c.load.poll(true);return this._requiredScriptsLoadResults[a]?
true:false},loadTime:function(){var a=+new Date-this.startTime;return isNaN(a)?0:a}};c._tags=[];c.addTag=function(a,b){if(arguments.length<2){c.util.log("`containerName` and `tag` arguments are required","error");return false}var d=c.getContainerByName(a);if(!d){c.util.log("Container "+a+" does not exist. Can't add tag.","error");return false}d.addTags(b);b.requiredScripts.length>0&&b.preloadResources();return true};c.onDomReady(function(){c.doTags(c.position.DOM_COMPLETE)});c.blockTag=function(){var a=
(o.location.protocol==="https:"?"https":"http")+"://{{waitservice}}/wait/{{delay}}/0/{{uid}}_{{id}}",b=c.POLL_INTERVAL;return function(d,e,f){function h(){var x=new Date-p,l=b-c.waitLatency<0?0:b-c.waitLatency;c.waitLatency=x-l;f.logError("Blocked for "+x+" v "+l+" adjusting offset to "+c.waitLatency+" tag("+d+")","debug");c._waiting=false}if(f=c.getTag(d,e)){f.isReadyToExecute()&&f.canExecute()&&f.execute();if(!(f._executed||f.checkTimedOut()||!c.client.canWait())){var g=b-c.waitLatency<0?0:b-c.waitLatency,
q=K.to_html(a,{delay:g,uid:c.num.getCacheBuster(5),id:d,waitservice:f.container.waitService}),n=K.to_html('(function () { TMAN.sycnSafe=true; var Tag = TMAN.getTag(\'{{id}}\', "{{account}}"); if (!Tag.isReadyToExecute() && !Tag.checkTimedOut() ) { Tag.logError("blocking page for tag (id: {{id}}), elapsed " + Tag.getElapsed(),"debug");TMAN.blockTag(\'{{id}}\', "{{account}}");}else {Tag.logError("executing tag id: {{id}}","debug");TMAN.getTag(\'{{id}}\', "{{account}}").execute();TMAN.syncSafe=false;} })();',
{id:d,account:e}),p=+new Date;f.starttimeoutTimer();f.setStartTime();c.load.poll();if(c._waiting)f.logError("Not blocking for Tag + "+f.id+" due to TMAN._waiting. Tag will only be executed by doTags callback in this version which can cause issues with more than 2 accelerated tags at the same position","warning");else{if(f.container.blockCalls++>c.MAX_BLOCK_CALLS){c.getContainerByName(e).log.error("MAX_BLOCK_CALLS ("+f.container.MAX_BLOCK_CALLS+") reached for "+e+" whilst blocking for tag "+d,"fatal");
return false}f.logError("Blocking for tag ("+d+") with delayWithLatencyAdjusted: "+g+", elapsed "+f.getElapsed(),"debug");c._waiting=true;c.util.writeScript(q,false,{timeout:b,shouldKill:function(){return f.isTimedOut()},onLoad:h});c.hack.addDelayedWrite(n,true)}}}else c.util.log("Unable to find tag for blocking ("+d+","+e+")","error")}}();c.getTag=function(a,b){var d=c.getContainerByName(b);if(!d){c.util.log("Container "+b+" does not exist. Can't get tag.","error");return false}d=d.getTagById(a);
if(!d){c.util.log("Tag (id: "+a+") does not exist on this container ("+b+").","error");return false}return d};c.Tag.fromJSON=function(a,b){return this.fromObject(JSON.parse(a),b)};c.Tag.fromObject=function(a,b){var d=a.code;if(a.canExecute&&typeof a.canExecute!=="function")a.canExecute=Function(a.canExecute);if(typeof b!=="undefined")a.position=b;return new c.Tag(d,a)};i.TMAN=i.TMAN||{};c.client=function(){function a(g){e=m;g=(g||navigator.userAgent).toLowerCase();if(g.indexOf("msie")!=-1){d="IE";
if(g=g.match(/\bmsie (\d+\.\d+)/i))e=parseFloat(g[1])}else if(g.indexOf("firefox")!=-1){d="FF";e=g.substr(g.indexOf("firefox")+8,3)}else if(g.indexOf("chrome")>-1)d="CR";else if(g.indexOf("safari")>-1)d="SF";else if(g.indexOf("opera")>-1)d="OP";else{d="OT";return false}return true}function b(g){h=m;g=g||navigator.userAgent;g=g.toLowerCase();if(g.indexOf("windows ca")!=-1)f="WMB";else if(g.indexOf("windows")!=-1)f="WIN";else if(g.indexOf("ipad")!=-1)f="IPA";else if(g.indexOf("ipod")!=-1)f="IPO";else if(g.indexOf("macintosh")!=
-1)f="MAC";else if(g.indexOf("symbian")!=-1)f="SYM";else if(g.indexOf("android")!=-1)f="AND";else if(g.indexOf("linux")!=-1)f="LIN";else{f="OTH";return false}return true}var d,e,f,h;a();b();return{identify:function(g){return a(g)&&b(g)},getBrowserName:function(){return d},getBrowserVersion:function(){return e},getBrowser:function(){return d+(e||"")},getOSName:function(){return f},getOSVersion:function(){return h||""},getOS:function(){return f+(h||"")},canCacheJS:function(){return false},canKill:function(){return d!=
"IE"},canAsyncJS:function(){return!(d=="OP"||d=="IE"||d=="FF"&&e<3.6)},canKillAsyncJS:function(){return false},canKillSyncJS:function(){return false},canPrecache:function(){return d!=="SF"&&(d!="IE"||e>=7)},preCacheType:d==="SF"?false:function(){return d==="OP"||d==="CR"||d==="IE"?"image":"object"},useDelayedWrite:function(){return d==="IE"&&e>=7},useReadyState:function(){return d==="IE"},canWait:function(){return c.waitLatency!==false&&(d!="IE"||e>=7)},isBodyAppendSafe:function(){return d!="IE"},
dataReplacement:function(){if(d=="FF")return"about:blank";return null},srcReplacement:function(g){c.util.log("srcReplacement("+d+") - "+g.nodeName+" / parent = "+g.parentNode.nodeName,"debug");return d=="FF"||d=="IE"&&e>=9?"about:blank":d=="IE"?g.nodeName=="IMG"?!g.parentNode.removeChild(g):false:null},textReplacement:function(){if(d=="FF")return"about:blank";return null},isExecSafeOnload:function(){return false}}}();var L=c,H;a:switch(c.client.getOS()){case "WIN":case "MAC":case "LIN":H=50;break a;
default:H=100}L.POLL_INTERVAL=H;c.Rule=function(a){if(typeof a!="object")throw Error("`options` required for TMAN.Rule");this.likeOR=a.likeOR||[];if(typeof this.likeOR!="object")this.likeOR=[this.likeOR];this.likeAND=a.likeAND||[];if(typeof this.likeOR!="object")this.likeAND=[this.likeAND];this.equals=a.equals||[];if(typeof this.equals!="object")this.equals=[this.equals];this.greaterThan=typeof a.greaterThan!="undefined"?a.greaterThan:false;this.lessThan=typeof a.lessThan!="undefined"?a.lessThan:
false;this.reverseMatch=a.reverseMatch||false};c.Rule.prototype={test:function(a){var b;if(a===null||typeof a=="undefined")c.util.log("`subject` required for TMAN.Rule","error");else{if(this.greaterThan&&a<=this.greaterThan||this.lessThan&&a>=this.lessThan)return this.reverseMatch?true:false;var d=this.equals.length;if(d){for(b=false;d--;)if(a==this.equals[d])b=true;if(!b)return this.reverseMatch?true:false}var e=[this.likeOR,this.likeAND],f=2;for(a=a.toString();f--;)if(d=e[f].length){for(b=false;d--;)if(a.indexOf(e[f][d])>
-1)b=true;else if(f===1)return this.reverseMatch?true:false;if(!b)return this.reverseMatch?true:false}return this.reverseMatch?false:true}}};c.MAX_URL_LENGTH=2E3;c.CONVERSION_PARAMETERS=["levrev","levresdes","levordref"];c.Track=function(a,b){if(a){if(!(a instanceof c.Container))throw Error("container must be a TMAN.Container");this._container=a;this._container.track=this}b||(b={});this.setOptions(b)};c.Track.prototype={setOptions:function(a){for(var b=false,d=["callback","campaignEvent","clientname",
"sessionTimeout","testMode"],e,f=0;e=d[f++];)if(typeof this[e]=="undefined"&&a[e]!="undefined"){this["_"+e]=a[e];b=true}if(typeof this._campaignEvent!=="undefined"){if(!(this._campaignEvent instanceof c.CampaignEvent))throw Error("campaignEvent must be a TMAN.CampaignEvent");}else this._campaignEvent=new c.CampaignEvent;if(this._container){if(typeof this._container.account!=="undefined")this._clientname=this._container.account;if(typeof this._container.sessionTimeout!=="undefined")this._sessionTimeout=
this._container.sessionTimeout}if(typeof this._sessionTimeout==="undefined")this._sessionTimeout=1800;if(!this._clientname)throw Error("must have a clientname (either in options, or from container.account");return b},getCampaignEvent:function(){return this._campaignEvent},setReferrer:function(a){this._campaignEvent.setReferrer(a)},getReferrer:function(){return this._campaignEvent.getReferrer()},getLocation:function(){return this._campaignEvent.getLocation()},setLocation:function(a){this._campaignEvent.setLocation(a)},
setParamsFromQueryString:function(){var a=this._campaignEvent.getLocationParams();return this._campaignEvent.setOptions({campaignId:a.tmcampid,placementRef:a.tmplaceref,clickRef:a.tmclickref,eventType:a.tmad==="i"?c.CampaignEvent.VIEW:a.tmad==="c"?c.CampaignEvent.CLICK:m})},gettmParams:function(){tmParam=i.tmParam;if(typeof tmParam==="undefined")return false;var a={campaignId:tmParam.tmcampid,placementRef:tmParam.tmplaceref,clickRef:tmParam.tmclickref,eventType:tmParam.tmad==="i"?c.CampaignEvent.VIEW:
tmParam.tmad==="c"?c.CampaignEvent.CLICK:m};this._custom=tmParam.tmcustom;for(var b=0;key=c.CONVERSION_PARAMETERS[b++];)if(typeof tmParam[key]!=="undefined"){this["_"+key]=tmParam[key];this._isConversion=true}return this._campaignEvent.setOptions(a)},_getContainerParam:function(a){if(!this._container)throw Error("can't call getContainerParams if you haven't passed a container in the constructor");a=c.getParam(a,this._container);if(a=="")return m;return a},getContainerParams:function(){if(!this._container)throw Error("can't call getContainerParams if you haven't passed a container in the constructor");
var a=this._getContainerParam("tmad");a=a==="i"?c.CampaignEvent.VIEW:a==="c"?c.CampaignEvent.CLICK:m;a={campaignId:this._getContainerParam("tmcampid"),placementRef:this._getContainerParam("tmplaceref"),clickRef:this._getContainerParam("tmclickref"),eventType:a};this._custom=this._getContainerParam("tmcustom");for(var b=0;key=c.CONVERSION_PARAMETERS[b++];){var d=this._getContainerParam(key);if(typeof d!=="undefined"){this["_"+key]=d;this._isConversion=true}}return this._campaignEvent.setOptions(a)},
_setHistory:function(a){var b=false,d=this.getHistory(c.CampaignEvent.CLICK);if(d){a.tmch=d;b=true}if(d=this.getHistory(c.CampaignEvent.VIEW)){a.tmch=d;b=true}return b},settmParams:function(){var a=i.tmParam;if(typeof a==="undefined"){c.util.log("no window.tmParam object","error");return false}var b=false;if(this._campaignEvent.campaignId){a.tmcampid=this._campaignEvent.campaignId;a.tmad=this._campaignEvent.eventType===c.Track.VIEW?"i":"c";if(this._campaignEvent.placementRef)a.tmplaceref=this._campaignEvent.placementRef;
if(this._campaignEvent.clickRef)a.tmclickref=this._campaignEvent.clickRef;b=true}return b=b||this._setHistory(a)},setContainerParams:function(){if(!this._container)throw Error("can't call setContainerParams if you haven't passed a container in the constructor");var a=false;if(this._campaignEvent.campaignId){var b={tmcampid:this._campaignEvent.campaignId,tmad:this._campaignEvent.eventType===c.Track.VIEW?"i":"c"};if(this._campaignEvent.placementRef)b.tmplaceref=this._campaignEvent.placementRef;if(this._campaignEvent.clickRef)b.tmclickref=
this._campaignEvent.clickRef;a=true}(a=a||this._setHistory(b))&&this._container.addParams(b);return a},isConversion:function(){return this._isConversion},getConversionParams:function(){var a,b=0,d;for(d={};a=c.CONVERSION_PARAMETERS[b++];)if(typeof this["_"+a]!=="undefined")d[a]=this["_"+a];return d},sessionActive:function(){if(this._testMode)return false;if(typeof this._clientname==="undefined")return false;return c.session.isActive(this._clientname,this._sessionTimout)},setBaseCampaignRule:function(a){if(!a.execute||
typeof a.execute!=="function")throw Error("base rule does not have an execute method");return this.baseRule=a},callTrackingServer:function(a){if(this.serverCalled)return false;if(!(this._campaignEvent.campaignId||this._isConversion))return false;a=this.getTrackingServerURL(a);if(!a)return false;c.util.appendScript(a.substring(0,c.MAX_URL_LENGTH),false);return this.serverCalled=true},getTrackingServerURL:function(a){if(!a){if(!this._container)throw Error("can't call getTrackingServerURL if you haven't passed a container in the constructor");
a=this._container.serverCall}if(!a){c.util.log("no serverCall specified for the current container","error");return false}var b="_callback"+(new Date).getTime();a=a+"?tracking=1";if(this._campaignEvent.campaignId){a+="&tmcampid="+this._campaignEvent.campaignId+"&tmad="+(this._campaignEvent.eventType===c.Track.VIEW?"i":"c");if(this._campaignEvent.placementRef)a+="&tmplaceref="+encodeURIComponent(this._campaignEvent.placementRef);if(this._campaignEvent.clickRef)a+="&tmclickref="+encodeURIComponent(this._campaignEvent.clickRef)}if(this._isConversion){a+=
"&"+c.String.objectToQuery(this.getConversionParams());var d=this.getHistory(c.CampaignEvent.CLICK);if(d)a+="&tmch="+encodeURIComponent(d);if(d=this.getHistory(c.CampaignEvent.VIEW))a+="&tmvh="+encodeURIComponent(d)}if(this._custom)a+="&tmcustom="+encodeURIComponent(this._custom);var e=this;c.Track[b]=function(f){e._callback&&e._callback(f);e.trackingServerCalled=true;delete c.Track[b]};a+="&jsonp=TMAN.Track."+b;return a},applyCampaignRules:function(){if(this.sessionActive()||!this.baseRule)return false;
return this.baseRule.execute(this._campaignEvent)},testCampaignRules:function(a){if(this.sessionActive()||!this.baseRule)return false;for(var b=new c.CampaignEvent,d=0;d<a.length;d++){var e=a[d];b.setReferrer(e.referrer);b.setLocation(e.location);if(!this.baseRule.execute(b)){this.reason="base rule failed";return false}for(var f in e.expected)if(e.expected[f]!==b[f]){this.reason=e.name+" failed: value of "+f+" expected to be "+e.expected[f]+" but was "+b[f];return false}}return true},initialize:function(){this._isConversion=
false;this.gettmParams();this._container&&this.getContainerParams();this.setParamsFromQueryString();this.applyCampaignRules();if(this._campaignEvent.campaignId){this.addEventToHistory();this.settmParams();this._container&&this.setContainerParams()}return this._campaignEvent.campaignId},tm2bootstrap:function(){this.initialize()},addEventToHistory:function(){if(!this._campaignEvent.campaignId)return false;var a="his:"+this._campaignEvent.eventType+":"+this._clientname,b=c.storage.get(a)||"";if(b)b+=
" ";b+=this._campaignEvent.serialize();c.storage.set(a,b,301536E3);return true},getHistory:function(a){return c.storage.get("his:"+a+":"+this._clientname)||false}};c.landingPageRule=function(a){if(!a)throw Error("options required for TMAN.landingPageRule");if(typeof a!="object")throw Error("options passed to TMAN.landingPageRule is not an object");if(!a.campaignId)throw Error("No campaignId specified for call to TMAN.landingPageRule");this.campaignId=a.campaignId;if(!a.match)throw Error("No match function specified for call to TMAN.landingPageRule");
this.match=a.match;if(!a.rulePriority)a.rulePriority=1;this.rulePriority=a.rulePriority;this.match=a.match;this.clickRef=a.clickRef;this.placementRef=a.placementRef;this.subrules=[]};c.landingPageRule.prototype={addCampaignRule:function(a){if(!(a instanceof c.landingPageRule))throw Error("rule argument must be a TMAN.landingPageRule object");this.subrules.push(a);this.subrules.length>1&&this.subrules.sort(function(b,d){return d.rulePriority-b.rulePriority});return a},execute:function(a){if(!(a instanceof
c.CampaignEvent))throw Error("argument to execute needs to be a TMAN.CampaignEvent");var b=this.match(a);if(!b)return false;b=typeof b==="object"?b:{};a.campaignId=b.campaignId||this.campaignId;a.placementRef=b.placementRef||this.placementRef;a.clickRef=b.clickRef||this.clickRef;a.viewEvent=b.viewEvent||this.viewEvent;for(b=0;b<this.subrules.length;b++)if(this.subrules[b].execute(a))break;return true}};var z=["linkedin","facebook","twitter"];c.landingPageRule.matchSocial=function(a,b){var d=a.getReferrerDomain();
domains=z;b&&domains.push(b);var e="\\.("+domains.join("|")+")\\.";return d.match(RegExp(e))};var G=["google","yahoo","msn","bing","aol","lycos","ask","altavista","live"];c.landingPageRule.matchSEO=function(a,b){var d=a.getReferrerDomain();domains=G;b&&domains.push(b);var e="\\.("+domains.join("|")+")\\.";return d.match(RegExp(e))?{clickRef:d,placementRef:a.getReferrerKeywords()}:false};c.landingPageRule.Test=function(a){if(!a)throw Error("options required for TMAN.landingPageRule.Test");if(typeof a!=
"object")throw Error("options passed to TMAN.landingPageRule.Test is not an object");if(!a.expected)throw Error("No expected specified for call to TMAN.landingPageRule.Test");if(typeof a.expected!="object")throw Error("expected is not an object");this.expected=a.expected;if(!a.name)throw Error("No name specified for call to TMAN.landingPageRule.Test");this.referrer=a.referrer;this.location=a.location;this.name=a.name};c.CampaignEvent=function(a){a||(a={});this.setOptions(a);this.referrer=o.referrer;
this.location=o.location.toString()};c.CampaignEvent.CLICK=0;c.CampaignEvent.VIEW=1;c.CampaignEvent.prototype={setOptions:function(a){for(var b=false,d=["campaignId","placementRef","clickRef","eventType"],e,f=0;e=d[f++];)if(typeof a[e]!=="undefined"){this[e]=a[e];b=true}if(typeof this.eventType==="undefined")this.eventType=c.CampaignEvent.CLICK;return b},setReferrer:function(a){this.referrer=a},getReferrer:function(){return this.referrer},setLocation:function(a){this.location=a},getLocation:function(){return this.location},
getLocationParams:function(a){a=a||this.location;if(!a)return{};a=a.split("?");if(!a.length==2)return{};return c.String.queryToObject(a[1])},getReferrerKeywords:function(a){a=a||this.referrer;if(a=/[?&](q|p|query|encquery|terms|rdata|szukaj|k|qt|qs|wd|text)=([^&]*)/.exec(a))return decodeURIComponent(a[2].replace(/\+/g," "));return""},getReferrerDomain:function(a){return(a=a||this.referrer)?a.replace(/^https?:\/\/([^\/]+)\/.*$/,"$1"):""},serialize:function(){var a=new Date;a=parseInt((a.getTime()+
a.getTimezoneOffset()*6E4)/1E3,10);return[a,this.campaignId,c.util.scramble(this.placementRef||""),c.util.scramble(this.clickRef||"")].join(";")}};LEVU={};LEVU.ABoH=c.util.append;LEVU.AIF=c.util.appendIframe;LEVU.GPR=c.util.getProtocol;LEVU.GP=c.String.getParam;LEVU.SP=c.String.setParam;LEVU.OTQ=c.String.objectToQuery;LEVU.QTO=c.String.queryToObject;LEVU.RX=c.String.regEx;LEVU.SS=c.String.subString;LEVU.FD=c.String.isFound;LEVU.GS=c.String.getStem;LEVU.PR=c.String.printR;LEVU.LES=c.String.lescape;
LEVU.DLE=c.String.doubleLescape;LEVU.WIF=c.util.writeIframe;LEVU.AJS=c.util.appendScript;LEVU.CIm=c.util.createImage;LEVU.LE=c.util.log;LEVU.IIF=c.util.isInIframe;LEVU.WJS=c.util.writeJS;LEVU.PKV=c.util.parseKeyValue;LEVU.SKV=c.util.setKeyValue;LEVU.ES=c.hack.evalScript;LEVU.SQ=c.hack.getScriptParams;LEVU.FS=c.hack.findScript;LEVU.ADW=c.hack.addDelayedWrite;LEVU.IDW=c.hack.initDelayedWrite;LEVU.WDW=c.hack.writeDelayedWrite;LEVU.DS=c.num.doSample;LEVU.GetCB=c.num.getCacheBuster;LEVU.GC=function(a){return c.util.cookie(a)};
LEVU.SC=function(a,b,d,e){c.util.cookie(a,b,{path:d,expires:e})};try{LEVU.ES("lu.js");var F=LEVU.SQ("lu.js");F&&c.util.log("Querystring ["+F+"] found on lu.js, no longer supported","FATAL")}catch(I){c.util.log("Error excuting LEVU.SQ on bootStrap of lu.js","ERROR")}c.DOMQ=function(a){this.el=a||o};c.DOMQ.factory=function(a){for(var b=[],d=0,e=a.length;d<e;d++)b[d]=new c.DOMQ(a[d]);return b};c.DOMQ.prototype={id:function(a){if(!this.el)return this;if(!this.el.getElementById)return o.getElementById(a);
this.el=this.el.getElementById(a);return this},tag:function(a,b){if(!this.el)return this;this.el=this.el.getElementsByTagName(a)[b||0];return this},name:function(a,b){if(!this.el)return this;this.el=this.getElementsByName(a)[b||0];return this},className:function(a,b){if(!this.el)return this;this.el=this.getElementsByClassName(a)[b||0];return this},isAncestor:function(a){var b=this.el;if(b){for(;a;){if(a==b&&a!=b)return true;a=a.parentNode}return false}},getElementsByName:function(a){if(!this.el)return[];
a=o.getElementsByName(a);if(this.el===o)return a;for(var b=[],d=0,e=a.length;d<e;d++)this.isAncestor(a[d])&&b.push(a[d]);return b},getElementsByClassName:function(a){if(!this.el)return[];var b=this.el.getElementsByTagName("*");a=a.replace(/\-/g,"\\-");a=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");for(var d=[],e=0,f=b.length;e<f;e++)a.test(b[e].className)&&d.push(b[e]);return d},match:function(a,b){return(new c.String(this.toString())).match(a,b)},replace:function(a,b){return(new c.String(this.toString())).replace(a,
b)},toString:function(){if(!this.el)return"";return this.el==o?this.el.documentElement.innerHTML:this.el.value?this.el.value:this.el.innerHTML}};c.DT=function(){var a={html:function(){return new c.DOMQ},id:function(d){return a._html.id(d)},tag:function(d,e){return a._html.tag(d,e)},name:function(d,e){return a._html.name(d,e)},className:function(d,e){return a._html.className(d,e)},head:function(){return a.tag("head")},body:function(){return a.tag("body")}};a._html=a.html();var b=function(d){for(var e in d){var f=
d[e],h="";if(typeof f=="string")h=a.id(f);else if(f instanceof RegExp)h=a.html().match(f,"$1");else if(f instanceof Array)h=a.id(f[0]).match(f[1],"$1");else if(typeof f=="function")h=f(a)||"";c.conf.param[e]=""+h}};i.LEV_DT&&b(i.LEV_DT);return b}()})(this);this.LEV=this.LEV||{};this.Lescape=TMAN.String.escape;this.DoubleLescape=TMAN.String.doubleEscape;if(!LEV.extend)LEV.extend=TMAN.util.extend;if(!LEV.String)LEV.String=TMAN.String;if(!LEV.StringBuilder)LEV.StringBuilder=TMAN.StringBuilder;
if(!LEV.DOMQ)LEV.DOMQ=TMAN.DOMQ;if(!LEV.DT)LEV.DT=TMAN.DT;if(!LEV.onDOM)LEV.onDOM=TMAN.onDomReady;LEV.checkURLTracking=function(){var i=document.location.search||"";if(i){var m=TMAN.String.getParam(i.substr(1),"tmcampid");m&&TMAN.util.extend(TMAN.conf.param,{tmcampid:m,tmad:TMAN.String.getParam(i,"tmad"),tmplaceref:TMAN.String.getParam(i,"tmplaceref"),tmclickref:TMAN.String.getParam(i,"tmclickref")})}};
LEV.bootStrap=function(){TMAN.conf.id=window.tmPageId;if(TMAN.conf.landingPageMins&&TMAN.sessionCookie.isActive(TMAN.conf.landingPageMins)){TMAN.util.log("Session cookie still active and tmOPV set to ["+TMAN.conf.landingPageMins+"] minutes","MESSAGE");return false}else if(TMAN.conf._lastContainerId==TMAN.conf.id)return false;else{TMAN.conf._tagStr="";TMAN.conf._tagStr=TMAN.util.cookie("tmStaging")?TMAN.conf.baseURL.replace(/(.*?)\/\/(.*?)\.(.*)/,"$1//tagstaging.$3"):TMAN.conf.baseURL;TMAN.conf._tagStr=
TMAN.conf._tagStr+"/tmpageid="+TMAN.conf.id;TMAN.conf.lastContainerId=TMAN.conf.id;TMAN.conf._tagStr+="&levyouruid="+Math.random();if(TMAN.version)TMAN.conf._tagStr+="&tmver="+TMAN.version;TMAN.conf._tagStr+="&tmsecmode="+(TMAN._secure?"S":"N");TMAN.conf.enableURLTracking&&LEV.checkURLTracking();var i=TMAN.conf._tagStr+LEV_TMIFPS();if(TMAN.conf.param&&(TMAN.conf.param.tmcampid||TMAN.conf.param.levrev||TMAN.conf.param.levresdes)){window.tmCBRequired=true;TMAN.conf._callbackRequired=true}i=i+"&tmtag=js";
if(TMAN.conf.enableJSCall)if(window.tm2BootAsync)TMAN.util.appendScript(i);else TMAN.syncSafe?TMAN.util.writeScript(i):TMAN.util.log("Unable to initiliaze container, !syncSafe && !tm2BootAsync","fatal")}};
function LEV_TMIFPS(){var i=new LEV.StringBuilder;if(typeof TMAN.conf.param!="undefined")for(var m in TMAN.conf.param){var k=TMAN.conf.param[m],s=typeof k;if(s==="function"){k=k();s=typeof k}if(m&&k&&(s=="number"||s=="string"||s=="boolean"))i.append("&",m,"=",TMAN.String.doubleEscape(k))}return i.toString()}function LEV_TMTCB(){window.tmTrack=undefined;window.tmTrackWaiting&&LEV_TMIFCB()}
var LEV_TMIFCB=function(){function i(){window.LEV_DT&&LEV.DT(window.LEV_DT);if(window.LEV_DTD)for(var k=0;k<LEV_DTD.length;k++)LEV_DTD[k]();m()}function m(){if(typeof window.tmDisableIframe!="undefined")TMAN.conf._disableIframe=window.tmDisableIframe;if(typeof window.tmCBRequired!="undefined")TMAN.conf._callbackRequired=window.tmCBRequired;var k=LEV_TMIFPS();k=TMAN.conf._tagStr+k;if(location.hash=="#tmtest")parent.location=document.referrer+"#"+k;try{TMAN.util.log("referrer="+document.referrer,"DEBUG");
if(typeof TMAN.conf.param=="object"){var s="",B;for(B in TMAN.conf.param)if(typeof TMAN.conf.param[B]!="undefined")s+="\t"+B+"=>"+TMAN.conf.param[B]+"\n";s||(s="<empty>")}TMAN.util.log("TMAN.conf.param contents\n"+s,"DEBUG");typeof tmOPV!="undefined"&&TMAN.util.log("tmOPV="+TMAN.conf.landingPageMins,"DEBUG");TMAN.util.log("tmBaseURL="+TMAN.conf.baseUrl,"DEBUG");TMAN.util.log("tmPageId="+TMAN.conf.id,"DEBUG")}catch(o){TMAN.util.log("logging error on of tmPageId or tmBaseURL probably does not exits"+
o.message,"FATAL")}if(TMAN.conf._disableIframe){if(TMAN.conf.param&&(TMAN.conf.param.tmad||TMAN.conf.param.levrev||TMAN.conf.param.levresdes||TMAN.conf.param.levordref)||TMAN.conf._callbackRequired){var v=k+"&tmtag=image";if(LEV.onDOM.isReady()){TMAN.util.appendImage(v);TMAN.util.log("Image written: "+v)}else LEV.onDOM(function(){TMAN.util.appendImage(v);TMAN.util.log("Image written: "+v,"DEBUG")})}}else{v=k+"&tmtag=iframe";if(LEV.onDOM.isReady()){TMAN.util.appendIframe(v);TMAN.util.log("Iframe written: "+
v,"DEBUG")}else LEV.onDOM(function(){TMAN.util.appendIframe(v);TMAN.util.log("Iframe written: "+v,"DEBUG")})}}return function(){TMAN.conf._writeImmediately=window.tmImmediate||false;TMAN.conf._writeImmediately?i():LEV.onDOM(i)}}();if(typeof TMAN.conf==="undefined"){TMAN.conf={param:{}};if(typeof tmPageId==="undefined")if(typeof tmContId==="undefined")TMAN.util.log("tmContId or tmPageId not defined for TagMan container, it's compulsary","FATAL");else tmPageId=tmContId}
TMAN.util.extend(TMAN.conf,{_lastContainerId:0,_tagStr:"",_callbackRequired:false,_disableIframe:false,enableJSCall:true,enableURLTracking:true,_writeImmediately:false});TMAN.position=TMAN.position||{};TMAN.util.extend(TMAN.position,{PRE_HEAD:0,TOP_HEAD:1,BOTTOM_HEAD:2,TOP_BODY:3,BOTTOM_BODY:31,DOM_COMPLETE:32,WINDOW_LOADED:33,END:64});
if(typeof tmBaseUrl==="string"){TMAN.util.extend(TMAN.conf,{baseURL:window.tmBaseUrl,id:window.tmPageId,landingPageMins:window.tmOPV||false,bootstrap:typeof tmBootStrap==="undefined"?true:window.tmBootStrap,param:window.tmParam||{}});TMAN.conf.bootstrap&&LEV.bootStrap()}
TMAN.doTags=TMAN.doTags||function(i){var m=window.TMAN;if(i>=(typeof(window.tm2BootPosition!="undefined")?window.tm2BootPosition:m.position.TOP_BODY)&&typeof m.conf.TM2initialised==="boolean")if(!m.conf.TM2initialised){m.conf.TM2initialised=true;LEV.bootStrap()}};
TMAN.tm2initialise=function(i){TMAN.conf.param=TMAN.conf.param||{};if(i.baseURL||i.host&&i.account){window.TMAN.conf.baseURL=i.baseURL||(location.protocol==="https:"?"https://":"http://")+i.host+"/"+i.account+"/"+(i.serverCall||"tman.cgi");window.TMAN.conf.TM2initialised=i.bootstrap?false:true;if(typeof window.TMAN.Tag==="function")TMAN.addTag(i.account,new TMAN.Tag("TMAN.conf.account=TMAN._containers[0].account;TMAN.conf.id=TMAN._containers[0].id;TMAN.conf.param=TMAN._containers[0].param;window.TMAN.conf.TM2initialised=true; LEV.bootStrap();",
{position:typeof window.tm2BootPosition!="undefined"?window.tm2BootPosition:TMAN.position.TOP_BODY,async:window.tm2BootAsync||false,movable:true}))}else{TMAN.util.log("Problem with container code conf.baseURL and host/account not available","FATAL");TMAN.conf.TM2initialised=true}};
if(typeof TMAN.Container!=="function")TMAN.Container=function(i,m,k){var s=window.TMAN.conf;s.account=i||s.account;s.id=m||s.id;s.host=k.host||DEFAULT_HOST;s.tags=k.tags||[];s.async="async"in k?k.async:false;s.tagsBlockingTimeout=k.tagsBlockingTimeout||0;s.sessionTimeout=k.sessionTimeOut||3600;s.landingPageConteiner=k.landingPageContainer||false;s.bootstrap="bootstrap"in k?k.bootstrap:true;s.enableJSCall="enableJSCall"in k?k.enableJSCall:true;s.param=s.param||{};s.serverCall=k.serverCall||s.serverCall||
"tman.cgi/";TMAN.addContainer=TMAN.addContainer||function(){return true};TMAN.tm2initialise(TMAN.container)};TMAN.addContainer=TMAN.addContainer||function(){return true};if(typeof window.TMAN.asyncLoader==="function"){window.TMAN.asyncLoader();window.TMAN.asyncLoader=undefined}this.TMAN=this.TMAN||{};TMAN.MAP=function(){this.maps=[]};
TMAN.MAP.prototype={addMap:function(i){i=new TMAN.MAP.HashMap(i);this.maps[i.head.ParentCId()]=i},addMapIf:function(i,m){var k=new TMAN.MAP.HashMap(m);if(k.head.ParentCId()==i)this.maps[i]=k},search:function(i){i=TMAN.MAP.B92SHA1(i);var m,k;for(k in this.maps)if(m=this.maps[k])return m.Search(i)}};
TMAN.MAP.Head=function(i){var m;this.ok=true;this.error="";if(!(!i||i.length==0)){this.v=TMAN.B92.desmall(i.substr(0,2));if(this.v!=2){this.ok=false;this.error="Version "+this.v+" is unsupported"}else{this.hlen=TMAN.B92.desmall(i.substr(2,1));this.clen=TMAN.B92.desmall(i.substr(3,1));this.cid=TMAN.B92.desmall(i.substr(4,2));this.olen=TMAN.B92.desmall(i.substr(6,1));this.oto=TMAN.B92.desmall(i.substr(7,2));m=TMAN.B92.desmall(i.substr(9,1));this.schema=i.substr(10,m);this.maps=i.substr(10+m)}}};
TMAN.MAP.Head.prototype={Version:function(){return this.v},HashLen:function(){return this.hlen},CIdLen:function(){return this.clen},ParentCId:function(){return this.cid},OtherLen:function(){return this.olen},Maps:function(){return this.maps},OPVTO:function(){return this.oto},Schema:function(){return this.schema}};
TMAN.MAP.SHA1=function(i){function m(b,d){return b<<d|b>>>32-d}var k,s,B,o=Array(80),v=1732584193,c=4023233417,K=2562383102,L=271733878,H=3285377520,z,G,F,I;z=i.length;var a=[];for(k=0;k<z-3;k+=4){s=i.charCodeAt(k)<<24|i.charCodeAt(k+1)<<16|i.charCodeAt(k+2)<<8|i.charCodeAt(k+3);a.push(s)}switch(z%4){case 0:k=2147483648;break;case 1:k=i.charCodeAt(z-1)<<24|8388608;break;case 2:k=i.charCodeAt(z-2)<<24|i.charCodeAt(z-1)<<16|32768;break;case 3:k=i.charCodeAt(z-3)<<24|i.charCodeAt(z-2)<<16|i.charCodeAt(z-
1)<<8|128}for(a.push(k);a.length%16!=14;)a.push(0);a.push(z>>>29);a.push(z<<3&4294967295);for(i=0;i<a.length;i+=16){for(k=0;k<16;k++)o[k]=a[i+k];for(k=16;k<80;k++)o[k]=m(o[k-3]^o[k-8]^o[k-14]^o[k-16],1);s=v;z=c;G=K;F=L;I=H;for(k=0;k<80;k++){B=o[k];B=k<20?m(s,5)+(z&G|~z&F)+I+B+1518500249&4294967295:k<40?m(s,5)+(z^G^F)+I+B+1859775393&4294967295:k<60?m(s,5)+(z&G|z&F|G&F)+I+B+2400959708&4294967295:m(s,5)+(z^G^F)+I+B+3395469782&4294967295;I=F;F=G;G=m(z,30);z=s;s=B}v=v+s&4294967295;c=c+z&4294967295;K=K+
G&4294967295;L=L+F&4294967295;H=H+I&4294967295}return[v,c,K,L,H]};TMAN.MAP.B92SHA1=function(i){return TMAN.B92.encode(TMAN.MAP.SHA1(i),25)};TMAN.MAP.Map=function(i,m){if(i&&m){this.head=m;this.hash=i.substr(0,m.HashLen());this.Cid=TMAN.B92.desmall(i.substr(m.HashLen(),m.CIdLen()));this.Other=TMAN.B92.desmall(i.substr(m.HashLen()+m.CIdLen(),m.OtherLen()))}};
TMAN.MAP.Map.prototype={Hash:function(){return this.hash},ContainerId:function(){return this.Cid},Header:function(){return this.head},OncePerVisit:function(){return(this.Other&1)==1?true:false}};TMAN.MAP.HashMap=function(i){this.text=i;this.head=new TMAN.MAP.Head(this.text)};TMAN.MAP.HashMap.prototype.Search=function(i){var m=this.head,k=m.HashLen(),s=k+m.CIdLen()+m.OtherLen();i=i.substr(i.length-k);k=m.Maps();for(var B=0;;){B=k.indexOf(i,0);if(0%s==0)return new TMAN.MAP.Map(k.substr(B,s),m)}};


(function(w) {

        // staging or live mappings
        if ( LEVU.GC('tmStaging') ) {
                // tmIncludedOnce avoid infinite loop if someone puts live template on staging or is messing around with their dns
            if (typeof(tmIncludedOnce)=='undefined') {
                var stagingMapURL = LEVU.FS('kelloggs.js');
                if (stagingMapURL) {            
                    var stagingMapURL = stagingMapURL.src.replace( /(.*?)\/\/(.*?)\.(.*?)\// , '$1//tagstaging.$3/' );
                    LEVU.WJS(stagingMapURL,1);
                } else {
                    LEVU.LE('Unable to find [kelloggs.js]','FATAL');
                }
                w.tmIncludedOnce = 1; 
            }
        } else {
                // create bootstrap function
            TMAN.MAP.Initialise = function() {
                var tmPageId = w.tmPageId;
                var tmContId = w.tmContId;
                var tmOPV = w.tmOPV;
                // reverse compatibility
                if (typeof( tmPageId ) == 'undefined' && typeof( tmContId ) != 'undefined') var tmPageId = tmContId;
                if (typeof(tmPageId) != 'undefined') LEVU.LE('base tmPageId='+tmPageId,'Debug');
                if (typeof(tmOPV) != 'undefined') LEVU.LE('base tmOPV='+tmOPV,'Debug');
                // Initialise globals
                var searchRecords = [ LEVU.GS(location.pathname,'1') // First Path Element
,LEVU.GS(location.pathname,'1,2') // First 2 Path Elements
,location.pathname // URL Path
,LEVU.GS(location.pathname,'1,2,3') // First 3 Path Elements
,LEVU.GS(location.hash,'1,2') || '' // Anchor First Two Path Elements
,LEVU.GS(location.hash,'1') || '' // Anchor First Path Element
,LEVU.GS(location.hash,'1,2,3,4') || '' // Anchor first 4 elements
 ];
                if (!searchRecords) {
                    LEVU.LE('No mapping rules found','Warning');
                }
                else {
                    LEVU.LE("Mapping Rule Values\n" + LEVU.PR(searchRecords),'Debug');                
                }
                return searchRecords;
            };
            // simple map code
            TMAN.MAP.mapContainer = function( searchRecords ) {
                // Unhashed data
                var simpleMaps = [ {OPVTO:30,SPID:35,Maps:{"0recipes":[34,0],"1den/register.asp":[36,0],"1den/thankyou.asp":[37,0],"2/shoppingcart.asp":[38,0]}},
	{OPVTO:30,SPID:32,Maps:{"0recipes":[42,0],"2/fiber-rich-recipes.aspx":[42,0]}},
	{OPVTO:30,SPID:63,Maps:{"0Coupon.aspx":[69,0],"0RecipeDetail.aspx":[68,0]}},
	{OPVTO:30,SPID:7,Maps:{"2/Marvelous-Maple-Granola.aspx":[6,0],"2/Recipes.aspx":[6,0],"2/Crispy-Topped-Power-Oatmeal.aspx":[6,0],"2/Power-Up-Morning-Parfaits.aspx":[6,0],"2/Energy-Packed-PBJ-Bars.aspx":[6,0],"2/Berry-Almond-Energy.aspx":[6,0],"2/No-Bake-Peanut-Butter-Bars.aspx":[6,0],"2/Blueberry-Banana-Muffins.aspx":[6,0],"2/Tonys-Tiger-Bites.aspx":[6,0]}},
	{OPVTO:30,SPID:42,Maps:{"3artist/terryadams.aspx/videos":[55,0]}},
	{OPVTO:30,SPID:1,Maps:{"0gliders.aspx":[104,0],"0derby.aspx":[107,0],"0rally.aspx":[105,0],"0chaos.aspx":[106,0],"0cerealsling.aspx":[108,0],"0vacattack.aspx":[109,0],"0applerescue.aspx":[110,0],"0cinnashake.aspx":[111,0],"0towerofdrabbles.aspx":[112,0],"0marketmayhem.aspx":[113,0],"0insideout.aspx":[114,0],"0signalskate.aspx":[115,0],"0messagemixer.aspx":[116,0],"0bridgetothebowl.aspx":[118,0],"0megamaze.aspx":[117,0],"0cerealswitch.aspx":[119,0],"0cinnaseek.aspx":[120,0],"0drabstangledtrack.aspx":[107,0]}},
	{OPVTO:30,SPID:18,Maps:{"0sprinklingsprofilethankyou.aspx":[16,0],"2/ChocolatePeanutPebbleBar.aspx":[15,0],"2/ABerryCrunchyTopping.aspx":[15,0],"2/BerryFrostbite.aspx":[15,0],"2/StrawberryDipAndEat.aspx":[15,0],"2/DoubleRainbowCookies.aspx":[15,0],"2/FruityPastryPizzas.aspx":[15,0],"2/CrunchyPBJBars.aspx":[15,0],"2/BlueberryPeachCobbler.aspx":[15,0],"2/AppleStrudelBreakfastBake.aspx":[15,0],"2/AppleCrumblealaMode.aspx":[15,0],"2/VeryCherryHearts.aspx":[15,0],"2/CinnaPumpkinDoubleDeckers.aspx":[15,0],"2/LemonRaspberryParfaits.aspx":[15,0],"2/SimpleStrawberryShortcake.aspx":[15,0],"2/CelebrationFlags.aspx":[15,0],"2/PBJBananaSammies.aspx":[15,0],"2/CookieDoughIceCreamSammies.aspx":[15,0],"2/AppleCranberryPie.aspx":[15,0],"2/GooeyCaramelCoconutBars.aspx":[15,0],"2/CookiesAndCremeMilkshakes.aspx":[15,0],"2/RockyRoadBars.aspx":[15,0],"2/FudgySpookySpiders.aspx":[15,0],"2/ChocolateCherryWhippedSammies.aspx":[15,0],"2/SprinklyIceCreamBites.aspx":[15,0],"2/MeltyMilkshakeBars.aspx":[15,0],"2/WildBerryFruitBlossoms.aspx":[15,0],"2/SuperDuperSmores.aspx":[15,0]}},
	{OPVTO:30,SPID:23,Maps:{"1tips-and-tools/healthy-recipes":[22,0],"1challenge/design-your-plan":[131,0],"2/Products/Coupons":[21,0],"2/challenge/design-your-plan":[131,0],"2http://www.specialk.com/challenge/design-your-plan":[22,0],"2/mealplan/start/step2challenge":[140,0],"2/mealplan/start/step1":[139,0],"2/mealplan/manage":[141,0],"2/signup/registration/step3":[144,0],"2/signup/registration":[142,0],"2":[146,0],"2/signup/registration/step2":[147,0],"3/mealplan/manage/shopping-list":[148,0]}},
	{OPVTO:30,SPID:61,Maps:{"0recipedetails_recipes.aspx":[62,0],"1en/videos-and-fun":[73,0],"1en/videos-and-fun.html":[73,0]}},
	{OPVTO:30,SPID:12,Maps:{"0recipes":[9,0],"0registration_complete":[11,0],"0recipe":[9,0],"1account/new":[10,0],"1events/coupons":[8,0],"2":[12,0]}},
	{OPVTO:30,SPID:41,Maps:{"1showcase.aspx/list":[50,0],"1artist.aspx/list":[49,0],"1showcase/photos.aspx":[57,0],"3event/sweettricksbeats.aspx/details":[51,0],"3event/sweettricksbeats.aspx/videos":[52,0],"3artist/terryadams.aspx/details":[53,0],"3artist/terryadams.aspx/asktheartist":[54,0],"3showcase/games.aspx/dj-delicious":[56,0],"3showcase/videos.aspx/pop-tarts-love":[58,0]}},
	{OPVTO:30,SPID:20,Maps:{"5recipes":[19,0],"6recipes/colossal-candy-corn":[134,0]}},
	{OPVTO:30,SPID:14,Maps:{"0Recipes.aspx":[13,0],"0recipe-fruit-and-ice-cream-filled-cookie-sandwiches-18482.aspx":[13,0],"0recipe-chips-deluxe--chocolate-milkshake-18484.aspx":[13,0],"0recipe-frozen-raspberry---cream-squares-1239.aspx":[13,0],"0recipe-coconut-cookie-bars-18483.aspx":[13,0],"0recipe-frozen-whoopie-pie-18481.aspx":[13,0],"0recipe-strawberry-chocolate-stripes-parfait-18182.aspx":[13,0],"0recipe-banana-and-strawberry-trifle-194.aspx":[13,0],"0recipe-coconut-cream-pie-5088.aspx":[13,0],"0recipe-brownie-rainbow-pie-366.aspx":[13,0],"0recipe-creamy-buffalo-chicken-dip-15741.aspx":[13,0],"0recipe-town-house--crackers-with-avocado-and-mango-salsa-17122.aspx":[13,0],"0recipe-italian-veggie-dip-13401.aspx":[13,0],"0recipe-greek-garden-spread-12041.aspx":[13,0],"0recipe-barbecue-on-town-house-toppers--6363.aspx":[13,0],"0recipe-cool-cucumber-cracker-appetizer-11562.aspx":[13,0],"0recipe-fiesta-chicken-salad-3048.aspx":[13,0],"0recipe-california-party-spread-2990.aspx":[13,0],"0recipe-asian-chicken-salad-154.aspx":[13,0],"0recipe-mediterranean-tuna-salad-2963.aspx":[13,0],"0recipe-bruschetta-bites-372.aspx":[13,0],"0recipe-swiss-cheese-and-cherry-spread-18405.aspx":[13,0],"0recipe-strawberry-bottom-cheesecake--2-extra-servings--3111.aspx":[13,0],"0recipe-key-lime-pie-5143.aspx":[13,0],"0recipe-mocha-toffee-ice-box-pie-6617.aspx":[13,0],"0recipe-berry-berry-cool-pie-11381.aspx":[13,0],"0recipe-s-more-in-a-cone-4185.aspx":[13,0],"0recipe-mint-chocolate-chip-cheesecake-pie-6165.aspx":[13,0],"0recipe-squirmy-cones-2440.aspx":[13,0],"0recipe-five-minute-creamy-coconut-pie-1156.aspx":[13,0],"0recipe-butterscotch-pecan-sandies--pie-390.aspx":[13,0],"0recipe-raspberry-shortcake-pie-2215.aspx":[13,0],"0recipe-creamy-clown-cookie-cups-877.aspx":[13,0],"0recipe-cool-and-simple-citrus-pie-789.aspx":[13,0],"0recipes-cookies-summer.aspx":[13,0],"0recipes-crackers-summer.aspx":[13,0],"0recipes-other-goodies-summer.aspx":[13,0]}},
	{OPVTO:30,SPID:47,Maps:{"0Coupons.aspx":[48,0]}},
	{OPVTO:30,SPID:59,Maps:{"1recipes/emailRecipe.html":[65,0]}},
	{OPVTO:30,SPID:4,Maps:{"2/CaramelPecanCrunchCereal.aspx":[122,0],"2/BerryYogurtCrunch.aspx":[123,0],"2/DarkChocolateAlmond.aspx":[127,0],"2/ChocolateChip.aspx":[126,0],"2/CinnamonOatCrunch.aspx":[124,0],"2/CaramelCoconutFudge.aspx":[125,0],"2/ButtermilkWaffles.aspx":[129,0],"2/ChocolateyPeanutButter.aspx":[128,0]}},
	{OPVTO:30,SPID:24,Maps:{"0AppleStrudel.aspx":[27,0],"0Blueberry.aspx":[27,0],"0UnfrostedBlueberry.aspx":[27,0],"0BlueberryMuffin.aspx":[27,0],"0BrownSugarCinnamon.aspx":[27,0],"0LowFatBrownSugarCinnamon.aspx":[27,0],"0UnfrostedBrownSugarCinnamon.aspx":[27,0],"0CherryTurnover.aspx":[27,0],"0Cherry.aspx":[27,0],"0ChocolateChip.aspx":[27,0],"0ChocolateChipCookieDough.aspx":[27,0],"0ChocolateFudge.aspx":[27,0],"0CookiesAndCreme.aspx":[27,0],"0ConfettiCake.aspx":[27,0],"0MinicrispsChocolate.aspx":[27,0],"0HotFudgeSundae.aspx":[27,0],"0MinicrispsStrawberry.aspx":[27,0],"0RainbowCookieSandwich.aspx":[27,0],"0Raspberry.aspx":[27,0],"0SMores.aspx":[27,0],"0Strawberry.aspx":[27,0],"0StrawberryMilkshake.aspx":[27,0],"0LowFatStrawberry.aspx":[27,0],"0UnfrostedStrawberry.aspx":[27,0],"0VanillaMilkshake.aspx":[27,0],"0WildBerryBloom.aspx":[27,0],"0WildBerry.aspx":[27,0],"0WildliciousWildStrawberry.aspx":[27,0],"0WildGrape.aspx":[27,0],"2/ChocolatePeanutPebbleBar.aspx":[27,0],"2/ABerryCrunchyTopping.aspx":[27,0],"2/BerryFrostbite.aspx":[27,0],"2/DoubleRainbowCookies.aspx":[27,0],"2/AppleCrumblealaMode.aspx":[27,0],"2/AppleStrudelBreakfastBake.aspx":[27,0],"2/BlueberryPeachCobbler.aspx":[27,0],"2/CrunchyPBJBars.aspx":[27,0],"2/FruityPastryPizzas.aspx":[27,0],"2/VeryCherryHearts.aspx":[27,0],"2/CinnaPumpkinDoubleDeckers.aspx":[27,0],"2LemonRaspberryParfaits.aspx":[27,0],"2/SimpleStrawberryShortcake.aspx":[27,0],"2/CelebrationFlags.aspx":[27,0],"2/PBJBananaSammies.aspx":[27,0],"2/AppleCranberryPie.aspx":[27,0],"2/GooeyCaramelCoconutBars.aspx":[27,0],"2/RockyRoadBars.aspx":[27,0],"2/CookieDoughIceCreamSammies.aspx":[27,0],"2/FudgySpookySpiders.aspx":[27,0],"2/CookiesAndCremeMilkshakes.aspx":[27,0],"2/ChocolateCherryWhippedSammies.aspx":[27,0],"2/MeltyMilkshakeBars.aspx":[27,0],"2/SprinklyIceCreamBites.aspx":[27,0],"2/SuperDuperSmores.aspx":[27,0],"2/WildBerryFruitBlossoms.aspx":[27,0]}},
	{OPVTO:30,SPID:5,Maps:{"1games/Word-Search-Egypt.aspx":[29,0],"1games/Slider-Puzzle.aspx":[30,0],"1games/Word-Search-Mexico.aspx":[28,0],"1games/Sprinkle-Blasters.aspx":[74,0],"1games/Sprinkle-Dash.aspx":[75,0],"1games/Sprinkles-Sneak.aspx":[77,0],"1games/Coloricious-Pages-Mexico.aspx":[79,0],"1games/Unleash-The-Sprinkles.aspx":[78,0],"1games/Froot-Loops-Mazes.aspx":[89,0],"1games/Froot-Loops-Origami.aspx":[88,0],"1games/Spot-The-Difference-Mexico.aspx":[81,0],"1games/Sprinklicious-Board-Game.aspx":[80,0],"1games/Catch-The-Koi.aspx":[83,0],"1games/Sprinkle-Pursuit.aspx":[76,0],"1games/Soaring-Samurai.aspx":[86,0],"1games/Karate-Mountain.aspx":[85,0],"1games/Ninja-Climb.aspx":[84,0],"1games/Word-Search-Japan.aspx":[87,0],"1games/Hungry-Mummies.aspx":[90,0],"1games/Coloricious-Pages-Japan.aspx":[96,0],"1games/Monument-Hop.aspx":[91,0],"1games/Froot-Loops-Quest.aspx":[92,0],"1games/Hieroglyph-Decoder.aspx":[93,0],"1games/Froot-Loops-Hunt.aspx":[94,0],"1games/Coloricious-Pages-Egypt.aspx":[95,0],"1games/Croc-River-Crossing.aspx":[97,0],"1games/Froot-Loops-Swing.aspx":[98,0],"1games/Froot-Loops-Connections.aspx":[100,0],"1games/Color-Swap.aspx":[99,0],"1games/Froot-Loops-Stickers.aspx":[101,0],"1games/Ice-Block.aspx":[102,0],"2/healthymessage/index.html":[151,0],"5frooty-passport":[31,0],"5favorites":[150,0],"5frooty-passport":[152,0],"5leaderboard":[154,0],"5home":[153,0]}} ];
                var i=-1;
                var mappedContainer;
                // Only Search if pageId maches
                for (var j=0;j<simpleMaps.length;j++) {
                    var map = simpleMaps[j];
                    if (map["SPID"] == tmPageId) {
                        i = searchRecords.length;
                        LEVU.LE("Mapping string\n" + LEVU.PR(map["Maps"]),'Debug');              
                        while (i > 0 && !mappedContainer) {
                            i--;
                            mappedContainer = map["Maps"][i+searchRecords[i].toString()];
                        }
                    }
                }
                if (i==-1)
                    LEVU.LE('No mappings for this mappedContainer','Warning');
                // update pageId and mappedContainerId if matched
                if (mappedContainer) {
                        w.sourcePageId =  w.tmPageId;
                    w.tmOPV = mappedContainer[1];
                    w.tmPageId = mappedContainer[0];
                }
            };
            // bootstrap if tm2 params defined
            if (w.tmPageId || w.tmContId) {
                var searchRecords = TMAN.MAP.Initialise();
                if ( searchRecords ) {
                    TMAN.MAP.mapContainer( searchRecords );
                }
            }
        }
})(window);
TMAN.position.CUSTOM_1=34;
TMAN.position.CUSTOM_2=35;
TMAN.position.CUSTOM_3=36;
TMAN.position.CUSTOM_4=37;
TMAN.position.EVENT=38;
TMAN.position.SIGNUP=39;
TMAN.position.SUBS=40;
TMAN.position.PRINT=41;
TMAN.position.SHARE=42;
TMAN.position.RSS=43;
TMAN.position.NEWSLETTER=44;
TMAN.position.DOWNLOAD=45;
TMAN.position.EXCEL=46;
TMAN.position.PDF=47;
TMAN.position.CONTACTS=48;
TMAN.position.SURVEY_START=49;
TMAN.position.SURVEY_COMPLETE=50;
TMAN.position.CHAT=51;
TMAN.position.COMMENTED=52;
TMAN.position.RATED=53;
TMAN.position.CARTADD=54;
TMAN.position.FB_LIKE=55;
TMAN.position.FB_FRIEND=56;
TMAN.position.FB_JOIN=57;
TMAN.position.FB_FIND=58;
TMAN.position.TW_FOLLOW=59;
TMAN.position.FUNNEL_A_1=60;
TMAN.position.FUNNEL_A_2=61;
TMAN.position.FUNNEL_A_3=62;
TMAN.position.FUNNEL_A_4=63; 

// tm3 async bootstrap
TMAN.doTags(TMAN.currentPosition,true);

