/*! 184-1-RELEASE 2015-11-22 */
function __trcCopyProps(a,b,c){for(d in a)b[d]=a[d];if(c)for(var d in c)b[d]=c[d];return b}function __trcFromError(a){return TRC.Browser.ie?a.message+"["+a.number+": "+a.name+"]":a.message?a.message+(a.fileName?a.fileName+":"+a.lineNumber:""):a}function __trcClientTimestamp(){var a=new Date,b=a.getHours(),c=a.getMinutes(),d=a.getSeconds()+a.getMilliseconds()/1e3;return(10>b?"0":"")+b+":"+(10>c?"0":"")+c+":"+(10>d?"0":"")+d.toFixed(3)}function __trcLog(a,b){if(TRC.pConsole("page",TRC.modDebug.getType(a),b,b),"0"==a&&TRC.pConsole("errors",TRC.modDebug.getType(a),b,b),!(window.trc_debug_level0&&(b+="("+c.join(",")+")"),"object"==typeof window.console&&console.log(b),(document.cookie.search("taboola-debug")>0||a<=window.trc_debug_level)&&TRC.modDebug.logMessageToServer(a,b)}}function __trcError(a,b){__trcLog(0,a+(b?": "+__trcFromError(b):"")),b&&b.stack&&"undefined"!=typeof window.console&&console.trace&&console.trace()}function __trcDebug(){var a=Array.prototype.slice.call(arguments);a.unshift(3),__trcLog.apply(null,a)}function __trcInfo(){var a=Array.prototype.slice.call(arguments);a.unshift(2),__trcLog.apply(null,a)}function __trcWarn(){var a=Array.prototype.slice.call(arguments);a.unshift(1),__trcLog.apply(null,a)}function __trcDOMWalker(a,b){for(b(a),a=a.firstChild;a;)arguments.callee(a,b),a=a.nextSibling}function __trcPurgeEventHandlers(a){try{__trcDOMWalker(a,function(a){for(var b in a)"function"==typeof a[b]&&(a[b]=null)})}catch(b){}}function __trcJSONify(a){function b(a){return'"'+a.replace(/[\s\S]/g,function(a){switch(a){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}return a})+'"'}function c(a){for(var b=[],c=0;cf;f++)h.test(d[f].className)&&g.push(d[f]);return g}function __trcToArray(a,b){var c;for(c in a)a.hasOwnProperty(c)&&b.push([c,a[c]])}Gettext=function(a){return{gettext:function(){return""},strargs:function(){return""}}},Gettext.strargs=function(){return""},function(a,b,c){"use strict";var d,e=b.createElement("div"),f=b.createElement("div"),g=function(a,b){return a.classList?a.classList.add(b):(c.dom.removeClass(a,b),void(a.className+=" "+b))},h=function(a){var b=a.which||a.keyCode;27===b&&o()},i=function(a){var b=a.target||a.srcElement;(b===f||"trc_close_modal"===b.id)&&(c.dom.stopEvent(a),o())},j=function(a){/http(s)?:\/\/www\.taboola\.com/.test(a.origin)&&a.data&&1025===+a.data&&o()},k=function(a){var b=[];return b.push("×"),b.push(''),b.join("")},l=function(a,b){for(;a.tagName.toUpperCase()!==b.toUpperCase();)a=a.parentNode;return a},m=function(b){a.showModalDialog(b.href,"","dialogHeight: 550px; dialogWidth: 660px")},n=function(g){var n=l(g.target||g.srcElement,"A");return g&&c.dom.stopEvent(g),c.Browser.ieUpto(7)?m(n):(d||v(),e.innerHTML=k(n.href),c.dom.removeClass(f,"trc_modal_hidden"),c.dom.removeClass(e,"trc_modal_hidden"),c.dom.on(b,"keyup",h),c.dom.on(b,"click",i),c.dom.on(b.getElementById("trc_close_modal"),"click",i),void c.dom.on(a,"message",j))},o=function(){g(f,"trc_modal_hidden"),g(e,"trc_modal_hidden"),c.dom.off(b,"keyup",h),c.dom.off(b,"click",i),c.dom.off(b.getElementById("trc_close_modal"),"click",i),c.dom.off(a,"message",j)},p=function(a){var c=b.createElement("div");return c.id="tbl-aug-"+Math.floor(2147483648*Math.random()).toString(36),r+="#"+c.id+" ",a&&a.appendChild(c),c},q=function(a){var b=[];return b.push(a+'.trc_modal_dialog { width:660px; height:550px; box-shadow: black 0 0 18px 0;font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:12px;border:2px solid #417cc3;border-radius:10px;position:fixed;z-index:99999;background:#f7f9fc;top:50%;left:50%;margin-top:-250px;margin-left:-330px;-moz-box-sizing: content-box; -webkit-box-sizing: content-box;box-sizing: content-box;}'),b.push(a+".trc_modal_mask {z-index:1040;position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:0.5;filter: alpha(opacity=50);}"),b.push(a+".trc_modal_close {font-family:sans-serif!important;width:30px!important;height:30px!important;font-size: 30px!important;font-weight: bold!important;line-height: 28px!important;color: #fff!important;text-shadow: 0 1px 0 #000;opacity: 0.9;filter: alpha(opacity=90);background: #417cc3;padding: 0;cursor: pointer;border: 0;-webkit-appearance: none;text-align: center;border-radius: 15px!important;position:absolute!important;top: -13px;right: -13px;text-decoration: none!important;z-index: 9;}"),b.push(a+".trc_modal_close:hover {text-decoration: none!important;opacity: 1!important;filter: alpha(opacity=100)!important;}"),b.push(a+".trc_modal_hidden {display:none!important;}"),b.push(a+".trc_modal_frame {width: 100%!important;height: 550px!important;}"),b.join("")},r="",s=p(),t=p(s),u=p(t),v=function(){f.className="trc_modal_mask trc_modal_hidden",e.className="trc_modal_dialog trc_modal_hidden",u.appendChild(f),u.appendChild(e),b.body.appendChild(s),c.dom.injectStyle(q(r)),d=!0};c.aboutUs={open:n,close:o}}(window,document,TRC),function(a,b){TRC.aspect={before:function(a,b,c,d){var e=a[b];a[b]=function(){return d&&(a[b]=e),c.apply(this,arguments),e.apply(this,arguments)}},after:function(a,b,c,d){var e=a[b];a[b]=function(){d&&(a[b]=e);var f=e.apply(this,arguments);return c.apply(this,arguments),f}}}}(window,document),function(a,b){var c=TRC.PROTOCOL,d=TRC.AutoPlaylistController=function(a,c,d,e,f,g,h){return this.animationDelay=25,this.videoData=f,this.rbox=a,this.publisher=c,this.lightbox=d,this.videoDoneHandler=null,this.autoPlayContainer=e,this.gt=this.rbox.trc.gt,this.listId=g,this.container=b.createElement("div"),this.countdownBox=null,this.counterBox=null,this.countdownTimer=null,this.playlistRecommendation=null,this.playlistItemBox=b.createElement("div"),this.autoplayTime="undefined"==typeof h?5:h,this.active=-1!=this.autoplayTime,this.isRender=!1,this.createPlayer(),this};d.prototype.videoDone=function(a){"none"==this.countdownBox.style.display&&this.checkContainerVisibility()&&("block"==this.container.style.display||this.lightbox||(null==this.playlistItemBox.firstChild&&this.getPlaylistItem("n"),this.showNextUp()),function(a){if(0>=a)return this.log("playlist",{ri:this.reqId,sd:this.sesData,ui:this.userData,pi:this.videoData.id,pt:"video",li:this.listId}),void this.activateNextUp("n");for(var b=""+a--;b.length<2;)b="0"+b;this.counterBox.innerHTML=Gettext.strargs(this.gt.gettext("in %1 Seconds"),[b]),this.countdownTimer=TRC.Timeout.set(arguments.callee.trcBind(this,a),1e3)}.trcBind(this,this.autoplayTime)(),this.autoplayTime>0&&this.showCountdown())},d.prototype.getScreenPosition=function(){return Math.max(b.documentElement.scrollTop,b.body.scrollTop)},d.prototype.autoPlayerLinkTargetSupport=function(c){function d(c){var d;return b.createEvent?(d=b.createEvent("MouseEvent"),d.initMouseEvent("click",!0,!0,a,0,0,0,0,0,!1,!1,!1,!1,0,null)):(d=b.createEventObject(),d.button=1),d}"undefined"!=typeof c?this.playlistRecommendation.link.onclick(c,"playlist"):this.playlistRecommendation.link.onclick(d(this.playlistRecommendation),"playlist")},d.prototype.activateNextUp=function(a,b){this.countdownTimer&&(TRC.Timeout.clear(this.countdownTimer),this.countdownTimer=null),TRC.pageManager.storePublisherValue(this.publisher,"auto-play-intent",(new Date).getTime()+":"+this.playlistRecommendation.id+":"+a),this.videoData=this.playlistRecommendation,this.lightbox?(this.createPlayer(),this.getPlaylistItem(a)):this.autoPlayerLinkTargetSupport(b),"none"!=this.countdownBox.style.display&&this.hideCountdown(),this.hideNextUp(),this.playlistItemBox.removeChild(this.playlistItemBox.firstChild)},d.prototype.showNextUp=function(){this.container.style.display="block",this.container.style.opacity=1,this.log("visible",{ri:this.reqId,sd:this.sesData,ui:this.userData,pi:this.videoData.id,pt:"video",li:this.listId}),TRC.Browser.ie&&(this.container.style.marginLeft=(this.container.parentNode.offsetWidth-this.container.clientWidth)/2+"px")},d.prototype.hideNextUp=function(){this.container.style.display="none",this.container.style.opacity=0},d.prototype.animValueSet=function(a,b,c,d){switch(d){case"size":a[b]=c+"px";break;case"opacity":a.filter="alpha(opacity="+(c+100)+")",a[b]=c;break;default:a[b]=c}},d.prototype.animCall=function(a,b,c,d,e,f){"undefined"==typeof f&&(f="size");var g=parseInt(b/this.animationDelay),h=parseFloat(c[d]),i=(a-h)/g*5;this.animValueSet(c,d,h+i,f),b-this.animationDelay>0?TRC.Timeout.set(arguments.callee.trcBind(this,a,b-this.animationDelay,c,d),this.animationDelay):(this.animValueSet(c,d,a,f),"function"==typeof e&&e())},d.prototype.showCountdown=function(){var a=this.countdownBox.parentNode,b=Math.max(a.clientWidth,a.offsetWidth);this.countdownBox.style.display="inline";var c=Math.max(a.clientWidth,a.offsetWidth);a.style.width=b+"px",this.animCall(c,750,a.style,"width")},d.prototype.hideCountdown=function(){this.countdownBox.style.display="none",this.countdownBox.parentNode.style.width="auto"},d.prototype.checkContainerVisibility=function(){return this.autoPlayContainer.playerbox.offsetTop>=this.getScreenPosition()?!0:!1},d.prototype.createPlayer=function(){if(this.lightbox){if("undefined"!=typeof this.autoPlayContainer.playerbox)for(;this.autoPlayContainer.playerbox.childNodes.length>0;)this.autoPlayContainer.playerbox.removeChild(this.autoPlayContainer.playerbox.firstChild);this.autoPlayContainer.createEmbedIframe(this.rbox,this.autoPlayContainer.playerbox,this.videoData),"function"==typeof this.autoPlayContainer.setTitle&&this.autoPlayContainer.setTitle(this.videoData.title)}},d.prototype.close=function(){this.videoDoneHandler&&this.videoDoneHandler.remove(),"function"==typeof this.videoData.lightboxClosed&&this.videoData.lightboxClosed()},d.prototype.render=function(a){if(this.active){this.isRender=!0,this.getPlaylistItem("s"),this.videoDoneHandler=TRC.listen("videoDone",this.videoDone.trcBind(this)),a.appendChild(this.container),this.container.className="trc_autoplaylist-box",this.container.style.display="none",this.container.appendChild(this.genHeader()),this.container.appendChild(this.playlistItemBox);var c=b.createElement("div");c.style.clear="both",this.container.appendChild(c),this.container.onmouseover=function(){this.log("explore",{ri:this.reqId,sd:this.sesData,ui:this.userData,pi:this.videoData.id,pt:"video",li:this.listId})}.trcBind(this),null!=this.playlistRecommendation&&this.showNextUp()}},d.prototype.genPlaylistURL=function(a,b){var d={};d.autoplaylist={placement:"autoplaylist",origin:this.listId.replace(/^rbox-/,""),"list-size":1,"item-id":this.videoData.id},a&&(d.autoplaylist.intent=a);var e=this.rbox.trc.formatTRCRequest(d,"video");return e.cb=this.rbox.trc.genCallback(b),c+"//"+this.rbox.domain+"/"+this.publisher+"/trc/3/json?tim="+encodeURIComponent(__trcClientTimestamp())+(this.rbox.trc.trcByPass?"&trc_skip_failover=yes&":"&")+encodeURIComponent(__trcJSONify(e))+TRC.pageManager.additionalDispatchParams()},d.prototype.getPlaylistItem=function(a){if(!this.lightbox)return void TRC.Timeout.set(this.getPlaylistItemFromRBox.trcBind(this),0);var b=this.genPlaylistURL(a,function(a){if(!(a&&a.trc&&a.trc.vl&&a.trc.vl.length&&a.trc.vl[0].v))return void this.hideNextUp();this.reqId=a.trc.vl[0].req,this.sesData=a.trc.sd,this.userData=a.trc.ui,TRC.pageManager.storePublisherValue(this.publisher,"session-data",this.sesData),TRC.pageManager.storeValue("user-id",this.userData);var b=a.trc.vl[0].v;this.playlistRecommendation=b.length?b[0]:b,this.playlistItemBox.appendChild(this.drawVideoBox(this.playlistRecommendation)),this.countdownBox&&this.showNextUp()}.trcBind(this));this.rbox.trc.loadExternal(b,"js",function(){this.playlistRecommendation||this.hideNextUp()})},d.prototype.getPlaylistItemFromRBox=function(a){null!=this.playlistItemBox.firstChild&&this.playlistItemBox.removeChild(this.playlistItemBox.firstChild);for(var b=0,c=0;c=a)}}(this,e[f]);return this.compatibility={lineClamp:function(){return"undefined"!=typeof b.createElement("div").style.webkitLineClamp}(),cssTransforms:function(){for(var a=b.createElement("div"),c=["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"],d=0;d=0?a.split("{")[0]+"{":"";return a=h?a.substring(a.indexOf("{")+1):a,c=a.split("{"),d=c.length>1?c[0].split("."):a.split("."),g=d.length,2>g?h+a:(e=d[1],__trcTrim(e)===r?h+a:(b[__trcTrim(e)]?(f(1),d[0]="#"+b[__trcTrim(e)].cssDivsArr.join(" #")+" "+d[0]):(f(p),d[0]=i(d.join("."))+d[0]),c.length>1?(c[0]=d.join("."),h+c.join("{")):h+d.join(".")))}function c(a,c){var e=a.split(","),f=e.length,i="";if(h()>l&&(i=m,__trcDebug("Number of augmented css rules before Split : "+h()),g(0)),null===c)return d(2>f?a:e,i);if(2>f)return i+b(a,c);for(var j=0;f>j&&(e[j]=b(e[j],c),!(e[j].indexOf("{")>=0&&f-1>j));j++);return i+e.join(",")}function d(a,b){var c=a.length;if("string"==typeof a)return f(1),b+a;for(var d=0;c>d&&(f(1),!(a[d].indexOf("{")>=0&&c-1>d));d++);return b+a.join(",")}function e(a,b){var d=a.split("}"),e=d.length;if(2>e)return c(a,b);for(var f=0;e>f;f++)d[f]=c(d[f],b);return d.join("}")}function f(a){o+=a}function g(a){o=a}function h(){return o}function i(a){return j(!1,!1).replace(new RegExp("{class}","gm"),a)}function j(a,b){var c;if("object"==typeof a){q="";for(var d in a)"string"==typeof d&&""!==d&&(c="#"+a[d].cssDivsArr.join(" #")+" ",q=q+c+" "+n),p++;return q="#"+b.iframe.join(" #")+" "+n+"#"+b.topDiv.join(" #")+" "+n+q.slice(0,q.length-n.length)}return q}var k,l=4040,m=" style_split",n="{class},",o=0,p=0,q="",r="vidiscovery-note";return k={setStyleTextIdPrefix:function(a,b,c){b&&j(b,c);var d=e(a,b);return __trcDebug("Number of augmented css rules left : "+h()),g(0),d},setStyleElements:function(a){var b=a.split(m),c=b.length;c>1&&TRC.pConsole("page","debug","splitting css","");for(var d=0;c>d;d++)TRC.dom.injectStyle(b[d])},setStyleToElements:function(a,b,c){try{var d=[],e=b.split(","),f=[];"Array"==__trcTypeOf(a)?d=a:d.push(a);for(var g=0,h=d.length;h>g;g++){var i=0;for(e.length;i=1&&31>=c||127==c||0==f&&c>=48&&57>=c||1==f&&c>=48&&57>=c&&45==h?"\\"+c.toString(16)+" ":c>=128||45==c||95==c||c>=48&&57>=c||c>=65&&90>=c||c>=97&&122>=c?d.charAt(f):"\\"+d.charAt(f)}return g}}()},a._trcIsUTactive&&(k.classSplit=b,k.multiRuleSplit=c,k.ruleSplit=e,k.addRuleCounter=f,k.getCssIdsTemplate=j),k}(window),TRC.css.responsive=function(){function a(a,b){var c=TRC.Browser.ieUpto(7)?99:99.99;return(c-a*b)/a}function b(b,c,d,e,f){var g=a(b,d);f?e.push(TRC.css.utils.setStyleTextIdPrefix("."+c+" .videoCube{width: "+g+"%; position: relative; float: left; margin: 0 0 "+d+"% "+d+"%;}",TRC.modesCache,TRC.lightBoxCssReset)):e.push("."+c+" .videoCube{width: "+g+"%; position: relative; float: left; margin: 0 0 "+d+"% "+d+"%;}")}function c(a,b,c,e,f){var g=" .trc_rbox_div .videoCube {width: "+(1==a.cells?"100":"48")+"%;}",h=" .trc_header_left_column {width: "+(1==a.cells?"100":"48")+"%;}",i=" .trc_header_right_column {display: "+(1==a.cells?"none":"inline")+";}",j="."+b+" .trc_rbox_div div.videoCube:nth-of-type(-n+"+a.rows+"){float:left;clear:left;}",k="."+b+" .trc_rbox_div div.videoCube:nth-of-type(n+"+(a.rows+1)+"){float:none;clear:right;margin-left:auto;}";f?d(a,b,c,e):e?(c.push(TRC.css.utils.setStyleTextIdPrefix(k,TRC.modesCache,TRC.lightBoxCssReset)),c.push(TRC.css.utils.setStyleTextIdPrefix(j,TRC.modesCache,TRC.lightBoxCssReset))):(c.push(k),c.push(j)),e?(c.push(TRC.css.utils.setStyleTextIdPrefix("."+b+g,TRC.modesCache,TRC.lightBoxCssReset)),c.push(TRC.css.utils.setStyleTextIdPrefix("."+b+h,TRC.modesCache,TRC.lightBoxCssReset)),c.push(TRC.css.utils.setStyleTextIdPrefix("."+b+i,TRC.modesCache,TRC.lightBoxCssReset))):(c.push("."+b+g),c.push("."+b+h),c.push("."+b+i))}function d(a,b,c,d){var e,f,g,h=a.rows*a.cells-a.rows;for(e=1;e<=a.rows;e++)f="."+b+" .trc_rbox_div .videoCube_"+e+"_child{float:left;clear:left;}",d?c.push(TRC.css.utils.setStyleTextIdPrefix(f,TRC.modesCache,TRC.lightBoxCssReset)):c.push(f);for(e=a.rows+1;h>=e;e++)g="."+b+".trc_rbox_div .videoCube_"+e+"_child{float:none;clear:right;margin-left:auto;}",d?c.push(TRC.css.utils.setStyleTextIdPrefix(g,TRC.modesCache,TRC.lightBoxCssReset)):c.push(g)}function e(a,b,c,d,e,f){var h=a.rows*a.cells,i="."+b+" div.videoCube:nth-of-type(-n+"+h+"){display:block;visibility:visible;}",j="."+b+" div.videoCube:nth-of-type(n+"+(h+1)+"){display:none;visibility:hidden;}";e?g(c,d,h,b,f):f?(c.push(TRC.css.utils.setStyleTextIdPrefix(i,TRC.modesCache,TRC.lightBoxCssReset)),c.push(TRC.css.utils.setStyleTextIdPrefix(j,TRC.modesCache,TRC.lightBoxCssReset))):(c.push(i),c.push(j))}function f(a,c,d,e,f){var g="."+c+" .trc_rbox_outer .videoCube .video-label-box {height:auto;}",i="."+c+" .trc_rbox_outer .videoCube {margin-bottom:10px;}",j="."+c+" .trc_rbox_outer{margin-left:-"+a.margin+"%;}",k=a.rows*a.cells;1==a.cells&&(e?h(d,c,f,k):f?(d.push(TRC.css.utils.setStyleTextIdPrefix(g,TRC.modesCache,TRC.lightBoxCssReset)),d.push(TRC.css.utils.setStyleTextIdPrefix(i,TRC.modesCache,TRC.lightBoxCssReset))):(d.push(g),d.push(i))),f?d.push(TRC.css.utils.setStyleTextIdPrefix(j,TRC.modesCache,TRC.lightBoxCssReset)):d.push(j),d.push("."+c+" .videoCube_aspect{padding-bottom:"+a.ratio+"%; width: 100%;}"),b(a.cells,c,a.margin,d,f)}function g(a,b,c,d,e){var f;for(f=1;c>=f;f++)e?a.push(TRC.css.utils.setStyleTextIdPrefix("."+d+" .videoCube_"+f+"_child{display:block;visibility:visible;}",TRC.modesCache,TRC.lightBoxCssReset)):a.push("."+d+" .videoCube_"+f+"_child{display:block;visibility:visible;}");for(f=c+1;b>=f;f++)e?a.push(TRC.css.utils.setStyleTextIdPrefix("."+d+" .videoCube_"+f+"_child{display:none;visibility:hidden;}",TRC.modesCache,TRC.lightBoxCssReset)):a.push("."+d+" .videoCube_"+f+"_child{display:none;visibility:hidden;}")}function h(a,b,c,d){for(var e,f,g=1;d>=g;g++)e="."+b+" .videoCube_"+g+"_child .video-label-box {height:auto;}",f="."+b+" .videoCube_"+g+"_child{margin-bottom:10px;}",c?(a.push(TRC.css.utils.setStyleTextIdPrefix(e,TRC.modesCache,TRC.lightBoxCssReset)),a.push(TRC.css.utils.setStyleTextIdPrefix(f,TRC.modesCache,TRC.lightBoxCssReset))):(a.push(e),a.push(f))}var i;return i={rulesToCssText:function(a,b,d,g,h){var i,j,k,l,m=[],n=TRC.Browser.ieUpto(8);for(i=0;j=b[i];i++)n||(k="undefined"!=typeof j.min||"undefined"!=typeof j.max,k&&m.push("@media screen and "),"undefined"!=typeof j.min&&(m.push("(min-width: "+j.min+"px) "),j.max&&m.push("and ")),"undefined"!=typeof j.max&&m.push("(max-width: "+j.max+"px) "),k&&m.push("{")),l=a+(n?"_rule"+i:""),h?c(j,l,m,g,n):f(j,l,m,n,g),e(j,l,m,d,n,g),!n&&k&&m.push("} ");return m.join("")},getRulePercentageWidth:a}}(),function(){TRC.DaisyChain=function(a,b){var c,d,e,f,g={},h="finish",i="active",j=0,k=0,l=TRC.text,m=i;this.renderInIframe=function(a,b){var c=a.contentWindow||a.contentDocument,d=b.trc.tag;return c.document&&(c=c.document),a.style.width=d.w||"0px",a.style.height=d.h||"0px",c.open(),c.write(this.normalizeTag(a,b)),c.close(),a},this.normalizeTag=function(b,c){var d=a.global["normalize-provider-tag"];return"function"==typeof d?d(c.trc.tag.js,c,b,l.htmlUnescape):l.htmlUnescape(c.trc.tag.js)},this.createIframe=function(){var a=document.createElement("iframe");return a.style.border=a.frameBorder=a.border="0",a.scrolling="no",b.container.appendChild(a),a},this.addToChain=function(a,b){var c=b||a.trc.tag.pr;g[c]=a,j++,TRC.pConsole("mediation","debug","pushing in daisy chain ",a,"object")},this.renderAd=function(a){var b,d;try{return e&&TRC.Timeout.clear(e),m==h?(TRC.pConsole("mediation","info","passback rejected - daisy chain finished"),__trcWarn("passback rejected - daisy chain finished- "+c),!1):(this.incrementPriority(),g[c]?(b=g[c],k++,b.trc.tag?this.renderScript(b):this.renderTaboola(b,a),!0):(j>k&&__trcError("Error in DaisyChain.renderAd - non continuous priority flaw - "+c),m=h,!1))}catch(i){return d=b&&b.trc.tag?b.trc.tag.jsid:c,__trcError("Error in DaisyChain.renderAd - "+d,i),f||(f=!0,this.renderAd()),!1}},this.incrementPriority=function(){c?c++:c=1},this.renderTaboola=function(c,d){TRC.pConsole("mediation","debug","rendering taboola"),this.removeIframe(),b.response=c,m=h,d?d.loadScriptCallback(b.response):a.internalDrawRBox(b)},this.renderScript=function(b){var c=b.trc.tag;e=this.setDeferredAvailableEvent(c.uip,c.ri,a.global["mediation-tag-timeout"]||1e3),TRC.pConsole("mediation","debug","rendering script : "+c.jsid,e,"string"),d?this.renderInIframe(d,b):(d=this.createIframe(),this.renderInIframe(d,b))},this.setDeferredAvailableEvent=function(b,c,d){return TRC.Timeout.set(function(){m=h,a.sendEvent("available",{ri:c,uip:b},null,!0),TRC.pConsole("mediation","debug","send available on placement : "+b)},d)},this.removeIframe=function(){d&&d.parentElement.removeChild(d)},TRC.pConsole("mediation","info","starting daisy chain on placement : "+b.placement)}}(),TRC.modDebug=function(a,b){function c(a){TRC.net.fireSimpleHttpRequest(a)}function d(a){switch(a){case 0:return"error";case 1:return"warn";case 2:return"info";case 3:return"debug";default:return}}function e(b,c,e){return i.timeStamp+escape(e)+"&"+i.type+escape(d(b))+"&"+i.message+escape(c)+(trc_debug_level>1?"&"+i.debugLevel+trc_debug_level:"")+"&"+i.id+Math.floor(1e4*Math.random())+(a.TRC.version?"&cv="+a.TRC.version:"")}var f,g=TRC.PROTOCOL,h=2,i={timeStamp:"tim=",type:"type=",message:"msg=",debugLevel:"llvl=",id:"id="},j=function(){var a={};return{setMessageCache:function(b){a[b]?a[b]+=1:a[b]=1},getMessageCount:function(b){return a[b]?a[b]:0}}}();return f={logMessageToServer:function(b,d){if(j.setMessageCache(d),j.getMessageCount(d)<=h){var f=a.TRCImpl&&TRCImpl.domain?TRCImpl.domain:"trc.taboola.com",i=a.TRCImpl?TRCImpl["normalize-log-param"]("publisher",TRC.publisherId):TRC.publisherId,k=g+"//"+f+"/"+i+"/log/2/debug?"+e(b,d,__trcClientTimestamp());c(k)}},getType:d},a._trcIsUTactive&&(f.getType=d,f.messageCache=j,f.getLogParams=e),f}(window,document),function(a,b){TRC.DeepLinking={isAppStoreURL:function(a,b){var c=/^(market|itms-apps|ms-windows-store)\:\/\//,d=b&&new RegExp(b);return c.test(a)||!!b&&d.test(a)},openDeepLink:function(a){var b=document.createElement("iframe");return b.src=a,b.className="tbl-deep-link",b.height=0,b.width=0,document.body.appendChild(b),b}}}(window,document),function(a,b){function c(a){try{if(f&&(TRC.Browser.ieUpto(10)?b.detachEvent("onreadystatechange",f):(b.removeEventListener("DOMContentLoaded",arguments.callee,!1),TRC.Interval.clear(f))),TRC.dom.isReady)return;TRC.dom.isReady=!0,TRC.dom.onReady=function(a){a()};for(var c=0;cf;f++)c=this.createAugmentingContainer(e),e=c,d.push(c);return b&&d[a-1].appendChild(b),d},createAugmentingContainer:function(a){var c=b.createElement("div");return c.id="tbl-aug-"+Math.floor(2147483648*Math.random()).toString(36),a&&a.appendChild(c),c},generateAugmentationPrefix:function(a){for(var b="",c=0;c1.3;return function(){return a}}(),isRetina:function(){var a=(window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)").matches)||window.devicePixelRatio&&window.devicePixelRatio>2)&&/(iPad|iPhone|iPod)/g.test(navigator.userAgent);return function(){return a}}(),isSmartPhone:function(){var a=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 320px) and (max-device-width : 480px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent);return function(){return a}}(),isTablet:function(){var a=window.matchMedia&&window.matchMedia(" only screen and (min-device-width : 768px) and (max-device-width : 1024px)").matches||/(iPhone|iPod)/g.test(navigator.userAgent);return function(){return a}}(),isDesktop:function(){return!(this.isTablet()||this.isSmartPhone())}}}(window,document),TRC.eventDelegator=function(a,b){function c(a,b){var c;i[a]&&(c=i[a]._all,d(c,b?b:""),b&&i[a][b.container.id]&&(c=i[a][b.container.id],d(c,b)))}function d(a,b){var c,d=a.length;for(c=0;d>c;c++)try{a[c]instanceof Function&&setTimeout(function(a,b){return function(){a(b)}}(a[c],b),0)}catch(e){__trcError("executeHandlers",e)}}function e(a,b){var c;if(!b)return void setTimeout(a,0);for(c in b)try{a instanceof Function&&setTimeout(function(a,b){return function(){a(b)}}(a,b[c]),0)}catch(d){__trcError("executeHandlers",d)}}function f(a){i[a]=[],i[a]._all=[]}function g(a,b){i[a][b]=[]}var h,i=[],j={},k={subscribe:function(a,b,c){i[a]||f(a),c?(i[a][c]||g(a,c),i[a][c].push(b),j[a]&&j[a][c]&&e(b,{mode:j[a][c]})):(i[a]._all.push(b),j[a]&&e(b,j[a]))},dispatch:function(a,b){j[a]=j[a]||{},b?j[a][b.container.id]=b:j[a]._all={},c(a,b?b:null)},resetEvents:function(){j={}}};if(a._trcIsUTactive&&(k.processDelegatorsStack=c,k.executeHandlers=d,k.executePreviousEvents=e,k.delegatorsStack=i,k.eventsStack=j),TRC.subscriptionRegister)for(;TRC.subscriptionRegister.length;)h=TRC.subscriptionRegister.shift(),k.subscribe(h.event,h.handler,h.container);return k}(window,document),function(a,b){function c(a){"undefined"==typeof g[a]&&(g[a]=[])}function d(a,b){c(a),g[a].forEach(function(c,d){return b==c.id?void g[a].splice(d,1):void 0})}var e,f,g={},h=0;return TRC.listen=function(a,b){if("object"==typeof a&&a.length)return a.forEach(function(a){TRC.listen(a,b)}),null;c(a);var e={id:h++,handler:b,eventName:a,remove:function(){d(this.eventName,this.id)}};return g[a].push(e),e},TRC.dispatch=function(a,b){c(a);var d=e(a,b);g[a].forEach(function(a){f(function(){a.handler.call(this,d)}.trcBind(this))}.trcBind(this))},b.addEventListener&&b.dispatchEvent?(b.addEventListener("trcFakeEvents",function(a){a.cx()},!1),e=function(a,c){var d=b.createEvent("Event");return d.initEvent(a,!1,!1),"object"==typeof c?__trcCopyProps(c,d):d.data=c,d},void(f=function(a){var c=e("trcFakeEvents");c.cx=a,b.dispatchEvent(c)})):(b.documentElement.attachEvent("onpropertychange",function(a){"trcFakeEvents"==a.propertyName&&a.cx()}),e=function(a,c){var d;return c&&c.generator&&"ceo"===c.generator?(c.type=a,c):(d=b.createEventObject(),d.generator="ceo",d.type=a,"object"==typeof c?__trcCopyProps(c,d):d.data=c,d)},void(f=function(a){var c=e("trcFakeEvents");c.cx=a,c.propertyName="trcFakeEvents",b.documentElement.fireEvent("onpropertychange",c)}))}(window,document),function(a){var b=TRC.ExpandAnimationManager=function(b){this.rbox=b,this.container=b.container,this.trcContainer=this.container._trc_container,TRC.css.utils.setStyleElements(this.createCSS()),this.trcContainer.className+=" trc_expandable",this.throttledExpandScrollHandler=this.scrollHandler.trcBind(this).trcThrottle(10),TRC.dom.on(a,"scroll",this.throttledExpandScrollHandler)};b.prototype.scrollHandler=function(){this.rbox.isInViewPort(this.container,0)?this.trcContainer.wasOutOfViewPort&&(this.trcContainer.className+=" trc_show",TRC.dom.off(window,"scroll",this.throttledExpandScrollHandler)):this.trcContainer.wasOutOfViewPort=!0},b.prototype.createCSS=function(){for(var a=[],b="#"+TRC.css.utils.escape(this.container.id),c=this.rbox.trc.getProperty(this.rbox.mode_name,"expand-animation-duration"),d=this.rbox.trc.getProperty(this.rbox.mode_name,"expand-animation-max-height"),e=[b+" .trc_rbox_container.trc_expandable {"+TRC.css.utils.generateCssRuleWithVendorPrefixes("transition-duration",c+"ms")+"}",b+" .trc_rbox_container.trc_expandable.trc_show { max-height: "+d+"px;}"],f=0;f0)return!0}else for(b in a)if(a.hasOwnProperty(b))return!0;return!1},copyProperties:function(a,b,c){var d;if(this.isType(c,"Array")){d=c.length;for(var e=0;d>e;e++)b[c[e]]=a[c[e]]?a[c[e]]:void 0;return!0}return!1},getRandomIds:function(a){for(var b=0;bg;g++)a.call(e,c[g])&&h.push(c[g]);return h}}(),merge:function(a){"use strict";if(void 0===a||null===a||a.constructor!==Object)return null;for(var b=TRC.util,c=1;cg;g++)e=f[g],a[e]=d[e]}return a}}}(window,document),"undefined"==typeof Array.prototype.push&&(Array.prototype.push=function(){for(var a=0;ad;d++)d in this&&a.call(c,this[d],d,this)}),"undefined"==typeof document.getElementsByClassName&&(document.getElementsByClassName=function(a){var b=[];elms=document.getElementsByTagName("*");var c=a.split(/ +/);a:for(var d=0;d=0?a:document.trcGetParentByClassName(a.parentNode,b):null}),"undefined"==typeof document.trcGetChildByClassName&&(document.trcGetChildByClassName=function(a,b){return a?a.className.split(/\s+/).indexOf(b)>=0?a:document.trcGetChildByClassName(a.firstChild,b):null}),"undefined"==typeof Function.prototype.trcBind&&(Function.prototype.trcBind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.concat(Array.prototype.slice.call(arguments,0));return b.apply(a,d)}}),"undefined"==typeof Function.prototype.trcThrottle&&(Function.prototype.trcThrottle=function(a){var b,c=this;return function(){var d=arguments;b&&clearTimeout(b),b=setTimeout(function(){c.apply(c,d)},a)}}),"undefined"==typeof document.head&&(document.head=document.getElementsByTagName("head")[0]),TRC.GoogleAds=function(){return"object"==typeof window.console&&console.log("TRC.GoogleAds is Deprecated"),{draw:function(){}}},TRC.math=TRC.math||function(a,b){function c(a,b,c){return"undefined"==typeof c||0===+c?Math[a](b):(b=+b,c=+c,isNaN(b)||"number"!=typeof c||c%1!==0?NaN:(b=b.toString().split("e"),b=Math[a](+(b[0]+"e"+(b[1]?+b[1]-c:-c))),b=b.toString().split("e"),+(b[0]+"e"+(b[1]?+b[1]+c:c))))}return{roundByDecimal:function(a,b){var c=a/b,d=c.toFixed(0),e=c-d;return d*b+b*Math.round(e)},round10:function(a,b){return c("round",a,b)}}}(window,document),function(win,doc){var LightBoxManager=TRC.LightBoxManager=function(a,b,c,d,e){if(this.animationLength=300,this.fps="number"==typeof e?e:TRC.Browser.firefoxUpto(3.5)?20:45,this.listId=c,this.direction="undefined"!=typeof d?d:"ltr",this.origCoords=[0,0],this.cover=null,this.cssResetTopElements={},this.lightbox_container=null,this.whitebox=null,this.whitebox_header=null,this.playerbox=null,this.playerContainer=null,this.animationLoop=null,this.animationEvents=[],this.whiteboxSizeHandler=null,this.position_fixed_works=!1,this.closeButton=null,this.player_width=0,this.player_height=0,this.scalingLock=!1,this.additionalElements={},this.displayTitle=a,this.elementsHaveBeenAdded=!1,b&&"number"==typeof b.clientX?this.origCoords=[b.clientX,b.clientY]:this.origCoords=[this.getScreenWidth()/2,100],TRC.Browser.ie){var f=this.GetZoomFactor();this.origCoords=[Math.round((this.origCoords[0]-doc.documentElement.clientLeft)/f),Math.round((this.origCoords[1]-doc.documentElement.clientTop)/f)]}return this.createLightbox(),this.lightbox_container.style.cursor="wait",this};LightBoxManager.prototype.GetZoomFactor=function(){if(!doc.body.getBoundingClientRect)return 1;var a=doc.body.getBoundingClientRect(),b=a.right-a.left,c=doc.body.offsetWidth;return Math.round(b/c*100)/100},LightBoxManager.prototype.addElements=function(a){"object"!=typeof a&&(a={bottom:a});for(p in a)this.additionalElements[p]||(this.additionalElements[p]=[]),this.additionalElements[p].push(a[p])},LightBoxManager.prototype.createEmbedIframe=function(a,b,c){var d=TRC.baseDomain+"publisher."+a.trc.version+".js",e={};__trcCopyProps(c,e),delete e.link;try{var f=doc.createElement("iframe");f.frameBorder=f.border="0",f.scrolling="no",f.id="_trcLightIframeObj";var g=TRC.Browser.ie&&doc.domain!=win.location.hostname;g&&(f.src='javascript:""'),b.appendChild(f);var h=f.contentDocument?f.contentDocument:f.contentWindow.document;h.write(''),TRC.Timeout.set(function(){try{h.close()}catch(a){}},TRC.Browser.ie?3e3:0)}catch(i){return}},LightBoxManager.prototype.renderElements=function(){function a(a,b){var c=doc.createElement("div");switch(a){case"left":c.style.cssFloat=c.style.styleFloat="left";break;case"right":c.style.cssFloat=c.style.styleFloat="left"}"bottom"==a?this.playerbox.parentNode.appendChild(c):this.playerbox.parentNode.insertBefore(c,this.playerBox);try{"function"==typeof b?b(c):"function"==typeof b.render&&b.render(c)}catch(b){__trcError("Error in lightbox sub-element rendering",b)}}this.elementsHaveBeenAdded=!0,"top"in this.additionalElements&&this.additionalElements.top.forEach(a.trcBind(this,"top")),"left"in this.additionalElements&&this.additionalElements.left.forEach(a.trcBind(this,"left")),"right"in this.additionalElements&&this.additionalElements.right.forEach(a.trcBind(this,"right")),"bottom"in this.additionalElements&&this.additionalElements.bottom.forEach(a.trcBind(this,"bottom"))},LightBoxManager.prototype.createLightbox=function(){var width=this.getScreenWidth();this.createCoverIframe(),this.lightbox_container=doc.createElement("div"),this.lightbox_container.style.width=width+"px",this.lightbox_container.style.left="0px",this.lightbox_container.style.top="0px",this.lightbox_container.className="trc_lightbox_base trc_lightbox "+this.listId,this.lightbox_container.onclick=this.close.trcBind(this);var inner_div=doc.createElement("div");with(inner_div.style.display="block",inner_div.className="trc_lightbox_overlay",inner_div.style.width=width+"px",inner_div.style.left="0px",inner_div.style.top="0px",this.lightbox_container.appendChild(inner_div),inner_div=doc.createElement("div"),inner_div.style.display="block",inner_div.className="trc_lightbox_transparent",inner_div.style.width=width+"px",inner_div.style.left="0px",inner_div.style.top="0px",this.lightbox_container.appendChild(inner_div),TRCImpl.cssReset?this.setCssResetDivs(this.lightbox_container,"topDiv"):doc.body.appendChild(this.lightbox_container),this.whitebox=doc.createElement("div"),this.whitebox.className="trc_whitebox",this.whitebox.style.visibility="hidden",this.whitebox.onclick=function(a){a||(a=win.event),a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},inner_div.appendChild(this.whitebox),this.playerbox=doc.createElement("div"),this.playerbox.style.width="0px",this.playerContainer=doc.createElement("div"),this.playerContainer.appendChild(this.playerbox),this.playerContainer.style)width="0px",height="0px",overflow="hidden";with(this.whitebox.appendChild(this.playerContainer),inner_div.style)marginTop="30px",position="fixed";this.position_fixed_works=30===inner_div.offsetTop,this.position_fixed_works||(inner_div.style.position="absolute"),this.lightbox_container.style.height=this.lightbox_container.firstChild.style.height=this.getScreenHeight()+"px"},LightBoxManager.prototype.createCoverIframe=function(){with(this.cover=doc.createElement("iframe"),this.cover.style)width=this.getScreenWidth()+"px",height=this.getScreenHeight()+"px",border=0;this.cover.scrolling="no",this.cover.className="trc_cover_iframe",TRCImpl.cssReset?this.setCssResetDivs(this.cover,"iframe"):doc.body.appendChild(this.cover)},LightBoxManager.prototype.setCssResetDivs=function(a,b){for(var c,d=a,e=TRC.lightBoxCssReset[b].length,f=e-1;f>=0;f--)c=doc.createElement("div"),c.id=TRC.lightBoxCssReset[b][f],c.appendChild(d),d=c;doc.body.appendChild(d),this.cssResetTopElements[b]=d},LightBoxManager.prototype.createHeader=function(a,b){var c=doc.createElement("div");if(c.id="trc_lightbox_header",c.style.display="none","undefined"!=typeof b&&""!=b){var d=doc.createElement("div");d.id="branding_div_lightbox";var e=doc.createElement("img");e.id="branding_img_lightbox",e.src=b,d.style.styleFloat=d.style.cssFloat="ltr"==this.direction?"right":"left",e.style.display="none",d.appendChild(e),c.appendChild(d)}var f=doc.createElement("div");this.displayTitle?f.innerHTML=a:(f.innerHTML="",f.style.height="22px"),c.appendChild(f),c.titlebox=f,this.whitebox_header=c,this.whitebox.insertBefore(c,this.whitebox.firstChild)},LightBoxManager.prototype.setTitle=function(a){this.displayTitle?this.whitebox_header.titlebox.innerHTML=a:this.whitebox_header.titlebox.innerHTML=" "},LightBoxManager.prototype.createLightboxCloseButton=function(){this.closeButton=doc.createElement("div"),this.closeButton.className="trc_whiteboxCloseButton",this.closeButton.innerHTML="x",this.closeButton.onclick=this.close.trcBind(this),this.whitebox.insertBefore(this.closeButton,this.whitebox.firstChild)},LightBoxManager.prototype.startAnimate=function(a,b){var c=function(){for(var c=0;c0&&(this.cur=this.end),this.prop){case"opacity":this.elm[this.prop]=this.cur,this.elm.filter="alpha(opacity="+100*this.cur+")";break;default:this.elm[this.prop]=this.cur+this.unit}return++this.step>this.steps?(this.done=!0,c(),!0):!1}).trcBind(a))},this)},LightBoxManager.prototype.animationMainLoop=function(){this.animationEvents.forEach(function(a,b,c){null!=a&&a()&&(c[b]=null)})},LightBoxManager.prototype.getScreenWidth=function(){return doc.body.scrollWidth},LightBoxManager.prototype.getScreenHeight=function(){return Math.max(doc.body.scrollHeight,doc.documentElement.scrollHeight)},LightBoxManager.prototype.getLeftMargin=function(){return(this.getScreenWidth()-this.playerContainer.scrollWidth)/2},LightBoxManager.prototype.getScreenPosition=function(){return Math.max(doc.documentElement.scrollTop,doc.body.scrollTop)},LightBoxManager.prototype.fixSyndicatorLogo=function(){if(!this.scalingLock&&"none"!=this.whitebox_header.style.display){var branding_img=this.whitebox_header.getElementsByTagName("img");if(branding_img.length>0)with(branding_img[0].style)height=this.whitebox_header.titlebox.scrollHeight+"px",width="auto",display="block";this.whitebox_header.style.width=this.player_width+"px"}},LightBoxManager.prototype.animateOpening=function(){with(this.scalingLock=!0,this.playerContainer.style.visibility="hidden",this.whitebox.style)width="10px",height="10px",marginLeft=this.origCoords[0]-5+"px",marginTop=this.origCoords[1]-5+"px",visibility="visible";var playerW=this.playerContainer.scrollWidth,playerH=this.playerContainer.scrollHeight;this.startAnimate([[this.whitebox.style,"width",10,playerW,"px",this.animationLength],[this.whitebox.style,"height",10,playerH,"px",this.animationLength],[this.whitebox.style,"marginLeft",this.origCoords[0]-5,this.getLeftMargin(),"px",this.animationLength],[this.whitebox.style,"marginTop",this.origCoords[1]-5,30,"px",this.animationLength]],function(){this.createLightboxCloseButton(),this.whitebox_header.style.display="block",this.scalingLock=!1,this.player_width=playerW-.2,this.player_height=playerH-.2,this.playerContainer.style.visibility="visible";var a=document.body.scrollTop;TRC.Browser.webkit&&(document.body.scrollTop+=20),TRC.Timeout.set(function(){document.body.scrollTop=a},1e3)}.trcBind(this))},LightBoxManager.prototype.resizeWhitebox=function(){return this.scalingLock?void 0:0==this.player_width?void this.animateOpening():void((this.player_width0&&this.playerContainer.scrollWidth>0&&"0px"!=this.playerbox.style.width?(this.lightbox_container.style.height=this.lightbox_container.firstChild.style.height=this.getScreenHeight()+"px",this.position_fixed_works||(this.whitebox.parentNode.style.top=this.getScreenPosition()+30+"px"),this.fixSyndicatorLogo(),this.resizeWhitebox(),!1):!1}.trcBind(this),this.animationEvents.push(this.whiteboxSizeHandler),this.position_fixed_works||(doc.documentElement.addEventListener?doc.documentElement.addEventListener("scroll",this.whiteboxSizeHandler,!1):doc.documentElement.attachEvent("onscroll",this.whiteboxSizeHandler))},LightBoxManager.prototype.close=function(){this.lightbox_container.onclick=function(){},this.closeButton.onclick=function(){};for(var a in this.additionalElements)this.additionalElements[a].forEach(function(a){"object"==typeof a&&"function"==typeof a.close&&a.close()});TRC.Timeout.set(this.realClose.trcBind(this),500)},LightBoxManager.prototype.realClose=function(){for(var a=this.getLeftMargin(),b=this.playerContainer.getElementsByTagName("object"),c=0;b&&c=0){c=c.split("?")[0];var d=c.split("/");owner.page_id=d[0],d.length>2&&(owner.page_id+="/"+d[1]),owner.trcParseParams(a[b].src.split("?")[1])}}},this.getPageData=function(){return a.taboola_view_id||(a.taboola_view_id=(new Date).getTime()),
a.taboola_view_id},this.storeValue=function(a,b){this.storePublisherValue("taboola global",a,b)},this.removeKey=function(a){this.removePublisherKey("taboola global",a)},this.getValue=function(a){return this.getPublisherValue("taboola global",a)},this.storePublisherValue=function(a,b,c){null!=c&&void 0!=c&&this.getLocalStorageImplementation().setValue(a+":"+b,c)},this.getPublisherValue=function(a,b){return this.getLocalStorageImplementation().getValue(a+":"+b)},this.removePublisherKey=function(a,b){return this.getLocalStorageImplementation().removeKey(a+":"+b)},this.sortByLength=function(a,b){return a.domain.lenth-b.domain.length},this.setDomainConfiguration=function(a){try{var b=c(a);if("domains"!=b.documentElement.tagName||b.getElementsByTagName("domain").length<1)throw"Invalid configuration document: "+a;var d=b.getElementsByTagName("domain");this.state.m_publisherDomains={host:[],path:[],query:[]};for(var e=0;e0;)if(a.shift().staging)return!0}(arguments[a]))return!0;return!1}(this.getMatchingHosts(),this.getMatchingPaths(),this.getMatchingQuery())},this.fixRecommendationURL=function(b){function c(a,b){for(var c=a.substring(1).split("/").reverse(),d=b.substring(1).split("/"),e="",f=0;ff-g){e="/"+d.slice(0,f+1).join("/");break}if(c[g]!=d[f-g])break}return b.substring(e.length)}function d(a){for(var b={},c=0;c0&&!g[0].keep;)g.shift();g.length>0&&(e.host=a.location.host);for(var h=this.getMatchingPaths().sort(this.sortByLength);h.length>0&&!h[0].keep;)h.shift();h.length>0&&(e.pathname=h[0].domain+c(h[0].domain,e.pathname));var i=this.getMatchingQuery(),j=e.search.replace(/^\?/,"").split("&");""==j[0]&&j.shift();for(var k=0;k0?"?"+j.join("&"):"",e.toString()},this.additionalDispatchParams=function(){return null==this.state.moreDispatchParams&&(this.state.moreDispatchParams=this.getCurrentURL().filtered),0==this.state.moreDispatchParams.length?"":"&"+this.state.moreDispatchParams.join("&")},this.getCurrentURL=function(){var b=new TRC.URL(a.location.href),c=[],d=[];b.search.replace(/^\?/,"").split(/&/).forEach(function(a){a&&(0==a.search("trc_")||"taboola-debug"==a?d.push(a):c.push(a))}),b.search=c.length>0?"?"+c.join("&"):"";var e=new String(b.toString());return e.filtered=d,e},this.initState=function(){"undefined"==typeof this.state&&(this.state={}),this.state.privateStorageImpl=null,this.state.m_publisherDomains={host:[],path:[],query:[]},this.state.moreDispatchParams=null},this.pushState=function(){this.stateStack.push(this.state),delete this.state,this.initState()},this.popState=function(){this.stateStack.length>0&&(this.state=this.stateStack.pop())},this.initState(),this};h.getPageData=function(){return g.getPageData()},h.storeValue=function(a,b){return g.storeValue(a,b)},h.storePublisherValue=function(a,b,c){return g.storePublisherValue(a,b,c)},h.getValue=function(a){return g.getValue(a)},h.getPublisherValue=function(a,b){return g.getPublisherValue(a,b)},h.setDomainConfiguration=function(a){return g.setDomainConfiguration(a)},h.isEmbeddedView=function(){return g.isEmbeddedView()},h.isStagingView=function(){return g.isStagingView()},h.fixRecommendationURL=function(a){return g.fixRecommendationURL(a)},h.additionalDispatchParams=function(){return g.additionalDispatchParams()},h.getCurrentURL=function(){return g.getCurrentURL()},h.pushState=function(){return g.pushState()},h.popState=function(){return g.popState()},TRC.pageManager=g=TRC.pageManager||new h,a.PageManager=a.PageManager||h}(window,document),function(a,b){var c;TRC.bcFlashPlayerBootstrap=function(b){if("object"==typeof a.brightcove&&a.TRCImpl&&TRCImpl.modes)for(var d in a.brightcove.instances)try{var e=a.brightcove.getExperience(d);if(!e.getModule(APIModules.EXPERIENCE).getReady()){"undefined"==typeof c&&(c="onTemplateLoaded",TRC.regsiterForTemplateLoaded(c));continue}if(brightcove.getExperience(d).getModule(APIModules.VIDEO_PLAYER))return void TRC.my_onTemplateLoaded(d)}catch(f){}TRC.Timeout.set(arguments.callee,500)},TRC.bcFlashPlayerExpHandler=function(b){function c(b){if(!a.TRCImpl){var d=arguments;return void TRC.Timeout.set(function(){c.apply(a,d)},100)}var e=modVP.getCurrentVideo();e&&TRCImpl.playVideo({id:1==TRCImpl["brightcove-uses-reference"]?e.referenceId:e.id})}if(!(b in a.brightcove.instances))return!1;var d=a.brightcove.getExperience(b);return"object"!=typeof d?!1:(modVP=d.getModule(APIModules.VIDEO_PLAYER),TRCImpl.getProperty(null,"read-paused-bcplayer")&&d.getModule(APIModules.EXPERIENCE).addEventListener(BCExperienceEvent.CONTENT_LOAD,c),modVP.addEventListener(BCVideoEvent.VIDEO_START,c),modVP.addEventListener(BCMediaEvent.COMPLETE,function(){TRC.dispatch("videoDone",{videoid:a.trc_video_id})}),(modVP.isPlaying()||TRCImpl.getProperty(null,"read-paused-bcplayer"))&&c(null),!0)}}(window,document),function(a,b){TRC.modVP=null;var c=!1,d=!1,e=100,f=0,g=100,h=!1,i=!1,j=!1;TRC.brightcove_support=function(){if(!d&&!c){if("undefined"!=typeof brightcove){if(j||(h=TRC.isBCSmartPlayer(),j=!0),h&&brightcove.api&&brightcove.api.modules.APIModules)i=!0;else if(h){if(e>f)return void TRC.Timeout.set(TRC.brightcove_support,g)}else if("undefined"==typeof APIModules)return void TRC.net.loadScript("//admin.brightcove.com/js/APIModules_all.js","js",function(){TRC.brightcove_support()})}else if(e>f)return void TRC.Timeout.set(TRC.brightcove_support,g);d||(h?TRC.bcSmartPlayerBootstrap():TRC.bcFlashPlayerBootstrap(),c=!0,f++)}},TRC.my_onTemplateLoaded=function(b){return d?void 0:a.TRCImpl?void(d=i?TRC.bcSmartPlayerExpHandler(b):TRC.bcFlashPlayerExpHandler(b)):void TRC.Timeout.set(arguments.callee.trcBind(null,b),100)},TRC.brightcove_playVideo=function(a){var b=a.search(/video/)>=0?a.split("video")[1]:a;return null==modVP?!1:(modVP.loadVideo(b,TRCImpl["brightcove-uses-reference"]?"referenceId":"id"),scroll(0,0),!0)},TRC.regsiterForTemplateLoaded=function(b){var c=null;"function"==typeof a[b]&&(c=a[b]),a[b]=function(a){TRC.my_onTemplateLoaded(a),null!=c&&c(a)}},TRC.brightcoveMedia={reset:function(){TRC.modVP=null,c=!1,d=!1,f=0,h=!1,i=!1,j=!1}}}(window,document),function(a,b){var c,d=!1;TRC.bcSmartPlayerBootstrap=function(){if(!d){if("object"==typeof a.brightcove&&a.TRCImpl&&TRCImpl.modes)for(var b in a.brightcove.experienceObjects)try{var e=a.brightcove.api.getExperience(b);if(e)e.getModule(a.brightcove.api.modules.APIModules.EXPERIENCE).getReady(function(f){f&&e.getModule(a.brightcove.api.modules.APIModules.VIDEO_PLAYER)?(d=f,TRC.my_onTemplateLoaded(b)):"undefined"==typeof c&&(c=a.brightcove.experienceObjects[b].params.templateLoadHandler,TRC.regsiterForTemplateLoaded(c))});else if(TRC.bcFlashPlayerExpHandler(b))return}catch(f){}TRC.Timeout.set(TRC.bcSmartPlayerBootstrap,500)}},TRC.bcSmartPlayerExpHandler=function(b){var c=a.brightcove.api,d=c.modules.APIModules,e=c.events,f=function(a){a&&TRCImpl.playVideo({id:1==TRCImpl["brightcove-uses-reference"]?a.referenceId:a.id})},g=function(b){if(!a.TRCImpl){var c=arguments;return void TRC.Timeout.set(function(){g.apply(a,c)},100)}modVP.getCurrentVideo(f)};if(!(b in a.brightcove.experienceObjects))return!1;var h=c.getExperience(b);return"object"!=typeof h?!1:(modVP=h.getModule(d.VIDEO_PLAYER),TRCImpl.getProperty(null,"read-paused-bcplayer")&&h.getModule(d.EXPERIENCE).addEventListener(e.ExperienceEvent.TEMPLATE_READY,function(a){h.getModule(d.EXPERIENCE).removeEventListener(e.ExperienceEvent.TEMPLATE_READY,arguments.callee),modVP.getCurrentVideo(f)}),modVP.addEventListener(e.MediaEvent.BEGIN,g),modVP.addEventListener(e.MediaEvent.COMPLETE,function(){TRC.dispatch("videoDone",{videoid:a.trc_video_id})}),TRCImpl.getProperty(null,"read-paused-bcplayer")?g(null):modVP.getIsPlaying(function(a){a&&g(null)}),!0)},TRC.isBCSmartPlayer=function(){if(brightcove&&brightcove.api&&brightcove.api.modules.APIModules)return!0;for(var a=document.getElementsByClassName("BrightcoveExperience"),b=0;bh?setTimeout(TRC.kaltura_support.trcBind(TRC),20):__trcError("TRC.kaltura_support: can not find a player. reference: '"+c+"', retry: "+h+" times."));TRC.kaltura_API=r,d(r.id,TRC.kaltura_API,k)}else window.KWidget?KWidget.addReadyCallback(function(a){TRC.kaltura_API||(TRC.kaltura_API=b.getElementById(a),d(a,TRC.kaltura_API,k))}):!function(b){playerCallbackRescan=TRCImpl.global["player-callback-rescan"],l=TRCImpl.video_player_callback||f,m=a[l],n=m?j(m.toString()):null,o=j(b.toString()),a[l]=b,!m&&playerCallbackRescan&&(q=setTimeout(function(){var c=a[l];h+=1,c&&j(c.toString())!==o?(m=c,n=j(c.toString()),a[l]=b):100>h&&(q=setTimeout(arguments.callee.trcBind(this,b),20))},20))}(function(a){if(!p){if(q&&(clearTimeout(q),q=null),p=!0,m&&j(m.toString())==n){try{m(a)}catch(c){}m=null}p=!1,TRC.kaltura_API||(TRC.kaltura_API=b.getElementById(a),d(a,TRC.kaltura_API,k))}});e=!0}},TRC.kaltura_playVideo=function(a){return TRC.kaltura_API?(TRC.kaltura_API.insertMedia?TRC.kaltura_API.insertMedia("-1",a,"true"):TRC.kaltura_API.sendNotification&&TRC.kaltura_API.sendNotification("changeMedia",{entryId:a}),scroll(0,0),!0):!1}}(window,document),function(a,b){var c=TRC.ooyala_API=null;TRC.ooyala_support=function(){if(!TRC.ooyala_API){var b=function(a){for(var b=0;b1)return c[1]}return!1}(document.getElementsByTagName("script"));if(0==b&&a.OOYALA_PLAYER_JS&&(b=a.OOYALA_PLAYER_JS.customerCallbackName),0==b)return void __trcWarn("Ooyala link_target set, but no Ooyala player with JS API found!");var d=null;if(TRC.ooyala_API=c=function(){if(null!=d)return d;var a=document.getElementsByClassName("OoyalaVideoPlayer");return null!=a&&a.length>0?d=a[0]:void 0},a.trc_video_id){trc_video_id=null;try{delete a.trc_video_id}catch(e){}}var f=!1,g=function(a,b,c){"object"!=typeof c&&(c={data:c}),c.player_id=a,f||(f=!0),TRC.dispatch("ooyala_"+b,c)},h=b.split(".");b=h.pop();for(var i=a;h.length&&i;){var j=h.shift();i="object"!=typeof i[j]?i[j]={}:i[j]}var k="function"==typeof i[b]?i[b]:null;i[b]=function(){try{g.apply(a,arguments)}catch(b){}null!=k&&k.apply(a,arguments)},i[b].trc=!0,TRC.listen(["ooyala_startContentDownload","ooyala_stateChanged"],function(a){if(null!=c()&&("ooyala_stateChanged"!=a.type||"playing"==a.state)){var b=__trcCopyProps(a,{});b.id=c().getCurrentItem().embedCode,TRCImpl.playVideo(b)}}),TRC.listen(["ooyala_currentItemEmbedCodeChanged","ooyala_embedCodeChanged"],function(b){if(a.trc_video_id){var c=__trcCopyProps(b,{});c.id=b.embedCode,TRCImpl.playVideo(c)}}),TRC.listen("ooyala_playComplete",function(a){TRC.dispatch("videoDone",{videoid:trc_video_id,player_id:a.player_id})})}},TRC.ooyala_playVideo=function(a){return c?(c().setQueryStringParameters({embedCode:a,autoplay:1}),scroll(0,0),!0):!1}}(window,document),function(a,b){var c=TRC.PostRenderQueue=function(){return this.backend=[],this};c.prototype.pushBack=function(a,b){__trcDebug("postRenderQueue.pushBack("+a+")"),this.backend.push({name:a,func:b})},c.prototype.pushFront=function(a,b){__trcDebug("postRenderQueue.pushFront("+a+")"),this.backend.unshift({name:a,func:b})},c.prototype.popFront=function(){if(0==this.backend.length)return null;var a=this.backend.shift();return"function"==typeof a?{name:"unknown",func:a}:a}}(window,document),!function(a,b){function c(a,b,c){c=c||"en";var d={caption:a&&a.caption||b&&b.caption||o[c]&&decodeURIComponent(o[c])||"Read More",boxSelector:a&&a.boxSelector||b&&b.boxSelector||null,threshold:a&&a.threshold||b&&b.threshold||800,backgroundColor:a&&a.backgroundColor||b&&b.backgroundColor||"#fff",minimizedSize:a&&a.minimizedSize||b&&b.minimizedSize||800,scrollSize:a&&a.scrollSize||b&&b.scrollSize||800,buttonTop:a&&a.buttonTop||b&&b.buttonTop||48,buttonBottom:a&&a.buttonBottom||b&&b.buttonBottom||28,divTop:a&&a.divTop||b&&b.divTop||38,gradient:a&&a.gradient||b&&b.gradient||40};return d}function d(a){var b=a.backgroundColor;return"."+l+" {max-height:inherit}."+l+".tbl-forkorts-article-active {max-height:"+a.minimizedSize+"px;overflow: hidden;position: relative;}.tbl-read-more-btn {display: inline-block!important;margin: "+a.buttonTop+"px 0 "+a.buttonBottom+"px !important;line-height: 38px!important;text-align: center!important;white-space: nowrap!important;vertical-align: middle!important;-ms-touch-action: manipulation;touch-action: manipulation;cursor: pointer!important;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;background-image: none!important;border: 1px solid #93abbc!important;color: #326891!important;background-color: #edf2f5!important;border-color: #2e6da4;height: 38px!important;width: 250px!important;font-size: 15px!important;font-weight: bold!important;border-radius: 3px!important;font-family: sans-serif!important;}.tbl-read-more-btn:hover {background-color: #bed0dc!important;border-color: #7399b3!important;color: #326891!important;}.tbl-read-more-box {position: absolute;z-index: 4;left: 0;right:0;bottom: 0;display: none;text-align: center;padding: "+a.divTop+"px 12px 12px;background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, "+b+" "+a.gradient+"%, "+b+" 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(50%, "+b+" ), color-stop(100%, "+b+" ));background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, "+b+" "+a.gradient+"%, "+b+" 100%);background: -o-linear-gradient(top, rgba(255,255,255,0) 0%, "+b+" "+a.gradient+"%, "+b+" 100%);background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%, "+b+" "+a.gradient+"%, "+b+" 100%);background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, "+b+" "+a.gradient+"%, "+b+" 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='"+b+"',GradientType=0 );}."+l+"-active .tbl-read-more-box{display:block;}"}function e(){return a.pageYOffset||b.documentElement.scrollTop||b.body.scrollTop}function f(a){var c=b.querySelector("."+l);a.preventDefault(),a.stopPropagation(),c.classList.remove(l+"-active"),this.sendEvent("readmore",{},null,!0)}function g(a,c){var d=b.createElement("div");return d.className="tbl-read-more-box",d.innerHTML=""+a.caption+"",d}function h(b,c){var d=a.trc_debug_level;a.trc_debug_level=3,__trcDebug("Read More : "+b+" - "+c),a.trc_debug_level=d}function i(c,d){var e=c.context||d.context;"parent"===e&&(a=a.parent,b=a.parent.document),"top"===e&&(a=a.top,b=a.top.document)}function j(a,c){var d=c||"kortWidgetCssStyle",e=b.querySelector("#"+d);e&&e.parentNode.removeChild(e),e=b.createElement("div"),e.id=d,e.innerHTML=["",""].join(""),b.documentElement.appendChild(e)}function k(k){try{var o,p=c(k.readMorePageConfig,k.readMoreConfig,k.trc.language),q=k.isReadMoreDebug;i(k.readMorePageConfig,k.readMoreConfig),a.matchMedia&&p.boxSelector?(o=b.querySelector(p.boxSelector),o?b.querySelector("."+l)!==o?o.offsetHeight>=p.threshold&&e()b};return i.trcBind(this)()?(this.slideOut(),!0):(e>this.lastScrollTop?c=g:e=0&&(this.scrollRefElement!==a||h>=e)&&(this.lastScrollDir!=c&&(this.accumulatedScroll=0),d=c==g?-1:1,this.accumulatedScroll+=(this.lastScrollTop-e)*d,this.accumulatedScroll>=this.minEffectiveScrollSize&&(c==f?this.sliderShown||this.slideIn():c==g&&this.slideOut()),this.lastScrollTop=e,this.lastScrollDir=c,clearTimeout(this.scrollAccumulationTimer),this.scrollAccumulationTimer=setTimeout(function(){this.accumulatedScroll=0}.trcBind(this),200))))},l.prototype.getScrollTop=function(){return this.scrollRefElement===a?TRC.dom.getPageVerticalScroll()||document.documentElement.scrollTop:this.scrollRefElement.scrollTop},l.prototype.closeClickHandler=function(){TRC.dom.addClass(this.sliderContainer,"trc_user_closed"),this.rbox.sendEvent("close",{},null,!0)},l.prototype.createCSS=function(a){var b=[],c=TRC.css.utils.generateCssRuleWithVendorPrefixes,d=this.slideDirection==e?"translateY":"translateX",f=-1!=[h,j].indexOf(this.slideFrom)?"100%":"-100%";return b.push(a+".trc_slider {position: fixed; z-index: "+this.sliderZIndex+";}"),b.push(a+".trc_slider .trc_related_container {padding: 5px 5px 0; }"),b.push(a+".trc_slider.trc_user_closed {display: none;}"),b.push(a+".trc_slider_close_btn { font-family: Arial, helvetica, sans-serif; float: right; font-size: "+this.closeBtnFontSize+"; font-weight: bold; height: "+this.closeBtnSize+"; width: "+this.closeBtnSize+"; line-height: "+this.closeBtnSize+"; vertical-align: baseline; text-align: center; color: "+this.closeBtnColor+"; background-color: "+this.backgroundColor+"; }"),this.slideFrom==g&&b.push(a+".trc_slider_close_btn {position: absolute; right: 0; top: 0; z-index: "+(this.sliderZIndex+1)+"; }"),this.closeBtnNeedsTouchPadding&&b.push(a+".trc_slider_close_touch_padding {position: absolute; right: 0; top: 0; height: "+k+"px; width: "+k+"px; z-index: "+(this.sliderZIndex+2)+"; }"),TRC.Browser.compatibility.cssTransforms&&(b.push(a+".trc_slider {"+this.slideFrom+": 0;"+c("transform",d+"("+f+")")+"}"),b.push(a+".trc_slider.trc_slide_in {"+c("transform",d+"(0)")+"}"),b.push(a+".trc_slider.trc_slider_animate { "+c("transition-duration",this.transitionDuration+"ms")+c("transition-delay",this.transitionDelay+"ms")+c("transition-property","transform")+"}"),b.push("@media only screen and (max-device-width: 600px) and (orientation: landscape) {"+a+".trc_slider.trc_slide_in {"+c("transform",d+"("+f+")")+"}}")),this.slideDirection==e?b.push(a+".trc_slider {width: 100%; left: 50%; margin-left: -50%; }"):b.push(a+".trc_slider { bottom: 0; }"),b.push(a+".trc_slider .trc_related_container {background-color: "+this.backgroundColor+"; }"),b.join("")},l.prototype.createCloseBtn=function(){this.closeBtn=b.createElement("div"),this.closeBtn.innerHTML="×",TRC.dom.addClass(this.closeBtn,"trc_slider_close_btn"),this.closeBtnNeedsTouchPadding&&(this.closeBtnTouchPadding=b.createElement("div"),TRC.dom.addClass(this.closeBtnTouchPadding,"trc_slider_close_touch_padding"))},l.prototype.slideIn=function(){TRC.Browser.compatibility.cssTransforms?/trc_slide_in/.test(this.sliderContainer.className)||TRC.dom.addClass(this.sliderContainer,"trc_slide_in"):this.sliderContainer.style[this.slideFrom]="0px",this.sliderShown=!0},l.prototype.slideOut=function(){var a=this.slideDirection==f?"clientWidth":"clientHeight";TRC.Browser.compatibility.cssTransforms?TRC.dom.removeClass(this.sliderContainer,"trc_slide_in"):this.sliderContainer.style[this.slideFrom]="-"+this.sliderContainer[a]+"px",this.sliderShown=!1}}(window,document),function(a,b){TRC.text={replaceAll:function(a,b,c,d){var e;return"undefined"!=typeof b&&"undefined"!=typeof c&&b!==c?(e=new RegExp(b,"gi"),a.replace(e,"function"==typeof c&&"object"==typeof d?c.trcBind(d):c)):a},lsplit:function(a,b,c){var d=a.split(b);return d.slice(0,c-1).concat(d.length>=c?d.slice(c-1).join(b):[])},parseCSV:function(a){for(var b=a.split(","),c=[];b.length;){var d=b.shift();if('"'==d[0]){do{if('"'==d.slice(1).replace(/""/g,"").slice(-1))break;d+=","+b.shift()}while(b.length);c.push(d.slice(1,d.length-1).replace(/""/g,'"'))}else c.push(d)}return c},toStringList:function(a){if(!a)return[];if(!(a instanceof Array))return[""+a];var b=[];return a.forEach(function(a){a&&b.push(""+a)}),b},htmlUnescape:function(a){return String(a).replace(/"/g,'"').replace(/'/g,"'").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},encodeHTML:function(a){return"string"==typeof a&&a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}}}(window,document),function(a,b){TRC.TRCParser={parseABModeName:function(a,b){var c=this.parseTestVariant(b);return null===c?null:"ab_"+a+"_"+c},parseTestVariant:function(a){var b;return"object"!=typeof a?null:(b=a["video-list"],a.uvpw&&"object"==typeof b&&b["test-variant"]?b["test-variant"]:"undefined"==typeof a["test-variant"]?null:a["test-variant"])},hasVariantMismatch:function(a){var b=a["test-variant"],c=a["video-list"]["test-variant"];return b&&c?b!==c:!1}}}(window,document),function(a,b){var c=TRC.Manager=function(c,e){var f=500;return this.numOfResetCssDivs=3,this.eventLogger=[],this.eventCounter={},this.reset=function(){this.reset=!0,this.daisyChainReset();for(var b in TRC.callbacks)TRC.callbacks.hasOwnProperty(b)&&b.search("recommendations")>=0&&(TRC.callbacks[b]=function(){});this.preloadRequestLoader&&(TRC.Timeout.clear(this.preloadRequestLoader.timeout),this.preloadRequestLoader.parentNode.removeChild(this.preloadRequestLoader),this.preloadRequestLoader=null);try{delete a.trc_video_id,delete a.trc_article_id,delete a.trc_item_url,delete a.trc_testmode,delete a.trc_adPlayer}catch(c){a.trc_video_id=null,a.trc_article_id=null,a.trc_item_url=null,a.trc_testmode=null,a.trc_adPlayer=null}for(var d in this.boxes)if(this.boxes.hasOwnProperty(d)){if(this.boxes[d].container)for(this.boxes[d].container.className=this.boxes[d].container.className.replace(" trc_related_container",""),delete this.boxes[d].container._trc_container,delete this.boxes[d].container._trc_anonbox;this.boxes[d].container.hasChildNodes();)this.boxes[d].container.removeChild(this.boxes[d].container.lastChild);TRC.Timeout.reset(),TRC.Interval.reset(),delete this.boxes[d]}},this.renderRBox=function(a,b){var c=document.trcGetParentByClassName(a.getContainer(),"trc_rbox_container");c.style.display="block",a.load(function(){c.style.display="none"},b)},this.getConfig=function(b,c){return"undefined"!=typeof b[c]?b[c]:"undefined"!=typeof a["trc_"+c]&&null!=a["trc_"+c]?b[c]=a["trc_"+c]:"undefined"!=typeof this[c]&&null!=this[c]?b[c]=this[c]:b[c]=this[c]},this.getItemId=function(){var b=this.itemid;return a.trc_video_id||""==a.trc_video_id?b=a.trc_video_id:(a.trc_article_id||""==a.trc_article_id)&&(b=a.trc_article_id),""==b&&(b=this.getAutoItemMeta("item-id",null,this.urlPreNormalizer,this["normalize-item-id"])),this.itemid=b},this.getReferrer=function(){var a="";if(this.referrer)return this.referrer;this.referrer=function(){for(var a=document.head.getElementsByTagName("link"),b=0;bi;i++)f=b[i],d=f.cells*f.rows,e=h&&(a.matchMedia("(min-width: "+f.minWidth+"px)"+(isNaN(f.maxWidth)?"":" and (max-width: "+f.maxWidth+"px)")).matches||a.matchMedia("screen and (min-height: "+f.minWidth+"px)"+(isNaN(f.maxWidth)?"":" and (max-height: "+f.maxWidth+"px)")+" and (orientation: portrait)").matches),(isNaN(c)||f.minWidth<=c||0>c||e)&&d>g&&(g=d);return{listSize:g,rule:g?f:null}},this.getMatchMediaRuleMaxWidth=function(b,c){var d,e;if(!c)return screen.width;for(var f=0,g=b.length;g>f;f++)if(e=b[f],d=a.matchMedia("screen and (min-device-width: "+e.minWidth+"px)"+(isNaN(e.maxWidth)?"":" and (max-device-width: "+e.maxWidth+"px)")),d.matches)return e.maxWidth},this.calculateAutoListSize=function(a){var b,c,d=this.getProperty(a.mode_name,"list-size"),e=0,f=this.getProperty(a.mode_name,"responsive-rules"),g=null;if(this.getProperty(a.mode_name,"mode-is-responsive")){if(f&&f.length)return g=this.getResponsiveRecommendations(f),a.matched_rule=g.rule,g.listSize;e=this.getExtraResponsiveRecom(a)}if(c=d+e,a.autoSize=this.getProperty(a.mode_name,"auto-size"),!a.autoSize)return a.autoSize=!1,c;if(b=Math.floor(a.container.clientWidth>0?a.container.clientWidth:a.container.offsetWidth),0==b)return a.autoSize=!1,c;for(var h=this.getProperty(a.mode_name,"auto-size-rules"),i=0;i0?a.container.clientWidth:a.container.offsetWidth),e=a.AutoSizeRule.minWsRange;e<=a.AutoSizeRule.maxWsRange;e++)if(b=(d-(a.AutoSizeRule.n-1)*e)/a.AutoSizeRule.n,c=parseInt(b),c==b){a.AutoSizeRule.Wi=b,a.AutoSizeRule.Ws=e;break}},this.getItemUrl=function(){var b=this.itemurl;return(a.trc_item_url||null==this.itemurl)&&(b=this.getAutoItemMeta("item-url",null,this.urlPreNormalizer,this["normalize-item-url"])),this.itemurl=b},this.urlPreNormalizer=function(b,c){var d,e=this["prenormalize-"+b];if(!e)return c;(e["truncate-at"]||[]).forEach(function(a){var b=c.search(a);b>=0&&(c=c.substr(0,b))});var f=new a.TRC.URL(c);for(var g in e)if(e.hasOwnProperty(g)){if(!e[g])continue;switch(g){case"host":delete f.host;break;case"trailing-dirsep":for(;"/"==f.pathname.substr(f.pathname.length-1);)f.pathname=f.pathname.substr(0,f.pathname.length-1);break;case"query":var h=[],i=f.search.replace(/^\?/,"").split("&");d=e[g],"string"==typeof d&&(d=new RegExp(d));var j=function(){return d instanceof Array?function(a){for(var b=0;b=0&&(f.hash="#"+k)})}}return f.pathname||(f.pathname="/"),"item-id"==b?f.toString().toLowerCase():f.toString()},this.genCallback=function(a){var b="recommendations_"+(TRC.callbacks.auto_gen_callback_seq=TRC.callbacks.auto_gen_callback_seq+1||1);return TRC.callbacks[b]=a,"TRC.callbacks."+b},this.formatTRCRequest=function(b,c){function d(a){switch(a){case"user":return"u";case"uploader":return"U";case"content-rating":return"c";case"publish-date":return"t";case"duration":return"d";case"category":return"x";case"v":case"r":default:return a}}var e,f=[],g={ii:this.getItemId(),it:this.getItemType(),sd:TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),ui:TRC.pageManager.getValue("user-id"),vi:TRC.pageManager.getPageData(),cv:this.version,uiv:this.getPublisherVersion(),id:parseInt(1e3*Math.random())};TRC.pageManager.getValue("past-exclusions")&&(g.px=TRC.pageManager.getValue("past-exclusions")),c&&(g.it=c),this.excludedItems&&(g.ex=TRC.text.toStringList(this.excludedItems));var h=this.getItemUrl();for(e in b)if(b.hasOwnProperty(e)){var i=b[e];if(!i.placement)continue;i.item_id&&(g.ii=i.item_id),0==i.origin.toString().indexOf("h2")&&(g.ii="_homepage_"),i.item_type&&(g.it=i.item_type),"undefined"!=typeof i.item_url&&(h=i.item_url);var j={li:i.list_id||"rbox-"+(i.visible?i.origin.toString():"tracking"),s:this.getListSize(i),uim:this.computeUIM(b[e]),uip:i.placement,orig_uip:i.placement};i.dfp&&i.dfp.campaign_id&&(j.nvcid=i.dfp.campaign_id),i.category&&(j.ac=i.category),i.article?(j.sii=i.article,j.sit="text"):i.video&&(j.sii=i.video,j.sit="video"),i.exclude&&(j.ex=TRC.text.toStringList(i.exclude));var k=this.getProperty(i.mode_name,"required-attributes");"string"==typeof k&&"none"!=k&&(j.ra=k),"string"==typeof i.container&&(i.container=document.getElementById(i.container)),j=this["normalize-request-param"](j,i.mode_name),f.push(j)}if(a.trc_testmode&&(g.y=!0),this.trc_url_auto_detection==g.ii){var l=this.getProperty(f[0].uim,"remove-url-playvideo-behavior");l&&(h=null)}null!=h&&(g.u=h),this.getReferrer()&&(g.e=this.referrer);var m={};this.tags&&this.tags.length&&(m.k=this.tags.join(","));for(e in this.metadata)this.metadata.hasOwnProperty(e)&&this.metadata[e]&&(m[d(e)]=this.metadata[e]);if(function(){for(e in m)return!0;return!1}()&&(g.m=m),g.r=f,g=this["normalize-request-param"](g,null),this.preloadRequest)for(var n=0,o=g.r.length;o>n;n++)this.preloadRequest[g.r[n].uip]||(this.preloadRequest[g.r[n].uip]=this.preloadRequest[g.r[n].orig_uip],this.preloadRequest[g.r[n].orig_uip]=this.preloadRequest[g.r[n].uip],this.preloadRequest[g.r[n].orig_uip].new_uip=g.r[n].uip);return TRC.pConsole("recommendations","info","formatted request",g,"object"),g},this.computeUIM=function(a){var b=a.mode_name,c=this.global["disable-network-uim"]||"undefined"==typeof TRC.networkId?"":":pub="+TRC.networkId,d=TRC.blocker.blockedState>-2&&this.global["use-abp-uim"]?":abp="+TRC.blocker.blockedState:"",e=this.global["use-calibration-uim"]&&this.getProperty(b,"mode-is-responsive")?this.computeCalbUIM(a):"";return b+c+d+e},this.computeCalbUIM=function(a){if(!a.matched_rule)return"";var b=TRC.implClasses.TRCRBox,c=this.modes[a.mode_name],d=a.matched_rule,e="none"!=c["thumbnail-position"]&&c["thumbnail-position"]||void 0,f=e?TRC.math.round10(b.prototype.getRuleAspectRatio(d,"ratio")||b.prototype.getThumbAspectRatio(c,"ratio")||b.prototype.DEFAULT_THUMB_RATIO,-1):void 0,g=e?this.caclculateThumbnailWidth(a.container,d):void 0;return":type=responsive,rows="+d.rows+",cells="+d.cells+",thumb-pos="+e+(e&&"none"!=e?",thumb-ratio="+f+",thumb-width="+g:"")},this.caclculateThumbnailWidth=function(a,b){var c,d=TRC.css.responsive.getRulePercentageWidth(b.cells,b.margin.h)/100,e=50;return a&&d?(c=parseInt(a.clientWidth>0?a.clientWidth:a.offsetWidth,10),TRC.math.roundByDecimal(c*d,e)):null},this.dispatchLoadRequest=function(b){if(!(TRC.isKilled&&TRC.isKilled()||(this.preloadRequest=b,function(a){for(var b in a)return!1;return!0}(b)))){if(null==this.getItemId())return void(this.delayedDispatchLoadRequest=this.dispatchLoadRequest.trcBind(this,b));this.delayedDispatchLoadRequest=null;var c=this.getProperty(null,"timeout")||8e3;try{var e=this.formatTRCRequest(this.preloadRequest);e.cb=this.genCallback(this.handleLoadResponse.trcBind(this));var f=d+"//"+this.domain+"/"+escape(TRC.publisherId)+"/trc/3/json?tim="+escape(__trcClientTimestamp())+(this.trcByPass?"&trc_skip_failover=yes&":"&")+"data="+encodeURIComponent(__trcJSONify(e))+this.getOptOut()+TRC.pageManager.additionalDispatchParams();a.trc_debug_level>1&&(f+="&llvl="+a.trc_debug_level),TRC.utm.push((new Date).getTime()-TRC.utm.start),this.preloadRequestLoader=this.loadExternal(f,"js",this.handleLoadResponseFailure.trcBind(this),!0),this.preloadRequestLoader.timeout=TRC.Timeout.set(this.abortLoadRequest.trcBind(this,!0),c),TRC.pConsole("","time","dispatch recommendation request","")}catch(g){__trcError("TRC.dispatchLoadRequest: Error in request processing",g)}}},this.abortLoadRequest=function(a){var b;this.preloadRequestLoader&&(this.preloadRequestLoader.parentNode.removeChild(this.preloadRequestLoader),this.preloadRequestLoader=null);for(b in this.preloadRequest)if(this.preloadRequest.hasOwnProperty(b)){if(b.search("rbox-tracking")>=0)continue;a&&(a=!1,__trcWarn("TRC.abortLoadRequest: pv3 timeout"));var c=this.preloadRequest[b];delete this.preloadRequest[b],c.loadRBoxRequestFailed=!0,this.internalDrawRBox(c)}},this.getOptOut=function(){return this.userOptOut?"&user.opt_out=true":""},this.handleLoadResponseFailure=function(){null!=this.preloadRequestLoader&&(TRC.Timeout.clear(this.preloadRequestLoader.timeout),__trcError("Server did not respond to loadRBox"),this.abortLoadRequest())},this.isActivePlacementData=function(a,b){return a.new_uip?b===a.new_uip?!0:!1:!0},this.handleLoadResponse=function(a){try{TRC.pConsole("recommendations","info","recommendations response",a,a.trc.verbose?"verbose":"object"),TRC.pConsole("","time","recommendations loaded","");var b,c;if(TRC.utm.push((new Date).getTime()-TRC.utm.start),this.preloadRequestLoader&&TRC.Timeout.clear(this.preloadRequestLoader.timeout),a&&a.trc&&a.trc.ui&&(this.watchedItem=a.trc.wi,this.globaleRequestId=a.trc.vl&&a.trc.vl.length?a.trc.vl[0].ri:null,TRC.eventDelegator.dispatch("user_id_ready")),!(a&&a.trc&&a.trc.vl&&a.trc.vl.length))return __trcError("Invalid response from server: "+a),void this.abortLoadRequest();a.trc.tc&&TRC.Manager.prototype.loadExternal("http://c2.taboola.com/console/console_loader.js","js"),b="1"==a.trc.sl,TRC.pageManager.storePublisherValue(TRC.publisherId,"session-data",a.trc.sd),a.trc.DNT&&"TRUE"===a.trc.DNT.toUpperCase()?TRC.pageManager.removeKey("user-id"):TRC.pageManager.storeValue("user-id",a.trc.ui),this.parseResponse(a,b);for(var d in this.preloadRequest)if(this.preloadRequest.hasOwnProperty(d)){if(c=this.preloadRequest[d],1!=c.pv2&&null==c.response&&!c.dc&&d.search("rbox-tracking")<0){__trcWarn("Server did not provide response for '"+d+'"!');var e=c;delete this.preloadRequest[d],__trcDebug("Recovering internalDrawRBox("+d+")"),this.internalDrawRBox(e)}this.isActivePlacementData(c,d)&&1!=c.pv2&&c.dc&&c.dc.renderAd()}this.preloadRequestLoader&&(this.preloadRequestLoader.parentNode.removeChild(this.preloadRequestLoader),this.preloadRequestLoader=null),b&&!TRC.Device.isTouchDevice&&(TRC.backstageDomainPrefix=a.trc.bdp,this.loadSpotlight())}catch(f){__trcError("Error in TRC.handleLoadResponse : ",f)}},this.parseResponse=function(a,b){var c,d,e,f,g,h;for(f=0;f=0||(e=this.preloadRequest[d],"undefined"!=typeof e?(h=this.formatPlacementRecommendations(a,f),g.dc&&("tbl"!==g.typ||1!=g.pr||!g.v||g.v.length<1)?(e.dc||(e.dc=new TRC.DaisyChain(this,e),this.daisyChains.push(e.dc)),e.dc.addToChain(h,g.pr)):e.response=h,b&&(c=a.trc.pi,e.spotlight=!0,e["spotlight-publisher-id"]=c,__trcDebug("Detected Spotlight Administrator("+c+")")),e.response&&(e.dc&&delete e.dc,e.pv2||"undefined"==typeof e.container||this.internalDrawRBox(e))):__trcWarn("Invalid placement in server response",d))},this.formatPlacementRecommendations=function(a,b){var c=a.trc.vl[b],d={trc:{req:c.ri,"session-id":a.trc.si,"session-data":a.trc.sd,"user-id":a.trc.ui,"watched-item":a.trc.wi,"country-code":a.trc.cc,"test-variant":a.trc.t,uvpw:a.trc.uvpw,DNT:a.trc.DNT,cpb:a.trc.cpb,ppb:c.ppb}};return c.dc&&"tbl"!==c.typ?d.trc.tag=c:d.trc["video-list"]={video:c.v,"test-variant":c.t},d},this.loadSpotlight=function(){document.querySelectorAll&&(this.spotlightLoaded?TRC.dispatch("trc_afterRboxDraw"):(this.spotlightLoaded=TRC.URL.prototype.switchProtocol.call(TRC.getBackstageUrl()+"resources/js/1.1.0/spotlight.js",d),this.loadExternal(this.spotlightLoaded,"js")))},this.setCssDivsIds=function(a,b){var c=4;for(var d in a)a.hasOwnProperty(d)&&(a[d].cssDivsArr=[],d&&TRC.util.getRandomIds({arr:a[d].cssDivsArr,len:b,strength:c,prefix:"t",suffix:"_r"}))},this.setLBCssDivsIds=function(a,b){var c=4;TRC.util.getRandomIds({arr:a.iframe,len:b,strength:c,prefix:"t",suffix:"_r"}),TRC.util.getRandomIds({arr:a.topDiv,len:b,strength:c,prefix:"t",suffix:"_r"})},this.getModesCache=function(){if(TRC.modesCache)return TRC.modesCache;TRC.modesCache={};for(var a in this.modes)this.modes.hasOwnProperty(a)&&(TRC.modesCache[a]={});return TRC.modesCache},this.init=function(b){var c,d=TRC.URL.prototype.getParameter.call(location.href,"trc_css-isolation")||TRC.pageManager.getValue("trc_css-isolation"),e=TRC.URL.prototype.getParameter.call(location.href,"trc_abp");__trcCopyProps(b,this),this.boxes={},this.daisyChains=[],this.unique_placement_count={},this.tags=[],this.metadata={},this.cssReset="yes"===d||"no"!==d&&this.global["css-isolation"]!==!1?!0:!1,this.trcRequestDelay=this.global["trc-request-delay"]||f,this.trcByPass=this["trc-skip-failover"]===!0?!0:!1,d&&TRC.pageManager.storeValue("trc_css-isolation",d),this.configForPostEvent={available:this.global["send-avail-as-post"],visible:this.global["send-event-as-post"],explore:this.global["send-explore-as-post"]},this.configForGetEvent={available:this.global["send-avail-as-get"],visible:this.global["send-visible-as-get"],explore:this.global["send-explore-as-get"]},TRC.getBackstageUrl=function(){var a=TRC.backstageDomainPrefix||"backstage";return this["backstage-domain-url"]||"https://"+a+".taboola.com/backstage/"}.trcBind(this),e?this.setABPEmulation(e):this.global["abp-detection-enabled"]?TRC.blocker.blockedState=TRC.blocker.getBlockedState(this.global["abp-detection-class-names"]||["banner_ad","sponsored_ad"]):TRC.blocker.blockedState=TRC.blocker.states.ABP_DETECTION_DISABLED,c=this.defaults.style+this.global.style,TRC.blocker.blockedState>0&&this.global["switch-abp-class"]&&(c=TRC.text.replaceAll(c,"\\."+TRC.SYNDICATED_CLASS_NAME+"|\\."+TRC.SPONSORED_CONTAINER_CLASS_NAME,function(a){return"."+this[a.slice(1)]},this.global["switch-abp-class"])),TRC.styleInjected||(this.cssReset?(this.setLBCssDivsIds(TRC.lightBoxCssReset={iframe:[],topDiv:[]},this.numOfResetCssDivs),this.setCssDivsIds(this.getModesCache(),this.numOfResetCssDivs),TRC.css.utils.setStyleElements(TRC.css.utils.setStyleTextIdPrefix(c,TRC.modesCache,TRC.lightBoxCssReset)),__trcInfo("CSS Isolation is active")):this.global["css-ie-split"]&&TRC.Browser.ieUpto(9)?TRC.css.utils.setStyleElements(TRC.css.utils.setStyleTextIdPrefix(c,null,TRC.lightBoxCssReset)):TRC.dom.injectStyle(c)),TRC.pageManager.setDomainConfiguration(this.global["publisher-domains"]),this.domain=this.global["requests-domain"]?this.global["requests-domain"]:"trc.taboola.com",this.origin instanceof Array||(this.origin=[this.origin]),null!=this.userMetadata?this.metadata.user=__trcJSONify(this.userMetadata):"undefined"==typeof a.trc_user_id?this.metadata.user=this["get-user"]():this.metadata.user=a.trc_user_id,TRC.util.hasKeys(this["trc-network-mapping"])&&(TRC.networkId=TRC.publisherId,this.shiftPublisherId(this["trc-network-mapping"])),this.clickFraud=new TRC.clickFraudDetect({enabled:this.global["enable-clkfraud-detection"],pubId:TRC.publisherId},TRC.net);try{TRC.pConsole("page","debug","Hook : publisher_start",this["publisher-start"].toString()),this["publisher-start"]()}catch(g){__trcError("Error running publisher-start",g)}this.metadata.uploader=this["get-creator"](),this.tags=this["get-tags"]();try{this.metadata.v=this["get-views"](),this.metadata.r=this["get-rating"](),this.metafields.split(",").forEach(function(a){a&&(this.metadata[a]=this["get-"+a]?this["get-"+a]():this.readMetaTag(a))}.trcBind(this))}catch(g){}this.gt=new Gettext({domain:"rbox",locale_data:this.global.locale}),a.trc_testmode=!!a.trc_testmode||TRC.pageManager.isStagingView(),setTimeout(this.setupOVP.trcBind(this),0),this.init=function(){},TRC.isInteractive=!1,TRC.isPageLoaded=!1,this.setInteractiveHandlers(),this.setPageOnloadHandlers()},this.setABPEmulation=function(a){TRC.blocker.blockedState=a,this.global["abp-detection-enabled"]=!0,this.global["use-abp-uim"]=!0,TRC.pConsole("page","warn","emulating Ad Blocker Plus detection.")},this.setInteractiveHandlers=function(){var c,d=TRC.EVENT_PAGE_INTERACTIVE,e=["resize","scroll"],f=["scroll","mousedown","keydown","touchstart"],g=function(c){var h;if(c=c||window.event,!TRC.Browser.ie||"resize"!==c.type||null!=c.srcElement){for(h=0;h=0){var a=TRC.baseDomain.split("/");if(""==a[a.length-1]&&a.pop(),a[a.length-1]!=TRC.publisherId)return a[a.length-1]}}catch(b){}return"default"},this.getItemType=function(){switch(TRC.listOrigin.getSource()){case"h":return"home";case"c":return"category";case"t":return"text";case"s":return"search";case"p":return"photo";case"v":default:return"video"}},this.playVideo=function(b){var c,d=!1;try{TRC.dispatch("videoPlaying",b)}catch(e){__trcError("Problem in playVideo:videoPlaying",e)}if("undefined"!=typeof b.id&&a.trc_video_id!=b.id){var f=TRC.listOrigin.getSource();if("undefined"==typeof b.url&&(a.trc_video_id||"v"!=f?b.url=null:(b.url=this.getAutoItemMeta("item-url",null,this.urlPreNormalizer,this["normalize-item-url"]),this.trc_url_auto_detection=b.id)),a.trc_video_id=b.id,a.trc_item_url=b.url,null!=this.delayedDispatchLoadRequest&&(this.delayedDispatchLoadRequest(),d=!0),0!=a.TRC.trc_drawRBox){var g=0;for(var h in this.boxes)if(this.boxes.hasOwnProperty(h)){if(!/(rbox-blended|rplayer|rbox-v2)/.test(this.boxes[h].getListId()))continue;this.boxes[h].updateRecommendations("video")&&g++}if(1>g&&!d){var i={};c=this.computeRBoxOptions({mode:"rbox-tracking",item_id:b.id,item_url:b.url,item_type:"video",visible:!1}),delete c.container,i[c.placement]=c,this.dispatchLoadRequest(i)}}}},this.setUser=function(a){this.userMetadata=a,TRC.pConsole("page","info","user meta data ",a,"object")},this.getUIInstance=function(b){var c=this.getProperty(b,"impl-class");return c&&c in a.TRC.implClasses?a.TRC.implClasses[c]:TRC.implClasses.TRCRBox},this.calculatePlacement=function(a){if(a.mode_name.search("rbox-tracking")>=0)return a.mode_name;var b=a.mode_name+(a.category?"!"+a.category:"");return"undefined"!=typeof this.unique_placement_count[b]&&(b+="#"+ ++this.unique_placement_count[b]),b},this.computeRBoxOptions=function(b){return"string"==typeof b&&(b={mode_name:b}),b.pubOpts?b:(b.pubOpts=__trcCopyProps(b,{}),a.trc_testmode=!!a.trc_testmode||!!b.testmode,b.tracking=(this.tracking?this.tracking:"")+(b.tracking?b.tracking:""),b.target_type=b.target_type||this.target_type||this.getProperty(b.mode_name,"target_type")||"video",b.origin=new TRC.ListOriginBuilder(TRC.listOrigin.getSource(),b.target_type),b.mode_name=!!b.mode&&b.mode||!!b.mode_name&&b.mode_name||!!a.trc_mode_name&&a.trc_mode_name||"rbox-"+b.origin.toString(),b.mode_name=b.mode_name.replace(/\s+/g,""),b.category=!!b.category&&b.category,b.link_target=b.link_target||this.link_target||this.getProperty(b.mode_name,"link-target")||"normal","undefined"==typeof b.placement&&(b.placement=this.calculatePlacement(b)),this.unique_placement_count[b.placement]=0,b.visible="boolean"==typeof b.visible?b.visible:!this.invisible,"string"==typeof b.autoplaybox&&(b.autoplaybox=document.getElementById(b.autoplaybox)),!b.player&&b.slider!==!0&&b.visible&&(b.original_container=b.container,b.container=this.ensureValidContainer(b.container)),this.setupOVP(b),b.response=null,b.computed=!0,b)},this.listenToPlayer=function(a,b){var c,d="trc_related_container";c=TRC.listen("videoPlaying",function(e){var f,g=document.getElementById(e.player_id);return g?void(TRC.dom.isAncestor(b,g,!0)?(c.remove(),TRC.listen("videoPlaying",function(a){a.player_id===b.player_id?f.style.left="-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for videoPlaying")}),b.player_id=e.player_id,a.container&&("string"==typeof a.container&&(a.container=document.getElementById(a.container)),f=a.container),f||(a.container=f=document.createElement("div")),f.className=d+" trc-inplayer-rbox",f.style.left="-999999em",f.style.width=g.offsetWidth+"px",f.style.marginTop="-"+g.offsetHeight+"px",TRC.Browser.ieUpto(6)&&(b.style.position="absolute"),b.appendChild(f),TRC.kaltura_API&&TRC.Browser.firefox&&(delete TRC.kaltura_API,TRC.kaltura_support()),a.getListId=function(){return"rplayer-after"},a.list_id=a.getListId(),a.loaded=!0,this.internalDrawRBox(a)):__trcError("TRC.listenToPlayer: object with player_id wasn't found in playerContainer that was passed")):void __trcError("TRC.listenToPlayer: wrong player_id was passed")}.trcBind(this)),TRC.listen("videoDone",function(c){var d=a.container;return d?void(c.player_id===b.player_id?d.style.left="0":__trcError("TRC.listenToPlayer: wrong player_id was used for videoDone")):void __trcError("TRC.listenToPlayer:videoDone mainContainer wasn't found")}),TRC.ooyala_API&&(TRC.listen("ooyala_stateChanged",function(c){var d=a.container;d&&(c.player_id===b.player_id?d.style.left="-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for ooyala_stateChanged"))}),TRC.listen("ooyala_activePanelChanged",function(c){var d=a.container;d&&(c.player_id===b.player_id?d.style.left="more"===c.activePanel||"info"===c.activePanel?"0":"-999999em":__trcError("TRC.listenToPlayer: wrong player_id was used for ooyala_activePanelChanged"))}))},this.internalDrawRBox=function(c){var d,e;if(c=this.computeRBoxOptions(c),c.player){var f=c.player;return delete c.player,void this.listenToPlayer(c,document.getElementById(f))}if(c.slider===!0&&(c.container=document.createElement("div"),c.container.id="trc_rbox_slider_"+Math.floor(2147483648*Math.random()).toString(36),c.container.className="trc_related_container",this.cssReset&&b.body.appendChild(c.container)),d=c.container){if(c.visible||(d.style.display="none"),c.spotlight&&d.setAttribute("data-spotlight-publisher-id",c["spotlight-publisher-id"]),null==c.response&&this.loadCalled&&"undefined"!=typeof this.preloadRequest[c.placement]&&(c.response=this.preloadRequest[c.placement].response,__trcCopyProps(c,this.preloadRequest[c.placement]),null==c.response))return void(this.preloadRequest[c.placement].container=c.container);var g=new(this.getUIInstance(c.mode_name))(c.origin.toString(),c,this);this.boxes[g.id]=g,d._trc_container||(d._trc_container=document.createElement("div"),d._trc_container.className="trc_rbox_container",d._trc_anonbox=document.createElement("div"),d._trc_container.appendChild(d._trc_anonbox),d.appendChild(d._trc_container),this.cssReset&&"rbox-tracking"!==g.mode_name?(e=b.createElement("div"),TRC.dom.swapElements(d,e,!1),g.outermostContainer=this.createCssResetContainers(d,g.mode_name),TRC.dom.swapElements(e,g.outermostContainer,!1),TRC.pConsole("page","info","CSS reset is enabled on all widgets")):g.outermostContainer=d),g.render(d._trc_anonbox),this.renderRBox(g,c),a.TRC.trc_drawRBox=!0}},this.createCssResetContainers=function(a,b){for(var c,d=TRC.modesCache[b]?TRC.modesCache[b].cssDivsArr:[],e=d.length,f=a,g=e-1;g>=0;g--)c=document.createElement("div"),c.id=d[g],c.className="trc_isolation",c.appendChild(f),f=c;return f},this.daisyChainReset=function(){var a,b=this.daisyChains.length;for(a=0;b>a;a++)this.daisyChains[a].removeIframe()},this.loadRBox=function(){var a,b=Array.prototype.slice.call(arguments),c={},d=40;if(!(b.length<1))try{if(this.loadCalled)throw new Error("loadRBox() may only be called once!");b[0]instanceof Array&&(b=b[0]),this.till_request_count=0;for(var e=0;eb[0].length?-1:a[0].lengthd;d++)if(f=c[d][0].toLowerCase(),f.indexOf(n)>0){if(l.match(f)){m=c[d][1];break}if(f.indexOf("www.")>-1&&l.match(f.replace("www.",""))){m=c[d][1];break}}else if(k.match(f)){m=c[d][1];break}if(!m&&k.indexOf("www.")<0){for(d=0,e=o.length;e>d&&(g=new RegExp("(https://|http://|^)"+o[d]+"."),h=k.replace(g,"www."),!(m=b[h]));d++);m||(h="www."+k,m=b[h])}}TRC.publisherId=m?m:"unknown-site-on-"+TRC.publisherId,TRC.pConsole("page","info","in 'Network-Solution' : publisher-id was set to - "+TRC.publisherId,"")},c.prototype.getProperty=function(a,b){return"undefined"==typeof this.modes||"undefined"==typeof this.modes[a]||"undefined"==typeof this.modes[a][b]?this[b]:this.modes[a][b]},c.prototype.getFunction=function(a,b){var c=Array.prototype.slice.call(arguments,2),d=this.getProperty(a,b);return"function"==typeof d?(TRC.pConsole(a,"debug","Hook : "+b,d.toString(),"function"),d.apply(this,c)):void 0},c.prototype.readMetaTag=function(a){for(var b=document.head.getElementsByTagName("meta"),c=null,d=0;d(new Date).getTime()-3e4&&d[1]==this.getItemId())return"undefined"!=typeof d[2]?d[2]:"n"}return b.search(this.getItemId())>=0?"s":"u"},c.prototype["get-creator"]=function(){return this.readMetaTag("uploader")||this.readMetaTag("creator")},c.prototype["get-tags"]=function(){for(var a=null,b=a?a.split(","):[];b.length>0&&!b[0];)b.shift();return b},TRC.implClasses=TRC.implClasses||{},c.prototype.logTrcEvent=function(b,c,d,e){var f=!1;if(c.tim=__trcClientTimestamp(),c.id=parseInt(1e4*Math.random()),c.llvl=a.trc_debug_level,this.global["tmp-disable-cv"]||(c.cv=this.version),!TRC.isKilled||!TRC.isKilled()){if(this.configForPostEvent[b])try{this.logPostTrcEvent(b,this.global["send-full-list"]&&d?__trcCopyProps(c,{},d):c)}catch(g){f=!0,__trcError("Error in sending post event",g)}(f||this.configForGetEvent[b]!==!1||this.configForPostEvent[b]!==!0)&&((this.configForGetEvent[b]===!1||f)&&(c.fbe=1),this.logGetTrcEvent(b,c,e))}},c.prototype.logGetTrcEvent=function(a,b,c){var e,f,g,h,i,j;for(e in b)b.hasOwnProperty(e)&&(b[e]=this["normalize-log-param"](e,b[e]));f=this["normalize-log-param"]("publisher",TRC.publisherId),a=this["normalize-log-param"]("type",a);try{g=d+"//"+this.domain+"/"+f+"/log/3/"+escape(a)+"?",g+=this.trcByPass?"trc_skip_failover=yes&":"";for(h in b)b.hasOwnProperty(h)&&(i="_"==h.charAt(0)?h.substr(1):h,"undefined"!=typeof b[h]&&null!=b[h]&&(g+=0==h.indexOf("unescape-")?h.replace("unescape-","")+"="+b[h]+"&":escape(i)+"="+escape(b[h])+"&"));j=new Image,this.eventLogger.push(j),c&&(j.onload=j.onerror=function(){if("function"==typeof c)try{c()}catch(a){__trcError("Error in event callback",a)}return!0}),j.src=g}catch(k){__trcError("Error in sending event",k)}},c.prototype.logPostTrcEvent=function(a,c){var e,f,g=this["normalize-log-param"]("publisher",TRC.publisherId),a=this["normalize-log-param"]("type",a),h="tb-trc-transportFrame-"+c.id,i=this.getTransportForm(h),j=document.getElementById(h);for(var k in c)c.hasOwnProperty(k)&&(e=b.createElement("input"),e.name=("_"==k.charAt(0)?k.substr(1):k).replace(/unescape-/g,""),e.type="hidden",e.value=this["normalize-log-param"](k,c[k]),i.appendChild(e));if(!j)throw new Error("post iframe can be created");TRC.Browser.ie&&(f=j.contentDocument?j.contentDocument:j.contentWindow.document,f.write(""),f.close()),i.action=d+"//"+this.domain+"/"+g+"/log/3/"+escape(a)+(this.trcByPass?"?trc_skip_failover=yes":""),i.submit()},c.prototype.getTransportForm=function(a){var c,d;return d=b.createElement("form"),d.className="trc-hidden",d.target=a,d.style.display="none",d.method="post",b.body.appendChild(d),c=b.createElement("span"),c.innerHTML='',b.body.appendChild(c),d},c.prototype.log1=function(a,b,c,d){var e=a+":"+(d?d:b.li+b.ii)+b.ri;return b.ii&&b.it&&(e=a+":"+b.li+b.ii+b.ri),this.eventCounter[e]?void this.eventCounter[e]++:(this.logTrcEvent(a,b,c),void(this.eventCounter[e]=1))},c.prototype.loadExternal=function(){return TRC.net.loadScript.apply(null,arguments)},c.prototype.parseLoaderParams=function(b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];if("unknown"==d)continue;switch("auto"==d&&(d=""),c){case"visible":this.invisible=!("boolean"==typeof d?d:"false"!=d);break;case"video":a.trc_video_id=d,TRC.listOrigin.setSource("v");break;case"url":a.trc_item_url=d;break;case"article":a.trc_article_id=d,TRC.listOrigin.setSource("t");break;case"category":a.trc_article_id=d,TRC.listOrigin.setSource("c");break;case"home":a.trc_article_id=d,TRC.listOrigin.setSource("h");break;case"search":a.trc_article_id=d,TRC.listOrigin.setSource("s");break;case"photo":a.trc_article_id=d,TRC.listOrigin.setSource("p");break;case"link_target":this.link_target=d;break;case"video_source":this.video_source=d;break;case"callback":this.video_player_callback=d;break;case"player_reference":this.video_player_reference=d;break;case"target_type":TRC.listOrigin.setTarget(this.target_type=d);break;case"exclude":this.excludedItems=d instanceof Array?d:[d];break;case"tracking":this.tracking=d;break;case"referrer":this.referrer=d;break;case"user_opt_out":d&&"false"!=d&&"0"!=d?this.userOptOut=!0:this.userOptOut=!1}}},c.prototype.setupOVP=function(a){switch(a=a||{},this.getConfig(a,"video_source")||this.getConfig(a,"link_target")){case"brightcove":TRC.brightcove_support();break;case"ooyala":
TRC.ooyala_support();break;case"kaltura":TRC.kaltura_support()}},c.prototype.getItemByMetaValue=function(a){for(var b=document.head.getElementsByTagName("meta"),c=0;c5)return b.call(this,a,c[d].content);return null},c.prototype.getItemByLocationValue=function(a,b){return b.call(this,a,TRC.pageManager.getCurrentURL().toString())},c.prototype.getItemByParamUrl=function(b,c){return!a.trc_item_url||"item-id"!=b&&"item-url"!=b?null:c.call(this,b,a.trc_item_url)},c.prototype.getAutoItemMeta=function(b,c,d,e){var f,g,h,i=["paramUrl","meta","canonical","og","location"],j={paramUrl:"getItemByParamUrl",meta:"getItemByMetaValue",canonical:"getItemByCanonicalValue",og:"getItemByOgValue",location:"getItemByLocationValue"},k=this.global["url-extract-order"]?this.global["url-extract-order"]:i,l=0;for(k.push("location"),c=c?d.call(this,b,c):null;l=0?!0:!1,this.iosLinkTarget=this.trc.getProperty(this.mode_name,"ios-sc-link-target-mode")||this.trc.global["ios-sc-link-target"],this.defaultLinkTarget=this.trc.global["link-target-conf"]||{NAV:"_self",NT:"_blank",SP:"_blank"},this.linkTargetConf=this.isSmallIOS&&this.iosLinkTarget?this.iosLinkTarget:this.trc["link-target-conf"],this.ntHandlerEnabled=this.trc.global["publisher-onclick-nt-enabled"],this.organicRedirParam=this.trc.global["organic-redirect-param"],this.shiftRedirOnclick=this.trc.global["shift-redir-onclick"],this.useRedirect=this.trc.global["enable-organic-redirect"],this.useRedirectOnLink=this.trc.global["use-redirect-on-link"],this.adcItemTypes=this.trc.global["adchoice-item-types"]||{"is-organic":!1,"is-in-network":!1,"is-syndicated":!0,"is-native":!0},this.sendClickPiggyBack=this.trc.global["send-pb-in-click"],this.sendModeDebugData=this.trc.global["send-debug-mode"],this.lazyImageLoadMethdos={PAGE_LOAD:"regLazyImageLoadOnPageLoad",PAGE_INTERACTIVE:"regLazyImageLoadOnPageInteractive",RBOX_VISIBLE:"regLazyImageLoadOnRboxVisibile"},this.reqParams={"item-type":this.trc.getItemType(),"item-id":this.trc.getItemId()},this},IMAGE_LAZY_SRC_DATA_NAME="data-img-src",IMAGE_URL_PREFIX="https://images.taboola.com/taboola/image/fetch/f_jpg%2Cq_80%2Ch_{h}%2Cw_{w}%2Cc_fill%2Cg_faces%2Ce_sharpen/",protocol=TRC.PROTOCOL;TRCRBox.prototype.DEFAULT_THUMB_RATIO=.8,TRCRBox.prototype.genRBoxURL=function(){if(win.trc_testmode)return this.getRetryUrl("static-preview");var a={};a[this.placement]=this;var b=this.trc.formatTRCRequest(a,this.forceItemType);return b.cb=this.trc.genCallback(this.loadScriptCallback.trcBind(this)),protocol+"//"+this.domain+"/"+escape(TRC.publisherId)+"/trc/3/json?tim="+escape(__trcClientTimestamp())+(this.trc.trcByPass?"&trc_skip_failover=yes&":"&")+"data="+encodeURIComponent(__trcJSONify(b))+TRC.pageManager.additionalDispatchParams()+(win.trc_debug_level>1?"&llvl="+win.trc_debug_level:"")},TRCRBox.prototype.getListId=function(){return this.visible?"rbox-"+this.origin:"rbox-tracking"},TRCRBox.prototype.getItemType=function(){return this.forceItemType?this.forceItemType:this.trc.getItemType()},TRCRBox.prototype.generateRDiv=function(){var a=document.createElement("div");return a.id=this.getListId(),a.className="trc_rbox_div trc_rbox_border_elm","none"!=this.element.style.display&&(a.style.display="none"),a.style.overflowX="hidden",a.style.overflowY="hidden",a},TRCRBox.prototype.generateHeader=function(a){var b=document.createElement("div"),c=document.createElement("span"),d=this.trc.getProperty(this.mode_name,"header"),e=this.trc.getProperty(this.mode_name,"header-right"),f="No Header"!=e;return b.id=this.id.replace("trc_","trc_header_"),b.className="trc_rbox_header trc_rbox_border_elm",c.className="trc_rbox_header_span",b.ext=document.createElement("div"),b.ext.className="trc_header_ext",b.appendChild(b.ext),f?(this.generateHeaderPart(c,d,"trc_header_left_column trc_header_left_part"),this.generateHeaderPart(c,e,"trc_header_right_column trc_header_right_part")):c.innerHTML="No Header"!=d?d:"",b.titleBox=c,b.appendChild(c),a&&a.appendChild(b),b},TRCRBox.prototype.generateHeaderPart=function(a,b,c){var d=document.createElement("span");d.className="trc_inner_header "+(c||""),d.innerHTML=b,a.appendChild(d)},TRCRBox.prototype.render=function(a){var b=this.trc.getProperty(this.mode_name,"auto-scroll");this.element=document.createElement("div"),this.element.id=this.id.replace("trc_","trc_wrapper_"),this.element.className="trc_rbox "+this.mode_name,this.element.style.overflow="hidden","undefined"!=typeof b&&"none"!=b&&(this.element.onmouseover=function(){null!=this.auto_scroll_interval&&TRC.Interval.clear(this.auto_scroll_interval)},this.element.onmouseout=function(){"function"==typeof this.auto_scroll&&(null!=this.auto_scroll_interval&&TRC.Interval.clear(this.auto_scroll_interval),this.auto_scroll_interval=TRC.Interval.set(this.auto_scroll,parseInt(b)))}),a.appendChild(this.element),this.element.style.display="none",this.trc.getProperty(this.mode_name,"has-expand-animation")===!0&&new TRC.ExpandAnimationManager(this)},TRCRBox.prototype.generateVisibleParts=function(){if(null==this.listContainer){this.header=this.generateHeader(),"object"==typeof this.header&&this.element.appendChild(this.header);var a=document.createElement("div");a.id=this.id.replace("trc_","outer_"),a.className="trc_rbox_outer",a.style.overflow="hidden",this.listContainer=this.generateRDiv(),a.appendChild(this.listContainer),this.element.appendChild(a),this.element.style.display="block",this.trc.global["disclosure-enabled"]===!0?this.addTaboolaLogo():this.addTaboolaLogoNoDisclosure()}},TRCRBox.prototype.getRetryUrl=function(a){var b=protocol+"//cdn.taboola.com/libtrc/"+TRC.publisherId+"/";return"preview"==a?b+"trc-"+a+".js":b+"trc-"+this.getListId()+"-"+a+".js"},TRCRBox.prototype.check_preview_size_error=function(a,b){var c=b.trc["video-list"].video;return c instanceof Array||(c=[c]),a!=this.getRetryUrl("preview")&&c.length<10?(this.src=this.getRetryUrl("preview"),!0):!1},TRCRBox.prototype.setTargetItemsList=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a[b[d]["item-id"]]={tii:b[d]["item-id"],tipt:this.getProviderType(b[d]),tit:b[d].type,tids:c}},TRCRBox.prototype.getJsonTargetItemsList=function(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&c.push(a[b]);return{fil:__trcJSONify(c)}},TRCRBox.prototype.getProviderType=function(a){return a["is-syndicated"]?"SP":a["is-in-network"]?"NT":a["is-native"]?"NAV":"RC"},TRCRBox.prototype.isReadMoreDevice=function(a){for(var b=a.split("|"),c={smart_phone:TRC.dom.isSmartPhone(),tablet:TRC.dom.isTablet(),desktop:TRC.dom.isDesktop()},d=0;df;f++)doc.getElementById(c[f]).id=d[f]}catch(g){__trcError("TRCRBox.prototype.switchCSSResetDivs : ",g.message)}},TRCRBox.prototype.loadFailureHandler=function(){TRC.pConsole(this.mode_name,"debug","handleing TRC request failure","");var a="TRCRBox.loadFailureHandler(retry="+this.retryCount+")";if(__trcDebug("Enter "+a),!this.request)return void __trcDebug("Exit "+a+": request was aborted");if("object"==typeof window.trc_json_response)return __trcWarn("Exit "+a+": old style response"),this.loadScriptCallback(window.trc_json_response),void delete window.trc_json_response;if(this.abortRequest(),this.response||this.dc)return void __trcDebug("Exit "+a+": response already received");if(win.trc_testmode)this.src=this.getRetryUrl("preview"),__trcDebug("Exit "+a+": preview");else{if(!this.use_cdn)return __trcError("Aborting on error due to use-cdn=false",null),void this.abortRendering();this.src=this.getRetryUrl("error"),__trcWarn("Exit "+a+": retrying with "+this.src.split("/")[2].split(".")[0].toUpperCase())}this.getData()},TRCRBox.prototype.abortRequest=function(){this.timeoutId&&(TRC.Timeout.clear(this.timeoutId),this.timeoutId=null),this.request&&(this.request.parentNode.removeChild(this.request),this.request=null)},TRCRBox.prototype.sendRequest=function(){var a="TRCRBox.sendRequest(retry="+this.retryCount+")";if(__trcDebug("Enter "+a),this.response)return __trcDebug("Exit "+a+": already have response"),void this.loadScriptCallback(this.response);if(this.loadRBoxRequestFailed){if(!this.use_cdn)return __trcError("loadRBox failed and not using CDN, aborting."),void this.abortRendering();this.retryCount++,this.src=this.getRetryUrl("error")}var b=this.trc.getProperty(this.mode_name,"timeout")||8e3;this.timeoutId=TRC.Timeout.set(function(){return this.timeoutHappened=this.timeoutHappened+1||1,this.use_cdn?(this.abortRequest(),this.src=this.getRetryUrl("timeout"),__trcWarn("Called TRCRBox.sendRequest.timeout("+this.timeoutHappened+"): retrying with "+this.src.split("/")[2].split(".")[0].toUpperCase()),void this.getData()):void __trcError("Timedout waiting for server but not aborting")}.trcBind(this),b),this.response=null;try{this.requestTime=(new Date).getTime()-TRC.utm.start,this.request=this.trc.loadExternal(this.src,"js",this.loadFailureHandler.trcBind(this),!0)}catch(c){return void __trcError("Exit "+a+": error in loadExternal",c)}__trcDebug("Exit "+a+": success")},TRCRBox.prototype.abortRendering=function(){var a="TRCRBox.abortRendering(retry="+this.retryCount+")";switch(__trcDebug("Called "+a),this.drawList=!0,typeof this.errorHandler){case"string":return void(null!=this.listContainer&&this.listContainer.appendChild(document.createTextNode("Error getting recommendations: "+this.errorHandler)));case"function":return void this.errorHandler()}},TRCRBox.prototype.getData=function(){this.loaded=!0,this.retryCount++;var a="TRCRBox.getData(retry="+this.retryCount+")";return __trcDebug("Enter "+a),this.cdnEventHandler||(this.cdnEventHandler=TRC.listen("staticRecommendationsReceived",function(a){this.response||this.loadScriptCallback(a.response)}.trcBind(this))),this.retryCount>this.trc.MAX_RETRY?(__trcError("Exit "+a+": max retry - last call was to "+this.src.split("/")[2].split(".")[0].toUpperCase()),void this.abortRendering()):(TRC.dom.onReady(this.sendRequest.trcBind(this),TRC.Browser.ie?!1:!0),void __trcDebug("Exit "+a+": success"))},TRCRBox.prototype.getContainer=function(){return this.element.parentNode},TRCRBox.prototype.sendEvent=function(a,b,c,d,e,f){var g=!1,h={ri:this.response?this.response.trc.req:null,sd:TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),ui:TRC.pageManager.getValue("user-id"),pi:this.trc.getItemId(),wi:this.response?this.response.trc["watched-item"]:null,pt:this.getItemType(),vi:TRC.pageManager.getPageData(),li:this.getListId()},i=function(){g||(g=!0,e&&e())};(this.trc.global["tmp-use-pb-params"]&&this.trc.configForPostEvent[a]||"click"===a&&this.sendClickPiggyBack)&&(this.response.trc&&this.response.trc.ppb&&(b.ppb=this.response.trc.ppb),this.response.trc&&this.response.trc.cpb&&(b.cpb=this.response.trc.cpb)),"click"==a&&"nt"==b.prt&&(h={}),__trcCopyProps(b,h),d?(this.trc.log1(a,h,c,i,this.placement),TRC.pConsole(this.mode_name,"info","event type : "+a+" - this event will be sent only once for the widget",h,"object")):(this.trc.logTrcEvent(a,h,c,i),TRC.pConsole(this.mode_name,"info","sending event type : "+a,h,"object")),"number"==typeof f&&TRC.Timeout.set(i,f)},TRCRBox.prototype.load=function(a,b){if(!this.loaded){this.trc.preloadRequest=this.trc.preloadRequest||{},"object"==typeof b&&"undefined"==typeof this.trc.preloadRequest[b.placement]&&(b.pv2=!0,this.trc.preloadRequest[b.placement]=b);var c=this.trc.getItemId(),d="undefined"!=typeof c&&null!=c&&0!=c.length;d?(this.src=this.genRBoxURL(),this.errorHandler=a,this.getData()):this.loaded=!0}},TRCRBox.prototype.updateRecommendations=function(a){return this.retryCount=0,this.drawList=!1,this.loadRBoxRequestFailed=!1,this.response=null,this.forceItemType=a,this.reqParams={"item-type":this.trc.getItemType(),"item-id":this.trc.getItemId()},this.timeoutId&&(TRC.Timeout.clear(this.timeoutId),this.timeoutId=null),this.loaded=!1,this.trc.renderRBox(this),!0},TRCRBox.prototype.isVisible=function(a){function b(a,c){return!a.parentNode||a.parentNode==document.documentElement&&a!=c?!1:a==c||b(a.parentNode,c)}a=a?a:this.container;var c=a.getBoundingClientRect(),d=c.left+Math.round((c.right-c.left)/2),e=c.top+Math.round((c.bottom-c.top)/2),f="CSS1Compat"===document.compatMode&&document.documentElement.clientWidth||document.body.clientWidth,g="CSS1Compat"===document.compatMode&&document.documentElement.clientHeight||document.body.clientHeight,h=TRC.Browser.operaUpto(10.1)||TRC.Browser.safariUpto(4)?document.elementFromPoint(d+document.body.scrollLeft,e+document.body.scrollTop):document.elementFromPoint(d,e);return d>0&&f>d&&e>0&&g>e&&h&&b(h,a)},TRCRBox.prototype.visible_items_collection=function(){var a,b,c,d=0;for(a=0;a2&&(a=new TRC.URL(b),a.host=c,b=a.toString()),this.trc.getProperty(this.mode_name,"use-dpr-images")&&TRC.dom.isHighDensity()&&(b=b.replace(/fetch\//,"fetch/dpr_2.0%2C")),d&&"0"!=d&&(b=b.replace(/f_jpg(%2C)?/,""),b=b.replace(/fetch\//,"fetch/f_png%2Cr_"+d+"%2C")),b},TRCRBox.prototype.isHiddenItem=function(a){return"none"===doc.trcGetCurrentStyle(a,"display",null)},TRCRBox.prototype.getContainerDim=function(a,b,c){var d,e,f=100;if(c){if(this.cachedImageDim)return this.cachedImageDim}else if(d=TRC.dom.getElementRect(a),e=Math.ceil(d.right-d.left))return f=Math.ceil(d.bottom-d.top||this.getAspectHeight(b)||e*this.getThumbAspectRatio(this.trc.modes[this.mode_name],"ratio")||f),this.cachedImageDim={width:e,height:f};return null},TRCRBox.prototype.getAspectHeight=function(a){var b;return a.thumbnail_aspect?(b=TRC.dom.getElementRect(a.thumbnail_aspect),b.bottom-b.top):0},TRCRBox.prototype.getImageOptimizePrefix=function(a,b,c){var d=this.trc.getProperty(this.mode_name,"image-size-factor")||1,e=this.trc.getProperty(this.mode_name,"image-min-width")||110,f=this.trc.getProperty(this.mode_name,"image-size-round")||10,g=this.trc.getProperty(this.mode_name,"image-max-ratio")||5,h=Math.ceil(Math.max(c.width*d,e)/f)*f,i=c.height/c.width,j=Math.ceil(h*c.height/c.width),k=this.isInNormalDimension(h)?h:Math.min(this.trc.getProperty(this.mode_name,"image-max-dimension"),Math.ceil(this.trc.getProperty(this.mode_name,"image-max-dimension")*i)),l=this.isInNormalDimension(j)?j:Math.ceil(k*Math.min(i,g));return b=b.replace("{w}",Math.ceil(k).toString()).replace("{h}",Math.ceil(l).toString())},TRCRBox.prototype.isInNormalDimension=function(a){var b=this.trc.getProperty(this.mode_name,"image-min-dimension")||100,c=this.trc.getProperty(this.mode_name,"image-max-dimension")||600;return a>b-1&&c+1>a},TRCRBox.prototype.setLazyImageLoad=function(a,b){a.setAttribute(IMAGE_LAZY_SRC_DATA_NAME,b)},TRCRBox.prototype.setLazyImageLoadMethod=function(){var a,b=this.trc.global["thumb-lazy-load-method"]?this.trc.global["thumb-lazy-load-method"].split(","):[],c=0,d=b.length;for(a=0;d>a;a++)this.lazyImageLoadMethdos[b[a]]&&(c=1,this[this.lazyImageLoadMethdos[b[a]]]());if(!c)for(a in this.lazyImageLoadMethdos)this.lazyImageLoadMethdos.hasOwnProperty(a)&&this[this.lazyImageLoadMethdos[a]]()},TRCRBox.prototype.regLazyImageLoadOnPageInteractive=function(){var a=TRC.EVENT_PAGE_INTERACTIVE;TRC.listen(a,this.lazyImageLoader.trcBind(this)),TRC.isInteractive&&TRC.dispatch(a,void 0)},TRCRBox.prototype.regLazyImageLoadOnPageLoad=function(){var a=TRC.EVENT_PAGE_LOAD;TRC.listen(a,this.lazyImageLoader.trcBind(this)),TRC.isPageLoaded&&TRC.dispatch(a,void 0)},TRCRBox.prototype.regLazyImageLoadOnRboxVisibile=function(){var a=this.trc.global["thumb-lazy-load-space"]||100;this.isInViewPort(this.container,a)&&this.lazyImageLoader.trcBind(this)},TRCRBox.prototype.isInViewPort=function(a,b){var c=this.getMinViewPortOffsets(this.container);return!(0>c&&Math.abs(c)>b)},TRCRBox.prototype.lazyImageLoader=function(){var a,b,c=this.thumbnailImageStack||this.container.getElementsByTagName("img"),d=c.length;if(this.imagesLazyLoaded)this.imagesLazyLoaded=!0;else for(a=0;d>a;a++)b=c[a].getAttribute(IMAGE_LAZY_SRC_DATA_NAME),b&&(c[a].src=b)},TRCRBox.prototype.createUtmParam=function(){return{utm:TRC.utm.join(",")+(this.utm?","+this.utm.join(","):"")}},TRCRBox.prototype.getMinViewPortOffsets=function(a){var b=TRC.visibility.getViewPortOffsets(a);return b.verticalOffset<0&&b.horizontalOffset<0?Math.max(b.verticalOffset,b.horizontalOffset):Math.min(b.verticalOffset,b.horizontalOffset)},TRCRBox.prototype.drawListBody=function(trc){function autoHeight(elm){var oldVal=parseInt(document.trcGetCurrentStyle(elm,"height"));if(isNaN(oldVal))return!0;var p=document.createElement("span");with(p.style)display="block",height="10px",width="10px";elm.appendChild(p);var newVal=parseInt(document.trcGetCurrentStyle(elm,"height"));return elm.removeChild(p),newVal!=oldVal}function setHeight(a,b){a.style.height=b+"px";for(var c=0;a.clientHeight>b;)a.style.height=b-++c+"px"}if("object"==typeof trc){if(this.element.offsetTop<=0&&this.element.offsetWidth<=0)return void TRC.Timeout.set(this.drawListBody.trcBind(this,trc),1e3);win._tblConsole=win._tblConsole||[],TRC.pConsole(this.mode_name,"debug","start drawing widget","");var listContainer=this.listContainer;this.boxes=[];var internalc_width=0,TRCobj=this.trc;if(this.navigationType=TRCobj.getProperty(this.mode_name,"navigation-type"),this.trc.calculateAutoSizeParameters(this),this.element.className+=this.autoSize?" trc-auto-size":"",this.isWCTextLinks&&(this.isClassFilter=TRC.Browser.ieUpto(8),this.isClassFilter?TRC.listen("IE_ClassShift",this.fixWCTextLinksVideoBoxes.trcBind(this)):TRC.dom.on(win,"resize",this.fixWCTextLinksVideoBoxes.trcBind(this).trcThrottle(500)),
TRC.listen("videoCubeChange",this.fixWCTextLinksVideoBoxes.trcBind(this)),this.isResponsive)){var TEXT_LINKS_RESP_CSS_NAME="trc_tl_responsive",trc_container=doc.trcGetParentByClassName(this.getContainer(),"trc_related_container");TRC.dom.addClass(trc_container,TEXT_LINKS_RESP_CSS_NAME+" "+TEXT_LINKS_RESP_CSS_NAME+"_"+this.id),this.setResponsiveRules(TEXT_LINKS_RESP_CSS_NAME+"_"+this.id,this.recommendationList.length)}var has_duration_label=!1,detail_order=this.trc.getProperty(this.mode_name,"detail-order"),orientation=this.orientation=this.trc.getProperty(this.mode_name,"orientation");detail_order=detail_order.split(",");for(var j=0;j=b.left&&a.clientX=b.top&&a.clientYi;i++){var cur=this.recommendationList[i];cur.itemIndex=i,null==this.firstVideo&&"video"==cur.type&&(this.firstVideo=cur);try{this.trc.getFunction(this.mode_name,"item-data-filter",cur);var box=this.drawVideoBox(cur,has_duration_label);if(i>=this.recommendationList.length/2&&this.isWCTextLinks&&!this.isResponsive&&(box.className+=" trc_tl_right_col"),"vertical"==orientation){var clear_div=document.createElement("div");clear_div.style.clear="both",box.appendChild(clear_div)}if(internalc.appendChild(box),"scrolling"!=this.navigationType){var thumbnail_position=this.trc.getProperty(this.mode_name,"thumbnail-position");if(this.rows>1&&this.autoSize&&("top"==thumbnail_position||"bottom"==thumbnail_position)&&(this.itemMaxHeight=this.itemMaxHeight?this.itemMaxHeightlistContainer.offsetHeight){var diff=box.offsetHeight-listContainer.offsetHeight;box.style.height=parseInt(document.trcGetCurrentStyle(box,"height"))-diff+"px"}internalc.removeChild(box)}else{box.fixTextOverflow(),"undefined"==typeof box.image_div?box.thumb.appendChild(box.img):(box.thumb.appendChild(box.image_div),box.image_div.appendChild(box.img)),this.trc.global["use-delay-image-load"]?TRC.Timeout.set(this.setImageLoad.trcBind(this,box.img,box,box.img_src,100,box.thumb,this.trc.global["thumb-lazy-load-switch"]),10):this.setImageLoad(box.img,box,box.img_src,100,box.thumb,this.trc.global["thumb-lazy-load-switch"]);var mrg_right=parseInt(document.trcGetCurrentStyle(box,"margin-right"));internalc_width=box.clientWidth+box.offsetLeft+(isNaN(mrg_right)?0:mrg_right),"horizontal"==orientation&&autoHeight(box)&&setHeight(box,listContainer.offsetHeight)}this.boxes.push(box)}catch(e){__trcError("Error in drawVideoBox",e)}}if("scrolling"!=TRCobj.getProperty(this.mode_name,"navigation-type")){internalc.style.width="auto";var pagerDiv=self.drawPager(),auto=TRCobj.getProperty(self.mode_name,"auto-scroll");"undefined"!=typeof auto&&"undefined"!=typeof pagerDiv&&null!=pagerDiv&&"none"!=auto&&(self.auto_scroll=function(){var a=0;for(i=0;i=listContainer["scroll"+a])){if(TRC.Browser.ie&&TRC.Browser.ie<8)return listContainer.style[a.toLowerCase()]=internalc["client"+a]+18+"px",void("Width"==a&&(this.element.style.width=listContainer.style[a.toLowerCase()]));var b=Math.floor(Math.max(1,listContainer["scroll"+a]-listContainer["client"+a]));b-=Math.max(0,listContainer["scroll"+a]-listContainer.parentNode["scroll"+a]);var c=parseInt(listContainer.style[a.toLowerCase()]),d=Math.max(listContainer["scroll"+a],isNaN(c)?0:c)+b+"px";listContainer.style[a.toLowerCase()]=d,"Width"==a&&(this.element.style.width=d),this.postRenderQueue.pushFront("adapt to scrollbar",arguments.callee.trcBind(this,a))}}.call(this,"horizontal"==TRCobj.getProperty(this.mode_name,"orientation")?"Height":"Width"),TRCobj.getProperty(this.mode_name,"shade-scroll")&&this.postRenderQueue.pushBack("drawShade",function(a){this.drawShade(a)}.trcBind(this,orientation)),listContainer.onscroll=function(){this.sendEvent("explore",{},null,!0),this.check_visibility()}.trcBind(this),this.check_visibility();this.boxes[0].className+=" trc-first-recommendation trc-spotlight-first-recommendation",this.hasSyndicatedContent&&this.postRenderQueue.pushBack("syndication hint icon",this.addSyndicationHintIcon.trcBind(this,internalc)),"embed"===this.link_target&&this.postRenderQueue.pushBack("createEmbedThumb",this.createEmbedThumb.trcBind(this)),this.postRenderQueue.pushBack("list-suffix,publisher-end",function(a){this.trc.getFunction(this.mode_name,"list-suffix",a,this),this.trc["publisher-end"](this.id)}.trcBind(this,internalc)),this.postRenderQueue.pushBack("checkForBlocking",this.checkForBlocking.trcBind(this)),this.postRender(),this.trc.global["thumb-lazy-load-switch"]&&this.setLazyImageLoadMethod(),TRC.eventDelegator.dispatch("onrender",{name:this.mode_name,container:this.container});var visible_delay=0;this.visibleTimeoutId=null,"undefined"!=typeof this.trc.global&&(visible_delay=this.trc.global["visible-delay"]?this.trc.global["visible-delay"]:visible_delay),this.trc.global["enable-deferred-visible"]?TRC.Timeout.set(this.sendVisibility.trcBind(this,visible_delay,internalc),this.trc.global["visible-defer-timeout"]||"0"):this.sendVisibility(visible_delay,internalc);var active=this.trc.getProperty(this.mode_name,"auto-advance");-1!=active&&"undefined"!=typeof active&&(null==this.autoPlayer?this.autoPlayer=this.startAutoPlayManager(this.firstVideo,active):this.autoPlayer.getPlaylistItem("n"))}},TRCRBox.prototype.postRender=function(a){if(a){var b=this.postRenderQueue.popFront();if(null==b)return void __trcDebug("TRCRBox.postRender: finished");try{b.func.call(this),TRC.pConsole(this.mode_name,"debug","executing postRender functions - see info",b.func.toString())}catch(c){__trcError("Error in TRCRBox.postRender while executing "+b.name,c)}}TRC.Timeout.set(this.postRender.trcBind(this,!0),0)},TRCRBox.prototype.addSyndicationHintIcon=function(a){var b,c=this.trc.getProperty(this.mode_name,"syndicated-attribution"),d=this.trc.getProperty(this.mode_name,"syndicated-attribution-tooltip"),e=this.trc.getProperty(this.mode_name,"syndicated-attribution-position"),f=document.createElement("a"),g=/\btrc_rbox\b/;for(f.href=TRC.PROTOCOL+"//popup.taboola.com/"+(this.trc.language||"en")+"/?"+this.getAttributionLinkParams(),f.rel="nofollow",f.appendChild(document.createTextNode(c)),f.title=d,f.style.display="block",f.className="whatsThisSyndicated a-"+e,f.target="_blank";!g.test(a.className);)a=a.parentNode;b=f.cloneNode(!0),b.className+=" trc_mobile_attribution_link",f.className+=" trc_desktop_attribution_link",a.appendChild(f),a.appendChild(b),"absolute"!==a.style.position&&(a.style.position="relative"),TRC.dom.on(f,"click",function(a){return TRC.aboutUs.open(a||event)||!1})},TRCRBox.prototype.drawShade=function(a){if(!(TRC.Browser.ie&&TRC.Browser.ie<=6)){var b=this.listContainer["client"+("vertical"==a?"Width":"Height")]+"px",c=this.listContainer["client"+("vertical"==a?"Height":"Width")]+this.listContainer["client"+("vertical"==a?"Top":"Left")]-10+"px",d=document.createElement("div");d.className=a+"-start-shade",d.style["vertical"==a?"width":"height"]=b,d.style["margin"+("vertical"==a?"Top":"Left")]=this.listContainer["client"+("vertical"==a?"Top":"Left")]+"px";var e=document.createElement("div");e.className=a+"-end-shade",e.style["vertical"==a?"width":"height"]=b,this.listContainer.parentNode.insertBefore(d,this.listContainer),this.listContainer.parentNode.insertBefore(e,this.listContainer),e.style["margin"+("vertical"==a?"Top":"Left")]=c,e.style.backgroundRepeat=d.style.backgroundRepeat="repeat-"+("vertical"==a?"x":"y")}},TRCRBox.prototype.drawPager=function(){function a(){var a=[],c=0,d=0;if("none"==this.navigationType)return[{start_index:0,end_index:this.boxes.length}];for(b=0;b=j.clientHeight&&(l.removeChild(e),a[c++]={start_index:d,end_index:d>b-1?d:b-1},d=b-1>=d?b--:b,this.clearChilds(l)):1.1*j.clientHeight=b-1?d:b-1},d=b-1>=d?b--:b,this.clearChilds(l))}return a[c]={start_index:d,end_index:b-1},this.clearChilds(l),a}var b,c=this.trc,d=c.getProperty(this.mode_name,"pager-type-style"),e=c.getProperty(this.mode_name,"cyclical-paging"),f=c.getProperty(this.mode_name,"pager-position"),g=c.getProperty(this.mode_name,"pager-button-location"),h=c.getProperty(this.mode_name,"pager-button-style"),i=this.mode_name,j=this.listContainer,k=c.getProperty(i,"orientation"),l=j.firstChild;this.rows=c.getProperty(i,"rows"),this.clearChilds(l),j.style.overflowX="hidden",j.style.overflowY="hidden";var m=a.call(this),n=document.createElement("div");if(n.style.clear="both",!this.autoSize){for(;this.rows>1&&!(m.length>=this.rows);)this.rows--;if(this.rows>1)for(var o=[],p=0;p=this.boxes.length)){var q=this.boxes[b];l.appendChild(q);try{null!=q.img_src&&("undefined"==typeof q.image_div?q.thumb.appendChild(q.img):(q.thumb.appendChild(q.image_div),q.image_div.appendChild(q.img)),this.setImageLoad(q.img,q,q.img_src,100,q.thumb,this.trc.global["thumb-lazy-load-switch"]),q.img_src=null)}catch(r){__trcError("Pager thumbnail images fixing errors",r)}q.fixTextOverflow()}l.appendChild(n);var s=this.pager;if(null!=s)try{s.parentNode.removeChild(s)}catch(r){}var t=m.length;if(1>=t||"none"==this.navigationType)return this.check_visibility(),null;var u=document.createElement("div");u.style.position="absolute",u.style.width=j.clientWidth/2+"px";var v=document.createElement("div");u.appendChild(v),j.parentNode.appendChild(u),v.id="trc_pager_"+this.id,v.className="trc_pager",v.current=null,v.pages=[],v.curPage=0;var w=j.clientWidth,x=document.createElement("div");x.id="pager_prev_"+this.id,x.className="trc_pager_prev","sides"==g?(x.style.width="auto",x.style.paddingTop=(j.clientHeight-x.clientHeight)/2+"px",x.style.position="absolute",x.style["ltr"==c.direction?"left":"right"]="0px",j.parentNode.insertBefore(x,j)):v.appendChild(x),x.onclick=function(){v.curPage>0?v.pages[v.curPage-1].onclick():e&&v.pages[v.pages.length-1].onclick()};var y=document.createElement("div");y.id="pager_next_"+this.id,y.className="trc_pager_next",y.onclick=function(){v.curPage+1b;b++){var H=document.createElement("div");switch(d){case"none":H.innerHTML="",D.style.cssText="display:none !important;";break;case"numbers":H.innerHTML=""+(b+1);break;case"counter":var I=document.createElement("span");I.className="trc_pager_counter",I.innerHTML=Gettext.strargs(c.gt.gettext("%1 of %2"),[b+1,v.pages.length]),H.appendChild(I),D.className.search("trc_pager_counter")<0&&(D.className+=" trc_pager_counter");break;case"bullets":H.innerHTML='•';break;case"image":""!=E?(H.inner_img=document.createElement("img"),H.inner_img.src=F,H.appendChild(H.inner_img)):H.innerHTML=""+(b+1)}H.className="trc_pager_unselected",D.appendChild(H),H.index=b;var J=this;H.page_switch=function(){try{l.removeChild(n)}catch(a){}if(null!=v.current){for("image"==d&&""!=F&&(H.inner_img.src=F),v.current.className="trc_pager_unselected",b=m[v.curPage].start_index;b<=m[v.curPage].end_index;b++)b=J.boxes.length)){var f=J.boxes[b];if(b===m[this.index].start_index&&(f.className+=" trc-spotlight-first-recommendation"),l.appendChild(f),"undefined"!=typeof f.img&&null!=f.img_src&&(f.video_data.ad_load_count=(new Date).getTime(),"undefined"==typeof f.image_div?f.thumb.appendChild(f.img):(f.thumb.appendChild(f.image_div),f.image_div.appendChild(f.img)),f.img.src=f.img_src,f.img_src=null),null!=f.spnoverlay){var h=f.spnoverlay,i=h.firstChild,j=h.lastChild,k=j[(j.clientHeight>0?"client":"scroll")+"Height"];i.style.width=j[(j.clientWidth>0?"client":"scroll")+"Width"]+"px",h.style.height=i.style.height=Math.max(k,parseInt(i.style.height))+"px",f.spnoverlay=null}f.fixTextOverflow(),J.postRender()}}if(l.appendChild(n),v.current=this,"image"==d&&""!=E&&(H.inner_img.src=E),this.className="trc_pager_selected",v.curPage=this.index,"undefined"!=typeof y&&(this.index+1>=v.pages.length&&!e?(""!=z&&"none"!=g&&(y.image.src=z),y.className="trc_pager_next pager_disabled"):(""!=A&&"none"!=g&&(y.image.src=A),y.className="trc_pager_next pager_enabled")),"undefined"!=typeof x&&(this.index<=0&&!e?(""!=z&&"none"!=g&&(x.image.src=z),x.className="trc_pager_prev pager_disabled"):(""!=A&&"none"!=g&&(x.image.src=A),x.className="trc_pager_prev pager_enabled")),"counter"==d){var o=document.createElement("div");for(o.appendChild(document.createTextNode(Gettext.strargs(c.gt.gettext("%1 of %2"),[this.index+1,v.pages.length])));D.firstChild;)D.removeChild(D.firstChild);D.appendChild(o)}J.check_visibility(),TRC.dispatch("trc_afterRboxDraw")},H.onclick=function(){this.page_switch(),0!=this.index&&J.sendEvent("explore",{},null,!0)},H.onmouseover=function(){"image"==d&&""!=G&&(this.prev_img=this.inner_img.src,this.inner_img.src=G)},H.onmouseout=function(){"image"==d&&"undefined"!=typeof this.prev_img&&(this.inner_img.src=this.prev_img)},v.pages.push(H)}if("sides"==g?(y.style.width="auto",y.style.paddingTop=(j.clientHeight-y.clientHeight)/2+"px",y.style.position="absolute",j.parentNode.insertBefore(y,j),j.style.paddingLeft=j.style.paddingRight=y.clientWidth+"px",y.style["ltr"==this.trc.direction?"left":"right"]=w+y.clientWidth+"px"):v.appendChild(y),v.pages[0].onclick(),this.pager=v,"center"==f){v.style.position="absolute",v.style.cssFloat="none",v.style.styleFloat="none",v.style.display="block";var K=v.clientWidth;v.style.width=K+2+"px",v.style.position="relative";var L=(j.clientWidth-K)/2;v.parentNode.style.width=K+2+L+"px",v.style.marginLeft=L+"px"}else if("header"==f&&this.header.ext){v.parentNode.removeChild(v),v.className+=" in_trc_header";var M=document.createElement("div");M.appendChild(v),M.id=v.id,v.id="";var N=document.createElement("div");N.style.clear="left",M.appendChild(N),this.header.titleBox.innerHTML||(this.header.titleBox.innerHTML=" "),this.header.ext.appendChild(M)}return v},TRCRBox.prototype.check_visibility=function(){for(var a=0;a=0},b,"span");g&&(c&&(g=g.cloneNode(!0)),d.push(g))}return d},TRCRBox.prototype.findFlash=function(a){var b=this.findElement(a,document,"embed");return b?b:this.findElement(a,document,"object")},TRCRBox.prototype.pauseVideo=function(a){var b=this.findFlash(function(a){return"function"==typeof a.pauseVideo});try{b&&b.pauseVideo(a)}catch(c){__trcError("Error in pauseVideo",c)}"function"==typeof window.trc_pauseVideo&&window.trc_pauseVideo(a)},TRCRBox.prototype.playVideoAd=function(a,b,c,d){var e=this.findFlash(function(a){return"function"==typeof a.playVideoAd});try{e&&e.playVideoAd(a.title,a["display-url"],a["landing-url"],a.url,b,c,a["item-id"],d)}catch(f){__trcError("Error in playVideoAd",f)}},TRCRBox.prototype.getLinkTarget=function(a,b,c){var d;return d=b?b[a]||c[a]:c[a],d||(d="_blank"),d},TRCRBox.prototype.addPiggyBackParams=function(a){return a?a+"&ppb="+this.response.trc.ppb+"&cpb="+this.response.trc.cpb:void 0},TRCRBox.prototype.addModeDebugData=function(a){return a+encodeURI(this.getModeDebugData("string"))},TRCRBox.prototype.getModeDebugData=function(a,b){try{var c=this.response.trc["test-variant"];if("string"===a){var d="&cmn="+this.mode_name,e="&cpn="+this.placement,f="",g="",h="";return c!==b&&(f="&omn="+this.orig_name,g="&opn="+this.orig_placement,h="&vn="+c),d+e+f+g+h}var i={};return i.cmn=this.mode_name,i.cpn=this.placement,c!==b&&(i.omn=this.orig_name,i.opn=this.orig_placement,i.vn=c),i}catch(j){}},TRCRBox.prototype.createVideoLink=function(a,b){var c,d=document.createElement("a"),e=this.trc.global["publisher-onclick-nt-enabled"]&&a["is-in-network"],e=this.ntHandlerEnabled&&a["is-in-network"],f=this.sendClickPiggyBack?this.addPiggyBackParams(a.logger_url):a.logger_url;return this.sendModeDebugData&&(f=this.addModeDebugData(f)),e&&(a.hasNtClckHnadler=!0),d.title=TRC.util.getHtmlDecodeText(b),a.link_target=this.link_target,a.isSyndicated&&!e?(d.href=a.url,d.rel="nofollow",c=this.getLinkTarget(this.getProviderType(a),this.linkTargetConf,this.defaultLinkTarget),d.logger_url=f.replace("&url=","&redir=")+(a["is-in-network"]?"&prt=nt":"")+(a["is-native"]?"&prt=nav":""),d.target=c,this.trc.global["touchstart-enabled"]===!0&&TRC.dom.on(d,"touchstart",function(a){d.href=d.logger_url,d.isTouchPropagation=1,a.stopPropagation()}),d.onmousedown=function(a){return a=a||event,(a.target||a.srcElement).target=c,d.isTouchPropagation?!0:void(d.href=d.logger_url)},d.onclick=function(){if(this.trc.clickFraud.reportClick(),this.trc.global["deep-linking-enabled"]&&TRC.DeepLinking.isAppStoreURL(a.url,this.trc.global["additional-deep-links-regex"]))try{return TRC.DeepLinking.openDeepLink(d.logger_url),!1}catch(b){}return d.isTouchPropagation?!0:(this.shiftRedirOnclick&&(d.href=d.logger_url),this.pauseVideo("link"),TRC.Browser.ieUpto(7)?(this.clickLink(d.href,d.target),!1):!0)}.trcBind(this)):(d.href=a.url,"blank"!=this.link_target?d.target="_parent":(d.target="_blank",d.onmousedown=function(a){a=a||event,(a.target||a.srcElement).target="_blank"}),a["is-in-network"]&&(a.scParams.prt="nt"),this.organicRedirParam&&(f=f.replace("&url=","&"+this.organicRedirParam+"=")),this.useRedirect&&this.useRedirectOnLink&&(d.href=f),d.onmousedown=function(){d.href=f},d.onclick=this.videoLinkClickHandler.trcBind(this,a,d,f)),d},TRCRBox.prototype.videoLinkClickHandler=function(){var a=2e3,b=function(a,b,c){var d=a.trc.global["syndication-embed-code"];return"function"!=typeof d||win.trc_testmode?win.open(b.logger_url):a.openPlayer(b,d,c),!1},c=function(a,b){var c=a.trc.getProperty(a.mode_name,"player-embed-code"),d=a["player-container-id"],e=a.billboard||document.getElementById(d);return"function"==typeof c&&e&&!win.trc_testmode?a.playInsideHostingContainer(b,c,e):win.open(b.logger_url),!1},d=function(a,b,c,d){return"video"==b.type&&a.pauseVideo("link"),c.target="_blank",TRC.Browser.ieUpto(7)||d?TRC.Browser.firefoxUpto(8)?!0:(a.clickLink(c.href,c.target),!1):(c.href=b.url,a.sendEvent("click",{ii:b["item-id"],it:b.type},null,!1),!0)},e=function(a,b){switch(a){case"brightcove":return TRC.brightcove_playVideo(b);case"ooyala":return TRC.ooyala_playVideo(b);case"kaltura":return TRC.kaltura_playVideo(b)}return!1},f=function(a){var b=a.link_target;if("local"===b){if("function"==typeof window.trc_videoSelected)return void window.trc_videoSelected.call(window,a.id,a.url);b=this.trc.video_source}e(b,a.id)||this.clickLink(a.url)};return function(e,g,h,i){i=i||event;var j=e.link_target,k=!1,l=this.useRedirect;if("lightbox"===j&&this.trc.global)return b(this,e,i);switch(j){case"embed":k=c(this,e);break;case"blank":(i.target||i.srcElement).target="_blank",l&&(g.href=h),k=d(this,e,g,l);break;default:if(l&&"local"!=e.link_target&&"function"!=typeof this.onclick&&"function"!=typeof this.trc.onclick){if(TRC.Browser.ieUpto(7))return this.clickLink(g.href,g.target),!1;this.shiftRedirOnclick&&(g.href=h),k=!0}else this.sendEvent("click",e.hasNtClckHnadler?e.scParams:{ii:e["item-id"],it:e.type},null,!1,this.publisherClickHandler.trcBind(this,e,f.trcBind(this,e,!1)),a)}return e.url!=e.original_url&&__trcDebug("url:"+e.original_url+", changed to:"+e.url+", on page:"+win.location.href),k||(i.cancelBubble=!0,i.stopPropagation&&i.stopPropagation()),k}}(),TRCRBox.prototype.clickLink=function(a,b){TRC.Browser.firefoxUpto(8)&&(win.location.href=a);var c=document.createElement("a");if(c.href=a,c.target=b?b:"_parent",c.style.visibility="hidden",document.body.appendChild(c),c.click)return void c.click();var d=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,button:0});c.dispatchEvent(d)},TRCRBox.prototype.publisherClickHandler=function(a,b){var c=__trcCopyProps(a,{});delete c["item-id"],delete c.link;try{if("function"==typeof this.onclick&&!this.onclick.call(this.pubOpts,c))return!1;if("function"==typeof this.trc.onclick&&!this.trc.onclick.call(this.pubOpts,c))return!1}catch(d){__trcError("Publisher 'onclick' handler had an error",d)}return b(this)},TRCRBox.prototype.add_span=function(a,b,c){var d=document.createElement("span");return null!=a&&(d.className=a),null!=b&&("object"==typeof b?d.appendChild(b):d.innerHTML=b),"undefined"!=typeof c&&c.appendChild(d),d},TRCRBox.prototype.genBidiLabel=function(a,b,c){function d(a){var b="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",c="֑-߿יִ-﷿ﹰ-ﻼ",d=a.match(new RegExp("^[^"+b+c+"]*(?:(["+b+"]+)|(["+c+"]+))"));if(!d)return null;if(d[2]){var e=document.createElement("bde");return e.dir="rtl",e.innerHTML=a,e}return null}var e,f=!1,g=d(b);return null==g?g=b:f=!0,e=this.add_span("video-label "+c,g,a),e.isRTL=f,e},TRCRBox.prototype.buildLabelBox=function(a,b,c){var d,e;for(d=0;d",a);break;case"url":break;default:"undefined"!=typeof b[e]&&b[e]&&this.add_span("video-label video-"+e,this.formatData(e,b[e]),a)}},TRCRBox.prototype.FixVideoImage=function(a,b,c){var d=TRC.css.utils;if(0==c.height||0==c.width||!c.complete||TRC.Browser.ieUpto(6))return d.setStyleProperty(c,"width",a+"px",this.isCssImportant),d.setStyleProperty(c,"height",b+"px",this.isCssImportant),void(c.style.visibility="visible");var e=a/b,f=c.width/c.height;if(e>f){var g=Math.floor(a/f),h=Math.floor((b-g)/2);d.setStyleProperty(c,"width",a+"px",this.isCssImportant),0!=h&&(TRC.Browser.ieAtleast(8)?(c.style.position="relative",d.setStyleProperty(c,"top",h+"px",this.isCssImportant)):d.setStyleProperty(c,"margin-top",h+"px",this.isCssImportant))}else{var i=Math.floor(b*f),j=Math.floor((a-i)/2);d.setStyleProperty(c,"height",b+"px",this.isCssImportant),0!=j&&(TRC.Browser.ieAtleast(8)?(c.style.position="relative","ltr"==this.trc.direction?d.setStyleProperty(c,"left",j+"px",this.isCssImportant):d.setStyleProperty(c,"left",-1*j+"px",this.isCssImportant)):"ltr"==this.trc.direction?d.setStyleProperty(c,"margin-left",j+"px",this.isCssImportant):d.setStyleProperty(c,"margin-right",j+"px",this.isCssImportant))}c.style.visibility="visible"},TRCRBox.prototype.drawThumbnailLink=function(a,b,c,d,e){var f;b||"video"==c.type&&"undefined"!=typeof c.duration&&""!=c.duration&&"0"!=c.duration&&(f=this.genDuration(c.duration));var g=this.createVideoLink(c,d);TRC.dom.addClass(g,"item-thumbnail-href"),"undefined"!=typeof c["thumbnail-clickable"]&&"false"==c["thumbnail-clickable"]&&(g.title="",g.style.cursor="default",g.onclick=function(){return!1});var h=this.trc.getProperty(this.mode_name,"thumbnail-height"),i=this.trc.getProperty(this.mode_name,"thumbnail-width"),j=document.createElement("span");j.className="thumbBlock","undefined"!=typeof h&&(j.style.height=h+"px"),"undefined"!=typeof i&&(j.style.width=i+"px");var k=document.createElement("img");k.style.visibility="hidden";var l=this.add_span("thumbnail-overlay",null,j);TRC.Browser.ieUpto(6)&&(l.style.display="none");var m=this.trc.getProperty(this.mode_name,"emblem"),n=null;if(null==m||"null"==m||TRC.Browser.ie&&!TRC.Browser.ieAtleast(7)||(n=this.add_span("thumbnail-emblem",null,j),n.style.backgroundImage="url("+m+")"),"undefined"!=typeof h&&(l.style.height=h+"px",null!=n&&(n.style.height=h+"px")),"undefined"!=typeof i&&(l.style.width=i+"px",null!=n&&(n.style.width=i+"px")),k.onerror=this.imageOnErrorHandler.trcBind(this,k,c),k.onload=function(a){a.complete?this.FixVideoImage(i,h,a):TRC.Timeout.set(arguments.callee.trcBind(this,a),1e3)}.trcBind(this,k),7===TRC.Browser.ie&&(a.image_div=document.createElement("div")),c.isSyndicated){var o=document.createElement("span");if(o.className="branding",c["branding-text"])o.appendChild(document.createTextNode(this.formatData("syndicator",c["branding-text"])));else if(c["branding-url"]){var p=document.createElement("img");p.src=c["branding-url"],o.appendChild(p)}j.style.position="relative",j.appendChild(o);var q=document.createElement("span"),r=this.trc.getProperty(this.mode_name,"syndicated-static-text"),s=this.trc.getProperty(this.mode_name,"syndicated-static-text-position");q.className="static-text "+s,r&&q.appendChild(document.createTextNode(r)),j.appendChild(q)}if(a.thumb=j,a.img=k,a.img_src=this.getThumbnailURL(c,i,h),f){var t=document.createElement("div");t.className="video-duration video-duration-detail",t.style.left=0,"undefined"!=typeof i&&(TRC.Browser.ieUpto(6)?(t.style.marginLeft=i/2-3+"px",
t.style.top=h/2-15+"px"):7===TRC.Browser.ie?(t.style.left=i-3+"px",t.style.top=h-15+"px"):(t.style.marginLeft=i-3+"px",t.style.top=h-15+"px")),t.appendChild(f);var u=this.genDuration(c.duration);u.style.opacity=1,u.style.filter="alpha(opacity=100)",u.style.backgroundColor="transparent",t.appendChild(u),j.appendChild(t)}switch(g.appendChild(j),e){case"bottom":j.style.cssFloat="none",j.style.styleFloat="none",j.style.display="block",j.style.width=i+"px";break;case"top":case"under":j.style.cssFloat="none",j.style.styleFloat="none",j.style.display="block",j.style.width=i+"px";break;case"end":j.style.cssFloat="right",j.style.styleFloat="right"}return g},TRCRBox.prototype.imageOnErrorHandler=function(a,b){var c,d=a.src,e=this.trc.global["images-host"]?this.trc.global["images-host"]:"images.taboola.com",f=d.search(/\Shttp\S/),g=d.match(/\Staboola(\S+)?.com\/thumbnails\S/)?!0:!1;f>5&&g?(d=TRC.URL.prototype.switchProtocol.call(d.indexOf(e)>-1?unescape(unescape(d.slice(f+1))):unescape(d.slice(f+1)),protocol),__trcWarn("Failed to load taboola CDN thumbnail "+a.src+" for item="+b["item-id"]+", loading direct thumbnail instead : "+d)):f>5&&d.indexOf(e)>-1?(d=TRC.URL.prototype.switchProtocol.call(unescape(d.slice(f+1)),protocol),__trcWarn("Failed to load thumbnail "+a.src+" for item="+b["item-id"]+", loading "+d+" thumbnail instead")):(c=TRC.URL.prototype.switchProtocol.call(this.trc.getProperty(this.mode_name,"default-thumbnail"),protocol),d="undefined"!=c?c:"",a.onerror=null,__trcWarn("Failed to load thumbnail "+a.src+" for item="+b["item-id"]+", loading default thumbnail instead")),a.src=d},TRCRBox.prototype.drawVideoBox=function(a,b,c,d){var e="";a=__trcCopyProps(a,{}),a.isSyndicated=a["is-syndicated"]||a["is-in-network"]||a["is-native"],a.isPhoto="photo"===a.type,a.isText="text"===a.type,a.tags="string"==typeof a.tags?TRC.text.parseCSV(a.tags):[];var f=document.createElement("div");f.rbox=this;var g=f.thumbnail_position=d||this.trc.getProperty(this.mode_name,"thumbnail-position");f.video_data=a,f.setAttribute("data-item-id",a["item-id"]),f.setAttribute("data-item-title",a.title),f.setAttribute("data-item-thumb",this.getThumbnailURL(a,100,80)),f.setAttribute("data-item-syndicated",!!a.isSyndicated),this.setVideoBoxClassName(f),this.autoSize&&this.setAutoDimantions(f);var h=a.url;if(0==h.search(/\w{3,4}:\/\/(\w+)\.taboola(syndication)?.com/))for(var i=h.split(/[\?&]/),j=0;j=0?"&":"?")+this.tracking+(k[1]?"#"+k[1]:"")}"function"==typeof TRC.pageManager&&(h=TRC.pageManager.fixRecommendationURL(h))}a.url=h;var l={pi:this.trc.getItemId(),ri:this.response.trc.req,sd:TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),ui:TRC.pageManager.getValue("user-id"),it:a.type,ii:a["item-id"],pt:this.getItemType(),li:this.listContainer.id,url:h,p:a.isSyndicated?a.publisher:"",vi:TRC.pageManager.getPageData(),r:Math.floor(100*Math.random())};a.scParams=l;var m=[];for(var n in l)l.hasOwnProperty(n)&&l[n]&&(this.trc["normalize-log-param"](n,l[n]),m.push(encodeURIComponent(n)+"="+encodeURIComponent(l[n])));a.logger_url=protocol+"//"+this.domain+"/"+encodeURIComponent(this.trc["normalize-log-param"]("publisher",TRC.publisherId))+"/log/3/click?"+m.join("&"),e+=a.title;var o=this.createVideoLink(a,e);TRC.dom.addClass(o,"item-label-href"),a.link=o;var p=document.createElement("span");if(p.style.display="block",p.className="video-label-box",o.appendChild(p),f.labelsBox=p,f.appendChild(o),"none"!=g){var q=this.drawThumbnailLink(f,b,a,e,g);if("under"==g){var r=this.trc.getProperty(this.mode_name,"thumbnail-height");q.title=o.title="",f.insertBefore(q,o),f.style.position="relative",f.style.height=r+"px";var s=document.createElement("span");s.className="label-box-overlay",o.className+="video-labels-anchor",e=this.findElement(function(a){return a.className.search("title")>=0},f.labelsBox,"span",null),TRC.Browser.ieUpto(8)&&!TRC.Browser.ieUpto(7)&&(o.className+=" ie8fix"),f.labelsBox.appendChild(s),a.thumbUnder=!0}else"bottom"==g?f.appendChild(q):f.insertBefore(q,o)}var t=c||this.trc.getProperty(this.mode_name,"detail-order"+(a.isSyndicated?"-syndicated":""));t=t.split(","),this.buildLabelBox(p,a,t),f.fixTextOverflow=this.fixBoxTitleAndDesc.trcBind(this,a,p),TRC.Browser.ieUpto(6)&&(f.onmouseover=function(){this.className+=" videoCube_hover"},f.onmouseout=function(){this.className=this.className.replace(/\b\s+videoCube_hover\b/g,"")});try{this.trc.getFunction(this.mode_name,"item-renderer",f,f.video_data)}catch(u){__trcError("Error in itemRenderer",u)}return f},TRCRBox.prototype.setAutoDimantions=function(a){if(this.AutoSizeRule){var b=this.AutoSizeRule.Ws+"px";this.rows>1&&(a.style.marginBottom=b),this.boxes.length%this.AutoSizeRule.n==0&&(b=0),"rtl"==this.trc.direction?a.style.marginRight=b:a.style.marginLeft=b,a.style.width=this.AutoSizeRule.Wi+"px";var c=this.trc.getProperty(this.mode_name,"thumbnail-height"),d=this.trc.getProperty(this.mode_name,"thumbnail-width"),e=c/d;this.trc.modes[this.mode_name]["thumbnail-width"]=this.AutoSizeRule.Wi,this.trc.modes[this.mode_name]["thumbnail-height"]=Math.round(this.AutoSizeRule.Wi*e)}},TRCRBox.prototype.getRuleAspectRatio=function(a,b){return a.virtualThumbWidth&&a.virtualThumbHeight&&!isNaN(a.virtualThumbWidth)&&!isNaN(a.virtualThumbHeight)?"ratio"==b?a.virtualThumbHeight/a.virtualThumbWidth:a.virtualThumbHeight/a.virtualThumbWidth*100:!1},TRCRBox.prototype.getThumbAspectRatio=function(a,b){try{var c=a["thumbnail-height"]/a["thumbnail-width"];return"ratio"==b?c:Math.round(100*c)}catch(d){return __trcWarn("getThumbAspectRatio",d.message),null}},TRCRBox.prototype.getThumbnailURL=function(a,b,c){if("undefined"==typeof a["thumb-size"])return a.thumbnail;for(var d=[{w:a["thumb-size"].split("x")[0],h:a["thumb-size"].split("x")[1],u:a.thumbnail}],e=1;"undefined"!=typeof a["thumb-size-"+e];e++)d.push({w:a["thumb-size-"+e].split("x")[0],h:a["thumb-size-"+e].split("x")[1],u:a["thumbnail-"+e]});d=d.sort(function(a,b){return a.w*a.h-b.w*b.h});for(var f=0;f"+this.trc.getProperty(this.mode_name,"attribution-text")+"",c=this.trc.getProperty(this.mode_name,"attribution-position"),d=this.trc.attribution&&"none"!=c,e=this.trc.getProperty(this.mode_name,"min-width-for-attribution"),f=this.trc.getProperty(this.mode_name,"hide-attribution-when-no-place");d&&("top"===c?(a=this.container.clientWidth||this.container.offsetWidth,!a||a>=e?this.generateLinksBox(this.header.ext,b,this.trc.direction,"attribution",null,"top"):f||this.generateLinksBox(this.getWidgetFooter(),b,this.trc.direction,"attribution",null,"bottom")):this.generateLinksBox(this.getWidgetFooter(),b,this.trc.direction,"attribution",null,"bottom"))},TRCRBox.prototype.adcHoverHandler=function(a,b){var c=__trcGetElementsByClass("trc_adc_b_logo",null,a)[0];b?c.style.display="inline-block":c.style.display="none"},TRCRBox.prototype.isAdchoicesEnabled=function(a,b,c){return a?"off"==a.status?!1:this.isAdchoiceItemTypes(b,c)?!0:!1:!1},TRCRBox.prototype.isAdchoiceItemTypes=function(a,b){for(var c in a)if(b[c])return!0;return!1},TRCRBox.prototype.getAdchoiceConfig=function(){return{status:this.trc.global["has-adchoice"]&&this.trc.getProperty(this.mode_name,"mode-has-adchoice")?"on":"off",position:this.trc.getProperty(this.mode_name,"adchoice-position"),url:this.trc.getProperty(this.mode_name,"adchoice-target-url")||this.trc.global["adchoice-url"],enableBig:this.trc.getProperty(this.mode_name,"adchoice-large")}},TRCRBox.prototype.getAdchoicesPosition=function(a,b){var c="top";return c="auto"===a?"none"===b?c:b:a},TRCRBox.prototype.renderAdchoicesLink=function(a,b,c){if(this.hasAdChoicesLogo=this.isAdchoicesEnabled(a,b,c),this.hasAdChoicesLogo){var d,e,f=''+(a.enableBig?'':"")+" ",g=this.getAdchoicesPosition(a.position,this.trc.getProperty(this.mode_name,"attribution-position")),h=this.trc.getProperty(this.mode_name,"min-width-for-attribution"),i=a.url||null;"top"===g?(d=this.container.clientWidth||this.container.offsetWidth,e=!d||d>=h?this.generateLinksBox(this.header.ext,f,this.trc.direction,"adc",null,"top",i):this.generateLinksBox(this.getWidgetFooter(),f,this.trc.direction,"adc",null,"bottom",i)):e=this.generateLinksBox(this.getWidgetFooter(),f,this.trc.direction,"adc",null,g,i),a.enableBig&&(e.onmouseover=function(){TRCRBox.prototype.adcHoverHandler(this,!0)},e.onmouseout=function(){TRCRBox.prototype.adcHoverHandler(this,!1)})}},TRCRBox.prototype.generateLinksBox=function(a,b,c,d,e,f,g){var h,i,j=document.createElement("div"),k=["trc_desktop_"+d+"_link","trc_mobile_"+d+"_link"],l=TRC.PROTOCOL+"//popup.taboola.com/"+(this.trc.language||"en")+"/?"+this.getAttributionLinkParams(),m=g||l,n=function(a){return TRC.aboutUs.open(a)||!1};if(a){for(h=0;h '),h||(i.onclick=n),j.appendChild(i);return"rtl"===c&&(j.style.cssFloat=j.style.styleFloat="left"),j.className="logoDiv link-"+d+" "+(e?" attribution-disclosure-link-"+e:""),a.appendChild(j),j}},TRCRBox.prototype.getAttributionLinkParams=function(){var a=["template=colorbox","taboola_utm_source="+this.publisher,"taboola_utm_medium=bytaboola","taboola_utm_content="+this.mode_name+":"+this.placement+":"+(this.trc["test-variant"]||"")];return this.privacyId&&a.push("plink="+this.privacyId),a.join("&")},TRCRBox.prototype.addWidgetContentType=function(){var a=this.getWidgetContentType(this.itemsTypes);this.element.className+=" "+("sponsored"===a&&TRC.blocker.blockedState>0&&this.trc.global["switch-abp-class"]?this.trc.global["switch-abp-class"]["trc-content-sponsored"]:"trc-content-"+a)+" "},TRCRBox.prototype.getWidgetContentType=function(a){var b=a["is-syndicated"]||a["is-in-network"]||a["is-native"];return b&&a["is-organic"]?"hybrid":b?"sponsored":"organic"},TRCRBox.prototype.getItemsTypesList=function(a){for(var b,c={},d=0;b=a[d];d++)b["is-syndicated"]?c["is-syndicated"]=!0:b["is-in-network"]?c["is-in-network"]=!0:b["is-native"]?c["is-native"]=!0:c["is-organic"]=!0,b["is-adc"]&&(c["is-adc"]=!0);return c},TRCRBox.prototype.getPrivacyId=function(a){for(var b,c=0;b=a[c];c++)if(b.plink)return b.plink;return null},TRCRBox.prototype.getWidgetFooter=function(){return this.footer||(this.footer=document.createElement("div"),this.footer.className="trc-widget-footer",this.element.appendChild(this.footer)),this.footer},TRCRBox.prototype.renderDisclosureLink=function(){var a,b=this.trc.getProperty(this.mode_name,"min-width-for-disclosure"),c=this.trc.getProperty(this.mode_name,"hide-disclosure-when-no-place"),d=""+this.trc.getProperty(this.mode_name,"disclosure-link-text-sponsored")+"",e=""+this.trc.getProperty(this.mode_name,"disclosure-link-text-hybrid")+"",f=this.trc.getProperty(this.mode_name,"disclosure-position");"none"!=f&&(a=this.container.clientWidth||this.container.offsetWidth,"bottom"!=f&&this.header.ext&&"No Header"!=this.trc.getProperty(this.mode_name,"header")&&(!a||a>=b)?(this.generateLinksBox(this.header.ext,d,this.trc.direction,"disclosure","sponsored","top"),this.generateLinksBox(this.header.ext,e,this.trc.direction,"disclosure","hybrid","top")):c||(this.generateLinksBox(this.getWidgetFooter(),d,this.trc.direction,"disclosure","sponsored","bottom"),this.generateLinksBox(this.getWidgetFooter(),e,this.trc.direction,"disclosure","hybrid","bottom")))},TRCRBox.prototype.addClearingDiv=function(){this.element.appendChild(document.createElement("div")).className="trc_clearer"},TRCRBox.prototype.genDuration=function(a){var b=this.formatDuration(a),c=document.createElement("dt");c.style.position="absolute",c.style.overflow="hidden",c.style.height="auto",c.style.width="auto",c.style.zIndex=48,c.style.right=0;var d=document.createElement("div");return d.style.zIndex=50,d.style.paddingLeft="4px",d.style.paddingRight="4px",d.innerHTML=b,c.appendChild(d),c},TRCRBox.prototype.fixBoxTitleAndDesc=function(a,b,c){if(!c)return void this.postRenderQueue.pushBack("fixBoxTitleAndDesc",this.fixBoxTitleAndDesc.trcBind(this,a,b,!0));try{var d=this.trc.getProperty(this.mode_name,"details-inline-with-title"),e=d?d.split(","):[],f=this.findElement(function(a){return a.className.search("title")>=0},b,"span",null);e&&e.length&&f&&"inline"==document.trcGetCurrentStyle(f,"display")&&(f.style.display="inline-block"),f.inlineDetailsElements=this.setupInlineDetails(e,b),this.fixBoxOverflow(f,a.title,!1,"false"!=a["truncate-title"],e,b),a.thumbUnder&&(a.link.style.fontSize=b.font+"px"),e&&e.length&&(f.style.display="inline"),this.fixBoxOverflow(this.findElement(function(a){return a.className.search("description")>=0},b,"span",null),a.description,!0,!0,null,null)}catch(g){__trcError("Problem in fixBoxTitleAndDesc",g)}},TRCRBox.prototype.fixBoxOverflow=function(a,b,c,d,e,f){if(null!=a&&!(this.useNativeLineClamp&&this.setupBoxLineClamp(a)||a.clientHeight<=0||a.clientWidth<=0)){"undefined"==typeof d&&(d=!0);var g=!1;a.parentNode.font=this.getFontSize(a);var h=a.innerHTML;a.innerHTML="";var i=this.add_span(null,"H",a),j=Math.max(i.offsetHeight,i.clientHeight),k=Math.max(0,a.scrollHeight-a.clientHeight);for(a.removeChild(i),a.innerHTML=h,this.addInlineElementsForMeasure(a.inlineDetailsElements,a,!0),a.inlineDetailsElementsHTML=a.innerHTML.replace(h,""),b=b.replace(/^\s+|\s+$/g,"");a.clientHeight+k+j/2=0},b,"span",null);f&&(f.style.display="block")}for(var g=0;c&&g=0?b.replace(/\s+\S+$/,""):b.substr(0,b.length-1);var d=a.getElementsByTagName("bde");return a.inlineDetailsElementsHTML&&d.length&&(a.innerHTML=a.innerHTML.replace(a.inlineDetailsElementsHTML,"")),a.getElementsByTagName("span").length>0&&a.removeChild(a.getElementsByTagName("span")[0]),(d.length>0?d[0]:a).innerHTML=b,this.add_span(null,"…",a),b},TRCRBox.prototype.decreaseOverflowingTextFontSize=function(a){var b=this.getFontSize(a);if(parseInt(b)<=9)return!1;b=parseInt(b)-1;var c="font-size: "+b+"px!important; line-height: "+1.25*b+"px!important;";return"string"==typeof a.style.cssText?a.style.cssText=c:a.setAttribute("style",c),!0},TRCRBox.prototype.addInlineElementsForMeasure=function(a,b,c){for(var d,e,f,g=0;a&&g=0&&a.parentNode===b},b),!e&&d&&(f=document.createElement("span"),f.className="trc_inline_detail_spacer",f.innerHTML=TRC.Browser.ieUpto(8)?" ":" ",b.appendChild(f),b.appendChild(c?d.cloneNode(!0):d))},TRCRBox.prototype.hideClonedElementsAfterMeasure=function(a,b){for(var c,d,e=0;a&&e=0&&a.parentNode===b},b,"span"),d&&(d.style.display="none")},TRCRBox.prototype.removeTagsEntities=function(a){var b=new RegExp("<[^>]*>$");return b.test(a)||(b=new RegExp("&w+;$"),b.test(a))?a.replace(b,""):a},TRCRBox.prototype.removeHtmlTags=function(a){return a.replace(new RegExp("<[^>]+>","g"),"")},TRCRBox.prototype.formatData=function(a,b){var c=this.trc.getProperty(this.mode_name,"format-"+a);return c=c||"%s","function"==typeof c?c.call(this,b):((a.search("duration")>=0||a.search("Duration")>=0)&&(b=this.formatDuration(b)),"undefined"==typeof b&&(b=""),c.replace(new RegExp("%\\w"),''+b+""))},TRCRBox.prototype.formatDuration=function(a){var b=parseInt(a/3600);b>=1?a%=3600:b=0;var c=parseInt(a/60),d=parseInt(a%60);return"number"!=typeof b||"number"!=typeof c||"number"!=typeof d||isNaN(b)||isNaN(c)||isNaN(d)||1>a?"":(b>=1?b+":":"")+(10>c?"0":"")+c+":"+(10>d?"0":"")+d},TRCRBox.prototype.formatNumber=function(a){return"undefined"==typeof a?"":this.trc.getFunction(this.mode_name,"format-number",a)},TRCRBox.prototype.dateFormatISO=function(a){var b=new Date(1e3*parseInt(a)),c=b.getFullYear(),d=b.getMonth()+1,e=b.getDate();return 10>e&&(e="0"+e),10>d&&(d="0"+d),c+"-"+d+"-"+e},TRCRBox.prototype.dateFormatAmerican=function(a){var b=new Date(1e3*parseInt(a)),c=b.getFullYear(),d=b.getMonth()+1,e=b.getDate();return d+"/"+e+"/"+c},TRCRBox.prototype.dateFormatEuropean=function(a){var b=new Date(1e3*parseInt(a)),c=b.getFullYear(),d=b.getMonth()+1,e=b.getDate();return e+"/"+d+"/"+c},TRCRBox.prototype.dateFormatDays=function(a){var b=new Date,c=" months ago",d=b.getFullYear(),e=b.getMonth(),f=new Date;("undefined"!=typeof a||0!=parseInt(a))&&(f=new Date(1e3*parseInt(a)));var g=f.getFullYear(),h=f.getMonth(),i=12*d+e-(12*g+h);if(0==i){var j=b.getDate(),k=f.getDate();i=j-k,c=1>=i?" day ago":" days ago"}else 1==i&&(c=" month ago");return i+c},TRCRBox.prototype.ratingStars=function(a,b){if(b>5&&(b=Math.floor(b/2)),"undefined"==typeof a)return"";for(var c=document.createElement("span"),d=0;b>d;d++){var e=document.createElement("img");e.style.width="16px",e.style.height="16px",e.style.display="inline";var f=protocol+"//cdn.taboola.com/taboola/star-on.png",g=protocol+"//cdn.taboola.com/taboola/star-off.png";d=b.left&&a.clientX=b.top&&a.clientYg;g++)d[g]={rows:c[g].rows||e||f,cells:c[g].cells,min:c[g].minWidth,max:c[g].maxWidth,margin:c[g].margin.h,ratio:this.getRuleAspectRatio(c[g])||this.getThumbAspectRatio(this.trc.modes[this.mode_name])||100*this.DEFAULT_THUMB_RATIO},this.isClassFilter&&this.pushResponsiveIERules(a+"_rule"+g,d[g].min);TRC.css.utils.setStyleElements(TRC.css.responsive.rulesToCssText(a,this.responsiveRules,b,this.trc.cssReset,this.isWCTextLinks)),this.isClassFilter&&this.setResponsiveIEClassShift(a)}catch(i){__trcError("Error in setOnStandardResponsiveRules : ",i.message)}},TRCRBox.prototype.setOnAutoSizeResponsiveRules=function(a,b,c){var d,e=TRC.dom.getWindowWidth(),f=this.container.clientWidth>0?this.container.clientWidth:this.container.offsetWidth,g=e/f,h=this.trc.getProperty(this.mode_name,"rows"),i=1;try{d=this.responsiveRules=[];for(var j=0,k=c.length;k>j;j++)d[j]={rows:c[j].rows||h||i,cells:c[j].n,min:g*c[j].minWc,margin:Math.round((c[j].maxWsRange+c[j].minWsRange)/2)/f*100,ratio:this.getThumbAspectRatio(this.trc.modes[this.mode_name])||c[j].ratio||100*this.DEFAULT_THUMB_RATIO},this.isClassFilter&&this.pushResponsiveIERules(a+"_rule"+j,d[j].min);TRC.css.utils.setStyleElements(TRC.css.responsive.rulesToCssText(a,this.responsiveRules,b,this.trc.cssReset)),this.isClassFilter&&this.setResponsiveIEClassShift(a)}catch(l){__trcError("Error in setOnAutoSizeResponsiveRules : ",l.message)}},TRCRBox.prototype.setResponsiveIEClassShift=function(a){var b=this.getResponsiveIEClassShift(a).trcBind(this);b(),TRC.dom.on(win,"resize",b.trcThrottle(50))},TRCRBox.prototype.getResponsiveIEClassShift=function(a){var b=a,c="IE_ClassShift",d=TRC.dom.getWindowWidth,e=d();return function(){var a,f,g="",h=-1,i=d();for(a in this.responsiveIERules)this.responsiveIERules.hasOwnProperty(a)&&(f=parseInt(a),f>h&&i>=f&&(g=this.responsiveIERules[a],h=f));b!==g&&(this.container.className=this.container.className.replace(b,g),b=g),Math.abs(e-i)>1&&(TRC.dispatch(c),e=i)}},TRCRBox.prototype.pushResponsiveIERules=function(a,b){TRC.util.isType(this.responsiveIERules,"Array")||(this.responsiveIERules={},this.pushResponsiveIERules=function(a,b){this.responsiveIERules[b]=a},this.pushResponsiveIERules(a,b))},TRCRBox.prototype.setMetaAttribute=function(a){a.meta={},__trcCopyProps(this.trc,a.meta),delete a.meta["video-list"]},TRCRBox.prototype.drawResponsiveList=function(a){var b=this.listContainer,c=document.createElement("div"),d=this.recommendationList.length,e=0,f=doc.trcGetParentByClassName(this.getContainer(),"trc_related_container"),g="trc_elastic";TRC.pConsole(this.mode_name,"debug","start drawing responsive mode - see info",this.trc.getProperty(this.mode_name,"responsive-rules"),"object"),this.isClassFilter=TRC.Browser.ieUpto(8),this.orientation=this.trc.getProperty(this.mode_name,"orientation"),TRC.dom.addClass(f,g+" "+g+"_"+this.id),this.resetBoxes(),c.id="internal_"+this.id,TRC.dom.clearInnerElements(b),b.appendChild(c),this.setExploreTracker(),this.setMetaAttribute(c),this.firstVideo=null,this.setResponsiveRules(g+"_"+this.id,d),this.pasreRecommendationList(d,this.hasDuration(),c),this.isClassFilter?TRC.listen("IE_ClassShift",this.fixResponsiveVideoBoxes.trcBind(this)):(TRC.dom.on(win,"resize",this.fixResponsiveVideoBoxes.trcBind(this).trcThrottle(500)),TRC.listen("videoCubeChange",this.fixResponsiveVideoBoxes.trcBind(this))),TRC.dom.addClass(this.boxes[0],"trc-first-recommendation trc-spotlight-first-recommendation"),"embed"===this.link_target&&this.postRenderQueue.pushBack("createEmbedThumb",this.createEmbedThumb.trcBind(this)),this.postRenderQueue.pushBack("list-suffix,publisher-end",function(a){this.trc.getFunction(this.mode_name,"list-suffix",a,this),this.trc["publisher-end"](this.id)}.trcBind(this,c)),this.postRenderQueue.pushBack("checkForBlocking",this.checkForBlocking.trcBind(this)),this.postRender(),this.trc.global["thumb-lazy-load-switch"]&&this.setLazyImageLoadMethod(),TRC.eventDelegator.dispatch("onrender",{name:this.mode_name,container:this.container}),this.visibleTimeoutId=null,"undefined"!=typeof this.trc.global&&(e=this.trc.global["visible-delay"]?this.trc.global["visible-delay"]:e),this.trc.global["enable-deferred-visible"]?TRC.Timeout.set(this.sendVisibility.trcBind(this,e,c),this.trc.global["visible-defer-timeout"]||"0"):this.sendVisibility(e,c)},TRCRBox.prototype.getRecomDirectURL=function(a){if(0==a.search(/\w{3,4}:\/\/(\w+)\.taboola(syndication)?.com/))for(var b=a.split(/[\?&]/),c=0,d=b.length;d>c;c++)if("url"==b[c].split("=")[0])return decodeURIComponent(b[c].split("=")[1]);return a},TRCRBox.prototype.getURLHashParts=function(a){return a[0]+(a[0].search("\\?")>=0?"&":"?")+this.tracking+(a[1]?"#"+a[1]:"")},TRCRBox.prototype.createVideoBoxDirectURL=function(a){var b,c=a.video_data,d=c.url;try{d=this.getRecomDirectURL(d),c.isSyndicated||(c.original_url=d,d=this.trc.getFunction(this.mode_name,"change-url",d,a,this.tracking),d==c.original_url&&this.tracking&&(b=d.split("#"),d=this.getURLHashParts(b)),"function"==typeof TRC.pageManager&&(d=TRC.pageManager.fixRecommendationURL(d))),c.url=d,a.directURL=d}catch(e){__trcError("Error in createVideoBoxDirectURL",e)}},TRCRBox.prototype.createVideoBoxClickUrl=function(a,b){var c={pi:this.trc.getItemId(),ri:this.response.trc.req,sd:TRC.pageManager.getPublisherValue(TRC.publisherId,"session-data"),ui:TRC.pageManager.getValue("user-id"),it:a.type,ii:a["item-id"],pt:this.getItemType(),li:this.listContainer.id,url:b,vi:TRC.pageManager.getPageData(),p:a.isSyndicated?a.publisher:"",r:Math.floor(100*Math.random())},d=[];for(var e in c)c.hasOwnProperty(e)&&c[e]&&(this.trc["normalize-log-param"](e,c[e]),d.push(encodeURIComponent(e)+"="+encodeURIComponent(c[e])));return protocol+"//"+this.domain+"/"+encodeURIComponent(this.trc["normalize-log-param"]("publisher",TRC.publisherId))+"/log/3/click?"+d.join("&")},TRCRBox.prototype.fixResponsiveBoxTitleAndDesc=function(a){var b=a.labelsBox,c=a.video_data,d=a.link,e=this.findElement(function(a){return a.className.search("title")>=0},b,"span",null),f=this.findElement(function(a){return a.className.search("description")>=0},b,"span",null),g=this.findElement(function(a){return a.className.search("label-box-overlay")>=0},b,"span",null),h=function(){c.thumbUnder&&b.font&&(d.style.fontSize=b.font+"px")};try{e.innerHTML=a.getAttribute("data-item-title"),setTimeout(function(){this.fixBoxOverflow(e,a.getAttribute("data-item-title"),!1,"false"!=c["truncate-title"]),TRC.Browser.ieUpto(8)&&g&&(g.style.height="99%",g.style.height="100%"),h()}.trcBind(this),0),f&&setTimeout(function(){this.fixBoxOverflow(f,c.description,!0,!0)}.trcBind(this),0)}catch(i){__trcError("Problem in fixResponsiveBoxTitleAndDesc",i)}},TRCRBox.prototype.createVideoBoxLabels=function(a){var b=document.createElement("span");return this.setVideoBoxLabelsClass(b),a.appendChild(b),b},TRCRBox.prototype.setVideoBoxLabelsClass=function(a){a.className="video-label-box"},TRCRBox.prototype.createThumbBlockHolder=function(a,b,c){var d=doc.createElement("div");d.className="thumbBlock_holder",b.appendChild(d),this.createVideoBoxThumbBlock(a,d,c),this.createVideoBoxAspect(d,a)},TRCRBox.prototype.createVideoBoxAspect=function(a,b){var c=document.createElement("div");c.className="videoCube_aspect",a.appendChild(c),b.thumbnail_aspect=c},TRCRBox.prototype.drawVideoBoxThumbnailLink=function(a,b,c,d){var e;return a.img_src=this.getThumbnailURL(c,this.trc.getProperty(this.mode_name,"thumbnail-width"),this.trc.getProperty(this.mode_name,"thumbnail-height")),e=this.createVideoLink(c,d),TRC.dom.addClass(e,"item-thumbnail-href"),this.createThumbBlockHolder(a,e,b),e},TRCRBox.prototype.createVideoBoxThumbBlock=function(a,b,c){var d=document.createElement("span"),e="",f=a.video_data;c||"video"!=f.type||"undefined"==typeof f.duration||""==f.duration||"0"==f.duration||(e=this.genDuration(f.duration)),d.className="thumbBlock",a.thumbBlock=d,""!=e&&this.createDurationBlock(d,e,f.duration),b.appendChild(d)},TRCRBox.prototype.setVideoBoxImageHandlers=function(a,b,c){a.onerror=this.responsiveImageOnErrorHandler.trcBind(this,a,b,c),a.onload=this.responsiveImageOnLoadHandler.trcBind(this,a,b,c)},TRCRBox.prototype.responsiveImageOnErrorHandler=function(a,b,c){var d,e=a.src,f=this.trc.global["images-host"]?this.trc.global["images-host"]:"images.taboola.com",g=e.search(/\Shttp\S/),h=e.match(/\Staboola(\S+)?.com\/thumbnails\S/)?!0:!1;return g>5&&h&&!TRC.Browser.ie?(e=TRC.URL.prototype.switchProtocol.call(e.indexOf(f)>-1?unescape(unescape(e.slice(g+1))):unescape(e.slice(g+1)),protocol),__trcWarn("Failed to load taboola CDN thumbnail "+a.src+" for item="+c["item-id"]+", loading direct thumbnail instead : "+e),void(b.img_src=a.src=e)):(g>5&&e.indexOf(f)>-1?(e=TRC.URL.prototype.switchProtocol.call(unescape(e.slice(g+1)),protocol),__trcWarn("Failed to load thumbnail "+a.src+" for item="+c["item-id"]+", loading "+e+" thumbnail instead")):(d=this.trc.getProperty(this.mode_name,"default-thumbnail"),e=TRC.URL.prototype.switchProtocol.call("undefined"!=d?d:"",protocol),a.onerror=null,__trcWarn("Failed to load thumbnail "+a.src+" for item="+c["item-id"]+", loading default thumbnail instead")),void(TRC.Browser.ieUpto(8)?(a.src=e,null==a.onerror&&TRC.Timeout.set(this.fixResponsiveVideoImage.trcBind(this,b,a,!0),500)):b.thumbBlock.style.backgroundImage="URL("+e+")"))},TRCRBox.prototype.responsiveImageOnLoadHandler=function(a,b,c){a&&a.complete?this.appendVideoBoxImage(b):TRC.Browser.ieUpto(8)?(this.appendVideoBoxImage(b),this.fixResponsiveVideoImage(b,a,!1),TRC.listen("IE_ClassShift",this.fixResponsiveVideoImage.trcBind(this,b,a).trcBind(this))):TRC.Timeout.set(arguments.callee.trcBind(this,b.thumbBlock,a),50);
},TRCRBox.prototype.fixResponsiveVideoImage=function(a,b,c){var d;if(this.imageOptimizePrefix)return b.style.visibility="visible",b.style.width="100%",void(b.style.height="100%");var e,f,g,h,i,j=7==TRC.Browser.ie?a.thumbBlock.getBoundingClientRect():null,k=a.thumbBlock,l=j?j.right-j.left:k.clientWidth,m=j?j.bottom-j.top:k.clientHeight,n=this.isCssImportant,o=TRC.css.utils;if(0==m||0==l||0==b.height)return void(c||TRC.Timeout.set(this.fixResponsiveVideoImage.trcBind(this,a,b,!0),500));try{e=l/m,f=this.getImageAspectRatio(b),e>f?(g=Math.floor(l/f),h=Math.floor((m-g)/2),o.setStyleProperty(b,"width",l+"px",n),0!=h&&(TRC.Browser.ieAtleast(8)?(b.style.position="relative",o.setStyleProperty(b,"top",h+"px",n)):o.setStyleProperty(b,"margin-top",h+"px",n))):(d=Math.floor(m*f),i=Math.floor((l-d)/2),o.setStyleProperty(b,"height",m+"px",n),0!=i&&(TRC.Browser.ieAtleast(8)?(b.style.position="relative","ltr"==this.trc.direction?o.setStyleProperty(b,"left",i+"px",n):o.setStyleProperty(b,"left",-1*i+"px",n)):"ltr"==this.trc.direction?o.setStyleProperty(b,"margin-left",i+"px",n):o.setStyleProperty(b,"margin-right",i+"px",n))),b.style.visibility="visible"}catch(p){alert(p.message),__trcError("Error in fixResponsiveVideoImage : ",p.message)}},TRCRBox.prototype.getImageAspectRatio=function(a){return a.trcRatio||(a.trcRatio=a.width/a.height),a.trcRatio},TRCRBox.prototype.createVideoBoxImageLoader=function(a){var b,c,d,e=TRC.Browser.ieUpto(8)?doc.createElement("img"):new Image,f=a.video_data,g=a.thumbBlock;this.trc.global["thumb-lazy-load-switch"]&&this.updateThumbnailStack(e),e.style.visibility="hidden",7===TRC.Browser.ie&&(a.image_div=document.createElement("div")),TRC.Browser.ieUpto(8)&&(a.img=e),this.setVideoBoxImageHandlers(e,a,f),this.trc.global["use-delay-image-load"]?TRC.Timeout.set(this.setImageLoad.trcBind(this,e,a,a.img_src,100,g,this.trc.global["thumb-lazy-load-switch"]),10):this.setImageLoad(e,a,a.img_src,100,g,this.trc.global["thumb-lazy-load-switch"]),TRC.Browser.ieUpto(6)||(b=this.add_span("thumbnail-overlay",null,g)),c=this.trc.getProperty(this.mode_name,"emblem"),null==c||"null"==c||TRC.Browser.ie&&!TRC.Browser.ieUpto(7)||(d=this.add_span("thumbnail-emblem",null,g),d.style.backgroundImage="url("+c+")"),f.isSyndicated&&this.addVideoBoxBranding(g,f)},TRCRBox.prototype.updateThumbnailStack=function(a){this.thumbnailImageStack=this.thumbnailImageStack||[],this.thumbnailImageStack.push(a)},TRCRBox.prototype.addVideoBoxBranding=function(a,b){var c=document.createElement("span"),d=document.createElement("span"),e=this.trc.getProperty(this.mode_name,"syndicated-static-text"),f=this.trc.getProperty(this.mode_name,"syndicated-static-text-position");c.className="branding",b["branding-text"]?c.appendChild(document.createTextNode(this.formatData("syndicator",b["branding-text"]))):b["branding-url"]&&this.createBrandingImage(c,b["branding-url"]),a.appendChild(c),d.className="static-text "+f,e&&d.appendChild(document.createTextNode(e)),a.appendChild(d)},TRCRBox.prototype.createBrandingImage=function(a,b){var c=doc.createElement("img");c.src=b,a.appendChild(c)},TRCRBox.prototype.createDurationBlock=function(a,b,c){var d=document.createElement("div"),e=this.genDuration(c);d.className="video-duration video-duration-detail",d.appendChild(b),e.style.opacity=1,e.style.filter="alpha(opacity=100)",e.style.backgroundColor="transparent",d.appendChild(e),a.appendChild(d)},TRCRBox.prototype.createVideoBoxLabelOverlay=function(a){var b=document.createElement("span");b.className="label-box-overlay",a.appendChild(b)},TRCRBox.prototype.createVideoBoxThumbLink=function(a,b){try{var c=a.video_data,d=a.thumbnail_position,e=this.drawVideoBoxThumbnailLink(a,b,c,a.getAttribute("data-item-title"));"under"===d?(e.title=a.link.title="",a.insertBefore(e,a.link),TRC.dom.addClass(a.link,"video-labels-anchor"),this.findElement(function(a){return a.className.search("title")>=0},a.labelsBox,"span",null),8==TRC.Browser.ie&&TRC.dom.addClass(a.link,"ie8fix"),this.createVideoBoxLabelOverlay(a.labelsBox),c.thumbUnder=!0):"bottom"===d?a.appendChild(e):a.insertBefore(e,a.link)}catch(f){__trcError("Error in createVideoBoxThumbLink",f)}},TRCRBox.prototype.setVideoBoxDataAttr=function(a,b){a.setAttribute("data-item-id",b["item-id"]),a.setAttribute("data-item-title",b.title),a.setAttribute("data-item-thumb",this.getThumbnailURL(b,100,80)),a.setAttribute("data-item-syndicated",!!b.isSyndicated)},TRCRBox.prototype.getThumbnailPosition=function(a,b){return b||this.trc.getProperty(this.mode_name,"thumbnail-position")},TRCRBox.prototype.drawResponsiveVideoBox=function(a,b,c,d,e,f){var g=document.createElement("div");try{return b=__trcCopyProps(b,{},{isSyndicated:b["is-syndicated"]||b["is-in-network"]||b["is-native"],isPhoto:"photo"===b.type,isText:"text"===b.type,tags:"string"==typeof b.tags?TRC.text.parseCSV(b.tags):[]}),this.createResponsiveVideoBox(g,b,e,f),"none"!==g.thumbnail_position&&this.createVideoBoxThumbLink(g,c),this.createResponsiveLabelBox(g),TRC.Browser.ieUpto(6)&&this.setOmouseEffects_IE6(g),this.trc.getFunction(this.mode_name,"item-renderer",g,g.video_data),a.appendChild(g),this.fixResponsiveBoxTitleAndDesc(g),this.boxes.push(g),this.createVideoBoxImageLoader(g),g}catch(h){__trcError("Error in drawResponsiveVideoBox",h)}return null},TRCRBox.prototype.createResponsiveLabelBox=function(a){this.buildLabelBox(a.labelsBox,a.video_data,a.detail_order)},TRCRBox.prototype.createResponsiveVideoBox=function(a,b,c,d){a.rbox=this,a.video_data=b,a.thumbnail_position=this.getThumbnailPosition(b,d?d:null),this.setVideoBoxDataAttr(a,b),this.setVideoBoxClassName(a),this.createVideoBoxDirectURL(a),b.logger_url=this.createVideoBoxClickUrl(a.video_data,a.directURL),a.setAttribute("data-item-title",b.title),this.createVideoBoxVideoLink(a),this.setVideoBoxDetailOrder(a,c?c:null)},TRCRBox.prototype.setVideoBoxClassName=function(a){var b=0,c=this.isResponsive,d=this.trc.getProperty(this.mode_name,"orientation"),e=TRC.blocker.blockedState>0&&this.trc.global["switch-abp-class"]?this.trc.global["switch-abp-class"].syndicatedItem:TRC.SYNDICATED_CLASS_NAME;this.setVideoBoxClassName=function(a){var f=a.video_data;a.className="videoCube trc_spotlight_item origin-"+f.origin+" thumbnail_"+a.thumbnail_position+(f.isSyndicated?" "+e:"")+(f["is-in-network"]?" inNetworkItem":"")+(f["is-native"]?" tabNativeItem":"")+(f.isPhoto?" photoItem":"")+(f.isText?" textItem":"")+" "+(c?"videoCube_"+(b+=1)+"_child":d)},this.setVideoBoxClassName(a)},TRCRBox.prototype.setVideoBoxDetailOrder=function(a,b){var c=b||this.trc.getProperty(this.mode_name,"detail-order"+(a.video_data.isSyndicated?"-syndicated":""));a.detail_order=c.split(",")},TRCRBox.prototype.setOmouseEffects_IE6=function(a){a.onmouseover=function(){TRC.dom.addClass(this," videoCube_hover")},a.onmouseout=function(){this.className=this.className.replace(/\b\s+videoCube_hover\b/g,"")}},TRCRBox.prototype.createVideoBoxVideoLink=function(a){var b=a.video_data,c=a.getAttribute("data-item-title"),d=this.createVideoLink(b,c);a.labelsBox=this.createVideoBoxLabels(d),a.appendChild(d),a.link=d,TRC.dom.addClass(d,"item-label-href")},TRCRBox.prototype.appendVideoBoxImage=function(a){try{(null!=a.img_src||this.trc.global["thumb-lazy-load-switch"])&&("undefined"==typeof a.image_div?TRC.Browser.ieUpto(8)?(a.thumbBlock.appendChild(a.img),a.img.style.visibility="visible"):a.thumbBlock.style.backgroundImage="URL("+a.img_src+")":(a.thumbBlock.appendChild(a.image_div),a.image_div.appendChild(a.img),a.img.style.visibility="visible"))}catch(b){__trcError("Pager thumbnail images fixing errors",b)}},TRCRBox.prototype.pasreRecommendationList=function(a,b,c){var d,e;this.stopBoxRendering=!1;for(var f=0;a>f;f++){d=this.recommendationList[f],d.itemIndex=f,null==this.firstVideo&&"video"==d.type&&(this.firstVideo=d);try{this.trc.getFunction(this.mode_name,"item-data-filter",d),this.fixHeight&&!this.stopBoxRendering?(e=this.drawResponsiveVideoBox(c,d,b,this.orientation),this.stopBoxRendering=this.hasMaxHeightExploitation(parseInt(document.trcGetCurrentStyle(this.container,"height"),10),this.fixHeight),this.stopBoxRendering&&this.safeRemoveItem(e)):this.fixHeight||this.drawResponsiveVideoBox(c,d,b,this.orientation,null,null)}catch(g){__trcError("Error in pasreRecommendationList",g)}}},TRCRBox.prototype.safeRemoveItem=function(a){var b=a.parentNode;TRC.dom.clearInnerElements(a),b.removeChild(a)},TRCRBox.prototype.hasMaxHeightExploitation=function(a,b){return a>=b},TRCRBox.prototype.fixResponsiveVideoBoxes=function(){for(var a=this.boxes,b=0,c=a.length;c>b;b++)this.fixResponsiveBoxTitleAndDesc(a[b])},TRCRBox.prototype.fixWCTextLinksVideoBoxes=function(){for(var a=this.boxes,b=0,c=a.length;c>b;b++)a[b].labelsBox.firstChild.innerHTML=a[b].video_data.title,a[b].fixTextOverflow(!0)},TRCRBox.prototype.createSponsoredOverlay=function(a){var b=doc.createElement("span");b.className="trc_sponsored_overlay",a.appendChild(b)},TRCRBox.prototype.setSponsoredOverlayClass=function(a,b){b.className="thumbnail"==a?"trc_sponsored_overlay_base":"trc_sponsored_overlay_base round"},TRCRBox.prototype.genrateResponsiveSponsoredLabel=function(a,b){var c=this.trc.getProperty(this.mode_name,"sponsored-location");if(c.match(/^thumbnail/)){var d=document.createElement("span");try{this.setSponsoredOverlayClass(c,d),this.createSponsoredOverlay(d),b.appendChild(d),a.spnoverlay=d}catch(e){__trcError("Error while generating sponsored label",e)}}},TRCRBox.prototype.generateResponsiveOuters=function(a){if(null==this.listContainer){this.header=this.generateHeader(a);var b=doc.createElement("div");b.id=this.id.replace("trc_","outer_"),b.className="trc_rbox_outer",this.generateResponsiveRBoxDiv(b),a.appendChild(b),this.trc.global["disclosure-enabled"]===!0?this.addTaboolaLogo():this.addTaboolaLogoNoDisclosure(),a.style.display="block"}},TRCRBox.prototype.generateResponsiveRBoxDiv=function(a){var b=doc.createElement("div");b.id=this.getListId(),b.className="trc_rbox_div trc_rbox_border_elm",a.appendChild(b),this.listContainer=b},TRCRBox.prototype.sendVisibility=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=null;if(this.visible_boxes={},this.synd_visible_boxes={},this.network_visible_boxes={},this.native_visible_boxes={},this.visible_items_collection()>=2||this.isVisible()){var p=arguments.callee;this.visibleTimeoutId=TRC.Timeout.set(function(){if(this.visibleTimeoutId&&(TRC.Timeout.clear(this.visibleTimeoutId),this.visibleTimeoutId=null),this.visible_items_collection()>=2||this.isVisible()){c=[],d=[],e=[],f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[];for(n in this.visible_boxes)this.visible_boxes.hasOwnProperty(n)&&(c.push(this.visible_boxes[n].id),e.push(this.visible_boxes[n].type));for(n in this.synd_visible_boxes)this.synd_visible_boxes.hasOwnProperty(n)&&(d.push(this.synd_visible_boxes[n].id),f.push(this.synd_visible_boxes[n].type),i.push(this.synd_visible_boxes[n].publisher));for(n in this.network_visible_boxes)this.network_visible_boxes.hasOwnProperty(n)&&(g.push(this.network_visible_boxes[n].id),h.push(this.network_visible_boxes[n].type),j.push(this.network_visible_boxes[n].publisher));for(n in this.native_visible_boxes)this.native_visible_boxes.hasOwnProperty(n)&&(k.push(this.native_visible_boxes[n].id),l.push(this.native_visible_boxes[n].type),m.push(this.native_visible_boxes[n].publisher));if(c.length>0||d.length>0||g.length>0||k.length>0)return TRC.pConsole(this.mode_name,"info","sending visible event",""),this.sendModeDebugData&&(o=this.getModeDebugData("object")),this.sendEvent("visible",{il:c.join(","),sil:d.join(","),ilt:e.join(","),navil:k.join(","),silt:f.join(","),ntil:g.join(","),ntilt:h.join(","),navilt:l.join(","),niltp:j.join(","),siltp:i.join(","),naviltp:m.join(",")},this.util.merge(this.getJsonTargetItemsList(this.fullEventItemsHash),o),!0),this.sendExternalTracking(this.getExternalTrackingURLsList().vi),void this.trc.getFunction(this.mode_name,"after-visible",b,this)}else TRC.Timeout.set(p.trcBind(this),1e3)}.trcBind(this),a)}else TRC.Timeout.set(arguments.callee.trcBind(this),1e3)},TRCRBox.prototype.sendExternalTracking=function(a){var b,c=this.generatePixelsMarkup(a),d=!TRC.Browser.ieUpto(8);c&&(d&&(d=this.appendPixelsToIFrame(c)),d||(b=doc.createElement("span"),b.innerHTML=c,doc.body.appendChild(b)))},TRCRBox.prototype.appendPixelsToIFrame=function(a){var b,c,d,e="trc-pixel-iframe-"+parseInt(1e4*Math.random(),10),f=!1;if(a){try{b=doc.createElement("span"),b.innerHTML='',doc.body.appendChild(b),c=doc.getElementById(e),d=c.contentDocument?c.contentDocument:c.contentWindow.document,d.body.innerHTML=a,f=!0,d.close()}catch(g){__trcDebug("Failed to create IFrame for external tracking")}return f}},TRCRBox.prototype.generatePixelsMarkup=function(a){for(var b,c="",d=0;a&&d');return c},TRCRBox.prototype.getExternalTrackingURLsList=function(){var a,b,c=this.recommendationList;if(!this.externalTrackingItemsList){this.externalTrackingItemsList={};for(var d=0;c&&d1?"#"+c.pop():"",a=c[0],c=b(a,"?",2),this.search=c.length>1?"?"+c.pop():"",a=c[0],c=b(a,"://",2),this.protocol=c.length>1?c.shift()+":":"",a=c[0],c=b(a,"/",2),this.pathname=c.length>1?"/"+c.pop():"/",a=c[0],c=b(a,"@",2),this.auth=c.length>1?c.shift():"",a=c[0],c=b(a,":",2),this.port=c.length>1?parseInt(c.pop()):0,this.host=c[0],this},d={"http:":1,"https:":1};c.prototype.toString=function(a){return(this.host?this.protocol+"//"+(this.auth?this.auth+"@":"")+this.host+(this.port?":"+this.port:""):"")+this.pathname+this.search+(a?"":this.hash||"")},c.prototype.switchProtocol=function(a){var b,c=this instanceof TRC.URL?this:new TRC.URL(this);return d[a]&&(c.protocol=a),b=c.toString(!1),b.length>1?b:""},c.prototype.getParameter=function(a){var b=this instanceof TRC.URL?this:new TRC.URL(this);params=b.search.substr(1).split(/&/);for(var c=0;c",close:""},b=[];return b.push(""),b.push(""),document.domain!==location.hostname&&(b.push(a.open),b.push("document.domain='"+document.domain+"';"),b.push(a.close)),b.push(a.open),b.push("document.head = document.head || document.getElementsByTagName('head')[0];"),b.push(a.close),b.push(''),b.push('
'),b.push(''),b.push("
"),b.push("
"),b.push('"),b.push(""),b.join("\n")},u=function(a,b,d){var f=c.userX.popover,g=f.trcContentIFrame,h=g.contentDocument||g.contentWindow.document,i=h.getElementById("content"),j=c.Browser.ieUpto(8);a=a||f.videoCube,f.anchor&&c.dom.removeClass(f.anchor,"trc_anchor"),f.videoCube=a,g.style.height=(j?h.body.scrollHeight:h.body.offsetHeight)+"px",c.dom.addClass(f,"trc_in"),b=b||a,f.anchor=b,9==c.Browser.ie&&(f.style.display="block"),z(),C(),d&&(e=new B(v,d)),j&&(i.className=i.className),f.isVisible=!0},v=function(){var a=c.userX.popover,b=a.trcContentIFrame,d=(b.contentDocument||b.contentWindow.document).getElementById("content");c.dom.removeClass(a,"trc_in"),a.anchor&&c.dom.removeClass(a.anchor,"trc_anchor"),c.Browser.ieUpto(8)&&(d.className=d.className),9==c.Browser.ie&&(a.style.display="none"),a.isVisible=!1,C()},w=function(a){var b=c.userX.popover,d=b.trcContentIFrame,e=(d.contentDocument||d.contentWindow.document).getElementById("content");if(e.innerHTML="","string"==typeof a)return void(e.innerHTML=a);try{e.appendChild(a)}catch(f){e.innerHTML=a.outerHTML}},x=function(a){var b=c.userX.popover,d=b.trcContentIFrame,e=(d.contentDocument||d.contentWindow.document).getElementById("title");e.innerHTML=a},y=function(a){var b={},d=function(a){var b=0;if("string"==typeof a&&null!=a&&""!=a){var c=a.indexOf("px");b=c>=0?parseInt(a.substring(0,c),10):1}return b},e=function(a){var b={};if(b.left=0,b.top=0,b.right=0,b.bottom=0,window.getComputedStyle){var c=window.getComputedStyle(a,null);b.left=parseInt(c.borderLeftWidth.slice(0,-2),10),b.top=parseInt(c.borderTopWidth.slice(0,-2),10),b.right=parseInt(c.borderRightWidth.slice(0,-2),10),b.bottom=parseInt(c.borderBottomWidth.slice(0,-2),10)}else b.left=d(a.style.borderLeftWidth),b.top=d(a.style.borderTopWidth),b.right=d(a.style.borderRightWidth),b.bottom=d(a.style.borderBottomWidth);return b};if(b.x=0,b.y=0,null!==a)if(a.getBoundingClientRect){var f=document.documentElement,g=a.getBoundingClientRect(),h=c.Browser.ie,i=h||window.scrollX==f.scrollLeft||"undefined"==typeof window.scrollX?f.scrollLeft:window.scrollX,j=h||window.scrollY==f.scrollTop||"undefined"==typeof window.scrollY?f.scrollTop:window.scrollY;b.x=g.left+i,b.y=g.top+j}else{b.x=a.offsetLeft,b.y=a.offsetTop;for(var k=a.parentNode,l=a.offsetParent,m=null;null!=l;){b.x+=l.offsetLeft,b.y+=l.offsetTop;var n=l.tagName.toLowerCase();if((c.Browser.ieUpto(8)&&"table"!=n||(c.Browser.firefoxAtleast(3)||c.Browser.chrome)&&"td"==n)&&(m=e(l),b.x+=m.left,b.y+=m.top),l!=document.body&&l!=document.documentElement&&(b.x-=l.scrollLeft,b.y-=l.scrollTop),!c.Browser.ie&&!c.Browser.opera||c.Browser.ieAtleast(8))for(;l!=k&&null!==k;)b.x-=k.scrollLeft,b.y-=k.scrollTop,(c.Browser.firefoxUpto(3)||c.Browser.webkit)&&(m=e(k),b.x+=m.left,b.y+=m.top),k=k.parentNode;k=l.parentNode,l=l.offsetParent}}return b},z=function(){var a,b,d,e=c.userX.popover,f=e&&e.videoCube&&e.videoCube.rbox.findElement(function(a){return a.className.search("trc_popover_arrow")>=0},e,"div"),g=e&&e.anchor;g&&f&&(c.dom.addClass(g,"trc_anchor"),a=y(g),b=a.x-e.offsetWidth+g.offsetWidth/2+f.clientLeft+f.offsetWidth/2+1,d=a.y+g.offsetHeight,0>b?(f.style.right=e.offsetWidth-a.x-f.offsetWidth/2-g.offsetWidth/2+"px",b=0):f.style.right=null,e.style.left=b+"px",e.style.top=d+"px")},A=function(){var a=c.userX&&c.userX.popover;a&&a.isVisible&&(TRC.Browser.ieUpto(8)?c.dom.getWindowWidth()!=i&&setTimeout(function(){z(),i=c.dom.getWindowWidth()},0):z())},B=function(a,b){var c,d,e=b;this.pause=function(){clearTimeout(c),e-=new Date-d},this.resume=function(){d=new Date,c=setTimeout(a,e)},this.resume()},C=function(){e&&e.pause&&e.pause()},D=function(){e&&e.resume&&e.resume()},E=function(){var a,e,f=b.createElement("div"),g=b.createElement("div"),h=d.popover.content.questionnaire.options,i=c.Browser.ieUpto(8)?"onclick":"onchange";c.dom.addClass(f,"trc_question_container"),g.innerHTML=d.popover.content.questionnaire.tellUsWhy,c.dom.addClass(g,"trc_question_title"),f.appendChild(g);for(var j in h)h.hasOwnProperty(j)&&(a=b.createElement("label"),e=b.createElement("input"),e.setAttribute("type","radio"),e.setAttribute("name","excludeReason"),e.setAttribute("value",j),e.setAttribute(i,"this.checked = true; TRC.userX.explainExclude(event, TRC.userX.popover.videoCube, 400); "),a.appendChild(e),a.innerHTML+=h[j],f.appendChild(a));return f},F=function(a){var b=a&&a.video_data,c={};return b?(c.ii=b&&b["item-id"],c.prt="rc",b["is-syndicated"]&&(c.prt="sc"),b["is-in-network"]&&(c.prt="nt"),b["is-native"]&&(c.prt="nav"),c.p=b.publisher||"",TRC.pageManager.getValue("past-exclusions")&&(c.px=TRC.pageManager.getValue("past-exclusions")),c):(__trcWarn("No video data have been found for user exclude event request params. aborting."),!1)},G=function(a,b){a=a||event;var d=F(b);return b&&"true"==b.getAttribute("data-excluded")||!d?(__trcDebug("No recommendation to exclude. Not sending exclude event."),c.dom.stopEvent(a)):(b.rbox.sendEvent("exclude",d,null,!1),H(b),c.dom.stopEvent(a))},H=function(a){var b=a.rbox.findElement(function(a){return a.className.search("trc_undo_btn")>=0},a,"div"),e=a&&a.video_data["is-syndicated"]?d.popover.title.scRemoved:d.popover.title.removed;c.userX.popover.videoCube=a,c.pageManager.storeValue("past-exclusions",1),x(e),w(E()),u(a,b,g),a.setAttribute("data-excluded","true"),c.dom.addClass(a,"trc_user_excluded")},I=function(a,b){a=a||event;var d=F(b);return b&&b.getAttribute("data-excluded")&&d?(b.rbox.sendEvent("excludeundo",d,null,!1),J(b),c.dom.stopEvent(a)):(__trcDebug("No recommendation to unexclude. Not sending exclude-undo event."),c.dom.stopEvent(a))},J=function(a){a.removeAttribute("data-excluded"),c.dom.removeClass(a,"trc_user_excluded"),v()},K=function(a,b,c){a=a||event;var d=a.target||a.srcElement,e=F(b);C(),b&&b.getAttribute("data-excluded")&&e?(e.xr=d.getAttribute("value"),b.rbox.sendEvent("excludeexplain",e,null,!1)):__trcDebug("No recommendation exclude to explain. Not sending exclude-explain event."),c?setTimeout(function(){L()},c):L()},L=function(){var a=c.userX.popover,b=c.Browser.ieUpto(9)?0:250;v(),c.dom.addClass(a.anchor,"trc_anchor"),setTimeout(function(){x(d.popover.title.thankYou),w(d.popover.content.approval),u(a.videoCube,a.anchor,h)},b)};c.userX={init:n,initForMode:o,explainExclude:K,locale:"en",isInitialized:!1}}(window,document,TRC),TRC.visibility=TRC.visibility||{},TRC.visibility=function(a,b){function c(a){var b=TRC.dom.getViewportVerticalRange(),c=TRC.dom.getElementRect(a);return c.top<0?Math.max(c.top,c.bottom):b.max-c.top-b.min}function d(a){var b=TRC.dom.getViewportHorizontalRange(),c=TRC.dom.getElementRect(a);return c.left<0?Math.max(c.left,c.right):b.max-c.left-b.min}return modObject={getViewPortOffsets:function(a){var b=c(a),e=d(a);return{verticalOffset:b,horizontalOffset:e}}},a._trcIsUTactive&&(modObject.getVerticalVPShift=c,modObject.getHorizontalVPShift=d),modObject}(window,document),function(win,doc){var protocol=TRC.PROTOCOL,taboolaConsole=TRC.URL.prototype.getParameter.call(location.href,"trc_console");win.trc_debug_level=TRC.URL.prototype.getParameter.call(location.href,"taboola-debug"),taboolaConsole&&"yes"===taboolaConsole.toLowerCase()&&TRC.Manager.prototype.loadExternal("http://c2.taboola.com/console/console_loader.js","js"),isNaN(parseInt(win.trc_debug_level))&&(trc_debug_level=1),TRC.callbacks={cdnRecommendations:function(a){TRC.dispatch("staticRecommendationsReceived",{response:a})},mute:function(){var a,b=TRCImpl.boxes;if(TRCImpl.preloadRequestLoader=null,TRC.Timeout.reset(),b)for(a in b)b[a].request=null;TRC.pConsole("warning - mute!","warn","server returned mute","")}},TRC.trc_drawRBox=!1,TRC.listOrigin=new TRC.ListOriginBuilder,TRC.baseDomain=TRC.baseDomain||protocol+"//cdn.taboola.com/libtrc/"+TRC.publisherId+"/",TRC.prototype=TRC.prototype||{},TRC.Interval=function(){var intervals={};return{set:function(callback,interval){var aArgs=Array.prototype.slice.call(arguments,2),intervalId=win.setInterval(function(){callback instanceof Function?callback.apply(null,aArgs):eval(callback)},interval);return intervals[intervalId.toString()]=1,intervalId},clear:function(a){a&&(win.clearInterval(a),delete intervals[a.toString()])},reset:function(){for(intervalId in intervals)win.clearInterval(intervalId),delete intervals[intervalId.toString()]}}}(),TRC.Timeout=function(){var a={};return{set:function(b,c){var d=win.setTimeout(function(){delete a[d.toString()],b()},c);return a[d.toString()]=1,d},clear:function(b){b&&(win.clearTimeout(b),delete a[b.toString()])},reset:function(){var b;for(b in a)win.clearTimeout(b),delete a[b.toString()]}}}(),TRC.trcReady=function(){var a;return function(){try{TRC.pConsole("page","debug","libtrc : calling TRC.ready",""),TRC.implLoaded=!0;var b=TRC.ready({style:".trc_rbox_container{direction:ltr;text-align:left}.trc_rbox_header{border-style:solid;border-width:0}.in_trc_header{position:relative!important;float:right;margin:0}#trc_rbox_css_loaded{overflow:hidden;width:0;height:0}.trc_rbox{margin-top:0}.trc_rbox_div{margin:0 0 3px;direction:ltr;padding:0;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;overflow:auto;position:relative;width:auto;*width:auto;border:solid #CCC 1px}.loading-animation span{display:block}.videoCube{zoom:1;cursor:pointer;float:none;overflow:hidden;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box}div.videoCube:hover,.videoCube_hover{cursor:pointer}.videoCube span.video-title:hover,.videoCube_hover span.video-title{text-decoration:underline}.videoCube a{text-decoration:none;border:0;color:#000;cursor:pointer}.videoCube a:hover,.videoCube_hover a,.videoCube a:link,.videoCube a{text-decoration:none!important;outline:0}.videoCube a .thumbBlock{float:left;display:block;overflow:hidden!important}.videoCube a img,.videoCube img{border:0;_border:0;display:block;margin:0;height:auto;width:auto}.videoCube .video-label{display:block;overflow:hidden}.videoCube .video-title{width:auto!important;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.videoCube .video-duration a{}.videoCube .video-duration{height:0;float:left;position:relative;color:#fff;font-size:11px}.videoCube .video-duration dt{border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;background-color:#000;opacity:.6;filter:alpha(opacity=60)}.videoCube span.video-label.trc_ellipsis{position:relative;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.sponsored-default .video-description{font-weight:400;color:#000;font-size:9px;max-height:22px;*height:22px;overflow:hidden;line-height:9px}.video-duration.video-duration-detail div{color:#fff}.sponsored-default{background-color:#f7f6c6;padding-bottom:0!important}.trc_rbox .sponsored{position:relative;display:block;overflow:visible;height:auto;width:auto;padding-right:0;text-align:right;font-size:9px}.sponsored-url{white-space:nowrap;float:left;overflow:hidden;width:98%;height:auto;margin-top:0;margin-left:1px;padding-bottom:2px;color:green;font-size:9px;text-decoration:underline}.sponsored-default .video-title{height:26px;font-size:11px;line-height:13px;max-height:26px;*height:26px}.sponsored-default .thumbBlock img{}.sponsored-default .thumbBlock{text-align:center;background-color:transparent}.trc_rbox_div{height:410px}.videoCube{direction:ltr;font-size:11px;margin:0;color:#000;border-width:0}.videoCube.vertical:first-child{border-top:0;margin-top:0}.videoCube.horizontal:first-child{border-left:0;margin-left:0}.trc_rbox .trc_rbox_div .videoCube.vertical{_margin-top:expression(this.previousSibling==null?'0':'default')}.trc_rbox .trc_rbox_div .videoCube.horizontal{_margin-left:expression(this.previousSibling==null?'0':'default')}div.videoCube:hover,.videoCube_hover{background-color:#EBF0FF;color:#000}.videoCube .thumbBlock{margin-right:5px;margin-left:1px;border-style:solid}.videoCube a img,.videoCube img{border-color:#ececec}.videoCube .overlayImg{}.videoCube .video-label-box{margin-left:81px}.videoCube .video-label dt{font-weight:700}.videoCube .video-title{height:auto;margin-bottom:3px;white-space:normal}.videoCube .trc_inline_detail_spacer{display:inline-block;white-space:pre}.sponsored-default{padding-bottom:0}.loading-animation{font-family:sans;font-size:1.5em;text-align:center;color:gray;height:100%}.trc_rbox_header{font-family:Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;text-decoration:none;color:#000}.trc_header_right_part{position:absolute;left:50%;top:0}.branding_div{overflow:visible;float:right}.branding_div img{height:20px}.trc_pager div{float:left;font-family:sans;cursor:pointer;margin-left:2px;margin-right:2px}.trc_pager_prev,.trc_pager_next{}.trc_pager{font-weight:400}.trc_pager_pages{display:block!important}.trc_related_container div.horizontal{float:left;box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box}.trc_related_container div.vertical{}.trc_related_container DIV.videoCube.thumbnail_top .thumbBlock,.trc_related_container DIV.videoCube.thumbnail_bottom .thumbBlock{float:none}@media screen and (-webkit-min-device-pixel-ratio:0){.sponsored-url{margin-top:2px}}.vidiscovery-note{display:none}.pager_disabled{cursor:auto}.videoCube .thumbBlock .trc_sponsored_overlay_base{display:block;width:auto;margin-left:0;position:absolute;color:#fff!important}.videoCube .thumbBlock .trc_sponsored_overlay{filter:alpha(opacity=60);opacity:.6;display:block;position:absolute;*left:0}.videoCube .thumbBlock .trc_sponsored_overlay_base .sponsored{position:relative;display:block;overflow:visible;width:auto;text-align:center;padding:0 5px;margin-top:0}.videoCube .thumbBlock .trc_sponsored_overlay_base.round .trc_sponsored_overlay{border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.videoCube .thumbBlock .trc_sponsored_overlay_base.round{margin-left:4px}.thumbnail-emblem{background-color:transparent;background-repeat:no-repeat;position:absolute;z-index:50}.playerCube .thumbnail-overlay,.videoCube .thumbnail-overlay{position:absolute;background-color:transparent;background-repeat:no-repeat;z-index:50}.videoCube:hover .thumbnail-overlay,.videoCube_hover .thumbnail-overlay{position:absolute;background-color:transparent;background-repeat:no-repeat;z-index:50}.thumbnail_bottom{padding-bottom:8px}.trc_pager_next img,trc_pager_next pager_disabled img,trc_pager_next:hover img{-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1);filter:FlipH;-ms-filter:\"FlipH\"}.trc_cover_iframe{position:absolute;z-index:100000;top:0;left:0;background:#000;opacity:.4;filter:alpha(opacity=40);border:0}.trc_lightbox_base{z-index:100001;position:fixed}.trc_lightbox_overlay{background-color:transparent;position:absolute;z-index:100002}.trc_lightbox_transparent{position:absolute;z-index:100003}#trc_lightbox_header{font-family:\"Trebuchet MS\",Helvetica,sans-serif}.trc_whitebox{background-color:#fff;position:relative;z-index:100004;padding:0 20px 20px;margin:0 auto;border:2px solid #000;-moz-box-shadow:3px 3px 20px #000;-webkit-box-shadow:3px 3px 20px #000;box-shadow:3px 3px 20px #000;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.trc_whiteboxCloseButton{width:32px;height:32px;border:0;position:absolute;right:-16px;top:-14px;cursor:pointer;background:url(//cdn.taboola.com/taboola-generic/close.png) no-repeat top left transparent;color:#fff;color:transparent;font-size:0}.trc_related_container .logoDiv{font-family:Arial,Helvetica,sans-serif;white-space:nowrap;font-size:9px}.trc_related_container .logoDiv a{font-size:9px;text-decoration:none!important;color:#000;margin-right:1px;vertical-align:text-bottom}.logoDiv a span:hover{text-decoration:underline}.trc_rbox_header .logoDiv{font-size:1em}.trc_related_container .vertical-start-shade{background-image:url(//cdn.taboola.com/taboola-generic/shade-down.png);height:10px;width:auto;position:absolute;z-index:5}.trc_related_container .vertical-end-shade{background-image:url(//cdn.taboola.com/taboola-generic/shade-up.png);height:10px;width:auto;position:absolute;z-index:5}.trc_related_container .horizontal-start-shade{background-image:url(//cdn.taboola.com/taboola-generic/shade-right.png);height:auto;width:10px;position:absolute;z-index:5}.trc_related_container .horizontal-end-shade{background-image:url(//cdn.taboola.com/taboola-generic/shade-left.png);height:auto;width:10px;position:absolute;z-index:5}.trc_rbox_container.trc_expandable{overflow:hidden;max-height:0;transition-property:max-height;-webkit-transition-property:max-height;-moz-transition-property:max-height;-o-transition-property:max-height;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}DIV.trc_autoplaylist-box{margin:6px auto 0;border:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:4px;font-family:\"Trebuchet MS\",Helvetica,sans-serif;width:320px;background:#191919;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#191919', endColorstr='#393939');-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr=#191919, endColorstr=#393939)\";background:-webkit-gradient(linear,left top,left bottom,from(#191919),to(#393939));background:-moz-linear-gradient(top,#191919,#393939);background:linear-gradient(top,#191919,#393939)}DIV.trc_autoplaylist-box .trc-next-up-header{font-size:14px;color:#CCC;float:left;line-height:31px;margin:0 4px 0 6px;overflow:hidden;white-space:nowrap}DIV.trc_autoplaylist-box .trc-next-up-countdown{color:#fff;font-weight:700;font-size:15px;padding-left:4px}DIV.trc_autoplaylist-box .nextup{cursor:pointer}DIV.trc_autoplaylist-box .nextup .thumbblock{border:solid #FEFEFE 1px;margin-right:10px}DIV.trc_autoplaylist-box:hover .nextup .thumbblock SPAN.thumbnail-overlay{background-image:url(//cdn.taboola.com/taboola-generic/lightbox-overlay.png)}DIV.trc_autoplaylist-box .nextup .video-label-box{color:#fff;font-weight:700;font-size:12px;line-height:14px}.trc-syndication-link{text-decoration:none;color:inherit}.playerCube{width:100%;height:100%;position:relative;cursor:pointer}.playerCube .thumbnail-overlay{width:100%;height:100%;top:0;left:0;position:absolute}.trc_related_container .whatsThisSyndicated{position:absolute;cursor:pointer}.trc_related_container .whatsThisSyndicated.a-bottom-right,.trc_related_container .static-text.bottom-right{bottom:0;right:0}.trc_related_container .whatsThisSyndicated.a-top-right,.trc_related_container .static-text.top-right{top:0;right:0}.trc_related_container .whatsThisSyndicated.a-bottom-left,.trc_related_container .static-text.bottom-left{bottom:0;left:0}.trc_related_container .whatsThisSyndicated.a-top-left,.trc_related_container .static-text.top-left{top:0;left:0}.trc_related_container .videoCube .thumbBlock .branding{position:absolute;bottom:0;z-index:1;width:100%;margin:0;padding:5px 0;text-align:center}.syndicatedItem .branding{margin:0}.trc_related_container .videoCube .thumbBlock .static-text{position:absolute;z-index:1;margin:0;padding:5px;background-color:#000;color:#fff;display:block;font-family:Arial,Helvetica,sans-serif;font-size:10px;font-weight:400;text-align:left;text-decoration:none;opacity:.7}.trc_related_container .static-text.top{width:100%;top:0;padding:5px 0}.trc_related_container .static-text.bottom{width:100%;bottom:0;padding:2px 0}.trc-inplayer-rbox{background:#333;background:rgba(30,30,30,.9);*background:#333;bottom:0;position:absolute;height:300px;text-align:center}.trc-inplayer-rbox .trc_rbox_container{margin:50px auto 0;width:640px}.trc_rbox.trc-auto-size{width:100%;height:100%}.videoCube.thumbnail_under .thumbBlock{margin-left:0;margin-right:0}.videoCube.thumbnail_under .label-box-overlay{width:100%;height:100%;position:absolute;background:#000;opacity:.75;filter:alpha(opacity=75);top:0;_display:none}.videoCube.thumbnail_under .video-labels-anchor{width:100%;height:auto;position:absolute;z-index:1;left:0;bottom:0;min-height:2.58em;max-height:2.58em;padding-top:2px;padding-bottom:2px;_background-color:#CECECE;-webkit-transition:all .2s linear;-moz-transition:all .2s linear;-ms-transition:all .2s linear;-o-transition:all .2s linear;transition:all .2s linear;line-height:1.25em}.videoCube.thumbnail_under .video-labels-anchor span.video-title,.videoCube.thumbnail_under .video-labels-anchor span.branding{position:relative;z-index:1;padding:0 3px;margin:0}.videoCube.thumbnail_under .video-title{min-height:2.58em}.videoCube.thumbnail_under:hover .video-labels-anchor{opacity:1;max-height:6.45em}.trc-auto-size .trc_rbox_outer .trc_rbox_div{height:auto;width:auto}.trc-auto-size .trc_rbox_div .videoCube{height:auto}.trc-auto-size .trc_rbox_div .videoCube.trc-first-recommendation{margin-top:0}.trc_rbox .trc_rbox_outer .trc_rbox_div .videoCube.trc-first-in-row{margin-left:0}.trc_related_container .trc_elastic{font-size:13px;line-height:18px;color:#333;background-color:#fff;box-shadow:#666 0 0 0 4px;margin:20px}.trc_elastic .trc_rbox{width:auto}.trc_elastic .videoCube{overflow:hidden}.trc_elastic .videoCube .thumbBlock{display:block;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:cover;position:absolute;display:inline-block;top:0;right:0;bottom:0;left:0;margin-left:0;margin-right:0}.trc_elastic .thumbBlock_holder{position:relative;width:100%}.trc_elastic .thumbnail_start .thumbBlock_holder{float:left;margin-right:10px}.trc_elastic .videoCube_aspect{width:1px}.trc_elastic .trc_rbox .trc_rbox_div{height:auto}.trc_elastic .video-label-box{display:block}.trc_user_exclude_btn{background:url(//cdn.taboola.com/libtrc/static/thumbnails/f539211219b796ffbb49949997c764f0.png) no-repeat scroll 0 0 transparent;width:12px;height:12px;position:absolute;right:2px;top:2px;z-index:9000;cursor:pointer;visibility:hidden}.trc_undo_btn{font-family:Arial,Helvetica,sans-serif;font-size:11px;line-height:14px;font-weight:400;color:#36C;text-decoration:underline;cursor:pointer;position:absolute;right:2px;top:2px;padding:0 1px;z-index:11000;visibility:hidden}.videoCube:hover .trc_user_exclude_btn,.videoCube_hover .trc_user_exclude_btn,.trc_user_excluded.videoCube:hover .trc_undo_btn,.trc_user_excluded.videoCube_hover .trc_undo_btn,.trc_undo_btn.trc_anchor{visibility:visible}.videoCube.trc_user_excluded .trc_user_exclude_btn{visibility:hidden}.trc_fade{opacity:0;filter:alpha(opacity=0);visibility:hidden;transition:opacity 500ms 0s,visibility 0s 500ms;-webkit-transition:opacity 500ms 0s,visibility 0s 500ms;-moz-transition:opacity 500ms 0s,visibility 0s 500ms;-o-transition:opacity 500ms 0s,visibility 0s 500ms;-ms-transition:opacity 500ms 0s,visibility 0s 500ms}.trc_fade.trc_in,.trc_user_excluded .trc_exclude_overlay{visibility:visible;opacity:1;filter:alpha(opacity=100);transition-delay:0s,0s;-moz-transition-delay:0s,0s;-webkit-transition-delay:0s,0s;-o-transition-delay:0s,0s;-ms-transition-delay:0s,0s}.trc_excludable .trc_exclude_overlay{position:absolute;z-index:10000;top:0;left:0;width:100%;height:100%;cursor:default;background-color:#fff}.videoCube.trc_excludable .trc_exclude_overlay.trc_fade{filter:alpha(opacity=80)\\9}.videoCube.trc_user_excluded .trc_exclude_overlay{visibility:visible;opacity:.8;filter:alpha(opacity=80)}.videoCube.trc_user_excluded .thumbBlock{filter:url(\"data:image/svg+xml;utf8,#grayscale\");filter:gray;-webkit-filter:grayscale(100%)}.videoCube.trc_user_excluded:hover a .video-label-box .video-title,.videoCube_hover.trc_user_excluded a .video-label-box .video-title{text-decoration:none}.videoCube.trc_user_excluded a .video-label-box *,.videoCube.trc_user_excluded:hover a .video-label-box *,.videoCube_hover.trc_user_excluded a .video-label-box *{color:#000;overflow:hidden;-webkit-transition:color 500ms 0s;-moz-transition:color 500ms 0s;-ms-transition:color 500ms 0s;-o-transition:color 500ms 0s;transition:color 500ms 0s}.videoCube.trc_user_excluded a .video-label-box .label-box-overlay{background-color:#BBB;-webkit-transition:background-color 500ms 0s;-moz-transition:background-color 500ms 0s;-ms-transition:background-color 500ms 0s;-o-transition:background-color 500ms 0s;transition:background-color 500ms 0s}.videoCube.thumbnail_under.trc_user_excluded .video-labels-anchor,.videoCube.thumbnail_under.trc_user_excluded:hover .video-labels-anchor{max-height:none;-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.trc_related_container .trc_clearer{clear:both;height:0;overflow:hidden;font-size:0;line-height:0;visibility:hidden}.link-adc{float:right!important}.trc-widget-footer .link-adc a .trc_adc_wrapper,.trc_header_ext .link-adc a .trc_adc_wrapper{vertical-align:baseline;height:15px;width:19px;display:inline-block;position:relative}.trc-widget-footer .link-adc a .trc_adc_s_logo,.trc_header_ext .link-adc a .trc_adc_s_logo,.trc-widget-footer .link-adc a .trc_adc_b_logo,.trc_header_ext .link-adc a .trc_adc_b_logo{vertical-align:middle;height:15px;display:inline-block;margin-top:-1px}.trc-widget-footer .link-adc a .trc_adc_s_logo,.trc_header_ext .link-adc a .trc_adc_s_logo{width:19px;background:url(//cdn.taboola.com/libtrc/static/thumbnails/3aadbb71016ecd7a194bbe2791777e9a.png) no-repeat!important}.trc-widget-footer .link-adc a .trc_adc_b_logo,.trc_header_ext .link-adc a .trc_adc_b_logo{width:77px;background:#fff url(//cdn.taboola.com/libtrc/static/thumbnails/0781f9c5a8637d1e162874f157460048.png) no-repeat!important;right:-1px;display:none;position:absolute}.trc_mobile_disclosure_link,.trc_mobile_attribution_link,.trc_mobile_adc_link{display:none}.trc_desktop_disclosure_link,.trc_desktop_attribution_link,.trc_desktop_adc_link{display:inline}@media screen and (max-width:767px){.trc_mobile_disclosure_link{display:inline}.trc_mobile_attribution_link{display:inline}.trc_mobile_adc_link{display:inline}.trc_desktop_disclosure_link{display:none}.trc_desktop_attribution_link{display:none}.trc_desktop_adc_link{display:none}}.trc_in_iframe .trc_mobile_attribution_link,.trc_in_iframe .trc_mobile_disclosure_link{display:inline}.trc_in_iframe .trc_desktop_attribution_link,.trc_in_iframe .trc_desktop_disclosure_link{display:none}.trc_related_container .logoDiv,.trc_related_container .trc_header_ext .logoDiv{float:right}.trc_related_container .logoDiv+.logoDiv{margin-right:2px}.trc_related_container .attribution-disclosure-link-sponsored,.trc_related_container .attribution-disclosure-link-hybrid{display:none}.trc_related_container .trc-content-sponsored .attribution-disclosure-link-sponsored{display:block}.trc_related_container .trc-content-hybrid .attribution-disclosure-link-hybrid{display:block}.trc_related_container .trc-widget-footer:hover a span,.trc_related_container .trc_header_ext:hover a span{text-decoration:underline!important}.logoDiv a span.trc_logos_v_align{display:inline-block!important;font-size:15px!important;line-height:1em!important;width:0!important}.trc_related_container .trc_header_ext:hover a span.trc_logos_v_align,.trc_related_container .trc_header_ext:hover a span.trc_adc_wrapper,.trc_related_container .trc-widget-footer:hover a span.trc_logos_v_align,.trc_related_container .trc-widget-footer:hover a span.trc_adc_wrapper{text-decoration:none!important}.trc_related_container{clear:both}"
});if(!b.invisible)return;TRC.dom.onReady(function(){a?(a.innerHTML="",a.style.display="none"):(a=doc.createElement("div"),doc.body.appendChild(a).style.display="none"),b.internalDrawRBox({mode:"rbox-tracking",container:a})})}catch(c){__trcError("Error in libtrc initialization",c)}}}(),TRC.pConsole("","time","impl file loaded",""),TRC.utm.push((new Date).getTime()-TRC.utm.start),TRC.trcReady()}(window,document);