talharajpoot

MY Hacked

Feb 2nd, 2015
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.48 KB | None | 0 0
  1. /*
  2. BrandGuard v2.1.5 (Fri Aug 22 13:33:27 UTC 2014)
  3. Lifestreet Media
  4. http://www.lifestreetmedia.com/
  5. */
  6. (function(){var M=function(b){function a(b){return parseInt(b,10)}function q(m){var d=b.screen.width,c=b.screen.height,l=b.innerWidth,z=b.innerHeight;if(/(Firefox)/i.test(r))return d+"x"+c;var h=l>z,l=b.devicePixelRatio;m=m?0:77;z=/Nexus 10/i.test(r);h&&d<c?(h=d,d=c,c=h):!h&&d>c&&(h=c,c=d,d=h);if(z)return d+"x"+(c-m);var a=r.match(/Android ([\.\d]+)/),h=(z=r.match(/Chrome/))&&r.match(/SAMSUNG/i);if(a){var a=a[1],e=a.split(".")[0],a=a.split(".")[1];if(!h&&(4==e&&(z||4<=a)||4<e))return d+"x"+(c-m)}if(h&&
  7. r.match(/Chrome\/28/i))return d+"x"+(c-m);d=Math.round(d/l);c=Math.round(c/l);return d+"x"+(c-m)}var x=b.top,n=b.document,E=b.location,r=navigator.userAgent,v=/(iPad|iPhone|iPod)/g.test(r),k=/(Android)/g.test(r),e=!!r.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i),g={margin:0,padding:0,position:"relative",left:0,top:0,opacity:1,visibility:"visible",overflow:"hidden",border:"none",cssFloat:"none"},f={allowtransparency:"false",frameborder:"0",hspace:"0",marginwidth:"0",marginheight:"0",
  8. scrolling:"no",vspace:"0"},B=function(b,d,c){var l,a;b=(c?c:n).createElement(b);for(l in d.attributes)d.attributes.hasOwnProperty(l)&&b.setAttribute(l,d.attributes[l]);for(a in d.style)d.style.hasOwnProperty(a)&&(b.style[a]=d.style[a]);return b},t=function(m){var d=n.body,c;n.createElement&&d&&d.appendChild?m.call(b,d):c=setTimeout(function(){clearTimeout(c);t(m)},1)},p=null,C=function(m){if(v&&"orientation"in b){var d;d=90==Math.abs(b.orientation);var c=b.screen.width,l=b.screen.height,a=d?l:c,c=
  9. d?c:l,h=m?0:96,l=m?0:108,e=m?0:112;m=m?0:124;if(/iPad/g.test(r))d=a+"x"+(c-h);else{if(h=r.match(/OS ([_\d]+) like Mac OS X/))h=h[1],c=7<=h.split("_")[0]?c-l:d?c-e:c-m;d=a+"x"+c}return d}return k?q(m):b.screen.width+"x"+b.screen.height},s=function(){return b.innerWidth||n.documentElement.clientWidth||n.body.clientWidth},w=function(){var b={},d;for(d in f)f.hasOwnProperty(d)&&(b[d]=f[d]);return b};return{isIOsDevice:function(){return v},isAndroidDevice:function(){return k},isMobile:function(){return e},
  10. buildElement:B,buildElementString:function(b,d,c){var l,a,h="<"+b;for(l in d.attributes)d.attributes.hasOwnProperty(l)&&(h+=" "+l+"="+d.attributes[l]);h+=' style="';for(a in d.style)d.style.hasOwnProperty(a)&&(h+=a+":"+d.style[a]+";");h+='">';c&&(h+="</"+b+">");return h},calcOffset:function(b,d){for(var c={left:b.offsetLeft,top:b.offsetTop};b.parentNode;)b=b.parentNode,b.offsetLeft&&(c.left+=b.offsetLeft),b.offsetTop&&(c.top+=b.offsetTop);return d?c.left+d+c.top:c},calcVisibility:function(b){for(var d=
  11. 1;b.parentNode;){var c;b.currentStyle?c="none"==b.currentStyle.display:(c=n.defaultView.getComputedStyle(b,null),c=null===c||"none"==c.getPropertyValue("display"));if(c)return-1;c=void 0;c=1;b.currentStyle?c="hidden"==b.currentStyle.visibility?0:b.currentStyle.opacity:(c=n.defaultView.getComputedStyle(b,null),c=null===c||"hidden"==c.getPropertyValue("visibility")?0:c.getPropertyValue("opacity"));c=parseFloat(c);d*=c||0===c?c:1;b=b.parentNode}return d},getLocations:function(){var a=b,d,c;try{for(;a!==
  12. x;)a=a.parent,d=a.location.href,c=a.document.referrer}catch(l){}return{self:d||E.toString(),refr:c||n.referrer}},onBodyExists:t,getFlashVersion:function(){if(null!==p)return p;var e=b.navigator,d=null;p=[0,0,0];if("undefined"!==typeof e.plugins&&"object"===typeof e.plugins["Shockwave Flash"])(d=e.plugins["Shockwave Flash"].description)&&"undefined"!==typeof e.mimeTypes&&e.mimeTypes["application/x-shockwave-flash"]&&e.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(d=d.replace(/^.*\s+(\S+\s+\S+$)/,
  13. "$1"),p[0]=a(d.replace(/^(.*)\..*$/,"$1")),p[1]=a(d.replace(/^.*\.(.*)\s.*$/,"$1")),p[2]=/[a-zA-Z]/.test(d)?a(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if("undefined"!==typeof b.ActiveXObject)try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");c&&(d=c.GetVariable("$version"))&&(d=d.split(" ")[1].split(","),p=[a(d[0]),a(d[1]),a(d[2])])}catch(l){}return p},getScreenSize:C,getZoomFactor:function(){var b=s(),d=C(!1).split("x");return(e?b/d[0]:1).toFixed(2)},buildIframeElement:function(b){return B("iframe",
  14. {attributes:w(),style:{margin:0,padding:0,position:"relative",left:0,top:0,zIndex:-99,opacity:1,visibility:"visible",overflow:"hidden",border:"none",cssFloat:"none",width:b.adWidth+"px",height:b.adHeight+"px"}})},buildCloseButtonElement:function(b,d,c){return B("img",{attributes:{id:b.wrapperId+"-close",src:c},style:{margin:0,padding:0,position:"absolute",left:"auto",bottom:"auto",right:0,top:0,border:0,zIndex:999999,width:d+"px",height:d+"px",cursor:"pointer",overflow:"hidden",cssFloat:"none",webkitAppearance:"none"}})},
  15. getViewportMetaTag:function(){var b,d,c,l=n.getElementsByTagName("meta");for(b=0;b<l.length;b++)if(d=l[b],c=d.getAttribute("name"),null!=c&&"viewport"==c.toLowerCase())return d;return null},getResetStyleSheet:function(){var b={},d;for(d in g)g.hasOwnProperty(d)&&(b[d]=g[d]);return b},getResetIframeAttributes:w,addEventListener:function(a,d,c,l){"undefined"!==typeof b.addEventListener?a.addEventListener(d,c,l):a.attachEvent("on"+d,c)},removeEventListener:function(a,d,c,l){"undefined"!==typeof b.removeEventListener?
  16. a.removeEventListener(d,c,l):a.detachEvent("on"+d,c)},getScrollX:function(){return"undefined"!==typeof b.pageXOffset?b.pageXOffset:(n.documentElement||n.body.parentNode||n.body).scrollLeft},getScrollY:function(){return"undefined"!==typeof b.pageYOffset?b.pageYOffset:(n.documentElement||n.body.parentNode||n.body).scrollTop},getWindowWidth:s,getWindowHeight:function(){return b.innerHeight||n.documentElement.clientHeight||n.body.clientHeight}}}(window),O=function(b,a){function q(b,a){try{var e=b.contentWindow.document;
  17. e.open();e.write(a);e.close()}catch(g){}}function x(v){var k=b.getResetIframeAttributes();k.width=v.adWidth;k.height=v.adHeight;if("failover_query_string"in v.slotResponseObject){v=v.slotResponseObject.failover_query_string;var e=a.location.protocol+"//"+(-1!==v.toString().indexOf("msgCode=1005")?"cdn.lfstmedia.com/~cdn/Ads/ad_shared/static/406.html":"cdn.lfstmedia.com/~cdn/Ads/ad_shared/static/failover.html");k.src=e+"?"+v}return b.buildElement("iframe",{attributes:k,style:b.getResetStyleSheet()})}
  18. function n(a){if(!/loaded|complete/.test(r.readyState)){var k="failover_query_string"in a.slotResponseObject,e=a.slotResponseObject.content;if(k||E.test(e)){try{r.write('<ins id="'+a.holderId+'"></ins>')}catch(g){}var f=setTimeout(function(){clearTimeout(f);var g=r.getElementById(a.holderId),p=b.getResetStyleSheet();p.width=a.adWidth+"px";p.height=a.adHeight+"px";for(var C in p)p.hasOwnProperty(C)&&(g.style[C]=p[C]);p=x(a);g.appendChild(p);k||q(p,e)},0)}else try{r.write(e)}catch(n){}}}var E=/<\/body>\s*<\/html>/i,
  19. r=a.document;return{showAd:function(a){var k=r.getElementById(a.wrapperId);if(k)k.style.width=a.adWidth+"px",k.style.height=a.adHeight+"px";else if(a.isSyncLoading)n(a);else if(k=r.getElementById(a.slotResponseObject.embd_tag_id||a.containerId)){var e=b.getResetStyleSheet();e.display="inline-block";e.width=a.adWidth+"px";e.height=a.adHeight+"px";var g=b.buildElement("ins",{attributes:{id:a.wrapperId},style:e});e.display="block";var e=b.buildElement("ins",{attributes:{id:a.holderId},style:e}),f=x(a);
  20. e.appendChild(f);for(g.appendChild(e);k.firstChild;)k.removeChild(k.firstChild);k.appendChild(g);"failover_query_string"in a.slotResponseObject||q(f,a.slotResponseObject.content)}},hideAd:function(b){if(b=r.getElementById(b.wrapperId))b.style.width=0,b.style.height=0}}}(M,window),P=function(b,a){function q(a){var e=b.getWindowWidth()/a.adWidth;a=b.getWindowHeight()/a.adHeight;return Math.min(e,a).toFixed(2)}function x(){return"orientation"in a&&"onorientationchange"in a?"orientationchange":"resize"}
  21. function n(a){b.addEventListener(a,"touchmove",function(b){b.preventDefault()},!1)}function E(a){var e="fixed",k="100%",g="100%";t==B.JS&&(e="absolute",k=b.getWindowWidth()+"px",g=b.getWindowHeight()+"px");return b.buildElement("ins",{attributes:{id:a.holderId+"-overlay"},style:{margin:0,padding:0,overflow:"hidden",display:"block",position:e,zIndex:999996,left:0,top:0,backgroundColor:/MSIE/.test(f)?"":"rgba(0, 0, 0, 0.8)",width:k,height:g}})}function r(a){var e=a.slotResponseObject.overlay_bg,e="none"==
  22. e?"white":e,k=Math.round((b.getWindowWidth()-a.adWidth)/2),f=p?0:Math.round((b.getWindowHeight()-a.adHeight)/2);return b.buildElement("ins",{attributes:{id:a.holderId},style:{margin:0,padding:0,overflow:"hidden",display:"block",position:"absolute",zIndex:999997,left:k+"px",top:f+"px",right:0,bottom:0,backgroundColor:e,width:a.adWidth+"px",height:a.adHeight+"px"}})}function v(a){a.style.left=b.getScrollX()+"px";a.style.top=b.getScrollY()+"px"}function k(b,e){(function m(){0<b.getElementsByTagName("body").length?
  23. e():a.setTimeout(m,20)})()}function e(a,e){var f=q(e),m=Math.round(e.adWidth*f),d=Math.round(e.adHeight*f),c=a.getElementsByTagName("iframe")[0],l=c.contentWindow.document,z=Math.round(34*f),h=g.getElementById(e.wrapperId+"-close"),A=Math.round((b.getWindowWidth()-m)/2),u=p?0:Math.round((b.getWindowHeight()-d)/2);if(t==B.JS){var n=a.parentNode;n.style.width=b.getWindowWidth()+"px";n.style.height=b.getWindowHeight()+"px";v(n)}a.style.width=m+"px";a.style.height=d+"px";a.style.left=A+"px";a.style.top=
  24. u+"px";c.style.width=m+"px";c.style.height=d+"px";h.style.width=z+"px";h.style.height=z+"px";k(l,function(){l.body.style.marginRight="100%";var b=l.body,c="scale("+f+")";b.style.msTransformOrigin="0% 0%";b.style.webkitTransformOrigin="0% 0%";b.style.transformOrigin="0% 0%";b.style.msTransform=c;b.style.webkitTransform=c;b.style.transform=c})}var g=a.document,f=navigator.userAgent,B={JS:"js",FIXED:"fixed"},t=/(Android)/g.test(f)?B.JS:B.FIXED,p=a!==a.top;return{showAd:function(f){g.getElementById(f.holderId)||
  25. a.setTimeout(function(){var p=function(){var b=g.getElementById(f.holderId);b.style.display="none";a.setTimeout(function(){e(b,f);b.style.display=""},320)},q=b.getWindowWidth(),m=b.getScrollX(),d=b.getScrollY(),c=a.setInterval(function(){q!=b.getWindowWidth()&&(q=b.getWindowWidth(),e(h,f))},800);b.addEventListener(a,x(),p,!1);var l=E(f);n(l);var z=function(){var c=b.getScrollX(),a=b.getScrollY();if(m!=c||d!=a)m=c,d=a,v(l)};t==B.JS&&b.addEventListener(a,"scroll",z,!1);var h=r(f),A=b.buildCloseButtonElement(f,
  26. 34,a.location.protocol+"//cdn.lfstmedia.com/~cdn/JS/02/x-button.34x34.png"),u=function(d){d&&("undefined"!==typeof d.stopPropagation?d.stopPropagation():d.returnValue=!1);a.clearInterval(c);b.removeEventListener(a,x(),p,!1);t==B.JS&&b.removeEventListener(a,"scroll",z,!1);b.removeEventListener(A,"click",u,!1);f.hide()};b.addEventListener(A,"click",u,!1);var y=b.buildIframeElement(f);h.appendChild(y);h.appendChild(A);l.appendChild(h);var K=g.body;K.firstChild?K.insertBefore(l,K.firstChild):K.appendChild(l);
  27. var F=y.contentWindow.document;F.open();F.write(f.slotResponseObject.content);F.close();k(F,function(){n(F.body)});b.addEventListener(F,"click",function(){a.setTimeout(u,200)},!1);e(h,f)},60)},hideAd:function(b){(b=g.getElementById(b.holderId+"-overlay"))&&g.body.removeChild(b)}}}(M,window),R=function(b,a){function q(c){if(!b.isMobile())return"1";if(!/(Android)/i.test(C))return b.getZoomFactor();var a=b.getWindowWidth(),d=b.getWindowHeight(),e=a>d;return Math.min(a/(e?c.adHeight:c.adWidth),d/(e?c.adWidth:
  28. c.adHeight)).toFixed(2)}function x(b){var d="",d="undefined"!==typeof a.getComputedStyle?a.getComputedStyle(b,null).backgroundColor:b.currentStyle.backgroundColor;if(d=/rgba?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+[\.\d+]*)*\)/g.exec(d))b.style.backgroundColor="rgba("+[d[1],d[2],d[3],"0.65"].join()+")"}function n(c,a){var d=q(c),d=Math.round(c.adHeight*d),e=b.getScrollY(),d=a!==s.BOTTOM?e:e+b.getWindowHeight()-d;return[b.getScrollX()+"px",d+"px"]}function E(c){var a=q(c);c=Math.round(c.adWidth*
  29. a);return Math.round((b.getWindowWidth()-c)/2)+"px"}function r(c){var a=q(c),a=Math.round(c.adHeight*a),e=d===w.FIXED,h=0,f=0,k=0,g=c.slotResponseObject.position;e?(h=g!==s.BOTTOM?0:"",k=g===s.BOTTOM?0:""):(h=n(c,g),f=h[0],h=h[1]);g=c.slotResponseObject.overlay_bg;return b.buildElement("ins",{attributes:{id:c.holderId+"-overlay"},style:{margin:0,padding:0,overflow:"hidden",display:"block",position:e?"fixed":"absolute",zIndex:989996,left:f,top:h,right:0,bottom:k,backgroundColor:"none"==g?"transparent":
  30. g,width:e?"100%":b.getWindowWidth()+"px",height:a+"px",pointerEvents:"none"==g?"none":"auto"}})}function v(c){var a=q(c),e=Math.round(c.adWidth*a),a=Math.round(c.adHeight*a),h=c.slotResponseObject.overlay_bg,f=d===w.FIXED;return b.buildElement("ins",{attributes:{id:c.holderId},style:{margin:0,padding:0,display:"block",position:f?"relative":"absolute",zIndex:989997,left:f?"50%":E(c),top:0,right:0,bottom:0,backgroundColor:"none"==h?"transparent":h,width:e+"px",height:a+"px",marginLeft:f?"-"+Math.round(e/
  31. 2)+"px":""}})}function k(c){var a=q(c),d=Math.round(c.adWidth*a),a=Math.round(c.adHeight*a);c=b.buildIframeElement(c);c.style.zIndex=989998;c.style.width=d+"px";c.style.height=a+"px";c.style.pointerEvents="auto";return c}function e(c){var d=q(c),d=Math.round(.56*c.adHeight*d);c=b.buildCloseButtonElement(c,d,a.location.protocol+"//cdn.lfstmedia.com/~cdn/JS/02/x-button.28x28.png");b.isAndroidDevice()&&(c.style.webkitTransform="translateZ(0px)",c.style.transform="translateZ(0px)");c.style.zIndex=989999;
  32. c.style.left="-"+d+"px";c.style.right="auto";c.style.pointerEvents="auto";return c}function g(b,a){var d=b.getBoundingClientRect(),e=a.clientWidth,f=e,d=d.left;0>d&&(d=0);d<e&&(f=d);a.style.left=0==f?"0":"-"+f+"px"}function f(b,a){var d="scale("+q(b)+")";a.style.marginRight="100%";a.style.msTransformOrigin="0% 0%";a.style.webkitTransformOrigin="0% 0%";a.style.transformOrigin="0% 0%";a.style.msTransform=d;a.style.webkitTransform=d;a.style.transform=d}function B(a,d){if(d)if(a===s.BOTTOM){var e=d.style,
  33. f;f=b.getScrollY();if(0==f)f=!0;else{var k=p.documentElement.scrollHeight,g=p.getElementsByTagName("body");0<g.length&&(k=Math.max(k,g[0].scrollHeight));f=!(b.getWindowHeight()+f>=k-5)}e.display=f?"":"none"}else e=d.style,f=p.documentElement,f=(b.getScrollY()||f.scrollTop)-(f.clientTop||0),e.display=0<f?"":"none"}function t(a,d,e){b.addEventListener(a,d,function A(f){f&&("undefined"!==typeof f.preventDefault&&f.preventDefault(),"undefined"!==typeof f.stopPropagation?f.stopPropagation():f.returnValue=
  34. !1);b.removeEventListener(a,d,A,!1);e.hide()},!1)}var p=a.document,C=navigator.userAgent,s={TOP:"top",BOTTOM:"bottom"},w={JS:"js",FIXED:"fixed"},m;m=/(iPad)/i.test(C)?w.JS:w.FIXED;var d=m;return{showAd:function(c){function l(){C&&B(c.slotResponseObject.position,m);var a=s,e=c.holderId,H=c.slotResponseObject.close_button,I=p.getElementById(e+"-overlay"),G=p.getElementById(e),e=q(c),k=Math.round(c.adWidth*e),D=Math.round(c.adHeight*e);I.style.height=D+"px";d!==w.FIXED&&(I.style.width=b.getWindowWidth()+
  35. "px");G.style.width=k+"px";G.style.height=D+"px";a.style.width=k+"px";a.style.height=D+"px";a=a.contentWindow.document.getElementsByTagName("body");0<a.length&&f(c,a[0]);H&&(H=Math.round(.56*c.adHeight*e),a=p.getElementById(c.wrapperId+"-close"),a.style.width=H+"px",a.style.height=H+"px");H=h;a=m;d===w.FIXED?(a=Math.round(c.adWidth*q(c)),H.style.marginLeft="-"+Math.round(a/2)+"px"):(I=n(c,c.slotResponseObject.position),a.style.left=I[0],a.style.top=I[1],H.style.left=E(c));y&&g(h,u)}if(!p.getElementById(c.holderId)){var m,
  36. h=v(c),s=k(c);h.appendChild(s);var u=null,y=c.slotResponseObject.close_button;y&&(u=e(c),h.appendChild(u),t(u,"click",c),b.isAndroidDevice()&&t(u,"touchstart",c));m=r(c);m.appendChild(h);var C=c.slotResponseObject.hide_at_edges;C&&B(c.slotResponseObject.position,m);p.body.appendChild(m);"none"!==c.slotResponseObject.overlay_bg&&x(m);var F=s.contentWindow.document;F.open();F.write(c.slotResponseObject.content);F.close();(function Q(){var b=F.getElementsByTagName("body");0<b.length?(f(c,b[0]),y&&g(h,
  37. u)):a.setTimeout(Q,10)})();var J=b.getWindowWidth(),H=a.setInterval(function(){J!=b.getWindowWidth()&&(J=b.getWindowWidth(),l())},800),I,G=!1,D=!1,L=function(){G||D||(D=!0,a.setTimeout(function(){l();D=!1},350))},N=function(){D||(G=!0,I&&a.clearTimeout(I),I=a.setTimeout(function(){l();G=!1},500))};b.addEventListener(a,"scroll",N,!1);b.isIOsDevice()?(b.addEventListener(a,"orientationchange",L,!1),b.addEventListener(a,"gestureend",L,!1)):b.addEventListener(a,"resize",L,!1);b.addEventListener(m,"DOMNodeRemoved",
  38. function(){a.clearInterval(H);b.removeEventListener(a,"scroll",N,!1);b.isIOsDevice()?(b.removeEventListener(a,"orientationchange",L,!1),b.removeEventListener(a,"gestureend",L,!1)):b.removeEventListener(a,"resize",L,!1)},!1)}},hideAd:function(b){(b=p.getElementById(b.holderId+"-overlay"))&&p.body.removeChild(b)}}}(M,window),S=function(b,a){function q(a){for(var e=b.document.getElementsByTagName("iframe"),g=0;g<e.length;g++)if(e[g].contentWindow==a)return e[g];return null}function x(b,a,g){b.style.width=
  39. a+(/px/g.test(a)?"":"px");b.style.height=g+(/px/g.test(g)?"":"px")}function n(b,a){var g=b.parentNode,f=g?g.parentNode:null;f&&/LSM_Slot/g.test(f.getAttribute("id"))&&(f.style.overflow=a);g&&/LSM_Slot/g.test(g.getAttribute("id"))&&(g.style.overflow=a)}function E(b){var a=null;try{a=JSON.parse(b.data)}catch(g){}if(null!=a&&"module"in a&&"LSM_Html5_API"==a.module)v[a.method](a.properties,a.messageId,b.source)}var r={},v={expand:function(a,e,g){var f=q(g);f&&(n(f,""),f.style.zIndex=999999,f.style.left=
  40. 0,f.style.top=0,a.fullscreen?(f.style.position="fixed",f.style.width="100%",f.style.height="100%"):(f.style.position=a.overlap?"absolute":"relative",null!==a.transition&&(f.style.webkitTransition=a.transition,f.style.transition=a.transition),b.setTimeout(function(){x(f,a.width,a.height)},60)))},close:function(b,e,g){function f(){n(t,"hidden");t.style.zIndex=0;t.style.left="";t.style.top="";t.style.position="relative";t.style.transition&&(t.style.webkitTransition="",t.style.transition="")}function r(){a.removeEventListener(t,
  41. "transitionend",r,!0);f()}var t=q(g);t&&(t.style.transition?a.addEventListener(t,"transitionend",r,!0):f(),x(t,t.getAttribute("width"),t.getAttribute("height")))},setBodyStyle:function(a,e,g){e=b.document.body;for(var f in a)a.hasOwnProperty(f)&&(e.style[f]=a[f])},getBodyStyle:function(a,e,g){a={};var f=b.document.body;if("undefined"!==typeof b.getComputedStyle)for(var n=b.getComputedStyle(f,null),f=0;f<n.length;f++)a[n[f]]=String(n.getPropertyValue(n[f]));else if("undefined"!==typeof f.currentStyle)for(n in f.currentStyle)f.currentStyle.hasOwnProperty(n)&&
  42. (a[n]=f.currentStyle[n]);g.postMessage(JSON.stringify({module:"LSM_Html5",method:"getBodyStyle",messageId:e,properties:a}),"*")}};r.init=function(){a.addEventListener(b,"message",E,!1)};return r}(window,M);window.LSM_Slot=window.LSM_Slot||function(b,a,q,x){function n(a){try{u.write(a)}catch(b){}}function E(){var a=(new Date).getTime(),b=Math.floor(100*Math.random()+1);return a+"-"+b}function r(a){var b;if("persistent"in a){var d=a.persistent;for(b in d)d.hasOwnProperty(b)&&(h[b]=d[b])}if("session"in
  43. a)for(b in d=a.session,d)d.hasOwnProperty(b)&&(h[b]=d[b]);if(l&&c&&(b=u.getElementById("LSM_Slot_UID"))){a={module:"LSM_UID",method:"storeSessionData",messageId:E(),sessionData:a||{}};try{b.contentWindow.postMessage(JSON.stringify(a),"https://ads.lfstmedia.com")}catch(e){}}}function v(a,c){var d={module:"LSM_Slot.BrandGuard",method:"getBrandGuardData",messageId:c,properties:{slotObjectName:a}};try{for(var e=b,f=b.top;e!==f;)e=e.parent,e.postMessage(JSON.stringify(d),"*")}catch(h){}}function k(){this.queue=
  44. [];this.paused=!1}function e(e){var f=++z,G="LSM_SlotObj_"+f,D="LSM_Slot_"+f,h=D+"_cntr";this.adImp=1;this.refreshTime=0;this.holderId=D;this.wrapperId=D+"_wrpr";this.containerId=h;this.slotTagProperties=e||{};this.slotIndex=f;this.globalSlotIndex=null;this.slotObjectName=G;this.slotResponseObject={};this.slotState=s.LOADING;this.adType=w.BANNER;this.adWidth=728;this.adHeight=90;f=a.getLocations();this.docLocation=f.self;this.docReferrer=f.refr;this.brandGuardMessageId=f=E();this.brandGuardTimeoutId=
  45. null;this.isGuarded=!1;this.isSyncLoading=D="div"===e._slot_type;b[G]=this;/loaded|complete/.test(u.readyState)||"_render_div_id"in e||D||n(a.buildElementString("ins",{attributes:{id:h},style:p},!0));if(e._guard&&!D&&l&&c&&b!==b.top){var g=this;this.brandGuardTimeoutId=setTimeout(function(){clearTimeout(g.brandGuardTimeoutId);g.brandGuardTimeoutId=null;y.enqueue(g)},d);v(G,f)}else y.enqueue(this)}function g(a,b){var c,d={delivery_method:w.BANNER,preloading:m.NO,show_delay:0,position:"top",overlay_bg:"none",
  46. hide_at_edges:!1,close_button:!1};for(c in a)a.hasOwnProperty(c)&&(d[c]=a[c]);for(c in b)b.hasOwnProperty(c)&&c in C&&(d[C[c]]=b[c]);for(c in d)if(d.hasOwnProperty(c)){var e=d[c];switch(c){case "delivery_method":d[c]=e.toLowerCase();"adhesion"==d[c]&&(d[c]=w.FLOATING);break;case "preloading":!0===e?d[c]=m.YES:!1===e&&(d[c]=m.NO);d[c]=d[c].toLowerCase();break;case "position":case "embd_type":case "overlay_bg":d[c]=e.toLowerCase()}}return d}function f(c){if(c&&"data"in c&&"https://ads.lfstmedia.com"===
  47. c.origin){var d=null;try{d=JSON.parse(c.data)}catch(e){}if(null!=d&&"module"in d&&"LSM_Slot.Session"===d.module)K[d.method](d.sessionData,d.messageId,c.source);a.removeEventListener(b,"message",f,!1)}}function B(){null===A&&(A=setTimeout(function(){clearTimeout(A);A=null;y.isPaused()&&y.start()},1500),a.addEventListener(b,"message",f,!1),a.onBodyExists(function(c){var d=a.buildElement("ins",{attributes:{},style:{position:"absolute",left:"-9999px",top:"-9999px",width:"1px",height:"1px",padding:0,overflow:"hidden",
  48. display:"",visibility:"visible"}}),e=a.getResetStyleSheet();e.width="1px";e.height="1px";var f=a.getResetIframeAttributes();f.id="LSM_Slot_UID";f.src="https://ads.lfstmedia.com/~cdn/JS/02/uid.html?origin="+encodeURIComponent(b.location.protocol+"//"+b.location.host);e=a.buildElement("iframe",{attributes:f,style:e});d.appendChild(e);c.firstChild?c.insertBefore(d,c.firstChild):c.appendChild(d)}))}function t(a){if(a&&"data"in a){var b=null;try{b=JSON.parse(a.data)}catch(c){}if(null!=b&&"module"in b&&
  49. "LSM_Slot.BrandGuard"===b.module)F[b.method](b.properties,b.messageId,a.source)}}var p={margin:0,padding:0,position:"relative",left:0,top:0,opacity:1,visibility:"visible",overflow:"hidden",border:"none","float":"none"},C={ad_size:"size",_ad_type:"delivery_method",_preload:"preloading",_slot_delay:"show_delay",_ad_position:"position",_ad_background:"overlay_bg",_hide_at_edges:"hide_at_edges",_close_button:"close_button",_render_div_id:"embd_tag_id",_slot_type:"embd_type"},s={LOADING:"loading",LOADED:"done",
  50. ERROR:"error",SHOWN:"shown",HIDDEN:"hidden"},w={BANNER:"banner",INTERSTITIAL:"interstitial",FLOATING:"floating"},m={YES:"yes",NO:"no",WAIT:"wait"},d=500,c="undefined"!==typeof b.JSON&&"function"===typeof b.JSON.parse,l="undefined"!==typeof b.postMessage,z=0,h={},A=null,u=b.document;k.prototype.pause=function(){this.paused=!0};k.prototype.isPaused=function(){return this.paused};k.prototype.enqueue=function(b){this.queue.push(b);!b.isSyncLoading&&this.paused||this.loadNextSlot()};k.prototype.start=
  51. function(){this.paused=!1;this.loadNextSlot()};k.prototype.loadNextSlot=function(){if(0!==this.queue.length){var c=this.queue.shift(),d,e;d={};var f=c.slotTagProperties,g=b.location.protocol,l=f._custom_domain||"ads.lfstmedia.com";for(e in f)if(f.hasOwnProperty(e)&&"slot"!=e&&("_"!=e.charAt(0)||"_"==e.charAt(1)))if("$"==e.charAt(0)){var k="_"+e.substring(1);d[k]=f[e]}else d[e]=f[e];d.jsonp=c.slotObjectName+".onLoad";d.__location=c.docLocation;d.__referrer=c.docReferrer;d.__screen=a.getScreenSize(!0);
  52. a.isMobile()||(d.__flash=a.getFlashVersion().join("."));d.__position=null!==c.globalSlotIndex?c.globalSlotIndex:c.slotIndex;k="_render_div_id"in c.slotTagProperties?c.slotTagProperties._render_div_id:c.containerId;c.isSyncLoading?(k=u.getElementsByTagName("script"),k=0<k.length?k[k.length-1].parentNode:null):k=u.getElementById(k);if(k){var m=a.calcOffset(k);d.__offsetX=m.left;d.__offsetY=m.top;d.__visibility=a.calcVisibility(k)}f._guard&&b===b.top?d.__guarded="no_parent_window":c.isGuarded&&(d.__guarded=
  53. "ok");if(!0!==f._no_session)for(e in h)h.hasOwnProperty(e)&&(d[e]=h[e]);d.__wn=/fb_http/i.test(b.name)?"1":"0";1<c.adImp&&(d.__adImp=c.adImp);"div"===f._slot_type&&(d.__embd_type="div");b!==b.top&&(d.__if="1");"_render_div_id"in f&&(d.__embd_tag_id="1");"_onload"in f&&(d.__onload="1");"_preload"in f&&(d.__preload=f._preload);"_guard"in f&&(d.__guard="1");d.__bgver="2.1.5";d.__stamp=(new Date).getTime();e=[];for(var p in d)d.hasOwnProperty(p)&&e.push(encodeURIComponent(p)+"="+encodeURIComponent(d[p]));
  54. d=g+"//"+l+"/gate/dynamic/"+f.slot+"?"+e.join("&");if(!c.isSyncLoading||!/loaded|complete/.test(u.readyState))if(f=null,c.isSyncLoading)n('<script type="text/javascript" src="'+d+'">\x3c/script>');else try{f=u.createElement("script");f.setAttribute("type","text/javascript");f.async=!0;f.src=d;var q=u.getElementsByTagName("script")[0];q.parentNode.insertBefore(f,q)}catch(r){}this.loadNextSlot()}};var y=new k;e.prototype.onBrandGuardData=function(b,a){if(a===this.brandGuardMessageId&&null!==this.brandGuardTimeoutId){clearTimeout(this.brandGuardTimeoutId);
  55. this.brandGuardTimeoutId=null;this.docLocation=b.location;this.docReferrer=b.referrer;var c=b.position;z=this.globalSlotIndex=c;this.isGuarded=!0;y.enqueue(this)}};e.prototype.onLoad=function(a){var c=this.slotTagProperties;this.slotResponseObject=a=g(a||{},c);"data"in a&&r(a.data);"content"in a||"failover_query_string"in a||(this.slotState=s.ERROR);!("ad_size"in c)&&"failover_query_string"in a&&(this.slotState=s.ERROR);/^\s*{\s*"advertisementAvailable"\s*:\s*false/i.test(a.content)&&(this.slotState=
  56. s.ERROR);this.isSyncLoading||"embd_tag_id"in a||u.getElementById(this.containerId)||(this.slotState=s.ERROR);var d=a.delivery_method;this.adType=d;d in x||(this.slotState=s.ERROR);if(d==w.FLOATING||d==w.INTERSTITIAL){var e=u.getElementById(this.containerId);e&&e.parentNode.removeChild(e)}"size"in a&&(e=a.size.split("x"),2<=e.length&&(this.adWidth=parseInt(e[0],10),this.adHeight=parseInt(e[1],10)));if(this.slotState!==s.ERROR)if(this.slotState=s.LOADED,"refreshTime"in a&&d==w.BANNER&&(d=parseInt(a.refreshTime,
  57. 10),this.refreshTime=30<d&&600>d?1E3*d:3E4),this.isSyncLoading)this.show();else if(a.preloading!==m.WAIT)if(a=a.show_delay,0<a){var f=this;b.setTimeout(function(){f.show()},1E3*a)}else this.show();"_onload"in c&&c._onload(this)};e.prototype.reload=function(){if(this.slotState===s.SHOWN&&!this.isSyncLoading)if(this.adType!=w.BANNER||u.getElementById("_render_div_id"in this.slotTagProperties?this.slotTagProperties._render_div_id:this.containerId)){this.hide();var a=u.getElementById(this.wrapperId);
  58. a&&a.parentNode.removeChild(a);this.adImp++;this.slotState=s.LOADING;y.enqueue(this)}else this.slotState=s.ERROR};e.prototype.show=function(){var a=this.slotState;if(a===s.LOADED||a===s.HIDDEN)if(x[this.adType].showAd(this),this.slotState=s.SHOWN,a=this.refreshTime,0<a){var c=this;b.setTimeout(function(){c.reload()},a);this.refreshTime=0}};e.prototype.hide=function(){this.slotState===s.SHOWN&&(x[this.adType].hideAd(this),this.slotState=s.HIDDEN)};e.prototype.state=function(){var a=this.slotState;
  59. return a===s.SHOWN||a===s.HIDDEN?s.LOADED:a};e.prototype.url=function(){return null};var K={setSessionData:function(a,b,c){h=a;null!==A&&(clearTimeout(A),A=null,y.isPaused()&&y.start())}},F={getBrandGuardData:function(b,c,d){var e=a.getLocations();b={module:"LSM_Slot.BrandGuard",method:"setBrandGuardData",messageId:c,properties:{location:e.self,referrer:e.refr,position:++z,slotObjectName:b.slotObjectName}};try{d.postMessage(JSON.stringify(b),"*")}catch(f){}},setBrandGuardData:function(a,c,d){if((d=
  60. a.slotObjectName)&&b[d])b[d].onBrandGuardData(a,c)}};l&&c&&(a.addEventListener(b,"message",t,!1),q.init(),y.pause(),B());if("undefined"!==typeof b.LSM_Slots){q=b.LSM_Slots;for(var J=0;J<q.length;J++)q[J]=new e(q[J])}q=function(a){return new e(a)};q.version="2.1.5";return q}(window,M,S,{banner:O,interstitial:P,floating:R})})();
Advertisement
Add Comment
Please, Sign In to add comment