var OB_voterWidgetObjArray=typeof OB_voterWidgetObjArray!="undefined"?OB_voterWidgetObjArray:[],cssFile_Loaded=false,outbrain_browsers=typeof outbrain_browsers=="object"?outbrain_browsers:new (function(){this.browserListVersion="2.0";this.ready=false;this.doc=document;this.agt=navigator.userAgent.toLowerCase();this.opera=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;this.avant=navigator.userAgent.toLowerCase().indexOf("avant")!=-1;this.chrome=navigator.userAgent.toLowerCase().indexOf("chrome")!=
-1;this.iPhone=navigator.userAgent.toLowerCase().indexOf("iphone")!=-1;this.iPod=navigator.userAgent.toLowerCase().indexOf("ipod")!=-1;this.ie=!this.opera&&navigator.appName.indexOf("Microsoft")!=-1;this.safari=!this.ie&&navigator.userAgent.toLowerCase().indexOf("safari")!=-1;this.mozilla=!this.opera&&!this.ie&&!this.safari&&!this.chrome;this.is_major=parseInt(navigator.appVersion);this.ie5=this.ie&&this.is_major==4&&this.agt.indexOf("msie 5.")!=-1;this.ie55=this.ie&&this.is_major==4&&this.agt.indexOf("msie 5.5")!=
-1;this.ie6=this.ie&&this.is_major==4&&this.agt.indexOf("msie 6.")!=-1;this.ie7=this.ie&&this.is_major==4&&this.agt.indexOf("msie 7.")!=-1;this.ie8=this.ie&&this.is_major==4&&this.agt.indexOf("trident/4.0")!=-1;this.ieDocMode=this.doc.documentMode?this.doc.documentMode:this.doc.compatMode&&this.doc.compatMode=="CSS1Compat"?7:5;this.ie8Doc8=this.ie8&&this.ieDocMode==8;this.sc=this.safari||this.chrome;this.os=navigator.platform.toLowerCase();this.osMac=this.os.indexOf("mac")!=-1;this.osWin=this.os.indexOf("win")!=
-1;this.osLinux=this.os.indexOf("linux")!=-1;this.ready=true}),outbrain_settings=typeof outbrain_settings=="object"?outbrain_settings:new (function(){var b=this;this.PLATFORM_TYPE_TYPEPAD=0;this.PLATFORM_TYPE_BLOGGER_SIDEBAR=1;this.PLATFORM_TYPE_TUMBLR=2;this.platformType=null;this.versions=new function(){this.numVer=520;this.rater="5.2.0";this.raterFull=this.mp="5.2.0.3";this.css="5.2.0";this.whatIs="3.7.5";this.language="3.2.0";this.images="5.1.1";this.odb="0.6"};this.demoMode=false;this.globals=
new function(){this.scriptType="text/javascript";this.cssType="text/css";this.cssRel="stylesheet"};this.domains=new function(){this.odb="odb.outbrain.com/";this.outbrain="http://www.outbrain.com/";this.js="http://widgets.outbrain.com/";this.traffic="http://traffic.outbrain.com/network/redir"};this.keys_and_users=new function(){this.odbKey="AYQHSUWJ8576";this.agentId="blog_JS";this.userName=this.outbrainKey=this.partnerName=null;this.partnerKey=this.odbKey};this.odb=new (function(){this.odbRatesRecorder=
"http://rate.outbrain.com/rate.do";this.odbGetDataUrlGlobal="http://"+b.domains.odb+"utils/odb?key=$KEY&agent=$AGENT&method=$METHOD&url=$PERMA_LINK&format=json&callback=outbrain_rater.returnedOdbData(${json},$VOTER_INDEX,$IS_REC)&timeframe=none$SELF_POSTS&lang=$LANGUAGE$ADDITIONAL";this.odbGetDataUrlRegular=this.odbGetDataUrlGlobal+"&idx=$VOTER_INDEX";this.odbGetDataUrlRec=this.odbGetDataUrlGlobal+"&urltyp=$URLTYPE&idx=$VOTER_INDEX$NUM$FRAMECONTROL$SRVPC$VISIBLE_RECS$MAXNUMADS";this.odbGetDataUrlRegular=
this.odbGetDataUrlRegular.replace(/\$METHOD/g,"get_score");this.odbGetDataUrlRegular=this.odbGetDataUrlRegular.replace(/\$IS_REC/g,"false");this.odbGetDataUrlRegular=this.odbGetDataUrlRegular.replace(/\$SELF_POSTS/g,"");this.odbGetDataUrlRegular=this.odbGetDataUrlRegular.replace(/\$ADDITIONAL/g,"");this.odbGetDataUrlRec=this.odbGetDataUrlRec.replace(/\$METHOD/g,"get_score_rec");this.odbGetDataUrlRec=this.odbGetDataUrlRec.replace(/\$IS_REC/g,"true");this.odbGetDataUrlRec=this.odbGetDataUrlRec.replace(/\$URLTYPE/g,
"redirect");this.odbGetDataUrlRec=this.odbGetDataUrlRec.replace(/\$ADDITIONAL/g,"");this.MPRequest="http://"+b.domains.odb+"utils/odb?key=$KEY&method=source_documents&format=$FORMAT&num=$ITEMS_COUNT&source_url=$SOURCE_URL&callback=outbrain_MP.setData(${json},$MP_INDEX)&timeframe=none&min_count=$MIN_COUNT&urltyp=redirect&fetch=$FETCH_TYPE";this.MPRequest=this.MPRequest.replace(/\$MIN_COUNT/g,2);this.MPRequest=this.MPRequest.replace(/\$FORMAT/g,"json");this.MPwlRequest="http://"+b.domains.odb+"utils/odb?key=$KEY&method=wl_most_popular&format=$FORMAT&num=$ITEMS_COUNT&callback=outbrain_MP.setData(${json},$MP_INDEX)&timeframe=none&min_count=$MIN_COUNT$MP_PWL&src_id=$SOURCE_ID&urltyp=redirect";
this.MPwlRequest=this.MPwlRequest.replace(/\$MIN_COUNT/g,2);this.MPwlRequest=this.MPwlRequest.replace(/\$FORMAT/g,"json");this.AdsOnlyRequest="http://"+b.domains.odb+"utils/odb?key=$KEY&method=get_ads&format=$FORMAT&max_num_ads=$ITEMS_COUNT&num=$ITEMS_COUNT&callback=outbrain_MP.setData(${json},$MP_INDEX)&timeframe=none&urltyp=redirect&source_url=$SOURCE_URL";this.AdsOnlyRequest=this.AdsOnlyRequest.replace(/\$FORMAT/g,"json");this.topPaddingThreshold=0.1;this.bottomPaddingThreshold=1.3;this.eagerOdbCalls=
1;this.isOdbCallsSerial=false;this.isSemafor=true;this.OUTSIDEFOLD=0;this.INSIDEFOLD=1;this.NEARFOLD=2;this.EAGER=10;this.ERRED=-1});this.blogUtils=new (function(){this.baseUrl="http://"+b.domains.odb+"blogutils/";this.getBlogSettings=this.baseUrl+"BlogSettings.action?apiKey=$USER_KEY&surl=$SOURCE_URL&localUrl=$LOCAL_URL&sig=$SIG$BLG_TEMPLATE&r="+Math.random()+"&version="+b.versions.raterFull;this.submitBlogSettings=this.baseUrl+"submitBlogSettings.action?apiKey=$USER_KEY&surl=$SOURCE_URL&localUrl=$LOCAL_URL";
this.cancelRecs=this.baseUrl+"ExcludeRec.action?bocr=$BOCR&index=$VOTER_INDEX&templateIndex=$TEMPLATE_INDEX";this.errorManager=b.domains.outbrain+"WidgetsErrorManager?localUrl=$LOCAL_URL&err_code=$ERROR_CODE&err_desc=$ERROR_DESC&err_severity=$ERROR_SEVERITY&err_tmpl=$ERROR_TEMPLATE&err_browser=$ERROR_BROSWER&err_machine=$ERROR_OS&err_source_id=$ERROR_SOURCE";this.timeCounter="http://traffic.outbrain.com/network/rtime/?docid=$DOC_ID&url=$ENCODED_URL&tpassed=$TIME_PASSED&ishp=$IS_HP&srcid=$SOURCE_ID&reqid=$REQUEST_ID";
this.blogHrefLocation=encodeURIComponent(location.href);this.sourceId=null});this.ping=new function(){this.id="odbPingIframeId";this.url="http://odb.outbrain.com/utils/ping.html";this.maxTime=10};this.language=new function(){this.defaultLangName="deflang";this.id="outbrainLanguageJs";this.url=b.domains.js+"lang_en.js";this.retrayMilliSeconds=100;this.retrayMaxTimes=10;this.retrayGradualTimeout=false};this.rater=new function(){this.cssId="cssLinkID";this.cssUrl=b.domains.js+"OutbrainRater.css?v="+
b.versions.css;this.globalElementClass="outbrainGlobalClass";this.firstRaterPositionElementId="outbrainCurrentPosition";this.isStars=this.isDisqus=true;this.cleanPermalink=this.isThumbs=false;this.windowName=null;this.recommendations=new function(){this.agentId="blog_JS";this.demoId="demo_JS";this.type="popular";this.maxCalls=10;this.always=false;this.openNewTab=this.showFramePage=true;this.defaultRecNumber=1;this.recNumberToFetch=3;this.displaySameSiteTitle=true;this.isPcEnabled=false;this.maxAds=
1};this.statuses=new function(){this.RATER_PRE_RATE_MODE=0;this.RATER_RATE_MODE=1;this.RATER_POST_RATE_MODE=2};this.odb=new function(){this.getScoreId="outbrainPostRankRequestID";this.getScoreRecId="outbrainPostRecRankRequestID";this.getCancelRecId="outbrainPostCancelRecRequestID"}};this.MP=new function(){this.id="outbrainMPJs";this.url=b.domains.js+"outbrainMP.js?v="+b.versions.mp;this.cssId="outbrainMPCss";this.css=b.domains.js+"outbrainMP.css?v="+b.versions.css;this.ids=new function(){this.parentContainerDiv=
"";this.containerDiv="outbrainMPDiv";this.requestElement="outbrainTopPostsDataScript";this.odbRequest=b.odb.MPRequest};this.classes=new function(){this.item="OB_MP_item";this.itemOver="OB_MP_item_hover";this.itemOdd="OB_MP_item_odd";this.itemEven="OB_MP_item_even";this.itemFirst="OB_MP_item_first";this.itemLast="OB_MP_item_last"};this.others=new function(){this.hideTitle=false;this.widgetTitle="MPP";this.titleMaxChar=100;this.titleTagName="h2";this.titleClassName="outbrain_MP_title"};this.fetchMode=
new function(){this.MP_MODE="mp";this.MV_MODE="mv";this.ALL_MODE="all"}};this.whatIs=new function(){this.id="whatIsOutbrainJs";this.url=b.domains.js+"OutbrainWhatIsIt-"+b.versions.whatIs+".js"};this.customSettings=new function(){this.id="outbrainCustomSettings";this.keyTagName="OBKey";this.enabled=true};this.templateOptions=["stars","firstLine","secondLine","recommendations","noRecommendations","dynSecondLine"];this.templateDefaults=[false,false,false,false,false,false];this.defaultTemplateName="general";
this.defaultTemplate="bottom;"+this.defaultTemplateName+";false;stars firstLine secondLine;"+this.defaultTemplateName;this.templateGlobalSplit=";";this.templateItemsSplit=" ";this.templateItemsJoin="-";this.defaultMatrixInfos='{"matrixInfos":{"general":{"matrixSource":"http://widgets.outbrain.com/matrix.png","matrixYpositionThanks":"60","matrixYHeight":"30","matrixXlength":"96","matrixAllXlength":"960","matrixAllYlength":"106","starWidth":"19","starHeight":"30","shadowYoffset":"5","matrixSmallStarPos":"90","matrixSmallStarHeight":"12","matrixSmallStarWidth":"60","ie6Postfix":"ie6"}}}';
this.timestampDef=new function(){this.installTimestamp=null;this.activeRecTimestamp=1211443547E3;this.activeV354Timestamp=1220960663848;this.activeV355Timestamp=1221362041E3;this.activeV361Timestamp=1222575308E3;this.activeV400Timestamp=1233100799E3}}),rater_global_settings=typeof rater_global_settings=="object"?rater_global_settings:new (function(){this.redirectUrlMethod="redirect";outbrain_settings.rater.recommendations.selfPost=null;this.versionOfSetting=function(b){if(b.indexOf("&version")==-1)b+=
"&version=5.2.0";return b};this.pathValidator=function(b,a,c){if(b.indexOf(a)==-1)b+=c;return b};outbrain_settings.odb.odbGetDataUrlRec=this.versionOfSetting(outbrain_settings.odb.odbGetDataUrlRec);outbrain_settings.odb.odbGetDataUrlRegular=this.versionOfSetting(outbrain_settings.odb.odbGetDataUrlRegular);outbrain_settings.blogUtils.getBlogSettings=this.versionOfSetting(outbrain_settings.blogUtils.getBlogSettings);outbrain_settings.versions.images="5.1.1"}),outbrain_global_functions=new (function(){this.$=
function(b){return document.getElementById(b)};this.trim=function(b){return b.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};this.isObject=function(b){return typeof b=="object"};this.isArray=function(b){return this.isObject(b)&&b.constructor==Array}}),outbrain_matrix_info=typeof outbrain_matrix_info=="function"?outbrain_matrix_info:function(){this.matrixYHeight=30;this.matrixYpositionThanks=60;this.matrixXlength=96;this.matrixAllXlength=960;this.matrixAllYlength=106;this.starHeight=30;this.starWidth=
19;this.shadowYoffset=0;this.matrixSmallStarPos=90;this.matrixSmallStarHeight=12;this.matrixSmallStarWidth=60;this.isOldBrowser=outbrain_browsers.ie5||outbrain_browsers.ie55||outbrain_browsers.ie6;this.ie6Postfix="";this.matrixSource=outbrain_settings.domains.js+"matrix"+this.ie6Postfix+".png?v="+outbrain_settings.versions.images;this.matrixSourceRTL=outbrain_settings.domains.js+"matrix_rtl"+this.ie6Postfix+".png?v="+outbrain_settings.versions.images;this.init=function(b){if(b!=null){if(typeof b.ie6Postfix!=
"undefined"&&b.ie6Postfix!=null)this.ie6Postfix=b.ie6Postfix;if(typeof b.matrixSource!="undefined"&&b.matrixSource!=null)this.matrixSource=b.matrixSource+"?v="+outbrain_settings.versions.images;if(typeof b.matrixSourceRTL!="undefined"&&b.matrixSourceRTL!=null)this.matrixSourceRTL=b.matrixSourceRTL+"?v="+outbrain_settings.versions.images;if(this.isOldBrowser&&this.ie6Postfix.length>0){this.matrixSource=this.matrixSource.replace(".png","_"+this.ie6Postfix+".png");this.matrixSourceRTL=this.matrixSourceRTL.replace(".png",
"_"+this.ie6Postfix+".png")}if(typeof b.matrixYHeight!="undefined"&&b.matrixYHeight!=null)this.matrixYHeight=b.matrixYHeight;if(typeof b.matrixYpositionThanks!="undefined"&&b.matrixYpositionThanks!=null)this.matrixYpositionThanks=b.matrixYpositionThanks;if(typeof b.matrixXlength!="undefined"&&b.matrixXlength!=null)this.matrixXlength=b.matrixXlength;if(typeof b.matrixAllXlength!="undefined"&&b.matrixAllXlength!=null)this.matrixAllXlength=b.matrixAllXlength;if(typeof b.matrixAllYlength!="undefined"&&
b.matrixAllYlength!=null)this.matrixAllYlength=b.matrixAllYlength;if(typeof b.starWidth!="undefined"&&b.starWidth!=null)this.starWidth=b.starWidth;if(typeof b.starHeight!="undefined"&&b.starHeight!=null)this.starHeight=b.starHeight;if(typeof b.shadowYoffset!="undefined"&&b.shadowYoffset!=null)this.shadowYoffset=b.shadowYoffset;if(typeof b.matrixSmallStarPos!="undefined"&&b.matrixSmallStarPos!=null)this.matrixSmallStarPos=b.matrixSmallStarPos;if(typeof b.matrixSmallStarHeight!="undefined"&&b.matrixSmallStarHeight!=
null)this.matrixSmallStarHeight=b.matrixSmallStarHeight;if(typeof b.matrixSmallStarWidth!="undefined"&&b.matrixSmallStarWidth!=null)this.matrixSmallStarWidth=b.matrixSmallStarWidth}}},outbrain_error_manager_object=typeof outbrain_error_manager_object=="function"?outbrain_error_manager_object:function(){var b=this;this.isAlreadySent=false;this.errorList=[];this.init=function(){new outbrain_timeout(function(){return b.checkIsError()},function(){b.sendError()},null,null,2E4,4,false)};this.isPassFilterError=
function(a){var c=true;if(outbrain_settings.blogUtils.blogHrefLocation.toLowerCase().indexOf("search")>0)c=false;if(outbrain_settings.blogUtils.blogHrefLocation.toLowerCase().indexOf("translate")>0)c=false;if(outbrain_settings.blogUtils.blogHrefLocation.toLowerCase().indexOf("archives.html")>0)c=false;if(outbrain_settings.blogUtils.blogHrefLocation.toLowerCase().indexOf("archive.html")>0)c=false;if(typeof OB_error_level=="number"&&OB_error_level>a)c=false;return c};this.addError=function(a,c,e){if(this.isPassFilterError(e))this.errorList[this.errorList.length]=
new this.error_obj(a,c,e);typeof OB_error_output=="string"&&OB_error_output=="console"&&console.log(this.getErrorString(e)+":"+c)};this.checkIsError=function(){if(b.errorList.length==0)return false;return true};this.sendError=function(){if(!b.isAlreadySent){b.isAlreadySent=true;for(var a=null,c=0;c<b.errorList.length;c++)if(b.errorList[c].error_severity>0)a=this.errorList[c];a&&b.createErrorRequest(a)}};this.whatBroswer=function(){};this.createErrorRequest=function(a){if(a!=null){outbrain_settings.blogUtils.errorManager=
outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_CODE/g,a.error_id);outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_DESC/g,encodeURIComponent(a.error_desc));outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_SEVERITY/g,a.error_severity);outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_TEMPLATE/g,a.error_tmpl);outbrain_settings.blogUtils.errorManager=
outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_BROSWER/g,outbrain_browsers.agt);outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_OS/g,outbrain_browsers.os);outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$ERROR_SOURCE/g,outbrain_settings.blogUtils.sourceId);outbrain_settings.blogUtils.errorManager=outbrain_settings.blogUtils.errorManager.replace(/\$LOCAL_URL/g,outbrain_settings.blogUtils.blogHrefLocation);
b.addErrorRequest(outbrain_settings.blogUtils.errorManager)}};this.addErrorRequest=function(a){var c=document.createElement("script");c.setAttribute("id","OBErrorCall");c.setAttribute("type","text/javascript");c.setAttribute("src",a);a=document.getElementsByTagName("head");a.length>0&&a[0].insertBefore(c,a[0].firstChild)};this.error_obj=function(a,c,e){this.error_id=a;this.error_desc=c;this.error_severity=e;this.error_tmpl=typeof OB_Template=="string"?OB_Template:"NA"};this.getErrorString=function(a){switch(a){case 1:return"Debug";
case 2:return"Error";case 3:return"Fatal";default:return"unknown"}};this.DEBUG=1;this.ERROR=2;this.FATAL=3;this.init()},outbrain_customSettings_object=typeof outbrain_customSettings_object=="function"?outbrain_customSettings_object:function(){var b=this;this.stopRater=this.hasSettings=this.isReadyMP=this.pageLoaded=this.ready=false;this.insertCustomSettingsScriptIntoDom=function(){new outbrain_timeout(function(){var a=false;if(OB_odb_life!=null)a=OB_odb_life.getStatus()==OB_odb_life.STAT_OK&&document.getElementsByTagName("head").length>
0;return a},function(){outbrain_settings.blogUtils.getBlogSettings=outbrain_settings.blogUtils.getBlogSettings.replace(/\$SIG/g,outbrain_settings.rater.windowName);outbrain_settings.blogUtils.getBlogSettings=outbrain_settings.blogUtils.getBlogSettings.replace(/\$BLG_TEMPLATE/g,typeof OB_Template=="string"?"&tmpl="+OB_Template:"");var a=document.createElement("script");a.type=outbrain_settings.globals.scriptType;a.id=outbrain_settings.customSettings.id;a.src=outbrain_settings.blogUtils.getBlogSettings;
document.getElementsByTagName("head")[0].appendChild(a)},null,null,100,15,false)};this.waitToOdbLifeSign=function(){new outbrain_timeout(function(){return OB_odb_life.getStatus()==OB_odb_life.STAT_OK},function(){b.setUserCustomSettings()},null,null,100,15,false)};this.getWindowName=function(){if(outbrain_settings.windowName==null){for(var a="",c=0;c<8;c++){var e=Math.floor(Math.random()*61);a+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".substring(e,e+1)}if(typeof window.name==
"string"&&(window.name==""||window.name.indexOf("frame")>-1)){window.name=a;outbrain_settings.rater.windowName=window.name}else outbrain_settings.rater.windowName=typeof window.name=="string"&&window.name!=""?window.name:a}};this.getBlogTemplateName=function(){if(typeof OB_platformType=="number"&&OB_platformType==outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR){var a=document.getElementById("page-skin-1");if(a){a=a.innerHTML.match("([Tt]emplate|[Nn]ame).*: *(.+)");if(a!=null&&a.length==3)OB_Template=
"BS:"+encodeURIComponent(a[2])}}};this.getSearchReferrer=function(){var a="",c="",e="";try{var g=document.referrer;if(g!="")if(g.indexOf("google")>0){c="[\\?&]q=([^&#]*)";e="goo:"}else if(g.indexOf("search.yahoo")>0){c="[\\?&]p=([^&#]*)";e="yho:"}else if(g.indexOf("search.live")>0||g.indexOf("search.msn")>0){c="[\\?&]q=([^&#]*)";e="mic:"}var h=(new RegExp(c)).exec(g);if(h==null||h=="undefined")a="";else{a=h[1];if(a!=null&&a!="undefined"&&a.length>0)a=e+encodeURIComponent(a)}}catch(d){return""}return a};
this.loadUserCustomSettings=function(){this.getBlogTemplateName();this.getWindowName();this.insertCustomSettingsScriptIntoDom()};this.setMPUserCustomSettings=function(){var a=outbrain_settings.keys_and_users.partnerKey;outbrain_settings.odb.MPRequest=outbrain_settings.odb.MPRequest.replace(/\$KEY/g,a);outbrain_settings.odb.MPwlRequest=outbrain_settings.odb.MPwlRequest.replace(/\$KEY/g,a);outbrain_settings.odb.AdsOnlyRequest=outbrain_settings.odb.AdsOnlyRequest.replace(/\$KEY/g,a);if(typeof OB_MP_cssLinkUrl==
"string")outbrain_settings.MP.css=OB_MP_cssLinkUrl;if(typeof OB_MP_hideTitle=="boolean")outbrain_settings.MP.others.hideTitle=OB_MP_hideTitle;if(typeof OB_MP_title=="string")outbrain_settings.MP.others.widgetTitle=OB_MP_title;if(typeof OB_MP_postTitleMaxChar=="number")outbrain_settings.MP.others.titleMaxChar=OB_MP_postTitleMaxChar;if(typeof OB_MP_titleTagName=="string")outbrain_settings.MP.others.titleTagName=OB_MP_titleTagName;if(typeof OB_MP_titleClassName=="string")outbrain_settings.MP.others.titleClassName=
OB_MP_titleClassName;if(typeof OB_MP_listItemType=="string")if(OB_MP_listItemType.toLowerCase()=="ordered"||OB_MP_listItemType.toLowerCase()=="unordered")MP_global_settings.design.listItemType=OB_MP_listItemType.toLowerCase();this.isReadyMP=true};this.blogSettingsCB=function(a){b.hasSettings=a;b.setUserCustomSettings()};this.setUserCustomSettings=function(){if(typeof OB_srcId=="number")outbrain_settings.blogUtils.sourceId=OB_srcId;if(typeof OB_platformType=="number")outbrain_settings.platformType=
OB_platformType;if(typeof OB_demoMode=="boolean")outbrain_settings.demoMode=false;if(typeof OB_agentId=="string")outbrain_settings.keys_and_users.agentId=OB_agentId;if(typeof OB_partnerName=="string")outbrain_settings.keys_and_users.partnerName=OB_partnerName;if(typeof OB_user=="string")outbrain_settings.keys_and_users.userName=OB_user;if(typeof OB_partnerKey=="string")outbrain_settings.keys_and_users.partnerKey=OB_partnerKey;if(typeof OB_showFramePage=="boolean")outbrain_settings.rater.recommendations.showFramePage=
OB_showFramePage;if(typeof OB_openNewTab=="boolean")outbrain_settings.rater.recommendations.openNewTab=OB_openNewTab;if(typeof OB_self_posts=="boolean")outbrain_settings.rater.recommendations.selfPost=OB_self_posts;if(typeof OB_stop_rater=="boolean")this.stopRater=OB_stop_rater;if(typeof OB_defaultRecNumber=="number")if(OB_defaultRecNumber>0)outbrain_settings.rater.recommendations.defaultRecNumber=OB_defaultRecNumber;if(typeof OB_MP_parentContainer=="string")outbrain_settings.MP.ids.parentContainerDiv=
OB_MP_parentContainer;if(typeof OB_isDisqus=="boolean")outbrain_settings.rater.isDisqus=OB_isDisqus;if(typeof OB_isStars=="boolean")outbrain_settings.rater.isStars=OB_isStars;if(typeof OB_topPaddingThreshold=="number")outbrain_settings.odb.topPaddingThreshold=OB_topPaddingThreshold;if(typeof OB_bottomPaddingThreshold=="number")outbrain_settings.odb.bottomPaddingThreshold=OB_bottomPaddingThreshold;if(typeof OB_eagerOdbCalls=="number")outbrain_settings.odb.eagerOdbCalls=OB_eagerOdbCalls;if(typeof OB_isOdbCallsSerial==
"boolean")outbrain_settings.odb.isOdbCallsSerial=OB_isOdbCallsSerial;if(typeof OB_displaySameSiteTitle=="boolean")outbrain_settings.rater.recommendations.displaySameSiteTitle=OB_displaySameSiteTitle;if(typeof OB_cleanPermalink=="boolean")outbrain_settings.rater.cleanPermalink=OB_cleanPermalink;if(typeof OB_PC_enable=="boolean")outbrain_settings.rater.recommendations.isPcEnabled=OB_PC_enable;if(typeof OB_max_ads=="number")outbrain_settings.rater.recommendations.maxAds=OB_max_ads;if(typeof OB_user_template!=
"undefined")if(OB_user_template.length>0)for(var a=0;a<OB_user_template.length;a++)if(OB_user_template[a].indexOf("thumbs_template")>0)if(typeof outbrain_settings.rater.isThumbs=="boolean")outbrain_settings.rater.isThumbs=true;a="";if(typeof OB_RecNumberFetch=="number")if(OB_RecNumberFetch>0){outbrain_settings.rater.recommendations.recNumberToFetch=OB_RecNumberFetch;a="&num="+OB_RecNumberFetch}outbrain_settings.odb.odbGetDataUrlRec=outbrain_settings.odb.odbGetDataUrlRec.replace(/\$NUM/g,a);outbrain_settings.odb.odbGetDataUrlRec=
outbrain_settings.odb.odbGetDataUrlRec.replace(/\$SELF_POSTS/g,typeof outbrain_settings.rater.recommendations.selfPost=="boolean"?"&blog_posts="+outbrain_settings.rater.recommendations.selfPost:"");if(outbrain_settings.keys_and_users.userName!=null)outbrain_settings.odb.odbGetDataUrlRegular+="&user="+outbrain_settings.keys_and_users.userName;if(outbrain_settings.keys_and_users.partnerName!=null)outbrain_settings.odb.odbGetDataUrlRegular+="&type=both";if(typeof OB_langJS=="string"&&OB_langJS!="")outbrain_settings.language.url=
OB_langJS;outbrain_settings.odb.odbGetDataUrlRec=outbrain_settings.rater.recommendations.showFramePage==false?outbrain_settings.odb.odbGetDataUrlRec.replace(/\$FRAMECONTROL/g,"&hideFP=true"):outbrain_settings.odb.odbGetDataUrlRec.replace(/\$FRAMECONTROL/g,"");a=outbrain_settings.keys_and_users.partnerKey;outbrain_settings.odb.odbGetDataUrlGlobal=outbrain_settings.odb.odbGetDataUrlGlobal.replace(/\$KEY/g,a);outbrain_settings.odb.odbGetDataUrlRegular=outbrain_settings.odb.odbGetDataUrlRegular.replace(/\$KEY/g,
a);outbrain_settings.odb.odbGetDataUrlRec=outbrain_settings.odb.odbGetDataUrlRec.replace(/\$KEY/g,a);if(!this.stopRater)this.ready=true};this.sendInlineCS=function(a){var c=document.createElement("script");c.setAttribute("id","OBBSCall");c.setAttribute("type","text/javascript");c.setAttribute("src",a);a=document.getElementsByTagName("head");a.length>0&&a[0].insertBefore(c,a[0].firstChild)};this.postSettings=function(){var a=outbrain_template_manager.templates[0].getLanguageId();a=outbrain_language_manager.languages_list[a].OPTIONAL_ADDONS.pc;
outbrain_settings.odb.odbGetDataUrlRec=a!=null&&a==true&&typeof outbrain_settings.rater.recommendations.isPcEnabled=="boolean"&&outbrain_settings.rater.recommendations.isPcEnabled==true?outbrain_settings.odb.odbGetDataUrlRec.replace(/\$SRVPC/g,"&srv_pc=true"):outbrain_settings.odb.odbGetDataUrlRec.replace(/\$SRVPC/g,"");outbrain_settings.odb.odbGetDataUrlGlobal=outbrain_settings.odb.odbGetDataUrlGlobal.replace(/\$AGENT/g,outbrain_settings.rater.recommendations.agentId);outbrain_settings.odb.odbGetDataUrlRegular=
outbrain_settings.odb.odbGetDataUrlRegular.replace(/\$AGENT/g,outbrain_settings.rater.recommendations.agentId);outbrain_settings.odb.odbGetDataUrlRec=outbrain_settings.odb.odbGetDataUrlRec.replace(/\$AGENT/g,outbrain_settings.rater.recommendations.agentId+"_rec");outbrain_settings.odb.odbGetDataUrlRec=outbrain_settings.odb.odbGetDataUrlRec.replace(/\$MAXNUMADS/g,outbrain_settings.rater.recommendations.maxAds<=1?"":"&max_num_ads="+outbrain_settings.rater.recommendations.maxAds);outbrain_settings.odb.odbGetDataUrlRec=
outbrain_settings.odb.odbGetDataUrlRec.replace(/\$VISIBLE_RECS/g,"&num_visible="+outbrain_settings.rater.recommendations.defaultRecNumber)};this.inlineCSUrlOnLoad=function(){new outbrain_timeout(function(){return b.ready},function(){var a=(new Date).getTime(),c=b.extractFeedUrl(),e=null;OBCTm=typeof OBCTm!="undefined"?OBCTm:1210838298671;if(b.hasSettings!=true)if(1210838298671<OBCTm&&a-OBCTm<7776E5||1210838298671>=OBCTm&&1211615898671>a){if(outbrain_settings.keys_and_users.outbrainKey==null){outbrain_settings.keys_and_users.outbrainKey=
b.getOutbrainKey();e=outbrain_settings.keys_and_users.outbrainKey}if(e!=null||c!=null||outbrain_settings.blogUtils.blogHrefLocation.length>0){a=[];a[0]=["OB_ITm",typeof OBITm!="undefined"?OBITm:null];a[1]=["OB_showRec",typeof OB_showRec!="undefined"?OB_showRec:null];a[2]=["OB_langJS",typeof OB_langJS!="undefined"?OB_langJS!=""?OB_langJS:null:null];a[3]=["OB_MP_itemsCount",typeof OB_MP_itemsCount!="undefined"?OB_MP_itemsCount:null];a[4]=["OB_self_posts",typeof OB_self_posts!="undefined"?OB_self_posts:
null];a[5]=["OB_MP_title",typeof OB_MP_title!="undefined"?encodeURIComponent(OB_MP_title):null];c=c==null?"":encodeURIComponent(c);e=e==null?"":e;outbrain_settings.blogUtils.submitBlogSettings=outbrain_settings.blogUtils.submitBlogSettings.replace(/\$USER_KEY/g,e);outbrain_settings.blogUtils.submitBlogSettings=outbrain_settings.blogUtils.submitBlogSettings.replace(/\$SOURCE_URL/g,c);outbrain_settings.blogUtils.submitBlogSettings=outbrain_settings.blogUtils.submitBlogSettings.replace(/\$LOCAL_URL/g,
outbrain_settings.blogUtils.blogHrefLocation);c=outbrain_settings.blogUtils.submitBlogSettings;e=false;for(var g=0;g<a.length;g++)if(a[g][1]!=null&&a[g][1]!="undefined"){c+="&"+a[g][0]+"="+a[g][1];e=true}e&&b.sendInlineCS(c)}}},null,null,500,20,true)};this.registerSubmitSettings=function(){b.pageLoaded==true&&b.inlineCSUrlOnLoad();if(window.addEventListener)window.addEventListener("load",function(){b.inlineCSUrlOnLoad()},false);else if(window.attachEvent)window.attachEvent("onload",function(){b.inlineCSUrlOnLoad()});
else if(document.getElementById){var a=window.onload;window.onload=function(){a();b.inlineCSUrlOnLoad()}}};this.isElementExist=function(a,c,e){a=document.getElementsByTagName(a);if(typeof a=="undefined")return false;for(var g=0;g<a.length;g++)if(a[g].getAttribute(c)==e)return true;return false};this.getElementByData=function(a,c,e){try{var g=document.getElementsByTagName(a);if(typeof g=="undefined")return null;for(a=0;a<g.length;a++)if(g[a].getAttribute(c)==e)return g[a]}catch(h){return null}return null};
this.getOutbrainKey=function(){var a=null,c=document.getElementsByName(outbrain_settings.customSettings.keyTagName);if(c.length>0){a=c[0].value!=null?c[0].value:c[0].content;a=encodeURIComponent(a)}else if(typeof OB_outbrainKey=="string")a=encodeURIComponent(OB_outbrainKey);return a};this.extractFeedUrl=function(){if(typeof OB_MP_feed=="string")return OB_MP_feed;var a=document.getElementsByTagName("head"),c=null;if(a&&a.length>0){a=a[0].getElementsByTagName("link");for(var e=null,g=0;g<a.length&&
c==null;++g){e=a[g];if(e.type!=null&&(e.type=="application/rss+xml"||e.type=="application/atom+xml")&&e.rel.toLowerCase()=="alternate"&&e.rel!=null&&e.href!=null&&e.href!="")c=e.href}}return c};this.callSubmitSettingsAndGetSettings=function(a,c,e){outbrain_settings.blogUtils.getBlogSettings=outbrain_settings.blogUtils.getBlogSettings.replace(/\$USER_KEY/g,a!=null?a:"");outbrain_settings.blogUtils.getBlogSettings=outbrain_settings.blogUtils.getBlogSettings.replace(/\$SOURCE_URL/g,c!=null?c:"");outbrain_settings.blogUtils.getBlogSettings=
outbrain_settings.blogUtils.getBlogSettings.replace(/\$LOCAL_URL/g,e!=null?e:"");b.registerSubmitSettings();b.loadUserCustomSettings()};this.getSetByLocalUrlMode=function(){if(typeof OB_settingsByLocalUrlMode=="number")return OB_settingsByLocalUrlMode;return 0};this.init=function(){var a=null,c=null,e=outbrain_settings.blogUtils.blogHrefLocation;if(typeof OB_isFramePage=="boolean")this.blogSettingsCB(false);else new outbrain_timeout(function(){var g=false;if(outbrain_settings.customSettings.enabled){outbrain_settings.keys_and_users.outbrainKey=
b.getOutbrainKey();if(outbrain_settings.keys_and_users.outbrainKey!=null){a=outbrain_settings.keys_and_users.outbrainKey;g=true}c=b.extractFeedUrl();if(c!=null){c=encodeURIComponent(c);g=true}if(b.getSetByLocalUrlMode()==2)e="";if(b.getSetByLocalUrlMode()==1&&e.length>0)g=true}return g},function(){b.callSubmitSettingsAndGetSettings(a,c,e)},null,function(){e.length>0&&(b.getSetByLocalUrlMode()==0||b.getSetByLocalUrlMode()==1)?b.callSubmitSettingsAndGetSettings("","",e):b.waitToOdbLifeSign()},500,10,
true,function(){return b.pageLoaded==true})};this.init()},outbrain_timeout=function(b,a,c,e,g,h,d,f){var j=this,k=0;this.start=function(){k++;if(b(k))a(k);else if(typeof f=="function"&&f(k)||k==h&&h!=1E3)typeof e=="function"&&e(k);else{typeof c=="function"&&c(k);d?setTimeout(function(){j.start()},g):setTimeout(function(){j.start()},k*g)}};this.start()},outbrain_odb_life_object=typeof outbrain_odb_life_object=="function"?outbrain_odb_life_object:function(b,a,c){this.STAT_OK=1;this.STAT_NO_LOAD_EVENT=
2;this.STAT_TIME_ELAPSED=3;this.odbLife=false;this.frameSrc=a;this.frameId=c;this.timeDiff=this.finishTime=this.startTime=null;this.maxOkTimeDiff=b;this.noResponseTimeout=this.responseTimeout=null;this.staticMode=typeof OB_odb_static_mode=="boolean"?OB_odb_static_mode:false;var e=this;this.init=function(){if(typeof OB_disable_odbl=="boolean"&&OB_disable_odbl==true||typeof OB_disable_odbl_ie6=="boolean"&&OB_disable_odbl_ie6==true&&(outbrain_browsers.ie5||outbrain_browsers.ie55||outbrain_browsers.ie6))this.odbLife=
true;else{this.addRandomNumber();this.insert("<iframe id="+this.frameId+" frameBorder='0' name='odbFrame' style='width:0px;height:0px;display:none;'></iframe>");e.staticMode||this.start()}};this.addRandomNumber=function(){var g=this.frameSrc.indexOf("?"),h="random="+Math.random();this.frameSrc+=g>-1?"&"+h:"?"+h};this.getIframeElement=function(){return document.getElementById(this.frameId)};this.insert=function(g){if(typeof outbrain_dom=="object"&&typeof outbrain_dom.documentWrite=="function")outbrain_dom.documentWrite(g);
else typeof OB_isLateStarter=="boolean"&&OB_isLateStarter==true||document.write(g)};this.redirect=function(g){if(e.getIframeElement()){this.startTime=new Date;window.frames.odbFrame.location.replace(g)}};this.start=function(){var g=e.getIframeElement();if(g){if(document.addEventListener)g.addEventListener("load",function(){e.frameReady()},false);else if(document.attachEvent)g.attachEvent("onload",function(){e.frameReady()});else if(document.getElementById)g.onload=function(){e.frameReady()};e.redirect(e.frameSrc);
this.noResponseTimeout=setTimeout(function(){e.noResponseAfterMaxTime()},e.maxOkTimeDiff*1E3)}else this.responseTimeout=setTimeout(e.start,1E3)};this.frameReady=function(){this.finishTime=new Date;clearTimeout(this.noResponseTimeout);this.getTimeDiff();this.odbLife=true};this.noResponseAfterMaxTime=function(){clearTimeout(this.responseTimeout);this.removeFrame()};this.getTimeDiff=function(){this.timeDiff=(this.finishTime.getTime()-this.startTime.getTime())/1E3};this.removeFrame=function(){var g=this.getIframeElement();
if(g){window.frames.odbFrame.location.replace("about:blank");g.parentNode.removeChild(g)}};this.getStatus=function(){var g=this.STAT_OK;if(!e.staticMode)if(this.odbLife){if(this.timeDiff>this.maxOkTimeDiff)g=this.STAT_TIME_ELAPSED}else g=this.STAT_NO_LOAD_EVENT;return g};this.init()},outbrain_PositionCalc=function(){this.bottomThreshold=this.topThreshold=0;this.isSerial=false;this.vpHeight=this.topY=0;this.setSerialMode=function(b){this.isSerial=b};this.reCalc=function(){this.topY=this.getTopY();
this.vpHeight=this.getViewportHeight()};this.getTopY=function(){var b;try{if(typeof window.pageYOffset!="undefined")b=window.pageYOffset;b=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop}catch(a){return outbrain_settings.odb.ERRED}return b};this.getElementY=function(b){var a=0;try{if(typeof b=="undefined")return outbrain_settings.odb.ERRED;if(b.offsetParent)for(;;){a+=b.offsetTop;if(typeof b.offsetParent==null)return outbrain_settings.odb.ERRED;if(!b.offsetParent)break;
b=b.offsetParent}else if(b.y)a+=b.y}catch(c){return outbrain_settings.odb.ERRED}return a};this.getViewportHeight=function(){try{viewportheight=typeof window.innerWidth!="undefined"?window.innerHeight:typeof document.documentElement!="undefined"&&typeof document.documentElement.clientHeight!="undefined"&&document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.getElementsByTagName("body")[0].clientHeight}catch(b){return outbrain_settings.odb.ERRED}return viewportheight};
this.checkIfElementInViewPort=function(b){if(b==null)return outbrain_settings.odb.OUTSIDEFOLD;b=this.getElementY(b);var a=this.topY,c=this.vpHeight,e=parseInt(c+a);return b==outbrain_settings.odb.ERRED||a==outbrain_settings.odb.ERRED||c==outbrain_settings.odb.ERRED?outbrain_settings.odb.ERRED:e>=b&&(a<b||this.isSerial)?outbrain_settings.odb.INSIDEFOLD:parseInt(e+this.bottomThreshold)>=b&&(a-this.topThreshold<b||this.isSerial)?outbrain_settings.odb.NEARFOLD:outbrain_settings.odb.OUTSIDEFOLD}},outbrain_dom_object=
typeof outbrain_dom_object=="function"?outbrain_dom_object:function(){this.$=function(b){return document.getElementById(b)};this.elementInsertion=function(b,a,c,e){if(typeof a=="string"){var g=document.createElement("div");g.innerHTML=a;a=g}a=c==true?e?this.insertBefore(a,b.firstChild):this.insertBefore(a,b):e?this.insertInside(a,b):this.insertAfter(a,b);return[a,b]};this.insertBefore=function(b,a){return a.parentNode.insertBefore(b,a)};this.insertInside=function(b,a){return a.appendChild(b)};this.extractFooter=
function(b,a){var c=null;if(typeof b=="undefined")return null;b=b.getElementsByTagName("DIV");for(var e=0;e<b.length;e++){var g=b[e];if(g.className==a)c=g}return c};this.uncleFinder=function(b){try{for(b=b.parentNode;typeof b!=null;){if(typeof b.nextSibling!=null)return true;b=b.parentNode}return false}catch(a){return false}};this.insertAfter=function(b,a){var c=null,e=outbrain_rater.pmd;if(outbrain_settings.platformType==outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR&&outbrain_browsers.ie==true){if(e.postFooterDivClassname!=
null)for(var g=0;g<e.postFooterDivClassname.length;g++)if(this.extractFooter(a.parentNode,e.postFooterDivClassname[g])!=null||this.uncleFinder(a)){try{c=a.parentNode.insertBefore(b,a.nextSibling)}catch(h){try{c=a.nextSibling.parentNode.insertBefore(b,a.nextSibling)}catch(d){c=null}}break}}else c=a.parentNode.insertBefore(b,a.nextSibling);return c};this.setInnerHTML=function(b,a){try{b.innerHTML=a}catch(c){var e=b.cloneNode(false);e.innerHTML=a;b.parentNode.replaceChild(e,b)}};this.extractFeedUrl=
function(){if(typeof OB_MP_feed=="string")return OB_MP_feed;var b=document.getElementsByTagName("head"),a=null;if(b&&b.length>0){b=b[0].getElementsByTagName("link");for(var c=null,e=0;e<b.length&&a==null;++e){c=b[e];if(c.type!=null&&(c.type=="application/rss+xml"||c.type=="application/atom+xml")&&c.href!=null&&c.href!="")a=c.href}}return a};this.insertElementToHead=function(b){var a=document.getElementsByTagName("head");if(a&&a.length>0){a[0].insertBefore(b,a[0].firstChild);return true}return false};
this.insertScriptToHead=function(b,a){if(this.insertElementToHead(this.getScriptElement(b,a)))return true;return false};this.getScriptElement=function(b,a){var c=document.createElement("script");typeof a!="string"&&c.setAttribute("id",a);c.setAttribute("type",outbrain_settings.globals.scriptType);c.setAttribute("src",b);return c};this.getElementsByAttribute=function(b,a,c,e){c=c||"*";e=!!e;var g=[];c=document.getElementsByTagName(c);for(var h=0;h<c.length;h++){var d=b==="class"?c[h].className:c[h].getAttribute(b);
(e?d.indexOf(a)>-1:d===a)&&g.push(c[h])}return g};this.getFirstClassByName=function(b){b=this.getElementsByAttribute("class",b,null,false);return b.length>0?b[0]:null};this.documentWriteScript=function(b,a){if(typeof OB_isLateStarter=="boolean"&&OB_isLateStarter==true)if(typeof OB_containerClass=="string"){var c=this.getFirstClassByName(OB_containerClass);c&&this.insertBefore(this.getScriptElement(b,a),c)}else this.insertScriptToHead(b,a);else document.write(b)};this.strToElement=function(b){try{var a=
document.createElement("span");a.innerHTML=b;return a.firstChild}catch(c){return null}};this.documentWrite=function(b){if(typeof OB_isLateStarter=="boolean"&&OB_isLateStarter==true)if(typeof OB_containerClass=="string"){var a=this.getFirstClassByName(OB_containerClass);if(a!=null)(b=this.strToElement(b))&&this.insertBefore(b,a)}else(b=this.strToElement(b))&&this.insertElementToHead(b);else document.write(b)}},OB_lang_object=function(){this.isInit=false;this.id="EN";this.name="LANGUAGE_NAME";this.RATE_DESCRIPTION=
["BAD_STR","BORING_STR","OK_STR","GOOD_STR","EXCELLENT_STR"];this.RATE_POST_RATE=["YOU_HATED_STRING","DIDNT_LIKE_STRING","WAS_OK_STRING","LIKED_STRING","LOVE_STRING"];this.RATE_POST_RATE_FOR_RECOMMENDATIONS=["OUR_READERS_ALSO_LIKE:","YOU_HATED_THIS_POST_({starsImage}),_YOU_MIGHT_LIKE:","YOU_DIDN'T_LIKE_THIS_POST_({starsImage}),_YOU_MIGHT_LIKE:","YOU_THOUGHT_THIS_WAS_OK_({starsImage}),_YOU_MIGHT_LIKE:","YOU_LIKED_THIS_POST_({starsImage}),_YOU_MIGHT_ALSO_LIKE:","YOU_LOVED_THIS_POST_({starsImage}),_YOU_MIGHT_ALSO_LIKE:"];
this.THANKS_STR="THANKS....";this.BE_THE_FIRST_STR="BE_THE_FIRST_TO_RATE_THIS";this.UNABLE_TO_SUBMIT_STR="UNABLE_TO_SUBMIT_YOUR_RATE_PLEASE_CHECK_YOUR_INTERNET_CONNECTION.";this.RATED_X_BY_Y_PEOPLE="RATED_{X.xx}_BY_{Y}_PEOPLE";this.RATED_X_BY_1_PERSON="RATED_{X.xx}_BY_1_PERSON";this.AVERAGE_RATING_X_BY_Y_PEOPLE="AVERAGE_RATING_X.xx_BY_Y_PEOPLE";this.RATED_X_BY_YOU="RATED_{X.xx}_BY_Y0U";this.RATED_X_BY_YOU_AND_1_OTHER="RATED_{X.xx}_BY_Y0U_AND_1_OTHER";this.RATED_X_BY_YOU_AND_Y_OTHERS="RATED_{X.xx}_BY_Y0U_AND_{Y}_OTHERS";
this.BY="BY";this.WHATS_THIS="WHATS_THIS";this.THIS_SITE="THIS_SITE";this.MOST_POPULAR="Most_Popular_Posts";this.MIGHT_ALSO_LIKE="You might also like";this.MORE_RECOMMENDED_SINGLE="MORE_RECOMMENDED_SINGLE";this.MORE_RECOMMENDED_PLURAL="MORE_RECOMMENDED_POSTS";this.MORE_RECOMMENDED_CLOSE_SINGLE="HIDE_MORE_RECOMMENDED_POST";this.MORE_RECOMMENDED_CLOSE_PLURAL="HIDE_MORE_RECOMMENDED_POSTS";this.PI_LEGEND_TITLE=this.PC_LEGEND_TITLE="Selected for you by our sponsor";this.COMMENT="COMMENT";this.IS_RTL=false;
this.THUMBS_SUPPORT=new function(){this.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS=["You might be interested in:","You recommended this post. You might be interested in:"];this.THUMBS_THANKS_STR="Thanks....";this.THUMBS_RECOMMEND_THIS="Recommend this?";this.THUMBS_RATED_X_BY_Y_PEOPLE="Recommended by {Y} people";this.THUMBS_RATED_X_BY_1_PERSON="Recommended by 1 person";this.THUMBS_AVG_RATE_X_BY_Y_PEOPLE="Recommended by {Y} people";this.THUMBS_RATED_X_BY_YOU="<b>Recommended by you</b>";this.THUMBS_RATED_X_BY_YOU_AND_1_OTHER=
"<b>Recommended by you</b> and 1 other";this.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS="<b>Recommended by you</b> and {Y} others";this.THUMBS_CANCEL_RECOMMENDATION="Cancel Recommendation";this.THUMBS_AFTER_CANCEL="You do not recommend this post";this.THUMBS_COMMENT="comment"};this.OPTIONAL_ADDONS=new function(){this.thumbs=this.pc=this.disqus=this.recommendations=this.mostPopular=false};this.initLang=function(b){var a;this.id=typeof b.id!="undefined"&&b.id!=null?b.id:"en";this.name=typeof b.name!="undefined"&&
b.name!=null?b.name:"en";for(a=0;a<this.RATE_DESCRIPTION.length;a++)if(b.RATE_DESCRIPTION[a]!=null)this.RATE_DESCRIPTION[a]=b.RATE_DESCRIPTION[a];for(a=0;a<this.RATE_POST_RATE.length;a++)if(b.RATE_POST_RATE[a]!=null)this.RATE_POST_RATE[a]=b.RATE_POST_RATE[a];if(typeof b.RATE_POST_RATE_FOR_RECOMMENDATIONS!="undefined")for(a=0;a<this.RATE_POST_RATE_FOR_RECOMMENDATIONS.length;a++)if(b.RATE_POST_RATE_FOR_RECOMMENDATIONS[a]!=null)this.RATE_POST_RATE_FOR_RECOMMENDATIONS[a]=b.RATE_POST_RATE_FOR_RECOMMENDATIONS[a];
if(typeof b.THANKS_STR!="undefined"&&b.THANKS_STR!=null)this.THANKS_STR=b.THANKS_STR;if(typeof b.MIGHT_ALSO_LIKE!="undefined"&&b.MIGHT_ALSO_LIKE!=null)this.MIGHT_ALSO_LIKE=b.MIGHT_ALSO_LIKE;if(typeof b.MORE_RECOMMENDED_SINGLE!="undefined"&&b.MORE_RECOMMENDED_SINGLE!=null)this.MORE_RECOMMENDED_SINGLE=b.MORE_RECOMMENDED_SINGLE;if(typeof b.MORE_RECOMMENDED_PLURAL!="undefined"&&b.MORE_RECOMMENDED_PLURAL!=null)this.MORE_RECOMMENDED_PLURAL=b.MORE_RECOMMENDED_PLURAL;if(typeof b.MORE_RECOMMENDED_CLOSE_SINGLE!=
"undefined"&&b.MORE_RECOMMENDED_CLOSE_SINGLE!=null)this.MORE_RECOMMENDED_CLOSE_SINGLE=b.MORE_RECOMMENDED_CLOSE_SINGLE;if(typeof b.MORE_RECOMMENDED_CLOSE_PLURAL!="undefined"&&b.MORE_RECOMMENDED_CLOSE_PLURAL!=null)this.MORE_RECOMMENDED_CLOSE_PLURAL=b.MORE_RECOMMENDED_CLOSE_PLURAL;if(typeof b.PC_LEGEND_TITLE!="undefined"&&b.PC_LEGEND_TITLE!=null)this.PC_LEGEND_TITLE=b.PC_LEGEND_TITLE;if(typeof b.PI_LEGEND_TITLE!="undefined"&&b.PI_LEGEND_TITLE!=null)this.PI_LEGEND_TITLE=b.PI_LEGEND_TITLE;if(typeof b.BE_THE_FIRST_STR!=
"undefined"&&b.BE_THE_FIRST_STR!=null)this.BE_THE_FIRST_STR=b.BE_THE_FIRST_STR;if(typeof b.UNABLE_TO_SUBMIT_STR!="undefined"&&b.UNABLE_TO_SUBMIT_STR!=null)this.UNABLE_TO_SUBMIT_STR=b.UNABLE_TO_SUBMIT_STR;if(typeof b.HOW!="undefined"&&b.HOW!=null)this.HOW=b.HOW;if(typeof b.WHATS_THIS!="undefined"&&b.WHATS_THIS!=null)this.WHATS_THIS=b.WHATS_THIS;if(typeof b.BY!="undefined"&&b.BY!=null)this.BY=b.BY;if(typeof b.THIS_SITE!="undefined"&&b.THIS_SITE!=null)this.THIS_SITE=b.THIS_SITE;if(typeof b.MOST_POPULAR!=
"undefined"&&b.MOST_POPULAR!=null)this.MOST_POPULAR=b.MOST_POPULAR;if(typeof b.AVERAGE_RATING_X_BY_Y_PEOPLE!="undefined"&&b.AVERAGE_RATING_X_BY_Y_PEOPLE!=null&&b.AVERAGE_RATING_X_BY_Y_PEOPLE.indexOf("{X.xx}")>-1)this.AVERAGE_RATING_X_BY_Y_PEOPLE=b.AVERAGE_RATING_X_BY_Y_PEOPLE;if(typeof b.RATED_X_BY_1_PERSON!="undefined"&&b.RATED_X_BY_1_PERSON!=null&&b.RATED_X_BY_1_PERSON.indexOf("{X.xx}")>-1)this.RATED_X_BY_1_PERSON=b.RATED_X_BY_1_PERSON;else if(typeof b.RATED_X_BY_1_PERSON!="undefined"&&b.RATED_X_BY_1_PERSON!=
null&&b.RATED_X_BY_1_PERSON.indexOf("X.xx")>-1)this.RATED_X_BY_1_PERSON=b.RATED_X_BY_1_PERSON;if(typeof b.RATED_X_BY_Y_PEOPLE!="undefined"&&b.RATED_X_BY_Y_PEOPLE!=null&&b.RATED_X_BY_Y_PEOPLE.indexOf("{X.xx}")>-1)this.RATED_X_BY_Y_PEOPLE=b.RATED_X_BY_Y_PEOPLE;if(typeof b.RATED_X_BY_YOU_AND_1_OTHER!="undefined"&&b.RATED_X_BY_YOU_AND_1_OTHER!=null&&b.RATED_X_BY_YOU_AND_1_OTHER.indexOf("{X.xx}")>-1)this.RATED_X_BY_YOU_AND_1_OTHER=b.RATED_X_BY_YOU_AND_1_OTHER;else if(typeof b.RATED_X_BY_YOU_AND_1_OTHER!=
"undefined"&&b.RATED_X_BY_YOU_AND_1_OTHER!=null&&b.RATED_X_BY_YOU_AND_1_OTHER.indexOf("{X.xx}")>-1)this.RATED_X_BY_YOU_AND_1_OTHER=b.RATED_X_BY_YOU_AND_1_OTHER;if(typeof b.RATED_X_BY_YOU_AND_Y_OTHERS!="undefined"&&b.RATED_X_BY_YOU_AND_Y_OTHERS!=null&&b.RATED_X_BY_YOU_AND_Y_OTHERS.indexOf("{X.xx}")>-1)this.RATED_X_BY_YOU_AND_Y_OTHERS=b.RATED_X_BY_YOU_AND_Y_OTHERS;if(typeof b.RATED_X_BY_YOU!="undefined"&&b.RATED_X_BY_YOU!=null&&b.RATED_X_BY_YOU.indexOf("{X.xx}"))this.RATED_X_BY_YOU=b.RATED_X_BY_YOU;
else if(typeof b.RATED_X_BY_YOU!="undefined"&&b.RATED_X_BY_YOU!=null&&b.RATED_X_BY_YOU.indexOf("X.xx"))this.RATED_X_BY_YOU=b.RATED_X_BY_YOU;if(typeof b.USERS_LIKE_YOU!="undefined"&&b.USERS_LIKE_YOU!=null)this.USERS_LIKE_YOU=b.USERS_LIKE_YOU;if(typeof b.COMMENT!="undefined")this.COMMENT=b.COMMENT;if(typeof b.IS_RTL=="boolean")this.IS_RTL=b.IS_RTL;if(typeof b.THUMBS_SUPPORT!="undefined"){if(typeof b.THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS!="undefined")for(a=0;a<this.THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS.length;a++)if(b.THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS[a]!=
null)this.THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS[a]=b.THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS[a];if(typeof b.THUMBS_SUPPORT.THUMBS_THANKS_STR!="undefined"&&b.THUMBS_SUPPORT.THUMBS_THANKS_STR!=null)this.THUMBS_SUPPORT.THUMBS_THANKS_STR=b.THUMBS_SUPPORT.THUMBS_THANKS_STR;if(typeof b.THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS!="undefined"&&b.THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS!=null)this.THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS=b.THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS;if(typeof b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_Y_PEOPLE!=
"undefined"&&b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_Y_PEOPLE!=null)this.THUMBS_SUPPORT.THUMBS_RATED_X_BY_Y_PEOPLE=b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_Y_PEOPLE;if(typeof b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_1_PERSON!="undefined"&&b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_1_PERSON!=null)this.THUMBS_SUPPORT.THUMBS_RATED_X_BY_1_PERSON=b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_1_PERSON;if(typeof b.THUMBS_SUPPORT.THUMBS_AVG_RATE_X_BY_Y_PEOPLE!="undefined"&&b.THUMBS_SUPPORT.THUMBS_AVG_RATE_X_BY_Y_PEOPLE!=null)this.THUMBS_SUPPORT.THUMBS_AVG_RATE_X_BY_Y_PEOPLE=
b.THUMBS_SUPPORT.THUMBS_AVG_RATE_X_BY_Y_PEOPLE;if(typeof b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU!="undefined"&&b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU!=null)this.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU=b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU;if(typeof b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_1_OTHER!="undefined"&&b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_1_OTHER!=null)this.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_1_OTHER=b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_1_OTHER;if(typeof b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS!=
"undefined"&&b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS!=null)this.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS=b.THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS;if(typeof b.THUMBS_SUPPORT.THUMBS_CANCEL_RECOMMENDATION!="undefined"&&b.THUMBS_SUPPORT.THUMBS_CANCEL_RECOMMENDATION!=null)this.THUMBS_SUPPORT.THUMBS_CANCEL_RECOMMENDATION=b.THUMBS_SUPPORT.THUMBS_CANCEL_RECOMMENDATION;if(typeof b.THUMBS_SUPPORT.THUMBS_AFTER_CANCEL!="undefined"&&b.THUMBS_SUPPORT.THUMBS_AFTER_CANCEL!=null)this.THUMBS_SUPPORT.THUMBS_AFTER_CANCEL=
b.THUMBS_SUPPORT.THUMBS_AFTER_CANCEL;if(typeof b.THUMBS_SUPPORT.THUMBS_COMMENT!="undefined"&&b.THUMBS_SUPPORT.THUMBS_COMMENT!=null)this.THUMBS_SUPPORT.THUMBS_COMMENT=b.THUMBS_SUPPORT.THUMBS_COMMENT}if(typeof b.OPTIONAL_ADDONS!="undefined"){if(typeof b.OPTIONAL_ADDONS.mostPopular=="boolean")this.OPTIONAL_ADDONS.mostPopular=b.OPTIONAL_ADDONS.mostPopular;if(typeof b.OPTIONAL_ADDONS.recommendations=="boolean")this.OPTIONAL_ADDONS.recommendations=b.OPTIONAL_ADDONS.recommendations;if(typeof b.OPTIONAL_ADDONS.disqus==
"boolean")this.OPTIONAL_ADDONS.disqus=b.OPTIONAL_ADDONS.disqus;if(typeof b.OPTIONAL_ADDONS.pc=="boolean")this.OPTIONAL_ADDONS.pc=b.OPTIONAL_ADDONS.pc;if(typeof b.OPTIONAL_ADDONS.thumbs=="boolean")this.OPTIONAL_ADDONS.thumbs=b.OPTIONAL_ADDONS.thumbs}this.isInit=true}},outbrain_language_manager_object=function(){this.languages_list=[];this.addLanguage=function(b,a){if(typeof this.languages_list[b]=="object")return this.languages_list[b];else{a=a;var c=outbrain_settings.language.id;if(a.indexOf(outbrain_settings.domains.js)>
-1)a=a.replace(/.js/g,"-"+outbrain_settings.versions.language+".js");var e=document.createElement("script");e.setAttribute("id",c+"_"+b);e.setAttribute("type",outbrain_settings.globals.scriptType);e.setAttribute("src",a);e.setAttribute("charset","utf-8");b=document.getElementsByTagName("head");b.length>0?b[0].appendChild(e):outbrain_dom.documentWrite('<script id="'+c+'" src="'+a+'" type="'+outbrain_settings.globals.scriptType+'" charset="utf-8"><\/script>')}};this.initLang=function(b){b.id=outbrain_settings.language.defaultLangName;
this.languages_list[b.id]=new OB_lang_object;this.languages_list[b.id].initLang(b)};this.isLanguageReady=function(b){return this.isInit(b)};this.isInit=function(b){return typeof this.languages_list[b]!="undefined"&&typeof this.languages_list[b].isInit!="undefined"&&this.languages_list[b].isInit};this.getName=function(b){return this.languages_list[b].name};this.isRtl=function(b){return this.languages_list[b].IS_RTL};this.changeX=function(b,a){a=Math.round(a*100)/100;a=a+"";a=a=a.length==1?a+".0":a;
if(b==null)return a;else{var c="";c=b;c=c.replace(/{X.xx}/g,'<span class="outbrain-bold" style="font-weight:bold;">'+a+"</span>");return c=c.replace(/X.xx/g,'<span class="outbrain-bold" style="font-weight:bold;">'+a+"</span>")}};this.changeY=function(b,a){var c="";c=b;b=a+"";b=b.length>3?b.substring(0,b.length-3)+","+b.substring(b.length-3,b.length):b;return c=c.indexOf("{Y}")>-1?c.replace(/{Y}/g,b):c.replace(/ Y /g," "+b+" ")};this.rateGetAverageStr=function(b,a,c){var e="";e=this.changeX(this.languages_list[b].AVERAGE_RATING_X_BY_Y_PEOPLE,
a);e=this.changeY(e,c);return e="("+e+")"};this.rateGetLikeYou=function(b,a,c){var e="";e=this.changeX(b,a);return e=this.changeY(e," "+c+" ")};this.rateGetAggregate=function(b,a,c,e){var g="";if(e)if(c==1)g=this.changeX(this.languages_list[b].RATED_X_BY_YOU,a);else if(c==2)g=this.changeX(this.languages_list[b].RATED_X_BY_YOU_AND_1_OTHER,a);else{c--;g=this.changeX(this.languages_list[b].RATED_X_BY_YOU_AND_Y_OTHERS,a);g=this.changeY(g,c)}else if(c==1)g=this.changeX(this.languages_list[b].RATED_X_BY_1_PERSON,
a);else{g=this.changeX(this.languages_list[b].RATED_X_BY_Y_PEOPLE,a);g=this.changeY(g,c)}return g};this.getRateDescription=function(b,a){return this.languages_list[b].RATE_DESCRIPTION[a]};this.getRatePostRate=function(b,a){return this.languages_list[b].RATE_POST_RATE[a]};this.getRatePostRateForRecommendations=function(b,a){return this.languages_list[b].RATE_POST_RATE_FOR_RECOMMENDATIONS[a]};this.getYouMightAlsoLike=function(b){return this.getRatePostRateForRecommendations(b,0)};this.getThanksString=
function(b){return this.languages_list[b].THANKS_STR};this.getBeTheFirstString=function(b){return this.languages_list[b].BE_THE_FIRST_STR};this.getUnableToSubmitString=function(b){return this.languages_list[b].UNABLE_TO_SUBMIT_STR};this.getByString=function(b){return this.languages_list[b].BY};this.getThisSiteString=function(b){return this.languages_list[b].THIS_SITE};this.whatsThis=function(b){return this.languages_list[b].WHATS_THIS};this.getMoreRecommendedLinkText=function(b,a){var c="";c=(a==
1?this.languages_list[b].MORE_RECOMMENDED_SINGLE:this.languages_list[b].MORE_RECOMMENDED_PLURAL)+" &raquo;";return c=c.replace(/{N}/g,a)};this.getPcLegendText=function(b,a){b=this.languages_list[b].PC_LEGEND_TITLE;if(a!=null&&typeof a=="string"&&a.length>0)b=b.replace(/{PC}/g,a);return b};this.getPiLegendText=function(b,a){b=this.languages_list[b].PI_LEGEND_TITLE;if(a!=null&&typeof a=="string"&&a.length>0)b=b.replace(/{PC}/g,a);return b};this.getMoreRecommendedCloseLinkTest=function(b,a){var c="";
c="&laquo; "+(a==1?this.languages_list[b].MORE_RECOMMENDED_CLOSE_SINGLE:this.languages_list[b].MORE_RECOMMENDED_CLOSE_PLURAL);return c=c.replace(/{N}/g,a)};this.GetMostPopular=function(b){return this.languages_list[b].MOST_POPULAR};this.isMostPopularAvailable=function(b){return this.languages_list[b].OPTIONAL_ADDONS.mostPopular};this.isRecommendationsAvailable=function(b){return this.languages_list[b].OPTIONAL_ADDONS.recommendations};this.rateThumbsGetAggregate=function(b,a,c,e){a="";if(e)if(c==1)a=
this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU;else if(c==2)a=this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_1_OTHER;else{c--;a=this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATED_X_BY_YOU_AND_Y_OTHERS;a=this.changeY(a,c)}else if(c==1)a=this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATED_X_BY_1_PERSON;else{a=this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATED_X_BY_Y_PEOPLE;a=this.changeY(a,c)}return a};this.getThumbsRatePostRateForRecommendations=function(b,a){return this.languages_list[b].THUMBS_SUPPORT.THUMBS_RATE_POST_RATE_FOR_RECOMMENDATIONS[a]};
this.getThumbsThanksString=function(b){return this.languages_list[b].THUMBS_SUPPORT.THUMBS_THANKS_STR};this.getThumbsRecommendThisString=function(b,a){var c="";return c=a!=null&&typeof a!="undefined"&&a.length>0?a.replace("${TEXT}",this.languages_list[b].THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS):this.languages_list[b].THUMBS_SUPPORT.THUMBS_RECOMMEND_THIS}},OB_lang=typeof OB_lang=="object"?OB_lang:new (function(){this.initLang=function(b){outbrain_language_manager.initLang(b)}}),outbrain_template_object=
typeof outbrain_template_object=="function"?outbrain_template_object:function(b,a,c,e,g){var h=this;this.templateIndex=b;this.templateHaveImages=this.templateHaveOdbAndLang=this.templateReplacedOnce=this.templateDOMInit=this.templateArrayInit=false;this.languageName=outbrain_settings.language.defaultLangName;this.dom=new outbrain_dom_object;this.all_optional_elements=outbrain_settings.templateOptions;this.all_user_elements=[];this.matrixInfo=new outbrain_matrix_info;g!=null&&g!="undefined"&&this.matrixInfo.init(g);
this.elements=outbrain_settings.templateItemsJoin+e.split(outbrain_settings.templateItemsSplit).join(outbrain_settings.templateItemsJoin)+outbrain_settings.templateItemsJoin;this.top=a.indexOf("top")==0;this.position=a;this.inside=c==true||c=="true";this.constants=this.templateDOM=null;this.smallImageSufix="png";this.rateYarray=new Array(0,this.matrixInfo.matrixYHeight,0);this.lastRate=-1;this.positionsStars=0;this.positionFirstLine=1;this.positionSecondLine=2;this.positionRec=3;this.positionNoRec=
4;this.positionDynSecondLine=5;this.matrixImage=null;this.isMatrixReady=false;this.mouseOutTimer=null;this.isPcHidden=false;this.pluginsArray=[];this.closeInTooltip="<div class=outbrain_tooltip_close><img alt='Close' width='13' height='13' src='"+outbrain_settings.domains.js+"spacer.gif' onclick='javascript:UnTip()'/></div>";this.txtInTooltip="<span class=\"outbrain-tooltip-content\"><b>Paid Distribution</b><br><br>An Outbrain customer paid to distribute this content.  We do our best to ensure that all of the links recommended to you lead to interesting content. If you'd like to submit articles yourself for distribution, visit <a href='http://outbrain.com/outloud' target='_blank'>outbrain.com/outloud</a>. We welcome your feedback at <a href='mailto:feedback@outbrain.com'>feedback@outbrain.com</a></span>";
this.showBalloon=true;this.waitImageUrl=outbrain_settings.domains.js+"/spinner-gray.gif";this.waitBackgroundClass="outbrain_waiting_background";this.cancelRecommendationId="CancelRecommendation";this.isOwnerNotLoading=true;this.recommendationLocationStr=' <span class="rec-src-link">($SOURCE_NAME)</span>';this.createInfoIcon=function(d,f,j,k,l,m,n){var o="background-image:url("+outbrain_settings.domains.js+"outbrain_info."+(h.fixPngOnThisBrowser()?"gif":"png")+")";l=l?' onClick="javascript:'+this.callForToolTip("this")+
'"':"";return"<img border='0' "+(n!=null&&!n.isNaN?'id="outbrain_toolTip_img_'+n+'"':"")+" src='"+outbrain_settings.domains.js+"spacer.gif' width='"+d+"' height='"+f+"' class='"+j+"' "+(m?" onmouseout=\"this.className='"+j+"'\" onmouseover=\"this.className='"+k+"'\"":"")+" "+l+" style='"+o+"'>"};this.addPlugin=function(d){for(var f=0;f<h.pluginsArray.length;++f)if(h.pluginsArray[f].ID==d.ID)return;h.pluginsArray[h.pluginsArray.length]=d;h.pluginsArray[h.pluginsArray.length-1].init()};this.getPlugin=
function(d){for(var f=0;f<h.pluginsArray.length;++f)if(h.pluginsArray[f].ID==d)return h.pluginsArray[f];return null};this.getElementWithFullName=function(d,f){return this.dom.$(d+"_"+f+"_"+this.position)};this.fixPngOnThisBrowser=function(){return outbrain_browsers.ie5||outbrain_browsers.ie55||outbrain_browsers.ie6};this.isSomeSecondLine=function(){return this.all_user_elements[this.positionSecondLine]||this.all_user_elements[this.positionRec]};this.isDynSecondLine=function(){return this.all_user_elements[this.positionDynSecondLine]};
this.getStarXPosition=function(d){d=d.rankInfo.vote!=0?d.rankInfo.getComputedRank(true):d.rankInfo.getComputedRank();d=(Math.round(d*2)-1)*this.matrixInfo.matrixXlength;return d>0?d:0};this.fixPng=function(d,f,j){if(d=this.getElementWithFullName(this.constants.ratesDivId,d)){var k=outbrain_language_manager.isLanguageReady(h.languageName)&&outbrain_language_manager.isRtl(h.languageName)?h.matrixInfo.matrixSourceRTL:h.matrixInfo.matrixSource;d.style.left=f+"px";d.style.top=j+"px";d.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+
k+'",sizingMethod="crop")'}};this.changeMatrixByXY=function(d,f,j){var k=this.getElementWithFullName(this.constants.ratesDivId,d),l=false;if(k)if(this.fixPngOnThisBrowser())l=this.fixPng(d,f*-1,j*-1);else{k.style.backgroundPosition=outbrain_browsers.ie?"-"+f+"px -"+j+"px":(f==0?"left ":"-"+f+"px ")+(j==0?"top":"-"+j+"px");l=true}return l};this.changeMatrix=function(d,f,j){if(f.rankInfo==null)return false;if(outbrain_rater.lockRater(d))return false;j=j!=null?j:f.rateMode;var k=0;switch(j){case outbrain_settings.rater.statuses.RATER_RATE_MODE:k=
(f.currentRateValue-1)*this.matrixInfo.matrixXlength;break;case outbrain_settings.rater.statuses.RATER_PRE_RATE_MODE:k=this.getStarXPosition(f);break;case outbrain_settings.rater.statuses.RATER_POST_RATE_MODE:k=this.getStarXPosition(f);break}k<0||this.changeMatrixByXY(d,k,this.rateYarray[j])};this.toggleMoreRecommendations=function(d){var f=this.getElementWithFullName(this.constants.recommendationsMoreDivId,d).getElementsByTagName("a")[0],j=this.getElementWithFullName(this.constants.recommendationsUlId,
d),k=j.getElementsByTagName("li"),l=outbrain_settings.rater.recommendations.defaultRecNumber,m=k.length;if(typeof j.opened=="boolean"&&j.opened){for(var n=l;n<m;n++)k[n].style.display="none";j.opened=false;h.dom.setInnerHTML(f,outbrain_language_manager.getMoreRecommendedLinkText(h.languageName,m-l));this.pcVisibilty(d,"none")}else{f.onclick=function(){h.toggleMoreRecommendations(d)};for(n=l;n<m;n++)k[n].style.display="";j.opened=true;h.dom.setInnerHTML(f,outbrain_language_manager.getMoreRecommendedCloseLinkTest(h.languageName,
m-l));this.pcVisibilty(d,"block")}this.checkBottomTableWrapper(d)};this.pcVisibilty=function(d,f){var j=this.getElementWithFullName(this.constants.recommendationsPcLegendId,d);if(typeof OB_voterWidgetObjArray[d].isPcHidden=="boolean"&&OB_voterWidgetObjArray[d].isPcHidden&&j!=null)j.style.display=f=="none"?"none":"block"};this.checkBottomTableWrapper=function(d){var f=this.getElementWithFullName(this.constants.recommendationsPcLegendId,d),j=this.getElementWithFullName(this.constants.recommendationsMoreDivId,
d);d=this.getElementWithFullName(this.constants.recommStatusTableId,d);if(f!=null&&j!=null&&d!=null)d.style.display=f.style.display!="none"||j.style.display!="none"?"":"none"};this.getMyRatingImage=function(d){if(d==0||d==null)return"";var f="",j="background-image: url(";if(typeof outbrain_language_manager!="undefined"&&typeof outbrain_language_manager.languages_list[h.languageName]!="undefined"&&outbrain_language_manager.isLanguageReady(h.languageName)&&outbrain_language_manager.isRtl(h.languageName)){f=
"_rtl";j+=h.matrixInfo.matrixSourceRTL+");"}else{f="";j+=h.matrixInfo.matrixSource+");"}f=outbrain_settings.domains.js+"my_rating_"+d+f+"."+this.smallImageSufix;var k=outbrain_browsers.mozilla&&!outbrain_browsers.osMac?"sub":"middle";return this.fixPngOnThisBrowser()?'<img src="http://widgets.outbrain.com/spacer.gif" style="width:60px;height:12px;border:none;float:none;margin:0 0 0 0;padding:0 0 0 0;background:none;display:inline;vertical-align:'+k+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+
f+"', sizingMethod='scale');\" />":'<img src="http://widgets.outbrain.com/spacer.gif" style="border:none;float:none;margin:0 0 0 0;padding:0 0 0 0;display:inline;height:'+this.matrixInfo.matrixSmallStarHeight+"px;width:"+this.matrixInfo.matrixSmallStarWidth+"px;background-position: -"+this.matrixInfo.matrixSmallStarWidth*(d-1)+"px -"+this.matrixInfo.matrixSmallStarPos+"px;vertical-align:"+k+";"+j+'" />'};this.changeStarsTextToImage=function(d,f,j){if(typeof d!="string")return false;return d=f==null?
d.replace("({starsImage})",""):d.replace("{starsImage}",this.getMyRatingImage(f,j))};this.showMoreRecommendations=function(){};this.textForToolTip=function(){var d=this.closeInTooltip,f=this.txtInTooltip,j=this.createInfoIcon(16,16,"ob_bigInfo_off","ob_bigInfo_off",false,false);f=f.replace(/\$ICON/g,j);return d+f};this.callForToolTip=function(d){if(d!="this")d="'"+d+"'";var f="outbrain_template_manager.templates["+this.templateIndex+"].unTip();";f+="outbrain_template_manager.templates["+this.templateIndex+
"].tip("+d+",-7,9)";return f};this.unTip=function(){try{UnTip()}catch(d){return false}};this.tip=function(d,f,j){outbrain_rater.loadToolTip();try{var k=this.textForToolTip();new outbrain_timeout(function(){return typeof Tip=="function"},function(){Tip(k,BALLOON,true,ABOVE,true,FIX,[d,f,-7],EXCLUSIVE,true,BALLOONSTEMOFFSET,j)},null,null,1E3,20,true)}catch(l){return false}};this.createLinkOfPC=function(d,f,j){var k=this.createInfoIcon(14,14,"ob_smallInfo_off","ob_smallInfo_on",true,true,d),l="outbrain_toolTip_img_"+
d,m=this.callForToolTip(l);d="";l='<a href="javascript:void(0)" onmouseout="javascript:document.getElementById(\''+l+"').className='ob_smallInfo_off'\" onmouseover=\"javascript:document.getElementById('"+l+"').className='ob_smallInfo_on'\" onClick=\"javascript:"+m+'">';d=j!=null&&j==2&&typeof outbrain_language_manager.getPiLegendText=="function"?outbrain_language_manager.getPiLegendText(h.languageName,f):outbrain_language_manager.getPcLegendText(h.languageName,f);return d="("+l+d+"</a>&nbsp;"+k+")"};
this.createRecommendationLi=function(d,f,j,k,l,m,n,o,p,q,r){var s=outbrain_settings.rater.recommendations.displaySameSiteTitle,t=document.createElement("li");t.className=p?this.constants.recommendationAdsLiClass:this.constants.recommendationLiClass;t.style.display=r?"":"none";r=typeof outbrain_settings.rater.recommendations.selfPost=="boolean"&&outbrain_settings.rater.recommendations.selfPost==true;m="_blank";if(!p&&!outbrain_settings.rater.recommendations.openNewTab)m="_self";if(j&&s)n='<span style="font-weight:'+
(!r&&o?"normal":"bold")+';">'+outbrain_language_manager.getThisSiteString(h.languageName)+"</span>";if(j&&!p)m="_self";p=p&&this.showBalloon?this.createInfoIcon(16,16,"ob_bigInfo_off","ob_bigInfo_on",true,true)+" ":"";s="true";if(typeof q=="string"&&q.length>0&&typeof OB_user_mode=="number"&&OB_user_mode==1)s="outbrain_template_manager.templates["+h.templateIndex+"].checkWaitStatus()";r="";if(typeof OB_add_nofollow=="boolean"&&OB_add_nofollow==true)r="rel='nofollow'";k=""+p+"<a "+r+' class="rec-link" target="'+
m+'" href="'+k+'" onClick="javascript:return('+s+')">'+l+"</a>";if(!o||typeof OB_same_source_visible=="boolean"&&OB_same_source_visible==true)k+=h.buildLocationString(n,j);if(typeof q=="string"&&q.length>0&&typeof OB_user_mode=="number"&&OB_user_mode==1)k+=h.renderRecCancelation(d,f,q);t.innerHTML=k;return t};this.buildLocationString=function(d,f){var j=h.recommendationLocationStr;if(typeof OB_location_string=="string"&&OB_location_string.length>0)j=OB_location_string;if(f&&typeof OB_same_src_loction_string==
"string"&&OB_same_src_loction_string.length>0)j=OB_same_src_loction_string;return j=j.replace("$SOURCE_NAME",d)};this.renderOneRecommendation=function(d,f,j,k,l,m){var n=document.createElement("li"),o=outbrain_template_manager.getRecommendationDataPerDoc(this.templateIndex,d,j,k);j=o[0];n=o[1];var p=o[2],q=o[5],r=o[7];o=o[8];if(j==null||n==null||p==null||q==null)return false;if(f){n=h.createRecommendationLi(d,k,q,j,n,'target="_blank"',p,l,r,o,m);f.appendChild(n)}else return false};this.recommendationsLegendUpdate=
function(d,f){if(d=this.getElementWithFullName(this.constants.fieldsetId,d))if((d=d.getElementsByTagName("legend")[0])&&d.innerHTML!=f){d.className=this.constants.recommendationsLegendClass;h.dom.setInnerHTML(d,f)}};this.recommendationsShowBefore=function(d){var f=false;f=this.getElementWithFullName(this.constants.fieldsetId,d)?this.getElementWithFullName(this.constants.fieldsetId,d).style.display!="none":false;if(f==true&&typeof OB_user_mode=="number"&&OB_user_mode==1){this.removeWaitClock(d);f=
false}return f};this.enableBlogExternalElements=function(d){if(currElement=document.getElementById(this.constants.externalBlogElementId))currElement.style.display="block";if(currElement=document.getElementById(this.constants.externalBlogElementId+"_"+d))currElement.style.display="block"};this.showRecommendations=function(d,f){var j=f.recTitle,k=f.jsonObj;j=this.changeStarsTextToImage(j,f.rankInfo.vote,true);if(!this.all_user_elements[this.positionRec])return false;if(this.recommendationsShowBefore(d))this.recommendationsLegendUpdate(d,
j);else{f=this.getElementWithFullName(this.constants.recommendationsUlId,d);this.recommendationsLegendUpdate(d,j);j=outbrain_template_manager.isAllSameSource(k.response.documents);var l=k.response.documents.doc.length,m=outbrain_settings.rater.recommendations.defaultRecNumber;m=m<=l?m:l;var n=l-m,o=outbrain_template_manager.getRecommendationsPerDoc(outbrain_template_manager.DATA_REC_MIXED,k.response.documents.doc,null,null),p=f&&typeof f.opened=="boolean"&&f.opened==true;if(typeof OB_user_mode=="number"&&
OB_user_mode==1){if(p)m=l;this.clearRecommendations(d,n)}for(var q=0;q<l;q++)this.renderOneRecommendation(d,f,o[q],q,j,q<m?true:false);this.checkIfMoreRecs(d,n,p);this.showHideRecsElements(d,k);this.enableBlogExternalElements(d);this.checkBottomTableWrapper(d)}};this.checkIfMoreRecs=function(d,f,j){if(f>0&&!j){f=outbrain_language_manager.getMoreRecommendedLinkText(h.languageName,f);if(currElement=this.getElementWithFullName(this.constants.recommendationsMoreDivId,d)){h.dom.setInnerHTML(currElement,
"<a href='javascript:void(0);' onclick='outbrain_template_manager.templates["+this.templateIndex+"].toggleMoreRecommendations("+d+");'> "+f+"</a>");currElement.style.display="block"}}};this.showHideRecsElements=function(d,f){this.setAdLegend(d,f);if(currElement=this.getElementWithFullName(this.constants.rateStatusInfoTableId,d))currElement.style.display="none";if(currElement=this.getElementWithFullName(this.constants.rateStatusInfoTdId,d))currElement.style.display="none";if(currElement=this.getElementWithFullName(this.constants.fieldsetId,
d)){currElement.style.display="block";OB_voterWidgetObjArray[d].hasRecommendations=true}};this.setAdLegend=function(d,f){var j=this.getpcName(d,f.response.documents);f=this.getCampType(d,f.response.documents);if(j.length>0){pcText=this.createLinkOfPC(d,j,f);if(currElement=this.getElementWithFullName(this.constants.recommendationsPcLegendId,d)){h.dom.setInnerHTML(currElement,pcText);if(!(typeof OB_voterWidgetObjArray[d].isPcHidden=="boolean"&&OB_voterWidgetObjArray[d].isPcHidden))currElement.style.display=
"block"}}};this.getpcName=function(d,f){for(var j="",k=0;k<f.doc.length;k++)if(typeof f.doc[k].adv_name!="undefined"){j=f.doc[k].adv_name;if(k>=outbrain_settings.rater.recommendations.defaultRecNumber)OB_voterWidgetObjArray[d].isPcHidden=true}return j};this.getCampType=function(d,f){for(var j=d=0;j<f.doc.length;j++)if(typeof f.doc[j].ct!="undefined")d=f.doc[j].ct;return d};this.clearRecommendations=function(d,f){var j=this.getElementWithFullName(this.constants.recommendationsUlId,d);if(j!=null)j.innerHTML=
"";d=this.getElementWithFullName(this.constants.recommendationsMoreDivId,d);if(d!=null&&f<1)d.innerHTML=""};this.changeRateInfoSingleLine=function(d,f,j){if(f>0&&(j==outbrain_settings.rater.statuses.RATER_PRE_RATE_MODE||j==outbrain_settings.rater.statuses.RATER_POST_RATE_MODE)){j="";if(f==1)j="hated";else if(f==2)j="didn't like";else if(f==3)j="rated";else if(f==4)j="liked";else if(f==5)j="loved";typeof OB_isFramePage=="boolean"&&OB_isFramePage==true||(d+=" (you "+j+" this "+this.getMyRatingImage(f,
false)+")")}return d};this.firstLineTextReplacer=function(d,f){var j=d.rateInfo,k=d.rankInfo.vote;if(typeof f!="number")f=d.rateMode;if(!this.isSomeSecondLine()){j=j.replace(/RECOMMENDED/g,'<span class="outbrain-bold">RECOMMENDED</span>');d=j.indexOf("[");if(d>-1){var l=j.indexOf("]",d);j=j.substr(0,d-1)+j.substr(l+1,j.length)}j=this.changeRateInfoSingleLine(j,k,f)}return j};this.setFirstLineInnerHTML=function(d,f){if(d=this.getElementWithFullName(this.constants.rateInfoDivId,d)){h.dom.setInnerHTML(d,
f);return true}return false};this.updateRateInfo=function(d,f,j,k){var l=f.rateInfo,m="";if(!outbrain_rater.lockRater(d)){m=f.rankInfo==null?this.changeStarsTextToImage(f.rateStatus,null):this.changeStarsTextToImage(f.rateStatus,f.rankInfo.vote);f.rateInfo=l;l=this.firstLineTextReplacer(f,j);this.setFirstLineInnerHTML(d,l);if(k!=true){var n=this.getElementWithFullName(this.constants.voterDivName,d);if(n)if(outbrain_browsers.ie6||outbrain_browsers.ie55||outbrain_browsers.ie55)waitForCss=window.setInterval(function(){if(cssFile_Loaded){n.style.display=
"block";window.clearInterval(waitForCss)}},1);else n.style.display="block";if(this.recommendationsShowBefore(d))this.showRecommendations(d,f,j);else if(this.all_user_elements[this.positionSecondLine]){f=this.getElementWithFullName(this.constants.rateStatusInfoTdId,d);j=false;if(!f||f&&this.isDynSecondLineOff(d)){if(f)f.innerHTML=""}else j=outbrain_rater.lastOdbRotationReturnedItem<d?true:this.all_user_elements[this.positionRec]?typeof OB_voterWidgetObjArray[d].jsonObj.response.documents!="undefined"&&
typeof OB_voterWidgetObjArray[d].jsonObj.response.documents.total_count!="undefined"&&OB_voterWidgetObjArray[d].jsonObj.response.documents.total_count>0?false:true:true;j&&h.dom.setInnerHTML(f,m)}}}};this.isDynSecondLineOff=function(d){d=OB_voterWidgetObjArray[d].SecLineOn;return this.all_user_elements[this.positionDynSecondLine]==true&&!d};this.changeView=function(d,f,j){return this.changeMatrix(d,f,j)};this.thanksMode=function(d,f){var j=outbrain_template_manager.getDataPerPost(b,d);j.frezz=true;
var k="<strong>"+outbrain_language_manager.getThanksString(h.languageName)+"</strong>";j.rateInfo=k;k=this.firstLineTextReplacer(j);this.setFirstLineInnerHTML(d,k);this.changeMatrixByXY(d,(f-1)*this.matrixInfo.matrixXlength,this.matrixInfo.matrixYpositionThanks);for(f=0;f<h.pluginsArray.length;++f)h.pluginsArray[f].onRate(d)};this.endThanksMode=function(d){outbrain_template_manager.setStatus(this.templateIndex,d,outbrain_settings.rater.statuses.RATER_POST_RATE_MODE);for(var f=0;f<h.pluginsArray.length;++f)h.pluginsArray[f].onPostRate(d)};
this.mouseClicked=function(d,f){outbrain_template_manager.setStatus(this.templateIndex,f,outbrain_settings.rater.statuses.RATER_RATE_MODE,d.getAttribute("_vote"));this.thanksMode(f,d.getAttribute("_vote"));setTimeout(function(){h.endThanksMode(f)},1E3)};this.mouseOverSpan=function(d,f,j){var k=outbrain_settings.rater.statuses.RATER_RATE_MODE;OB_voterWidgetObjArray[j].currentRateValue=f.getAttribute("_vote");d=outbrain_template_manager.getDataPerPost(d,j,k);clearTimeout(this.mouseOutTimer);this.changeView(j,
d,k);this.updateRateInfo(j,d,k,true)};this.mouseOutSpan=function(d,f){var j=outbrain_settings.rater.statuses.RATER_PRE_RATE_MODE;OB_voterWidgetObjArray[f].currentRateValue=0;var k=outbrain_template_manager.getDataPerPost(d,f,j);this.mouseOutTimer=setTimeout(function(){h.changeView(f,k,j);h.updateRateInfo(f,k,j,true)},10)};this.imageLoadEvent=function(){this.isMatrixReady=true};this.imagesPreload=function(){new outbrain_timeout(function(){return typeof outbrain_language_manager[h.languageName]!="object"&&
outbrain_language_manager.isLanguageReady(h.languageName)},function(){if(document.images&&outbrain_settings.rater.isStars){var d=[];this.matrixImage=new Image;this.matrixImage.onLoad=h.imageLoadEvent();this.matrixImage.src=outbrain_language_manager.isRtl(h.languageName)==true?h.matrixInfo.matrixSourceRTL:h.matrixInfo.matrixSource;if(h.fixPngOnThisBrowser())for(var f=0;f<5;f++){d[f]=new Image(60,12);d[f].src=outbrain_settings.domains.js+"my_rating_"+(f+1)+"."+h.smallImageSufix}this.onePix=new Image;
this.onePix.src=outbrain_settings.domains.js+"spacer.gif";h.templateHaveImages=true}},null,null,500,1E3,true)};this.initTemplate=function(){for(i=0;i<this.all_optional_elements.length;i++)this.all_user_elements[i]=this.elements.indexOf(outbrain_settings.templateItemsJoin+this.all_optional_elements[i]+outbrain_settings.templateItemsJoin)>-1?true:false;if(this.all_user_elements[this.positionsStars])outbrain_template_manager.isTemplateWithStars=true;else{this.all_user_elements[this.positionFirstLine]=
false;this.all_user_elements[this.positionSecondLine]=false}this.templateArrayInit=true};this.supportRecommendations=function(){return this.all_user_elements[this.positionRec]};this.buildDomMainWrapperStart=function(){return str='<div id="$CONTAINER_DIV_ID_$INDEX_$POSITION" class="$GLOBAL_CLASS" style="$DIV_WRAPPER_STYLE" >$upperBR<div class="$VOTER_DIV_CLASS" style="display:none;"  id="$VOTER_DIV_NAME_$INDEX_$POSITION"  >'};this.buildDomMainWrapperEnd=function(){for(var d=0;d<h.pluginsArray.length;++d)h.pluginsArray[d].initDOM(h.templateIndex);
return"$PLUGINS</div>$lowerBR</div> "};this.buildDomStarsWrapperStart=function(){return'<table class="table-css" cellpadding="0" cellspacing="0" border="0" style="$TABLE_STYLEwidth:100%;"><tbody style="border:none;width:100%;" class="$TBODY_CLASS"><tr style="$TABLE_STYLEwidth:100%;vertical-align:middle;"><td style="$TD_STYLE$WIDTH_STARS_TD;vertical-align:middle;">'};this.buildDomStarsFixPng=function(){return'<div id="$PNGFIX_HELPER_DIV_ID_$INDEX_$POSITION" style="overflow:hidden;position:relative;height:$STARS_Y_HEIGHTpx;width:$MATRIX_ONE_ITEM_LENGTHpx;margin-bottom:0px;"><div id="$PNGFIX_DIVS_CONTAINER_$INDEX_$POSITION" style="width:100%;height:100%;"><div class="$PNGFIX_STARS_DIV_CLASS" style="$PNGFIX_DIV_STYLE" _vote="1" onmouseout="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$PNGFIX_STARS_DIV_CLASS" style="$PNGFIX_DIV_STYLE" _vote="2" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+
this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$PNGFIX_STARS_DIV_CLASS" style="$PNGFIX_DIV_STYLE" _vote="3" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$PNGFIX_STARS_DIV_CLASS" style="$PNGFIX_DIV_STYLE" _vote="4" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$PNGFIX_STARS_DIV_CLASS" style="$PNGFIX_DIV_STYLE" _vote="5" onmouseout="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div></div><div id="$RATES_DIV_ID_$INDEX_$POSITION" class="$STARS_CLASS" style="width:$MATRIX_All_WIDTHpx;height:$MATRIX_ALL_HEIGHTpx;position:absolute;z-index:-1;vertical-align:absmiddle;"></div></div>'};
this.buildDomStars=function(){return'<div id="$RATES_DIV_ID_$INDEX_$POSITION" class="$STARS_CLASS" style="margin:0 0 0 0;padding:0 0 0 0;vertical-align:absmiddle;height:$STARS_Y_HEIGHTpx;width:$MATRIX_ONE_ITEM_LENGTHpx;$SOURCE_URL"><div class="$STARS_SPAN_CLASS" style="$PNGFIX_DIV_STYLE" _vote="1" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$STARS_SPAN_CLASS" style="$PNGFIX_DIV_STYLE" _vote="2" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$STARS_SPAN_CLASS" style="$PNGFIX_DIV_STYLE" _vote="3" onmouseout="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$STARS_SPAN_CLASS" style="$PNGFIX_DIV_STYLE" _vote="4" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+
this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div><div class="$STARS_SPAN_CLASS" style="$PNGFIX_DIV_STYLE" _vote="5" onmouseout="outbrain_template_manager.templates['+this.templateIndex+"].mouseOutSpan("+this.templateIndex+',$INDEX);" onclick="outbrain_template_manager.templates['+this.templateIndex+'].mouseClicked(this,$INDEX);" onmouseover="outbrain_template_manager.templates['+
this.templateIndex+"].mouseOverSpan("+this.templateIndex+',this,$INDEX);">&nbsp;</div></div>'};this.buildDomFirstPos=function(){return'</td><td class="$RATE_INFO_TD_CLASS" style="$TABLE_STYLEwidth:auto;vertical-align:middle;"><div id="$RATE_INFO_DIV_ID_$INDEX_$POSITION" style="$TABLE_STYLE vertical-align:absmiddle;"></div></td>'};this.buildDomStarsWrapperEnd=function(){return"</tr></tbody></table>"};this.buildDomSecondPos=function(){return'<table id="$RATE_STATUS_INFO_TABLE_ID_$INDEX_$POSITION" class="table-css" cellspacing="0" cellpadding="0" border="0" style="$TABLE_STYLEwidth:100%;"><tbody class="$TBODY_CLASS" style="$TABLE_STYLEwidth:100%;"><tr style="$TABLE_STYLEwidth:auto;"><td id="$RATE_STATUS_INFO_TD_ID_$INDEX_$POSITION" style="$TABLE_STYLEwidth:100%;" class="outbrain_my_rating"> </td></tr></tbody></table>'};
this.buildDomRecommendations=function(){return'<fieldset style="display:none;$FIELDSET_STYLE" id="$FIELDSET_ID_$INDEX_$POSITION" class="$FIELDSET_CLASS" >      <div id="$RECOMMENDATIONS_WAIT_ID_outer_$INDEX" class="$RECOMMENDATIONS_WAIT_CLASS_outer" style="display:none;"><div class="$RECOMMENDATIONS_WAIT_CLASS_inner">               <p ><img style="border:0px !important"/></p>       </div></div>  <legend class="$RECOMMENDATIONS_LEGEND_CLASS"></legend>    <ul id="$RECOMMENDATIONS_UL_ID_$INDEX_$POSITION" class="$RECOMMENDATIONS_UL_CLASS">    </ul></fieldset><table id="$RECOMMENDATIONS_STATUS_ID_$INDEX_$POSITION" class="$RECOMMENDATIONS_STATUS_TABLE_CLASS" style="display:none;"><tr><td>  <div id="$RECOMMENDATIONS_PC_LEGEND_$INDEX_$POSITION" class="$RECOMMENDATIONS_PC_LEGENED_CLS" style="display:none;"></div></td><td>  <div id="$RECOMMENDATIONS_MORE_DIV_ID_$INDEX_$POSITION" class="$RECOMMENDATIONS_MORE_LINK_DIV_CLASS" style="display:none;"></div></td></tr></table>'};
this.buildDOMOnce=function(){var d=typeof outbrain_settings.rater.isStars=="boolean"?outbrain_settings.rater.isStars:true;if(this.templateDOMInit)return this.templateDOM;if(this.templateArrayInit){this.templateDOM="";this.templateDOM+=this.buildDomMainWrapperStart();if(d&&this.all_user_elements[this.positionsStars]){this.templateDOM+=this.buildDomStarsWrapperStart();this.templateDOM+=h.fixPngOnThisBrowser()?this.buildDomStarsFixPng():this.buildDomStars()}if(d&&this.all_user_elements[this.positionFirstLine])this.templateDOM+=
this.buildDomFirstPos();if(d&&this.all_user_elements[this.positionsStars])this.templateDOM+=this.buildDomStarsWrapperEnd();if(d&&this.all_user_elements[this.positionSecondLine])this.templateDOM+=this.buildDomSecondPos();if(this.all_user_elements[this.positionRec])this.templateDOM+=this.buildDomRecommendations();this.templateDOM+=this.buildDomMainWrapperEnd();this.templateDOMInit=true}else setTimeout(h.buildDOMOnce,1E3)};this.constants=new (function(){var d=this;this.init=function(){d.upperBR=typeof OB_extraBR!=
"undefined"||typeof OB_extraBRType!="undefined"&&(OB_extraBRType==1||OB_extraBRType==2)?"<br />":"";d.lowerBR=typeof OB_extraBRType!="undefined"&&(OB_extraBRType==2||OB_extraBRType==3)?"<br />":"";d.divWrapperStyle=d.divWrapperStyle.replace(/\$CLEAR_STR/g,typeof OB_userClear=="boolean"?OB_userClear?"":"clear:both;":"clear:both;");if(h.fixPngOnThisBrowser()){d.divWrapperStyle=d.divWrapperStyle.replace(/\$COLOR_STR/g,"");d.divWrapperStyle=h.isSomeSecondLine()?d.divWrapperStyle.replace(/\$ONE_LINE/g,
"height:100%;"):d.divWrapperStyle.replace(/\$ONE_LINE/g,"")}else{d.divWrapperStyle=d.divWrapperStyle.replace(/\$COLOR_STR/g,"");d.divWrapperStyle=d.divWrapperStyle.replace(/\$ONE_LINE/g,"")}var f="background-image: url(";f+=outbrain_language_manager.isLanguageReady(h.languageName)&&outbrain_language_manager.isRtl(h.languageName)?h.matrixInfo.matrixSourceRTL:h.matrixInfo.matrixSource;f+=");";d.matrixUrl=f;d.recommendationsUlClass="recommendations_ul"+(outbrain_browsers.ie?"_ie":"");d.starsClassname=
h.fixPngOnThisBrowser()?"ratesIE6":"rates";if(h.isSomeSecondLine()){d.globalClass=d.globalClass.replace(/\$ONE_LINE/g,"");d.starsClassname=d.starsClassname.replace(/\$ONE_LINE/g,"")}else{d.globalClass=d.globalClass.replace(/\$ONE_LINE/g," outbrain_frame_page");d.starsClassname=d.starsClassname.replace(/\$ONE_LINE/g," rates_frame_page")}f="float:";f+=outbrain_language_manager.isLanguageReady(h.languageName)&&outbrain_language_manager.isRtl(h.languageName)?"right":"left";f+=";";d.pngfixDivsStyle="position:static;"+
f+"padding:0 0 0 0;margin:0 0 0 0;border:none;border-spacing:0px;font-size:normal;background: none;cursor: pointer;cursor: hand;width:"+h.matrixInfo.starWidth+"px;height:"+h.matrixInfo.matrixYHeight+"px;line-height:"+h.matrixInfo.matrixYHeight+"px;"};this.starsTextDistance=4;this.divWrapperStyle="$CLEAR_STR";this.divWrapperStyle+="padding:0 0 5px 0;";this.tableStyle="padding:0 0 0 0;margin:0 0 0 0;border:none;background:none;border-spacing:0px;";this.divWrapperStyle+="$COLOR_STR";this.divWrapperStyle+=
"$ONE_LINE";this.tableStyle="padding:0 0 0 0;margin:0 0 0 0;border:none;background:none;border-spacing:0px;";this.tdStyle="padding:"+h.matrixInfo.shadowYoffset+"px 0 0 0;margin:0 0 0 0;border:none;background:none;border-spacing:0px;";this.starDivStyle="height:"+h.matrixInfo.starHeight+"px;width:"+h.matrixInfo.starWidth+"px;";this.widthStarsTd="width:"+(parseInt(h.matrixInfo.matrixXlength)+parseInt(this.starsTextDistance))+"px;";this.starsClassname="";this.fieldsetClass=outbrain_browsers.ie?"outbrain-recommendationsFieldset-ie":
"outbrain-recommendationsFieldset";this.fieldsetClass+=outbrain_browsers.ie&&outbrain_browsers.ie8Doc8?" outbrain-ie8":"";this.fieldsetClass=outbrain_browsers.sc?"outbrain-recommendationsFieldset-sc":this.fieldsetClass;this.fieldsetStyle=outbrain_browsers.ie&&!outbrain_browsers.ie8Doc8?"padding-left:0px;padding-right:8px;":"padding-left:8px;padding-right:8px;";this.globalClass="div-wrapper";this.voterDivClass="voterDiv";this.tbodyClass="outbrain-tbody-css";this.rateInfoTdClass="rateInfo";this.recommendationsUlClass=
"";this.recommendationsMoreLinkId="moreRecommendationsLinkDiv";this.recommendationsWaitId="recommendationsWait";this.recommendationsWaitClass="Outbrain_recommendationsWait";this.recommendationsLegendClass="Outbrain_recommendations_legend";this.recommendationsPcLegendId="recommendationsPcLegend";this.recommendationsPcLegendCls="Outbrain_recommendations_pc_legend";this.recommStatusTableClass="outbrain-table-recommendations-bottom";this.recommStatusTableId="outbrainTableRecommendation";this.starsSpanClass=
"star-span";this.globalClass+="$ONE_LINE";this.starsClassname+="$ONE_LINE";this.lowerBR=this.upperBR="";this.voterDivName="OutbrainVoterDiv";this.containerId="outbrain_container";this.ratesDivId="rates";this.fieldsetId="recommendationsFieldset";this.recommendationsUlId="recommendationsList";this.recommendationsStripId="recommendationsStrip";this.recommendationsMoreDivId="recommendationsMoreDiv";this.rateStatusInfoTableId="rateStatusInfoTable";this.rateStatusInfoTdId="rateStatusInfo";this.rateInfoDivId=
"rateInfo";this.externalBlogElementId="outbrain_ext_element";this.pngfixRatesHelper="pngfixRatesMatrixHelper";this.pngfixMatrix="pngfixMatrix";this.pngfixStarsDivClass="pngfixStarsDivs";this.pngfixDivsContainer="pngfixDivs";this.recommendationAdsLiClass="outbrain_rec_li outbrain_ad_li";this.recommendationLiClass="outbrain_rec_li"});this.replacerOnce=function(){this.templateDOM=this.templateDOM.replace(/\$POSITION/g,this.position);this.templateDOM=this.templateDOM.replace(/\$DIV_WRAPPER_STYLE/g,this.constants.divWrapperStyle);
this.templateDOM=this.templateDOM.replace(/\$TABLE_STYLE/g,this.constants.tableStyle);this.templateDOM=this.templateDOM.replace(/\$TD_STYLE/g,this.constants.tdStyle);this.templateDOM=this.templateDOM.replace(/\$VOTER_DIV_NAME/g,this.constants.voterDivName);this.templateDOM=this.templateDOM.replace(/\$VOTER_DIV_CLASS/g,this.constants.voterDivClass);this.templateDOM=this.templateDOM.replace(/\$CONTAINER_DIV_ID/g,this.constants.containerId);this.templateDOM=this.templateDOM.replace(/\$TBODY_CLASS/g,
this.constants.tbodyClass);this.templateDOM=this.templateDOM.replace(/\$RATES_DIV_ID/g,this.constants.ratesDivId);this.templateDOM=this.templateDOM.replace(/\$STARS_CLASS/g,this.constants.starsClassname);this.templateDOM=this.templateDOM.replace(/\$STARS_SPAN_CLASS/g,this.constants.starsSpanClass);this.templateDOM=this.templateDOM.replace(/\$STAR_DIV_STYLE/g,this.constants.starDivStyle);this.templateDOM=this.templateDOM.replace(/\$RATE_INFO_TD_CLASS/g,this.constants.rateInfoTdClass);this.templateDOM=
this.templateDOM.replace(/\$RATE_INFO_DIV_ID/g,this.constants.rateInfoDivId);this.templateDOM=this.templateDOM.replace(/\$WIDTH_STARS_TD/g,this.constants.widthStarsTd);this.templateDOM=this.templateDOM.replace(/\$STARS_Y_HEIGHT/g,this.matrixInfo.matrixYHeight);this.templateDOM=this.templateDOM.replace(/\$MATRIX_ONE_ITEM_LENGTH/g,this.matrixInfo.matrixXlength);this.templateDOM=this.templateDOM.replace(/\$MATRIX_All_WIDTH/g,this.matrixInfo.matrixAllXlength);this.templateDOM=this.templateDOM.replace(/\$MATRIX_ALL_HEIGHT/g,
this.matrixInfo.matrixAllYlength);this.templateDOM=this.templateDOM.replace(/\$SOURCE_URL/g,this.constants.matrixUrl);this.templateDOM=this.templateDOM.replace(/\$upperBR/g,this.constants.upperBR);this.templateDOM=this.templateDOM.replace(/\$lowerBR/g,this.constants.lowerBR);this.templateDOM=this.templateDOM.replace(/\$FIELDSET_CLASS/g,this.constants.fieldsetClass);this.templateDOM=this.templateDOM.replace(/\$FIELDSET_STYLE/g,this.constants.fieldsetStyle);this.templateDOM=this.templateDOM.replace(/\$FIELDSET_ID/g,
this.constants.fieldsetId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_UL_ID/g,this.constants.recommendationsUlId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_STRIP_ID/g,this.constants.recommendationsStripId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_UL_CLASS/g,this.constants.recommendationsUlClass);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_WAIT_ID/g,this.constants.recommendationsWaitId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_WAIT_CLASS/g,
this.constants.recommendationsWaitClass);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_MORE_DIV_ID/g,this.constants.recommendationsMoreDivId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_MORE_LINK_DIV_CLASS/g,this.constants.recommendationsMoreLinkId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_LEGEND_CLASS/g,this.constants.recommendationsLegendClass);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_STATUS_TABLE_CLASS/g,this.constants.recommStatusTableClass);
this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_STATUS_ID/g,this.constants.recommStatusTableId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_PC_LEGEND/g,this.constants.recommendationsPcLegendId);this.templateDOM=this.templateDOM.replace(/\$RECOMMENDATIONS_PC_LEGENED_CLS/g,this.constants.recommendationsPcLegendCls);this.templateDOM=this.templateDOM.replace(/\$RATE_STATUS_INFO_TABLE_ID/g,this.constants.rateStatusInfoTableId);this.templateDOM=this.templateDOM.replace(/\$RATE_STATUS_INFO_TD_ID/g,
this.constants.rateStatusInfoTdId);this.templateDOM=this.templateDOM.replace(/\$GLOBAL_CLASS/g,this.constants.globalClass);this.templateDOM=this.templateDOM.replace(/\$PNGFIX_HELPER_DIV_ID/g,this.constants.pngfixRatesHelper);this.templateDOM=this.templateDOM.replace(/\$pngfixMatrix/g,this.constants.pngfixMatrix);this.templateDOM=this.templateDOM.replace(/\$PNGFIX_STARS_DIV_CLASS/g,this.constants.pngfixStarsDivClass);this.templateDOM=this.templateDOM.replace(/\$PNGFIX_DIVS_CONTAINER/g,this.constants.pngfixDivsContainer);
this.templateDOM=this.templateDOM.replace(/\$PNGFIX_DIV_STYLE/g,this.constants.pngfixDivsStyle);this.templateReplacedOnce=true};this.getLanguageId=function(){return h.languageName};this.changeContainerClassWhenExists=function(d){if(d=this.getElementWithFullName(this.constants.containerId,d))d.className=this.constants.globalClass};this.changeWhenHaveStars=function(d){new outbrain_timeout(function(){return typeof outbrain_language_manager[h.languageName]!="object"&&outbrain_language_manager.isLanguageReady(h.languageName)},
function(){var f=h.fixPngOnThisBrowser()?h.getElementWithFullName(h.constants.pngfixDivsContainer,d):h.getElementWithFullName(h.constants.ratesDivId,d);if(f){f=f.getElementsByTagName("div");for(var j=0;j<f.length;j++)if(outbrain_browsers.ie)f[j].style.styleFloat="right";else f[j].style.cssFloat="right"}else setTimeout(function(){h.changeWhenHaveStars(d)},100)},null,null,500,1E3,true)};this.replaceWhenHaveLang=function(d){new outbrain_timeout(function(){return typeof outbrain_language_manager[h.languageName]!=
"object"&&outbrain_language_manager.isLanguageReady(h.languageName)},function(){if(outbrain_language_manager.isRtl(h.languageName)){h.constants.globalClass=h.constants.globalClass.replace("div-wrapper","div-wrapper-right");h.templateDOM=h.templateDOM.replace('div-wrapper"','div-wrapper-right"');h.templateDOM=h.templateDOM.replace(h.matrixInfo.matrixSource,h.matrixInfo.matrixSourceRTL);h.templateDOM=h.templateDOM.replace("padding-left:0px;padding-right:8px;","padding-left:8px;padding-right:0px;");
h.changeContainerClassWhenExists(d);h.changeWhenHaveStars(d)}},null,null,500,1E3,true)};this.resetTemplate=function(d){if(typeof OB_user_mode=="number"&&OB_user_mode==1){if(currElement=this.getElementWithFullName(this.constants.fieldsetId,d))currElement.style.display="none";if(currElement=this.getElementWithFullName(this.constants.recommendationsPcLegendId,d))currElement.style.display="none"}};this.waitForImages=function(){new outbrain_timeout(function(){return h.isMatrixReady},function(){return true},
null,null,500,1E3,true)};this.replaceEveryTime=function(d){this.templateHaveImages||this.imagesPreload();this.replaceWhenHaveLang(d);var f=this.templateDOM;f=f.replace(/\$INDEX/g,d);f=f.replace(/\$GLOBAL_CLASS/g,this.constants.globalClass);for(var j="",k=0;k<h.pluginsArray.length;++k)j+=h.pluginsArray[k].initPost(d);return f=f.replace(/\$PLUGINS/g,j)};this.isTemplateReady=function(){return this.templateReplacedOnce};this.getDomPerPost=function(d){return this.replaceEveryTime(d)};this.insertRaterElement=
function(d,f){var j=null;d=d.firstChild;return j=this.dom.elementInsertion(f,d,this.top,this.inside)};this.addCssFileByUrl=function(d){var f=document.createElement("link");f.rel=outbrain_settings.globals.cssRel;f.type=outbrain_settings.globals.cssType;f.id=outbrain_settings.rater.cssId;f.href=d;f.onload=function(){cssFile_Loaded=true};d=document.getElementsByTagName("head");d.length>0?d[0].appendChild(f):outbrain_template_manager.addElementToManagerHelper(f)};this.addCssFile=function(){this.addCssFileByUrl(outbrain_settings.rater.cssUrl)};
this.getRateModeInfoText=function(d,f){return"<strong>"+outbrain_language_manager.getRateDescription(d,f)+"</strong>"};this.getRateModeStatusText=function(d,f,j,k){return outbrain_language_manager.rateGetAverageStr(d,j,k)};this.getPreModeInfoText=function(d,f){d=outbrain_language_manager.getBeTheFirstString(d);d+='$COMMENT <span id="whatIsSpan" class="whatIsSpan">[<a class="outbrain_my_rating" style="font-weight:bold;cursor:pointer;" onclick="outbrain_whatIs.loadJs('+f+');">?</a>]</span>';return d};
this.getPostModeInfoText=function(d,f,j,k,l){rateInfo="";rateInfo=outbrain_language_manager.rateGetAggregate(d,j,k,l);rateInfo+='$COMMENT <span id="whatIsSpan" class="whatIsSpan">[<a class="outbrain_my_rating" style="font-weight:bold;cursor:pointer;" onclick="outbrain_whatIs.loadJs('+f+');">?</a>]</span>';return rateInfo};this.getRatedStatusText=function(d,f){return outbrain_language_manager.getRatePostRate(d,f-1)+" ({starsImage})"};this.getDisqusText=function(d,f){return f=outbrain_rater.isDisqusOn(d)?
f.replace(/\$COMMENT/g,' | <span class="ob_commentOut" onmouseout="javascript:this.className=\'ob_commentOut\'" onmouseover="javascript:this.className=\'ob_commentOver\'" onClick="javascript:location.href=\''+outbrain_rater.cleanLink(location.href)+"#"+outbrain_rater.getDisqusLink()+'\'" style="cursor:hand;">'+outbrain_language_manager.languages_list[d].COMMENT+"</span>"):f.replace(/\$COMMENT/g,"")};this.getRecTitle=function(d,f){return outbrain_template_manager.isThumbs?outbrain_language_manager.getThumbsRatePostRateForRecommendations(d,
f>0?1:0):outbrain_language_manager.getRatePostRateForRecommendations(d,f)};this.getYouMightAlsoLike=function(d){return outbrain_language_manager.getYouMightAlsoLike(d)};this.getRateInfo=function(d,f){if(outbrain_rater.lockRater(d))return false;if(OB_voterWidgetObjArray[d].rankInfo==null)return false;var j=h.getLanguageId(),k=OB_voterWidgetObjArray[d],l=k.rankInfo.vote;f=f!=null?f:OB_voterWidgetObjArray[d].rateMode;var m="",n="",o="";if(f==outbrain_settings.rater.statuses.RATER_RATE_MODE){m=this.getRateModeInfoText(j,
OB_voterWidgetObjArray[d].currentRateValue-1);this.getRateModeStatusText(j,d,k.rankInfo.getComputedRank(true),k.rankInfo.ratedBy)}else m=k.rankInfo.ratedBy==0?this.getPreModeInfoText(j,d):this.getPostModeInfoText(j,d,k.rankInfo.getComputedRank(true),k.rankInfo.ratedBy,k.rated);m=this.getDisqusText(j,m);n=k.rated?this.getRatedStatusText(j,l):"";o=this.getRecTitle(j,l);return[k,m,n,f,o]};this.renderRecCancelation=function(d,f,j,k){k=k?k:h.getElementWithFullName(h.constants.fieldsetId,d).id;return" <span class='"+
h.cancelRecommendationId+"Div' id='"+h.cancelRecommendationId+"_"+d+"_"+f+"'><a href='javascript:void(0);' alt='Cancel this recommendation' onclick='javasctipt:outbrain_template_manager.templates["+h.templateIndex+"].checkWaitStatus();outbrain_template_manager.templates["+h.templateIndex+'].doWaiting("'+k+'",'+d+","+f+");outbrain_rater.setRecCancellationOdbScript("+d+","+h.templateIndex+',"'+encodeURIComponent(j)+'");outbrain_template_manager.templates['+h.templateIndex+"].onAfterRecCancelation("+
d+","+f+"); return false;') style='text-decoration:none;color:red;font-weight:bold'>[x]</a></span>"};this.checkWaitStatus=function(){if(!h.isOwnerNotLoading)return false};this.onAfterRecCancelation=function(){};this.doWaiting=function(d,f,j){h.addWaitClock(d,f);h.waitTimer(f,j)};this.waitTimer=function(d){new outbrain_timeout(function(){return h.checkWaitStatus()!=false},function(){},null,function(){h.noMoreWaitting(d)},1E3,60,true)};this.addWaitClock=function(d,f,j){d=document.getElementById(d);
if(j=document.getElementById(h.constants.recommendationsWaitId+"_outer_"+j)){j.style.display="block";h.isOwnerNotLoading=false;if(j=j.getElementsByTagName("img")[0]){j.src=h.waitImageUrl;if(d)if(d.className.indexOf(h.waitBackgroundClass)<0)d.className+=" "+h.waitBackgroundClass}}};this.removeWaitClock=function(d){var f=h.getElementWithFullName(h.constants.fieldsetId,d);d=document.getElementById(h.constants.recommendationsWaitId+"_outer_"+d);h.isOwnerNotLoading=true;if(d){d.style.display="none";if(f)f.className=
f.className.replace(h.waitBackgroundClass,"")}};this.noMoreWaitting=function(d,f){if(f==null||typeof f!="string"||f.length<=0)f="There was unknown error while sending data";confirm(f+"\nPress OK to reload the page or Cancel to abort. ")?window.location.reload():h.removeWaitClock(d)};this.initPlugins=function(){};this.startTemplate=function(){this.addCssFile();outbrain_language_manager.addLanguage(h.languageName,outbrain_settings.language.url);this.initTemplate();this.constants.init();this.initPlugins();
this.buildDOMOnce();this.replacerOnce();this.waitForImages()}},outbrain_template_manager_object=function(){this.ready=false;var b=this;this.globalElementId="outbrain_template_element_";this.helperElementId="outbrain_manager_helper_div";this.isRecOnly=true;this.optionalTemplates=[];this.userTemplatesFileUrl="";this.templatesListInit=this.userTemplatesFileReturned=false;this.userTemplatesFilesLoaded=this.userTemplatesListFilesSize=0;this.isTemplateWithStars=this.allTemplatesWasReadyBefore=false;this.templates=
[];this.dom=this.templateSTR=null;this.DATA_REC_MIXED=0;this.DATA_REC_REGULAR_ONLY=1;this.DATA_REC_AD_ONLY=2;this.isAdMarking=this.isThumbs=false;this.templateMapping=[{key:"stars",name:"general",position:"bottom",rec:false,stars:true,file:"",preload:true},{key:"rec",name:"general",position:"bottom",rec:true,stars:false,file:"",preload:false},{key:"stars_and_rec",name:"general",position:"bottom",rec:true,stars:true,file:"",preload:true},{key:"singleThumb",name:"thumbs_template",position:"bottom",
rec:false,stars:true,file:"http://widgets.outbrain.com/thumbsTemplate.js",preload:true},{key:"strip",name:"strip",position:"bottom",rec:true,stars:false,file:"http://widgets.outbrain.com/stripTemplate.js",preload:false},{key:"nm",name:"nm_template",position:"bottom",rec:true,stars:false,file:"http://widgets.outbrain.com/nmTemplate.js",preload:false},{key:"dual",name:"dual_template",position:"bottom",rec:true,stars:false,file:"http://widgets.outbrain.com/dualTemplate.js",preload:false}];this.templatesLoop=
function(a){for(var c=0;c<this.templates.length;c++)a()};this.getDataAllPosts=function(){return OB_voterWidgetObjArray};this.getDataPerPost=function(a,c,e){var g=OB_voterWidgetObjArray[c];if(typeof e!="number")e=g.rateMode;a=this.templates[a].getRateInfo(c,e);g.rateInfo=a[1];g.rateStatus=a[2];g.rateMode=a[3];g.recTitle=a[4];return g};this.getRecommendationDataPerDoc=function(a,c,e,g){var h=rater_global_settings.redirectUrlMethod=="redirect",d=null,f="",j=null;if(typeof e.content=="string"){d=this.getDataPerPost(a,
c).jsonObj;j=typeof d.response.request.did=="string"?d.response.request.did:null;if(typeof e.url=="string"&&h&&e.url.indexOf("key")>0)d=e.url;else{d=outbrain_settings.domains.traffic+"?key="+e.url_hash;h=false}f+=typeof OB_voterWidgetObjArray[c].demoAdId=="string"&&typeof e.pc_id=="string"&&e.pc_id==OB_voterWidgetObjArray[c].demoAdId?"&agent="+outbrain_settings.rater.recommendations.demoId:"&agent="+outbrain_settings.rater.recommendations.agentId+"_rec";f+="&version="+outbrain_settings.versions.rater;
if(j!=null&&!h)f+="&rdid="+j}c=null;if(typeof e.content=="string")c=e.content;a=null;if(typeof e.source_name=="string")a=e.source_name;var k=null;if(typeof e.author=="string")k=e.author;var l=null;if(typeof e.pubDate=="string")l=e.pubDate;var m=false;if(typeof e.same_source=="string")m=e.same_source=="true";var n=false;if(typeof e.pc_id!="undefined")try{if(typeof e.adv_name!="undefined")if(e.adv_name.length>0)n=true}catch(o){n=false}var p=false;if(typeof e.bocr=="string")p=e.bocr;if(outbrain_settings.rater.recommendations.defaultRecNumber<=
g)f+="&hr=1";if(g!=null&&typeof g=="number")f+="&idx="+g;g=null;if(!h)if(typeof e.rec_type=="string"){g=e.rec_type;f+="&type="+g}else f+="&type="+outbrain_settings.rater.recommendations.type;j=d+f;return[j,c,a,k,l,m,g,n,p]};this.getDocsPerDoc=function(a,c){var e=[];if(typeof a=="object"&&a!=null&&a.length>0)e=a;else if(typeof c=="number")e=OB_voterWidgetObjArray[c].jsonObj.response.documents.doc;else return e;return e};this.getRecommendationsPerDoc=function(a,c,e,g){var h=[];c=this.getDocsPerDoc(c,
e);for(e=0;e<c.length;e++)if(a==1&&typeof c[e].pc_id=="undefined"||a==2&&typeof c[e].pc_id!="undefined"||a!=2&&a!=1)h.push(c[e]);if(typeof g=="number"){if(h.length<=g)return[];return h[g]}return h};this.isAllSameSource=function(a){for(var c=true,e=0;e<a.doc.length;e++)if(typeof a.doc[e].same_source=="string")if(a.doc[e].same_source!="true")c=false;return a.isAllSameSource=c};this.setStatus=function(a,c,e,g){var h=this.getDataPerPost(a,c);h.rateMode=e;switch(e){case outbrain_settings.rater.statuses.RATER_PRE_RATE_MODE:break;
case outbrain_settings.rater.statuses.RATER_RATE_MODE:outbrain_rater.rate(a,c,g);break;case outbrain_settings.rater.statuses.RATER_POST_RATE_MODE:h.frezz=false;h.frezzSemaphore=0;this.updateAllData(c,e);break}};this.isThereTemplateWithRecommendations=function(){for(var a=0;a<this.templates.length;a++)if(this.templates[a].supportRecommendations())return true;return false};this.recommendationsStatusPerItem=function(a,c,e){var g=this.getDataPerPost(a,c),h=false;return h=this.lastOdbRotationRequestedItem<
c?false:outbrain_settings.rater.recommendations.always?true:this.templates[a].supportRecommendations()?outbrain_language_manager.isRecommendationsAvailable(outbrain_template_manager.templates[a].getLanguageId())?e==outbrain_settings.rater.statuses.RATER_POST_RATE_MODE&&OB_voterWidgetObjArray[c].rankInfo.vote>=0?true:g.rankInfo==null?false:typeof OB_voterWidgetObjArray[c].hasRecommendations=="boolean"&&OB_voterWidgetObjArray[c].hasRecommendations==true?true:(g.rankInfo.getComputedRank(true)>0||g.rankInfo.getComputedRank(true)==
0)&&OB_voterWidgetObjArray[c].rankInfo.vote==0?true:false:false:false};this.recommendationsHaveDataPerItem=function(a,c){return typeof c.response!="undefined"&&typeof c.response.documents!="undefined"&&typeof c.response.documents.total_count!="undefined"&&c.response.documents.total_count>0};this.showRecommendationsPerTemplateIsOk=function(a,c,e,g){b.templates[a].showRecommendations(c,e,g)};this.showRecommendationsPerTemplate=function(a,c,e,g){this.recommendationsStatusPerItem(a,c,g)&&this.recommendationsHaveDataPerItem(c,
e.jsonObj)&&this.showRecommendationsPerTemplateIsOk(a,c,e,g)};this.showRecommendations=function(a,c,e,g){var h=e.jsonObj;if(this.recommendationsStatusPerItem(a,c,g)&&this.recommendationsHaveDataPerItem(c,h))for(a=0;a<this.templates.length;a++)b.showRecommendationsPerTemplateIsOk(a,c,e,g)};this.updateRateInfoPerTemplate=function(a,c,e,g){this.templates[a].updateRateInfo(c,e,g)};this.updateRateInfo=function(a,c,e){for(var g=0;g<this.templates.length;g++)b.updateRateInfoPerTemplate(g,a,c,e)};this.changeViewPerTemplate=
function(a,c,e,g){this.templates[a].changeView(c,e,g)};this.changeView=function(a,c,e){for(var g=0;g<this.templates.length;g++)b.changeViewPerTemplate(g,a,c,e)};this.isDocGotAds=function(a){a=outbrain_template_manager.getRecommendationsPerDoc(outbrain_template_manager.DATA_REC_AD_ONLY,null,a,null);return a!=null&&a.length>0};this.updateAllDataPerTemplate=function(a,c,e){if(typeof e=="undefined")e=null;var g=this.getDataPerPost(a,c,e);if(e==null)e=g.rateMode;this.updateRateInfoPerTemplate(a,c,g,e);
this.changeViewPerTemplate(a,c,g,e);this.showRecommendationsPerTemplate(a,c,g,e)};this.updateAllData=function(a,c){for(var e=0;e<this.templates.length;e++){if(typeof c=="undefined")c=null;var g=this.getDataPerPost(e,a);if(c==null)c=g.rateMode;b.resetTemplate(e,a);b.showRecommendationsPerTemplate(e,a,g,c);b.changeViewPerTemplate(e,a,g,c);b.updateRateInfoPerTemplate(e,a,g,c)}};this.resetTemplate=function(a,c){b.templates[a].resetTemplate(c)};this.postDataLoaded=function(a){this.updateAllData(a,null)};
this.userRated=function(){};this.getMatrixInfosData=function(){this.result=null;this.defaultMatrixInfosJson=outbrain_settings.defaultMatrixInfos;this.userMatrixInfos=typeof OB_user_matrix_infos=="undefined"?this.defaultMatrixInfosJson:OB_user_matrix_infos;if(this.userMatrixInfos==null)this.userMatrixInfos=this.defaultMatrixInfoJson;if(this.userMatrixInfos!=null)try{this.result=eval("("+this.userMatrixInfos+")")}catch(a){return null}return this.result};this.checkIsRecOnly=function(a){if(b.isRecOnly==
true)for(var c=0;c<outbrain_settings.templateOptions.length;c++)if(a.indexOf(outbrain_settings.templateItemsJoin+outbrain_settings.templateOptions[c]+outbrain_settings.templateItemsJoin)>-1)if(outbrain_settings.templateOptions[c]=="stars")return false;return true};this.getTemplatesByUserString=function(){this.userMatrixInfos=b.getMatrixInfosData();this.defaultArr=outbrain_settings.defaultTemplate;this.userTemplate=typeof OB_user_template=="undefined"?this.defaultArr:OB_user_template;if(this.userTemplate==
null)this.userTemplate=this.defaultArr;if(this.userTemplate.constructor!=Array)this.userTemplate=[this.userTemplate];for(var a=0;a<this.userTemplate.length;a++){var c=this.userTemplate[a].split(outbrain_settings.templateGlobalSplit);if(!(c.length!=4&&c.length!=5))if(!(c[0].indexOf("top")==-1&&c[0].indexOf("bottom")==-1))if(typeof b.optionalTemplates[c[1]]!="undefined")if(typeof b.optionalTemplates[c[1]].constructor!="undefined")if(typeof b.optionalTemplates[c[1]].constructor=="function")if(typeof c[2]==
"string")if(!(c[2]!="true"&&c[2]!="false")){c[2]=c[2]=="true";if(c[1]==outbrain_settings.defaultTemplateName&&c[0]=="bottom"){if(typeof OB_isOnHeader=="boolean"&&OB_isOnHeader)c[0]="top";if(typeof OB_rater_position=="string")c[0]=OB_rater_position=="top"?"top":"bottom";if(typeof OB_insertInElement=="boolean")c[2]=OB_insertInElement;if(typeof OB_showRec=="boolean"&&OB_showRec)if(c[3].indexOf("recommendations")==-1&&c[3].indexOf("noRecommendations")==-1){if(c[3].length>0)c[3]+=" ";c[3]+="recommendations"}}for(var e=
outbrain_settings.templateItemsJoin+c[3].split(outbrain_settings.templateItemsSplit).join(outbrain_settings.templateItemsJoin)+outbrain_settings.templateItemsJoin,g=false,h=0;h<outbrain_settings.templateOptions.length;h++)if(e.indexOf(outbrain_settings.templateItemsJoin+outbrain_settings.templateOptions[h]+outbrain_settings.templateItemsJoin)>-1){g=true;break}this.isRecOnly=b.checkIsRecOnly(e);if(g){templateName="";templateName=c[4]==null||c[4]=="undefined"?c[1]:c[4];e=null;try{e=b.userMatrixInfos.matrixInfos[templateName]}catch(d){}b.templates[b.templates.length]=
new b.optionalTemplates[c[1]](b.templates.length,c[0],c[2],c[3],e);b.templates[b.templates.length-1].startTemplate()}}}this.ready=true;b.templatesListInit=true};this.addTemplate=function(a){for(var c=0;c<a.length;c++){this.optionalTemplates[a[c][0]]=a[c][1];if(a[c][0]!=outbrain_settings.defaultTemplateName){b.userTemplatesFilesLoaded++;if(b.userTemplatesFilesLoaded==this.userTemplatesListFilesSize)b.userTemplatesFileReturned=true}}};this.templatesLoaded=function(){this.getTemplatesByUserString()};
this.userScriptTag="userTemplateElement";this.removeTemplateScriptElement=function(){var a=outbrain_dom.$(this.userScriptTag);if(a){a.src="about:blank";this.removeElementFromManagerHelper(a);return true}return false};this.addTemplateScriptElement=function(a){this.addElementToManagerHelper(outbrain_dom.getScriptElement(a));new outbrain_timeout(function(){return b.userTemplatesFileReturned},function(){b.templatesLoaded()},null,function(){b.templatesLoaded()},1E3,20,true)};this.getTemplateFilesList=
function(){var a=[];if(typeof OB_userTemplateFile=="string")if(OB_userTemplateFile.indexOf(",")>0)a=OB_userTemplateFile.split(",");else a.push(outbrain_global_functions.trim(OB_userTemplateFile));if(typeof OB_userTemplateFilesList=="object"&&OB_userTemplateFilesList.constructor==Array)for(var c=0;c<OB_userTemplateFilesList.length;c++)a.push(outbrain_global_functions.trim(OB_userTemplateFilesList[c]));return a};this.getTemplateDescriptionObj=function(a){for(var c=0;c<this.templateMapping.length;c++)if(this.templateMapping[c].key&&
this.templateMapping[c].key==a)return this.templateMapping[c];return null};this.getGeneratedUserString=function(a,c){var e="",g=a.position?a.position:"bottom";g=typeof OB_isOnHeader=="boolean"&&OB_isOnHeader?"top":g;g+=c>0?c:"";c=a.name?a.name:"general";e=a.rec?a.rec:false;a=a.stars?a.stars:false;e=e&&a?"stars firstLine secondLine dynSecondLine recommendations":a?"stars firstLine secondLine norecommendations dynSecondLine":e?"recommendations":outbrain_settings.defaultTemplate;return g+";"+c+";false;"+
e};this.setTemplateUsingTemplateObjects=function(a){for(var c=false,e=[],g=[],h=0;h<a.length;h++)if(a[h]&&a[h]!=null){var d=this.getGeneratedUserString(a[h],h);g.push(d);a[h].file&&a[h].file.length>0&&e.push(a[h].file);if(a[h].preload)c=true}outbrain_settings.rater.isStars=c;if(g.length>0)OB_user_template=g;if(e.length>0)OB_userTemplateFilesList=e};this.setTemplateUsingModeString=function(a,c){var e=[];if(!(a=="stars"&&c=="rec")){if(a=="none"&&c=="rec")e.push(this.getTemplateDescriptionObj("rec"));
else if(a=="stars"&&c=="none")e.push(this.getTemplateDescriptionObj("stars"));else if(a=="none"&&c=="none")outbrain_rater.halt=true;else{c!="none"&&e.push(this.getTemplateDescriptionObj(c));a!="none"&&e.push(this.getTemplateDescriptionObj(a));typeof OB_isOnHeader=="boolean"&&OB_isOnHeader&&e.reverse()}this.setTemplateUsingTemplateObjects(e)}};this.resolveTemplateMode=function(){var a="stars",c="rec";if(!(typeof OB_user_template!="undefined"&&OB_user_template!=null))if(typeof OB_raterMode=="string"||
typeof OB_recMode=="string"){if(typeof OB_raterMode=="string")a=OB_raterMode;if(typeof OB_recMode=="string")c=OB_recMode;this.setTemplateUsingModeString(a,c)}};this.loadTemplates=function(){this.addTemplate([[outbrain_settings.defaultTemplateName,outbrain_template_object]]);this.resolveTemplateMode();var a=this.getTemplateFilesList();this.userTemplatesListFilesSize=a.length;if(a.length>0)for(var c=0;c<a.length;c++){var e=a[c];e+="?v="+outbrain_settings.versions.raterFull;this.addTemplateScriptElement(e)}else{b.userTemplatesFileReturned=
true;this.templatesLoaded()}};this.initTemplateManager=function(){this.dom=new outbrain_dom_object;outbrain_dom.documentWrite("<div id='"+this.helperElementId+"' style='display:none;'></div>")};this.getHelperElement=function(){return this.dom.$(this.helperElementId)};this.isSingleTemplateReady=function(a){return this.templates[a].isTemplateReady()};this.isTemplatesReady=function(){for(var a=0;a<this.templates.length;a++)if(!b.isSingleTemplateReady(a))return false;return true};this.onDomReady=function(){for(var a=
[],c=0;c<this.templates.length;c++)a[a.length]=b.templates[c].domReady(itemsArray[c].rateMode,c);return a};this.insertDomPerPost=function(a,c){for(var e=null,g=0;g<this.templates.length;g++){e=b.templates[g].getDomPerPost(a);var h=document.createElement("div");h.innerHTML=e;e=b.templates[g].insertRaterElement(h,c)}return e};this.getElementsPerPost=function(a){for(var c=[],e=0;e<this.templates.length;e++){var g=b.templates[e].getElementWithFullName(b.templates[e].constants.containerId,a);c[c.length]=
g}return c};this.IsRecForAllTemplates=function(){if(typeof OB_showRec=="boolean"&&OB_showRec==false)return false;for(var a=0;a<this.templates.length;a++)if(b.templates[a].supportRecommendations()==true)return true;return false};this.loadRankDataForPost=function(a){new outbrain_timeout(function(){return b.isTemplatesReady()},function(){if(!b.allTemplatesWasReadyBefore){outbrain_rater.initOnlyWithTemplates();b.allTemplatesWasReadyBefore=true}outbrain_rater.loadRankData(a)},null,null,100,1E3,true)};
this.addElementToManagerHelper=function(a){var c=this.getHelperElement();if(c)return c.appendChild(a);return false};this.removeElementFromManagerHelper=function(a){if(a)return a.parentNode.removeChild(a);return false};this.doRate=function(a,c,e){a=this.getDataPerPost(a,c);if(typeof a.rankInfo.lastRateId!="undefined"&&OB_voterWidgetObjArray[c].rankInfo.lastRateId!=null)(a=this.dom.$(a.rankInfo.lastRateId))&&a.parentNode.removeChild(a);if(this.getHelperElement()){a=document.createElement("iframe");
var g="RSIFrame"+Math.random();a.setAttribute("id",g);a.style.border="0px";a.frameborder=0;a.style.width="0px";a.style.height="0px";a.style.display="none";this.addElementToManagerHelper(a).contentWindow.document.location.replace(e);OB_voterWidgetObjArray[c].rankInfo.lastRateId=g}};this.initTemplateManager()},outbrain_whatIs=typeof outbrain_whatIs=="object"?outbrain_whatIs:new (function(){this.openedBefore=false;var b=this;this.start=function(a){new outbrain_timeout(function(){return typeof outbrain_whatis_create==
"function"},function(){outbrain_whatis_create(a)},null,null,500,100,true)};this.loadJs=function(a){if(this.openedBefore)outbrain_whatis_click(a);else{var c=document.createElement("script");c.src=outbrain_settings.whatIs.url;c.setAttribute("id",outbrain_settings.whatIs.id);c.setAttribute("type",outbrain_settings.globals.scriptType);var e=document.getElementsByTagName("head");if(e.length>0)e[0].insertBefore(c,e[0].firstChild);else outbrain_template_manager.getHelperElement()?voter.parentNode.insertBefore(c,
voter):setTimeout(function(){b.loadJs(a)},1E3);this.openedBefore=true;this.start(a)}}}),outbrain_rater_object=function(){var b=this;this.halt=this.supportRecommendations=this.isRunning=false;this.pmd=null;this.startTime=new Date;this.odbSemafor=false;this.delay=outbrain_browsers.mozilla?1E3:200;this.odbDynamicCallsArray=[];this.isHomePage=this.insertReady=this.pageLoaded=this.isLoadDynamicDataOn=false;this.adIdHelper=null;this.readMoreClass="entry-more-link";this.extPermalinkEleId="outbrain_ext_permalink_element";
this.itemInserted=this.fullSettingReady=false;this.itemInsertedCounter=0;this.permalinksUsed=[];this.userAppendContainerDivClass=this.userCustomizeFooterClass=this.userCustomizePermaLinkClass=this.userCustomizeContainerDivClass=null;this.elementToSearch="div";this.countInsertedItems=-1;this.lastOdbRotationReturnedItem=this.lastOdbRotationRequestedItem=0;this.isRecEnabled=true;this.odbCallsList=[];this.odbCallsListSemaforIsLock=false;this.scrollMaxTimeInterval=150;this.scrollHeightLast=0;this.scrollHeightFactor=
70;this.isToolTipLoaded=false;this.getQSParam=function(a){for(var c=document.location.search.substring(1).split("&"),e=null,g=0;g<c.length;g++){var h=c[g].indexOf("=");if(h>0){var d=c[g].substring(0,h);if(a==d){e=c[g].substring(h+1);break}}}return e};this.returnedOdbData=function(a,c){this.lastOdbRotationReturnedItem=c;this.odbCallsListSemaforIsLock=false;this.fireNextOdbRequestItem();b.isHomePage||this.timeCounterStart(c,a);OB_voterWidgetObjArray[c].jsonObj=a;this.widgetInit(c)};this.returnedCancelOdbData=
function(a,c,e){if(a!=null)if(typeof a.ob_exclude_resp!="undefined")if(typeof a.ob_exclude_resp.code=="number")if(a.ob_exclude_resp.code==0){this.setRecOdbScript(c,true);return}else if(typeof a.ob_exclude_resp.message=="string"){outbrain_template_manager.templates[e].noMoreWaitting(c,a.ob_exclude_resp.message);return}typeof c=="number"&&outbrain_template_manager.templates[e].noMoreWaitting(c,"")};this.widgetInit=function(a){var c=OB_voterWidgetObjArray[a].jsonObj;if(c!=null){OB_voterWidgetObjArray[a].rankInfo=
new OB_voterWidgetObjArray[a].rankInfo_object(c.response.score.average.ratings.wsum_ratings,c.response.score.average.ratings.count_users,c.response.score.average.ratings.wcount_users,c.response.score.average.ratings.pos_ratings,c.response.score.average.ratings.neg_ratings,outbrain_settings.keys_and_users.userName);if(typeof c.response.score.self_rating!="undefined"){OB_voterWidgetObjArray[a].rankInfo.vote=c.response.score.self_rating;OB_voterWidgetObjArray[a].rankInfo.rank-=OB_voterWidgetObjArray[a].rankInfo.vote;
OB_voterWidgetObjArray[a].rateMode=outbrain_settings.rater.statuses.RATER_POST_RATE_MODE;OB_voterWidgetObjArray[a].rated=true;OB_voterWidgetObjArray[a].frezz=false;OB_voterWidgetObjArray[a].frezzSemaphore=0}outbrain_template_manager.postDataLoaded(a);return true}};this.lockRater=function(a){if(OB_voterWidgetObjArray[a].frezz&&OB_voterWidgetObjArray[a].frezzSemaphore==0){OB_voterWidgetObjArray[a].frezzSemaphore++;return false}else if(OB_voterWidgetObjArray[a].frezz&&OB_voterWidgetObjArray[a].frezzSemaphore>
0)return true};this.disqusOnPage=false;this.isDisqusOn=function(a){if(this.disqusOnPage)return true;if(outbrain_language_manager.languages_list[a].OPTIONAL_ADDONS.disqus&&outbrain_settings.rater.isDisqus&&document.getElementById("disqus_thread")!=null)return this.disqusOnPage=true;else return false};this.getDisqusLink=function(){for(var a=null,c=typeof OB_dsqTagList!="undefined"?OB_dsqTagList:["dsq-add-new-comment","dsq-content","disqus_thread"],e=0;e<c.length;e++){a=document.getElementById(c[e]);
if(a!=null)break}return a!=null?c[e]:""};this.cleanLink=function(a){if(a.indexOf("#")>0)a=a.substr(0,a.lastIndexOf("#"));return a};this.cleanLink=function(a){if(a.indexOf("#")>0)a=a.substr(0,a.lastIndexOf("#"));return a};this.changeOdbCallMode=function(){if(b.isRecEnabled==false)outbrain_settings.odb.isSemafor=false};this.checkDemoAdId=function(a){if(b.adIdHelper!=null)OB_voterWidgetObjArray[a].demoAdId=b.adIdHelper};this.registerOdbRequest=function(a){if(!(typeof OB_odb_static_mode=="boolean"&&OB_odb_static_mode==
true)){b.isRecEnabled=outbrain_template_manager.IsRecForAllTemplates();b.changeOdbCallMode();b.checkDemoAdId(a);for(var c=outbrain_template_manager.getElementsPerPost(a),e=a<outbrain_settings.odb.eagerOdbCalls||a<1,g=null,h=0;h<c.length;h++){g=this.getOdbRequestObject(a,c[h],function(){b.setRecOdbScript(a)});e==true?this.addOdbRequestItem(g):this.objLocationItemHolder.addLocationItem(g)}this.checkLocations(false);this.fireNextOdbRequestItem()}};this.getOdbRequestObject=function(a,c,e){var g={};g.index=
a;g.element=c;g.func=e;return g};this.insertJsScript=function(a,c){var e=document.createElement("script");e.setAttribute("id",a);e.setAttribute("type",outbrain_settings.globals.scriptType);e.setAttribute("src",c);var g=document.getElementsByTagName("head");g.length>0?g[0].appendChild(e):outbrain_dom.documentWrite('<script id="'+a+'" src="'+c+'" type="'+outbrain_settings.globals.scriptType+'"><\/script>')};this.timeCounterObj=function(a,c,e,g){var h=this;this.counterIdx=a;this.counterCount=e;this.counterInterval=
c;this.getDocId=function(d){try{return d.response.request.did!=null&&typeof d.response.request.did=="string"?d.response.request.did:null}catch(f){return null}};this.counterDocId=this.getDocId(g);this.getReqId=function(d){try{return d.response.request.req_id!=null&&typeof d.response.request.req_id=="string"?d.response.request.req_id:null}catch(f){return null}};this.counterRequestId=this.getReqId(g);this.getSourceId=function(){return outbrain_settings.blogUtils.sourceId!=null?outbrain_settings.blogUtils.sourceId:
9999999};this.getUrl=function(){try{return outbrain_settings.blogUtils.blogHrefLocation}catch(d){return null}};this.getIsHomePage=function(){try{return b.isHomePage?"1":"0"}catch(d){return null}};this.timeCounterSendCall=function(d){var f=outbrain_settings.blogUtils.timeCounter;f=f.replace(/\$DOC_ID/g,h.counterDocId);f=f.replace(/\$ENCODED_URL/g,h.getUrl());f=f.replace(/\$TIME_PASSED/g,d);f=f.replace(/\$IS_HP/g,h.getIsHomePage());f=f.replace(/\$SOURCE_ID/g,h.getSourceId());f=f.replace(/\$REQUEST_ID/g,
h.counterRequestId);document.getElementById(outbrain_settings.ping.id)&&window.frames.odbFrame.location.replace(f)};new outbrain_timeout(function(){return false},null,function(d){typeof d!="undefined"&&d>1&&h.timeCounterSendCall((d-1)*h.counterInterval)},null,c,e+1,true)};this.timeCounterStart=function(a,c){if(typeof OB_time_counter!="string"||OB_time_counter==null)OB_time_counter="0|10000|0";var e=OB_time_counter.split("|");if(!(e==null||e=="undefined"||e.length==0||e.length%3!=0))for(var g=0;g<
e.length;g++){var h=parseInt(OB_time_counter.split("|")[g]),d=parseInt(OB_time_counter.split("|")[g+1]),f=parseInt(OB_time_counter.split("|")[g+2]);if(!isNaN(h)&&!isNaN(d)&&!isNaN(f)&&h==a)OB_voterWidgetObjArray[a].counter=new this.timeCounterObj(a,d,f+1,c)}};this.addOdbRequestItem=function(a){this.odbCallsList[this.odbCallsList.length]=a};this.fireNextOdbRequestItem=function(){if(!(typeof OB_stop_rater_homepage=="boolean"&&OB_stop_rater_homepage==true&&this.isHomePage==true))if(!(outbrain_settings.odb.isSemafor==
true&&this.odbCallsListSemaforIsLock==true)){for(var a=0;a<this.odbCallsList.length;a++)if(this.odbCallsList[a]!=null){this.odbCallsListSemaforIsLock=true;var c=this.odbCallsList[a];this.removeItemsByPostIndex(this.odbCallsList[a].index);try{c.func()}catch(e){}if(outbrain_settings.odb.isSemafor==true)return}this.cleanList()}};this.removeItemsByPostIndex=function(a){for(var c=this.odbCallsList.length-1;c>=0;c-=1)if(this.odbCallsList[c]!=null)if(this.odbCallsList[c].index==a)this.odbCallsList[c]=null};
this.cleanList=function(){for(var a=this.odbCallsList.length-1;a>=0;a-=1)this.odbCallsList[a]==null&&this.odbCallsList.splice(a,1)};this.checkLocationsWithDimmer=function(){clearTimeout(b.scrollLocationCheckTimer);this.scrollLocationCheckTimer=setTimeout(b.checkLocations,b.scrollMaxTimeInterval)};this.checkLocations=function(a){if(a==true){a=Math.round(b.objLocationItemHolder.objPositionCalc.getTopY()/b.scrollHeightFactor);if(a==b.scrollHeightLast)return;else b.scrollHeightLast=a}a=b.objLocationItemHolder.getElementsInScope();
if(a.length>0){for(var c=0;c<a.length;c++)b.odbCallsList[b.odbCallsList.length]=a[c];b.fireNextOdbRequestItem()}};this.createOdbScriptElement=function(a,c,e,g,h){var d=null;c+=g?"&sig="+outbrain_settings.rater.windowName:"";c+=h?"&rand="+Math.random():"";d=document.createElement("script");d.setAttribute("id",a);d.setAttribute("type",outbrain_settings.globals.scriptType);d.setAttribute("src",c);d.setAttribute("defer",e);return d};this.setRecOdbScript=function(a,c){outbrain_customSettings.postSettings();
var e="";e=b.isRecEnabled?outbrain_settings.odb.odbGetDataUrlRec:outbrain_settings.odb.odbGetDataUrlRegular;e=b.odbPathReplacer(e,a);if(c)e=b.odbBcrReplacer(e);e=this.rewriteOdbUrlForModules(e);c=b.createOdbScriptElement(outbrain_settings.rater.odb.getScoreRecId+"_"+a,e,true,true,true);this.setOdbScript(a,c)};this.rewriteOdbUrlForModules=function(a){if(outbrainTemplateRegistry.isTemplateLoaded(OutbrainTemplateRegistry.STRIP)){a+="&media=img";if(a.indexOf("num_visible")>0)a=a.replace(/num_visible=\d+/,
"num_visible=3");else a+="&num_visible=3"}return a};this.setRecCancellationOdbScript=function(a,c,e){var g="";g=outbrain_settings.blogUtils.cancelRecs;g=g.replace(/\$VOTER_INDEX/g,a);g=g.replace(/\$TEMPLATE_INDEX/g,c);g=g.replace(/\$BOCR/g,e);c=b.createOdbScriptElement(outbrain_settings.rater.odb.getCancelRecId+"_"+a,g,true,true,false);this.setOdbScript(a,c)};this.setOdbScript=function(a,c){a=document.getElementsByTagName("head").length>-1?document.getElementsByTagName("head")[0]:outbrain_template_manager.getHelperElement();
b.insertOdbRequestIntoDom(a,c)};this.odbPathReplacer=function(a,c){if(typeof OB_voterWidgetObjArray[c].demoAdId=="string"){a=a+"&ad_id="+OB_voterWidgetObjArray[c].demoAdId;a=a.replace(/method=\w*/,"method=odb_demo");a=a.replace(/agent=\w*/,"agent="+outbrain_settings.rater.recommendations.demoId)}var e=outbrain_language_manager.getName(outbrain_template_manager.templates[0].getLanguageId()),g=OB_voterWidgetObjArray[c].permaLink;if(outbrain_settings.rater.cleanPermalink)g=this.cleanPermalinkQueryString(g);
g=encodeURIComponent(g);a=a.replace(/\$VOTER_INDEX/g,c);a=a.replace(/\$PERMA_LINK/g,g);if(typeof outbrain_template_manager!="undefined"&&outbrain_template_manager.templates.length>0&&typeof outbrain_language_manager.isLanguageReady=="function"&&outbrain_language_manager.isLanguageReady(outbrain_template_manager.templates[0].languageName)){if(outbrain_language_manager.getName(outbrain_template_manager.templates[0].getLanguageId()))a=a.replace(/\$LANGUAGE/g,e)}else a=a.replace(/\$LANGUAGE/g,"en");if(b.isRecEnabled)outbrain_settings.rater.isStars&&
outbrain_template_manager.isTemplateWithStars||(a+="&nostar=true");a+="&r="+Math.random();a+="&is_hp="+b.isHomePage;if(c==0&&typeof outbrain_customSettings.getSearchReferrer=="function"){c=outbrain_customSettings.getSearchReferrer();if(c!=null&&typeof c!="undefined"&&c.length>0)a+="&ref_search="+outbrain_customSettings.getSearchReferrer()}return a};this.odbBcrReplacer=function(a){a+="&bcr=true";return a};this.cleanPermalinkQueryString=function(a){var c=a.indexOf("?");if(c>0)return a.substr(0,c);return a};
this.insertOdbRequestIntoDom=function(a,c){a.appendChild(c)};this.isDuplicatedContainer=function(a){for(var c=0;c<b.permalinksUsed.length;c++)if(b.permalinksUsed[c]==a)return true;b.permalinksUsed.push(a);return false};this.extractStopElement=function(a){b.adIdHelper=null;a=a.getElementsByTagName("input");for(var c=0;c<a.length;c++)if(a[c].name!=null&&a[c].name.toLowerCase()=="postattribute"){if(a[c].value!=null&&a[c].value.toLowerCase()=="hide")return true;if(a[c].value!=null&&a[c].value.toLowerCase().indexOf("ad-")>=
0)b.adIdHelper=a[c].value.toLowerCase().replace("ad-","")}return false};this.extractePermalinkByFixedId=function(){var a=null;if(typeof OB_permalinkArray=="object"&&OB_permalinkArray!=null&&OB_permalinkArray.constructor==Array&&OB_permalinkArray.length>b.countInsertedItems)a=OB_permalinkArray[b.countInsertedItems];var c=document.getElementById(this.elementName);if(c&&c.value!=null&&c.value!="undefined")a=c.value;return a};this.extractePermalinkByFooter=function(a){var c=null,e=a.getElementsByTagName("div");
if(b.pmd.postFooterDivClassname!=null)for(var g=0;g<e.length&&c==null;g++)if(e[g].parentNode==a)for(var h=e[g].getElementsByTagName("a"),d=0;d<b.pmd.postFooterDivClassname.length&&c==null;d++)if(e[g].className==b.pmd.postFooterDivClassname[d])for(var f=0;f<h.length;f++){var j=h[f];if(j.title=="permanent link"&&j.href!=null)if(j.href!=""){b.pmd.postFooterDivClassname=[b.pmd.postFooterDivClassname[d]];c=j.href;break}}return c};this.extractePermalinkByClass=function(a){var c=null;a=a.getElementsByTagName("a");
for(var e=0;e<a.length&&c==null;e++)for(var g=a[e],h=0;h<b.pmd.permaLinkClassName.length;h++)if(g.href!=null&&g.href!="")if(g.className==b.pmd.permaLinkClassName[h]){b.pmd.permaLinkClassName=[b.pmd.permaLinkClassName[h]];c=g.href;break}return c};this.extractePermalinkByHTag=function(a){for(var c=null,e=0;e<=6&&c==null;e++)for(var g=a.getElementsByTagName("h"+e),h=0;h<g.length&&c==null;h++)for(var d=g[h].getElementsByTagName("a"),f=0;f<d.length;f++){var j=d[f];if(j.href!=null&&j.href!=""){c=j.href;
break}}return c};this.extractePermalinkByFirstLink=function(a){var c=null;a=a.getElementsByTagName("a");for(var e=0;e<a.length;e++){var g=a[e];if(g.href!=null&&g.href!=""){c=g.href;break}}return c};this.extractePermalink=function(a){if(typeof a=="undefined")return null;var c=null;switch(outbrain_settings.platformType){case null:default:break;case outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR:c=this.extractePermalinkByFixedId();if(c==null){c=this.extractePermalinkByFooter(a);if(c==null){c=this.extractePermalinkByClass(a);
if(c==null){c=this.extractePermalinkByHTag(a);if(c==null)c=this.extractePermalinkByFirstLink(a)}}}break;case outbrain_settings.PLATFORM_TYPE_TYPEPAD:c=this.extractePermalinkByClass(a);break;case outbrain_settings.PLATFORM_TYPE_TUMBLR:c=this.extractePermalinkByHTag(a);if(c==null)c=this.extractePermalinkByFirstLink(a);break}return c};this.isAllLanguagesPerTemplatesInited=function(){for(var a=0;a<outbrain_template_manager.templates.length;a++){var c=outbrain_template_manager.templates[a].getLanguageId();
if(!outbrain_language_manager.isLanguageReady(c))return false}return true};this.createPmd=function(){var a=null,c=null,e=null,g=null;switch(outbrain_settings.platformType){case outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR:a=["post-body","post-body entry-content","entry-content","excerpt post-body entry-content","postcontent","cover","entry","storycontent","entry clearfloat","text"];c=["timestamp-link","post-title entry-title"];e=["post-footer","footer","postfooter"];break;case outbrain_settings.PLATFORM_TYPE_TYPEPAD:a=
["entry-more","entry-body"];c=["permalink"];break;case outbrain_settings.PLATFORM_TYPE_TUMBLR:a=["regular"];break;case null:default:a=[outbrain_settings.rater.globalElementClass];break}if(b.userAppendContainerDivClass!=null){g=b.userAppendContainerDivClass;if(typeof g=="object"&&g!=null&&g.length>0)for(var h=0;h<g.length;h++)a.push(g[h])}b.userCustomizeContainerDivClass!=null&&a.unshift(b.userCustomizeContainerDivClass);if(b.userCustomizePermaLinkClass!=null)c=[b.userCustomizePermaLinkClass];if(b.userCustomizeFooterClass!=
null)e=[b.userCustomizeFooterClass];b.pmd=new OB_platformMetaData(a,c,e)};this.loadMP=function(){if(typeof OB_showMP=="boolean"?OB_showMP:false)switch(outbrain_settings.platformType){case outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR:case outbrain_settings.PLATFORM_TYPE_TYPEPAD:case outbrain_settings.PLATFORM_TYPE_TUMBLR:var a=document.createElement("script");a.type=outbrain_settings.globals.scriptType;a.id=outbrain_settings.MP.id;a.src=outbrain_settings.MP.url;document.getElementById(outbrain_settings.rater.firstRaterPositionElementId).appendChild(a);
break;case null:default:break}};this.checkNextBrother=function(a,c,e){try{for(var g=a[c].parentNode.childNodes,h=a[c].className,d=0,f=0,j=null,k=0;k<g.length;k++)if(g[k].className==h){d=k;break}for(var l=0;l<e.postDivClassname.length;l++)if(h!=e.postDivClassname[l])for(k=d;k<g.length;k++)if(g[k].className==e.postDivClassname[l]){j=g[k];f=k}if(j==null)return 0;e=0;for(k=c;k<a.length;k++,e++)if(g[f]==a[k])return e}catch(m){return 0}return 0};this.checkNextPBrother=function(a){for(var c=a.nextSibling;c!=
null;){if(c.className==b.readMoreClass)return c;if(c.nodeType==1)break;c=c.nextSibling}return a};this.dynamicInsertion=function(){var a=this.elementToSearch;this.halt||new outbrain_timeout(function(){var c=false;if(b.pageLoaded==true)c=true;if(outbrain_template_manager!=null&&outbrain_template_manager.templatesListInit&&b.isAllLanguagesPerTemplatesInited()&&outbrain_customSettings.ready)b.fullSettingReady=true;else return false;for(var e=document.getElementsByTagName(a),g=outbrain_settings.platformType==
outbrain_settings.PLATFORM_TYPE_TYPEPAD,h=0,d=0;d<b.pmd.postDivClassname.length;d++)for(h=0;h<e.length;h++)if(e[h].className==b.pmd.postDivClassname[d])if(typeof e[h].outbrainWidget!="boolean"){if(typeof OB_parentsCount=="number")try{k=e[h];for(var f=0;f<OB_parentsCount;f++)k=k.parentNode}catch(j){continue}else{var k=null;try{switch(outbrain_settings.platformType){case outbrain_settings.PLATFORM_TYPE_TYPEPAD:k=e[h].parentNode.parentNode;break;case outbrain_settings.PLATFORM_TYPE_BLOGGER_SIDEBAR:k=
e[h].parentNode;break;case outbrain_settings.PLATFORM_TYPE_TUMBLR:k=e[h];break;default:k=e[h];break}}catch(l){continue}}b.countInsertedItems++;if(OB_voterWidgetObjArray.length>=b.countInsertedItems&&typeof OB_voterWidgetObjArray[b.countInsertedItems]!="undefined"&&typeof OB_voterWidgetObjArray[b.countInsertedItems].permaLink=="string"){f=b.countInsertedItems;b.extractStopElement(document)}else{var m=b.extractePermalink(k);if(m==null){b.countInsertedItems--;continue}if(b.extractStopElement(k)==true||
b.isDuplicatedContainer(m)){b.countInsertedItems--;continue}f=b.countInsertedItems;OB_voterWidgetObjArray[f]=new voterWidgetObj;OB_voterWidgetObjArray[f].permaLink=m}m=e[h];if(g){h+=b.checkNextBrother(e,h,b.pmd,d);m=b.checkNextPBrother(e[h])}if(outbrain_template_manager.insertDomPerPost(f,m)!=null){b.itemInserted=true;m.outbrainWidget=true;typeof reverseCallbackInsertByIdx=="function"&&reverseCallbackInsertByIdx(f);b.pmd.postDivClassname=[b.pmd.postDivClassname[d]];d=0;b.registerOdbRequest(f)}else b.countInsertedItems--}return c&&
b.itemInserted?true:false},function(){b.fireNextOdbRequestItem()},function(){b.itemInserted&&b.fireNextOdbRequestItem()},function(){outbrain_error_manager.addError(1001,"No rater inserted",outbrain_error_manager.FATAL)},100,1E3,true,function(){return b.pageLoaded&&b.fullSettingReady})};this.reDraw=function(){};this.pageLoadedEvent=function(a){b.pageLoaded=true;outbrain_customSettings.pageLoaded=true;a&&this.reDraw()};this.loadToolTip=function(){if(this.isToolTipLoaded!=true){this.isToolTipLoaded=
true;var a=document.createElement("script");a.setAttribute("id","ToolTip");a.setAttribute("type","text/javascript");a.setAttribute("src",outbrain_settings.domains.js+"wz_tooltip.js");var c=document.getElementsByTagName("head");c.length>0&&c[0].insertBefore(a,c[0].firstChild)}};this.waitForCustomSettings=function(){new outbrain_timeout(function(){return outbrain_customSettings.ready},function(){b.resetClassNames();b.createPmd();outbrain_template_manager.loadTemplates();b.loadMP();b.objLocationItemHolder.setLocationsSettingsOnce();
b.dynamicInsertion()},null,null,100,1E3,true)};this.dateTriggers=function(){if(typeof OBITm!="undefined")if(!isNaN(parseInt(OBITm))){OBITm=parseInt(OBITm);if(OBITm/1E12<1)OBITm*=1E3;if(typeof outbrain_settings.timestampDef.activeV400Timestamp!="undefined"&&OBITm>outbrain_settings.timestampDef.activeV400Timestamp)OB_PC_enable=typeof OB_PC_enable!="undefined"?OB_PC_enable:true;if(typeof outbrain_settings.timestampDef.activeV361Timestamp!="undefined"&&OBITm>outbrain_settings.timestampDef.activeV361Timestamp)OB_self_posts=
typeof OB_self_posts!="undefined"?OB_self_posts:false;if(typeof outbrain_settings.timestampDef.activeV355Timestamp!="undefined"&&OBITm>outbrain_settings.timestampDef.activeV355Timestamp){OB_defaultRecNumber=typeof OB_defaultRecNumber!="undefined"?OB_defaultRecNumber:2;OB_RecNumberFetch=typeof OB_RecNumberFetch!="undefined"?OB_RecNumberFetch:4}if(typeof outbrain_settings.timestampDef.activeV354Timestamp!="undefined"&&OBITm>outbrain_settings.timestampDef.activeV354Timestamp)OB_showMP=typeof OB_showMP!=
"undefined"?OB_showMP:false;if(typeof outbrain_settings.timestampDef.activeRecTimestamp!="undefined"&&OBITm>outbrain_settings.timestampDef.activeRecTimestamp){outbrain_settings.timestampDef.installTimestmp=OBITm;OB_showRec=typeof OB_showRec!="undefined"?OB_showRec:true;OB_showMP=typeof OB_showMP!="undefined"?OB_showMP:true;outbrain_settings.rater.recommendations.selfPost=typeof OB_self_posts!="undefined"?OB_self_posts:true}}};this.firstRater=function(){b.dateTriggers();this.isRunning=true;var a=typeof OB_waitForLoad==
"boolean"?OB_waitForLoad:false;a||this.reDraw();if(window.addEventListener)window.addEventListener("load",function(){b.pageLoadedEvent(a)},false);else if(window.attachEvent)window.attachEvent("onload",function(){b.pageLoadedEvent(a)});else if(document.getElementById)window.onload=function(){b.pageLoadedEvent(a)};outbrain_dom.documentWrite("<span id='"+outbrain_settings.rater.firstRaterPositionElementId+"'></span>");this.waitForCustomSettings()};this.insertGlobalSpan=function(a,c){a="";a=this.elementToSearch;
if(c){a=document.createElement(a);a.className=outbrain_settings.rater.globalElementClass;return a}else outbrain_dom.documentWrite("<"+a+" class='"+outbrain_settings.rater.globalElementClass+"'></"+a+">")};this.insertRater=function(){if(!this.halt)if(!this.isRunning&&typeof OB_platformType=="number"||typeof OB_platformType!="number"){if(typeof OutbrainPermaLink=="string")this.elementToSearch="span";if(typeof OB_elementToSearch=="string")this.elementToSearch=OB_elementToSearch;OB_voterWidgetObjArray.length==
0&&this.firstRater();if(typeof OutbrainPermaLink=="string"){var a=OB_voterWidgetObjArray.length;OB_voterWidgetObjArray[a]=new voterWidgetObj;OB_voterWidgetObjArray[a].permaLink=OutbrainPermaLink;this.insertGlobalSpan(a,false)}}};this.rate=function(a,c,e){var g=OB_voterWidgetObjArray[c];if(g.rankInfo==null)return false;if(!this.lockRater(c)){var h=g.permaLink;if(outbrain_settings.rater.cleanPermalink)h=this.cleanPermalinkQueryString(h);var d="?s="+e;h="&u="+encodeURIComponent(h);var f="&v="+outbrain_settings.versions.odb,
j="",k="",l="",m="";if(outbrain_settings.keys_and_users.agentId!=null)j="&a="+encodeURIComponent(outbrain_settings.keys_and_users.agentId);if(outbrain_settings.keys_and_users.partnerName!=null)k="&p="+encodeURIComponent(outbrain_settings.keys_and_users.partnerName);if(typeof OB_rfdid=="string")l=OB_rfdid;else if(this.getQSParam("rfdid")!=null)l=this.getQSParam("rfdid");if(l!="")l="&rfdid="+l;if(outbrain_settings.keys_and_users.userName!=null)m="&e="+outbrain_settings.keys_and_users.userName;g=typeof g.jsonObj.response.request.did==
"string"?g.jsonObj.response.request.did:null;g=g!=null&&parseInt(g)+0>0?"&did="+g:"";var n="&r="+Math.random(),o=outbrain_settings.odb.odbRatesRecorder;o+=d+h+f+j+k+l+m+g+n;outbrain_template_manager.doRate(a,c,o);OB_voterWidgetObjArray[c].rankInfo.vote=e;if(!OB_voterWidgetObjArray[c].rated){OB_voterWidgetObjArray[c].rankInfo.ratedBy++;OB_voterWidgetObjArray[c].rankInfo.wratedBy++}e==4&&OB_voterWidgetObjArray[c].rankInfo.posRate++;e==2&&OB_voterWidgetObjArray[c].rankInfo.negRate++;if(e==-1){OB_voterWidgetObjArray[c].rankInfo.ratedBy--;
OB_voterWidgetObjArray[c].rankInfo.wratedBy--;OB_voterWidgetObjArray[c].rated=false}else OB_voterWidgetObjArray[c].rated=true;outbrain_template_manager.userRated(c)}};this.initOnlyWithTemplates=function(){b.supportRecommendations=outbrain_template_manager.isThereTemplateWithRecommendations()};this.resetClassNames=function(){b.userCustomizeContainerDivClass=typeof OB_containerClass=="string"?OB_containerClass:null;b.userCustomizePermaLinkClass=typeof OB_permaLinkClass=="string"?OB_permaLinkClass:null;
b.userCustomizeFooterClass=typeof OB_footerClass=="string"?OB_footerClass:null;b.userAppendContainerDivClass=typeof OB_containerAppend=="object"&&OB_containerAppend!=null?OB_containerAppend:null};this.init=function(){b.resetClassNames();b.halt=typeof OB_Halt=="boolean"?OB_Halt:false;b.bindLocationEvent();b.bindResizeEvent()};this.bindLocationEvent=function(){if(window.addEventListener)window.addEventListener("scroll",function(){b.checkLocationsWithDimmer()},false);else if(window.attachEvent)window.attachEvent("onscroll",
function(){b.checkLocationsWithDimmer()});else if(document.getElementById){var a=window.onscroll;window.onload=function(){a();b.checkLocationsWithDimmer()}}};this.bindResizeEvent=function(){if(window.addEventListener)window.addEventListener("resize",function(){b.resizeMethods()},false);else if(window.attachEvent)window.attachEvent("onresize",function(){b.resizeMethods()});else if(document.getElementById){var a=window.onresize;window.onresize=function(){a();b.resizeMethods()}}};this.resizeMethods=
function(){b.objLocationItemHolder.setLocationsSettings()};this.locationItemHolder=function(){var a=this;this.objPositionCalc=new outbrain_PositionCalc;this.actionList=[];this.counter=0;this.addLocationItem=function(c){this.actionList[this.actionList.length]=c};this.cleanList=function(){for(var c=this.actionList.length-1;c>=0;c-=1)this.actionList[c]==null&&this.actionList.splice(c,1)};this.removeItemByPostIndex=function(c){for(var e=this.actionList.length-1;e>=0;e-=1)if(this.actionList[e]!=null)if(this.actionList[e].index==
c)this.actionList[e]=null};this.getElementsInScope=function(){var c=[];this.objPositionCalc.reCalc();for(var e=0;e<this.actionList.length;e++)if(this.actionList[e]!=null){var g=this.objPositionCalc.checkIfElementInViewPort(this.actionList[e].element);if(g==outbrain_settings.odb.INSIDEFOLD||g==outbrain_settings.odb.NEARFOLD||g==outbrain_settings.odb.ERRED){c[c.length]=this.actionList[e];this.removeItemByPostIndex(this.actionList[e].index)}}this.cleanList();return c};this.setLocationsSettings=function(){var c=
this.objPositionCalc.getViewportHeight();this.objPositionCalc.topThreshold=Math.round(outbrain_settings.odb.topPaddingThreshold*c);this.objPositionCalc.bottomThreshold=Math.round(outbrain_settings.odb.bottomPaddingThreshold*c)};this.setLocationsSettingsOnce=function(){this.objPositionCalc.setSerialMode=outbrain_settings.odb.isOdbCallsSerial;a.setLocationsSettings()}};this.objLocationItemHolder=new this.locationItemHolder;this.init()},OB_platformMetaData=typeof OB_platformMetaData=="function"?OB_platformMetaData:
function(b,a,c){this.postDivClassname=b;this.permaLinkClassName=a;this.postFooterDivClassname=c},voterWidgetObj=typeof voterWidgetObj=="object"?voterWidgetObj:function(){this.frezz=false;this.rateMode=outbrain_settings.rater.statuses.RATER_PRE_RATE_MODE;this.wratedBy=this.ratedBy=this.rateScore=this.frezzSemaphore=0;this.isPersonalized=false;this.userName="";this.mainDiv=this.jsonObj=null;this.currentRateValue=1;this.permaLink=this.rankInfo=null;this.rated=false;this.SecLineOn=true;this.rateInfo=
this.rateStatus=this.rateInfo="";this.rankInfo_object=function(b,a,c,e,g,h){this.user=h;this.rank=Number(b);this.ratedBy=Number(a);this.wratedBy=Number(c);this.posRate=Number(e);this.negRate=Number(g);this.personalRatedBy=this.personalRank=this.vote=0;this.getComputedRank=function(d){if(this.ratedBy==0)return 0;var f=0;f=this.personalRank!=0&&typeof d=="undefined"?this.personalRank:(this.rank+Number(this.vote))/this.wratedBy;return outbrain_language_manager.changeX(null,f)};this.getPersonalRateIndex=
function(){var d=this.getComputedRank(),f=this.getComputedRank(true),j=d<2.5&&d>0?0:d>2.5&&d<4?1:2;if(j==2&&f>d)j=1;return j}}},outbrain_plugin_object=typeof outbrain_plugin_object=="function"?outbrain_plugin_object:function(){this.ID="DEF_PLUG_ID";this.keyList=[];this.valueList=[];this.onStart=function(){};this.onRate=function(){};this.onPostRate=function(){};this.initPost=function(){};this.init=function(){}},plugin_disqus_object=function(){this.ID="DSQ_PL_ID";plugin_disqus_object.baseConstructor.call(this);
this.settings=new function(){};this.dsq_isDisqusHere=false;this.templateDOM="";this.active=this.iframeOpen=false;this.getDomPerPost=function(){};this.onStart=function(){};this.initPost=function(){};this.initDOM=function(){};this.replaceOnce=function(){};this.init=function(){}};plugin_disqus_object.prototype=outbrain_plugin_object;plugin_disqus_object.prototype.constructor=plugin_disqus_object;plugin_disqus_object.baseConstructor=outbrain_plugin_object;
var outbrain_owner_template_object=typeof outbrain_owner_template_object=="function"?outbrain_owner_template_object:function(){};outbrain_owner_template_object.prototype=outbrain_template_object;outbrain_owner_template_object.prototype.constructor=outbrain_owner_template_object;outbrain_owner_template_object.baseConstructor=outbrain_template_object;function OutbrainTemplateRegistry(){this.map={}}OutbrainTemplateRegistry.prototype.STRIP="strip";
OutbrainTemplateRegistry.prototype.reportTemplateLoaded=function(b){this.map[b]=true};OutbrainTemplateRegistry.prototype.reportAllUnloaded=function(){this.map={}};OutbrainTemplateRegistry.prototype.isTemplateLoaded=function(b){return Boolean(this.map[b])};var outbrainTemplateRegistry=new OutbrainTemplateRegistry;function OutbrainStart(){if(!outbrain_browsers.opera){outbrain_rater.insertRater();typeof reverseCallback=="function"&&reverseCallback()}}
if(!outbrain_browsers.opera){var outbrain_dom=typeof outbrain_dom=="object"?outbrain_dom:new outbrain_dom_object,outbrain_error_manager=typeof outbrain_error_manager=="object"?outbrain_error_manager:new outbrain_error_manager_object,outbrain_language_manager=typeof outbrain_language_manager=="object"?outbrain_language_manager:new outbrain_language_manager_object,outbrain_template_manager=typeof outbrain_template_manager=="object"?outbrain_template_manager:new outbrain_template_manager_object,OB_odb_life=
typeof OB_odb_life=="object"?OB_odb_life:null;if(OB_odb_life==null)OB_odb_life=new outbrain_odb_life_object(outbrain_settings.ping.maxTime,outbrain_settings.ping.url,outbrain_settings.ping.id);var outbrain_customSettings=typeof outbrain_customSettings=="object"?outbrain_customSettings:new outbrain_customSettings_object,outbrain_rater=typeof outbrain_rater=="object"?outbrain_rater:new outbrain_rater_object;OutbrainStart()};
