dmjs.addLoadEvent(function(){var t,e=document,n="https:"==e.location.protocol?"https":"http",o="https"==n?"https://info.evidon.com/c/betrad/pub/":"http://cdn.betrad.com/pub/";e.getElementById("_bapw-icon").src=o+"icon1.png",$(".ad-choice").click(function(){function t(t,n){function o(){i.onload=i.onreadystatechange=null,a.removeChild(i),n()}var a=e.getElementsByTagName("head")[0]||e.documentElement,c=!1,i=e.createElement("script");i.src=t,i.onreadystatechange=function(){c||"loaded"!=this.readyState&&"complete"!=this.readyState||(c=!0,o())},i.onload=o,a.insertBefore(i,a.firstChild)}var a=this;return t(n+"://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js",function(){t(o+"pub1.js",function(){BAPW.i(a,{pid:46,ocid:374},!1)})}),!1}),t=new Image,t.src=n+"://l.betrad.com/pub/p.gif?pid=46&ocid=374&ii=1&r="+Math.random()},20);0!=dmjs.revenueTags.length&&$("<meta/>").attr("scheme","DMINSTR2").attr("name","ltvtag").attr("content",encodeURIComponent(dmjs.revenueTags.join("|"))).appendTo($("head"));var _comscore=_comscore||[];_comscore.push(dmjs.global.comscore),function(){var c=document.createElement("script"),e=document.getElementsByTagName("script")[0];c.async=!0,c.src=("https:"==document.location.protocol?"https://sb":"http://b")+".scorecardresearch.com/beacon.js",e.parentNode.insertBefore(c,e)}();function loadFacebookAPI(){var e=document.createElement("script"),t=dmjs.global.facebook.app_id,i=dmjs.global.facebook.api_version;e.src="//connect.facebook.net/en_US/sdk.js#xfbml=1&version="+i+"&appId="+t,document.body.appendChild(e)}function showFacebookComment(){setTimeout(function(){$(".js-loading_icon").hide(),$(".js-fb-comments").show()},4e3)}var dartAds=function(win,doc){var perfTest=-1!=win.location.search.indexOf("perftest=true"),_page=!1,_params=[],_tile=1,_ord,_deferredAds={},_siteCodeOR="";win.dartAdComplete=function(e,t,i){var n=doc.getElementById(e).firstChild;n.width=t+"px",n.height=i+"px"};var generateUrl=function(e,t){var i,n=[],o=[],r=[],s=0,a=e.length;if(!_public.defaults.server||!_public.defaults.siteCode)return"";for(n.push(_public.defaults.server),n.push(t?"adi":"adj"),n.push("/"),n.push(""===_siteCodeOR?_public.defaults.siteCode:_siteCodeOR),n.push("/"+_page+";");a>s;s++){var c=e[s];for(i in c)if("object"==typeof c[i])for(var l=0;l<c[i].length;l++)n.push(i+"="+c[i][l]+";"),o.push(i+"="+c[i][l]+"_"),r[i]=c[i][l];else perfTest&&"cat"==i?c[i]="perftest":perfTest&&"scat"==i?c[i]="perftest":perfTest&&"sscat"==i&&(c[i]="perftest"),n.push(i+"="+c[i]+";"),o.push(i+"="+c[i]),r[i]=c[i]}return dmjs.revenueTags.push("Dart;"+o.join("_")),_public.defaults.staging&&n.push("envr=stage;"),"undefined"!=typeof win.dexQS&&win.dexQS.length>0&&n.push(win.dexQS+";"),n.push("dc_ref="+_dc_ref+";"),n.push("tile="+_tile+";"),"undefined"!=typeof crtg_content&&crtg_content.length>0&&n.push(crtg_content+";"),n.push("ord="+_ord+"?"),_tile++,n.join("")},_public={getAdUrl:function(e,t){var i,n,o=[];for(i=0;i<_params.length;i++)o.push(_params[i]);for(n=0;n<e.length;n++)o.push(e[n]);var r=generateUrl(o,t);return r},getAd:function(e,t,i){var n=t&&i;dmjs.platform.isTablet()&&(n=!1);var o=this.getAdUrl(e,n);if(!o)return!1;var r;return r=n?'<iframe src="'+o+'" width="'+t+'" height="'+i+'" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>':'<center><script type="text/javascript" src="'+o+'"></script></center>'},setParams:function(e,t){_page=e,_params=t,_ord=Math.floor(1e13*Math.random()),_dc_ref=window.location.href.replace("#","-")},renderAd:function(e,t,i){if(_page&&_params){var n=this.getAd(e,t,i);doc.write(n)}},renderiFrameAd:function(e,t,i,n){var o=n||"";if(_siteCodeOR=o,dmjs.global.opDART160Test&&"160x600"===e[0].sz&&(e[0].test="onesixty"),dmjs.platform.isTablet())return void this.renderAd(e,t,i);var r="DartAd_"+Math.round(1e7*Math.random()),s=this.getAdUrl(e);if(s){var a=doc.createElement("iframe"),c="/media/ad.html?divId="+r+"&w="+t+"&ad="+escape(s);a.scrolling="no",a.frameBorder="no",a.marginHeight="0",a.marginWidth="0",a.height=i||"0px",a.width="0px",doc.write("<div><center id='"+r+"'></center></div>"),doc.getElementById(r).appendChild(a),a.contentWindow.location.href=c}},renderAdDynamic:function(e,t,i,n){var o="DartAd_"+Math.round(1e7*Math.random()),r=this.getAdUrl(t);if(r){var s=doc.createElement("iframe"),a="/media/ad.html?divId="+o+"&w="+i+"&ad="+escape(r);s.scrolling="no",s.frameBorder="no",s.marginHeight="0",s.marginWidth="0",s.height=n||"0px",s.width="0px";var c=$("<div><center id='"+o+"'></center></div>");c.find("#"+o).append(s),$(e).append(c),s.contentWindow.location.href=a}},renderAdElements:function(nodes){var i=0,ii=nodes.length;if(_page&&_params)for(;ii>i;i++){var node=nodes[i],size=eval(node.getAttribute("data-dartAdSize")),params=eval(node.getAttribute("data-dartAdParams"));if("1"==node.getAttribute("data-dartCompanion")){var adUrl=this.getAdUrl(params,!1);win.adaptvCompanionAdTag=adUrl}else{var ad=this.getAd(params,size[0],size[1]);ad&&(node.innerHTML=ad)}}},defaults:{server:null,siteCode:null,staging:!1}};return _public}(window,document),OmnitureLinkSet=function(e,t,i,n,o){var r=new LinkTracking(e,n);return o&&r.setRCPSpecifics(o),r.linksetId(t).location(i).run()},linkTracking=function(e){return new LinkTracking(e)},LinkTracking=function(e,t){this.el=e,this.props={encode:!0,debug:!1},this.rcp_specifics={algo_id:null,request_id:null,weight_config_name:null,widget_id:null,category:null},this.rcp_mappings={algo_id:"wa_user1",request_id:"wa_un",weight_config_name:"wa_user2",widget_id:"wa_wsid",category:"category"},this.uniqueLinks={},t&&(this.props.objectType="PLATFORM"),this.linkTags=$("a",this.el),this.baseUrl="http://"+_omnitureLinkSetDomain+"/images/zig.gif?",this._getUrls()};LinkTracking.prototype.debug=function(e){return this.props.debug=e,this},LinkTracking.prototype.linksetId=function(e){return this.props.linksetId=e,this},LinkTracking.prototype.location=function(e){return this.props.location=e,this},LinkTracking.prototype.type=function(e){return this.props.objectType=e,this},LinkTracking.prototype.setRCPSpecifics=function(e){for(key in e)this.rcp_specifics[key]=e[key];return this},LinkTracking.prototype.extendRCPData=function(e){for(key in this.rcp_specifics)null!==this.rcp_specifics[key]&&""!==this.rcp_specifics[key]&&(e[this.rcp_mappings[key]]=this.rcp_specifics[key]);return e},LinkTracking.prototype._serialize=function(e){var t=[];for(var i in e)t.push(i+"="+e[i]);return t.join("&")},LinkTracking.prototype._getUrls=function(){this.urlMap={},this.urls=[];for(var e,t=1,i=0;i<this.linkTags.length;i++)e=this.linkTags[i].href,e&&(this.props.encode&&(e=encodeURIComponent(e)),"undefined"==typeof this.urlMap[e]&&(this.urlMap[e]=t,this.urls.push(e+";"+t),t++));return this},LinkTracking.prototype._getRandomNumber=function(){return Math.floor(9999999*Math.random())},LinkTracking.prototype._getExpName=function(){return $("meta[name=exp_name]").attr("content")},LinkTracking.prototype.trackImpression=function(){var e={Log:1,v:"JT01.02",ev:"lnkimpression",wa_page:encodeURIComponent(window.location.href),vid:this._getRandomNumber(),exp_name:this._getExpName()};this.props.linksetId&&(e.wa_lst=this.props.linksetId),this.props.location&&(e.wa_mp=this.props.location),this.props.objectType&&(e.wa_wot=this.props.objectType),this.extendRCPData(e),e.wa_l=this.urls.join("|");var t=this._serialize(e),i=this.baseUrl+t;return this.props.debug?(console.log(e,i),!1):($("body").append("<img src='"+i+"' width='1' height='1'/>"),this)},LinkTracking.prototype.bindClickTracking=function(){var e=this;return this.linkTags.bind("click",function(t){t.preventDefault();var i=$(this),n=i.attr("href"),o=e.urlMap[encodeURIComponent(n)],r={Log:1,v:"JT01.02",ev:"lnkimpression_click",wa_page_click:encodeURIComponent(window.location.href),vid:e._getRandomNumber(),exp_name:e._getExpName()};e.props.linksetId&&(r.wa_lst_click=e.props.linksetId),e.props.location&&(r.wa_mp_click=e.props.location),e.props.objectType&&(r.wa_wot=e.props.objectType),e.extendRCPData(r);var s=e.props.encode?encodeURIComponent(n):n;r.wa_l_click=s+";"+o;var a=e._serialize(r),c=String.format("http://{0}/images/zig.gif?{1}",_omnitureLinkSetDomain,a);$("body").append("<img src='"+c+"' width='1' height='1'/>"),n&&window.setTimeout(function(){window.location=n},500)}),this},LinkTracking.prototype.run=function(){return 0!=this.el.length&&(this.trackImpression(),this.bindClickTracking()),this},$(function(){var e="div[data-type='adTracking']";$(e+" a, "+e+" div.GoogleFlashAd div.Ad").bind("mouseup",function(){var t=$(this).parents(e);_JT.DM_Click(t[0])})}),"undefined"==typeof LSAPP.Service&&(LSAPP.Service=function(e){var t=this,i="www.livestrong.com";-1!==location.host.indexOf("ehowdev")&&(i=location.host.replace(/ehowdev/,"livestrongdev")),t.path="http://"+i+"/service/"+e+"/"},LSAPP.Service.prototype.get=function(e,t){return this.call("get",e,t)},LSAPP.Service.prototype.post=function(e,t){return this.call("post",e,t)},LSAPP.Service.prototype.put=function(e,t){return e._method="PUT",this.call("post",e,t)},LSAPP.Service.prototype.deletes=function(e,t){return e._method="DELETE",this.call("post",e,t)},LSAPP.Service.prototype.call=function(e,t,i){var n=this;return"function"==typeof i&&(i={success:i}),i.type=e,i.url=n.path,i.data=t,$.ajax(i)},LSAPP.Service_Factory={build:function(e){return new LSAPP.Service(e)}}),function(e){var t={};e.fn.tpl=function(t,i){return this.html(e.tpl(t,i))},e.tpl=function i(e,n){try{var o=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g,"").split("[!").join("	").replace(/((^|!\])[^\t]*)'/g,"$1\r").replace(/\t=(.*?)!\]/g,"',$1,'").split("	").join("');").split("!]").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):t[e]=t[e]||i(document.getElementById(e).innerHTML);return n?o(n):o}catch(r){}}}(jQuery),"undefined"==typeof lsapp.Notifications&&(lsapp.Notifications=function(){var e=this;return e.notifications=[],e.query=e.unread_counter=0,e.hide_seconds_after=5e3,e.lsapp_notification=$("#lsapp_widget_notifications"),e.host="www.livestrong.com",-1!==location.host.indexOf("ehowdev")&&(e.host=location.host.replace(/ehowdev/,"livestrongdev")),e.firebase_auth=function(){var e,t=this;$.getJSON("http://"+t.host+"/service/firebase/token/?_format=jsonp&callback=?",function(i){i.token&&(t.timestamp=i.timestamp,t.query=i.timestamp-10,t.firebase=new Firebase(i.path),t.firebase.auth(i.token,function(i){i||(e=t.firebase.endAt().limit(5),e.on("child_added",function(e){e.timestamp=t.timestamp,t.child_added_event(e)}),t.firebase.on("value",function(e){t.update_notification_counter(e)}))}),$.getJSON("http://"+t.host+"/service/user/preference/?_format=jsonp&key=show_notifications&callback=?",function(e){var t;1==e.show_notifications&&(t=$("#notification_settings_menu"),t.find(".toggle_notifications").addClass("updated"))}))})},e.handle=function(){var e=this;return{click_close_bubble:function(t){var i=$(t.target||t.srcElement);return e.bubble_timeout("stop",i),i.parent(".notification_bubble").fadeOut(500),!1},click_disable_notifications:function(t){return e.toggle_notifications(t,!1),!1},click_redirect_notification:function(e){var t=e.closest(".notification_bubble").data("destination");window.location=t},hover_reset_timeout:function(t){var i=$(t.target||t.srcElement);return i.hasClass("notification_bubble")&&("mouseenter"==t.type?e.bubble_timeout("stop",i):e.bubble_timeout("start",i)),!1}}},e.toggle_notifications=function(e,t){var i=function(t){LSAPP.Service_Factory.build("user/preference").post({preferences:{show_notifications:t}},function(){("undefined"!=e||null!=e)&&$(e).toggleClass("updated")})};"undefined"!=typeof t?i(t):LSAPP.Service_Factory.build("user/preference").get({key:"show_notifications"},function(e){i(Number(e.show_notifications)?0:1)})},e.bind_ui=function(){var e=this,t=window;$(t).click(function(e){var t=$(e.target||e.srcElement),i=$("#login_module");i.is(":visible")&&i.hide(),!t.parents("#event_notifier").length>0&&"event_notifier"!=t.attr("id")&&$("#event_history_wrapper").hasClass("open")&&$("#event_notifier").click()}),e.history_element=$("#event_notifier"),e.history_element&&e.history_element.click(function(t){var i=t.target||t.srcElement,n=$(i).data("lsapp-cmd");switch(n){case"event_notifier":var o=e.history_element.find("#event_history_wrapper");o.hasClass("open")?(o.removeClass("open"),e.history_element.find("#notification_settings_menu").hide(),e.history_element.find("#notification_settings_menu"),e.history_element.find(".count").hide().text(e.unread_counter=0)):o.addClass("open");break;case"notification_settings":e.history_element.find("#notification_settings_menu").toggle(),t.stopPropagation();break;case"toggle_notifications":e.toggle_notifications(i);break;case"username":case"avatar":t.stopPropagation();break;default:var r=$(i).closest("li").data("lsapp-cmd");"undefined"!=typeof r&&(r=JSON.parse(decodeURIComponent(r)),e.delete_notification(r.path,function(){$(i).closest("li").fadeOut("fast",function(){$(this).remove(),e.history_element.find(".event_history").children("li").size()<=1&&e.history_element.find(".no_notifications").show(),window.location=r.url,$(i).remove()})}))}})},e.bubble_timeout=function(e,t){var i=this,n=t.attr("data-bubble_timeout");try{switch("undefined"!=typeof n&&clearTimeout(n),e){case"start":t.attr("data-bubble_timeout",setTimeout(function(){t.fadeOut(350)},i.hide_seconds_after)).addClass("start");break;case"stop":default:t.removeClass("start").removeAttr("data-bubble_timeout")}}catch(o){}},e.child_added_event=function(e){var t=this,i=e.val();if(i.offset=t.translate_time(e.timestamp,i.timestamp),"undefined"!=typeof i||null!==i){if(i.path=e.name(),i.timestamp>t.query){var n=$($.tpl("notification_element",i));n&&($("#lsapp_widget_notifications").children(".notification_popup_container").append(n),t.notifications[i.path+""]=i,t.bubble_timeout("start",n))}t.unread_counter++,t.update_notification_history(i)}},e.translate_time=function(e,t){var i,n,o=1e3,r=new Date(e*o),s=new Date(t*o),a=(r.getTime()-s.getTime())/1e3;return 0>a?(n="s",i="1"+n):60>a&&a>0?(n="s",i=a+n):a>60&&3600>a?(n="m",a=Math.ceil(a/60),i=a+n):a>3600&&86400>a?(n="h",a=Math.ceil(a/3600),i=a+n):(n="d",i=" > 1"+n),i},e.delete_all_notifications=function(){var e=this;for(var t in e.notifications)e.delete_notification(t),delete e.notifications[t]},e.delete_notification=function(e,t){LSAPP.Service_Factory.build("notification/notification/socketpush/firebase").deletes({path:e},function(){"function"==typeof t&&"undefined"!=t&&t()})},e.update_notification_counter=function(t){e.unread_counter=t.numChildren(),e.history_element=$("#event_notifier"),e.unread_counter>0&&e.history_element.find(".count").show().text(e.unread_counter)},e.update_notification_history=function(e){var t,i=this,n={url:e.destination,path:e.path},o=i.history_element.find(".event_history"),r=5,s=100,a={truncate:{context:33}};if(e=i.notification_history_preprocess(e,a),e.notification_obj=encodeURIComponent(JSON.stringify(n)),i.history_element){var c=$.tpl("notification_history",e);c&&(o.prepend(c),t=o.children("li").not(".no_notifications").size(),t>=r?(o.css("overflow-y: scroll"),o.height(s*r)):(o.css("overflow-y: hidden"),o.css("height: auto"))),0!=i.unread_counter&&i.history_element.find(".no_notifications").hide()}},e.notification_history_preprocess=function(e,t){var e=e||{},t=t||{};for(var i in t)switch(i){case"truncate":for(var n in t.truncate)e.hasOwnProperty(n)&&(e[n]=e[n].length>=t.truncate[n]?e[n].substring(0,t.truncate[n])+"&hellip;":e[n])}return e},{init:function(){var t=$("#lsapp_widget_notifications");e.firebase_auth(),e.bind_ui(),function(){var i=e.handle();t.find(".close_notification").live("click",function(e){i.click_close_bubble(e)}),t.find(".notification_bubble .notifications_settings").live("click",function(e){var t=e.target||e.srcElement;i.click_disable_notifications($(t))}),t.find(".notification_bubble").live("click",function(e){var t=e.target||e.srcElement;i.click_redirect_notification($(t))}),t.find(".notification_bubble").live("hover",function(e){i.hover_reset_timeout(e)})}()}}}),function(){function e(){return"true"===dmjs.cookies.readCookie("loggedin")}function t(){return 3===parseInt(dmjs.cookies.readCookie("user_rank"))}function i(){return"object"==typeof dartAds}function n(){return"object"==typeof googleAds}function o(){return"object"==typeof googletag}var r,s=$("meta[name=wa_clvl]");t()&&(i()&&(dartAds.renderiFrameAd=function(){}),n()&&(googleAds.addAdUnit=function(){}),o()&&(googletag.cmd.push=function(){}),$("head").append($('<style type="text/css">.Ad, .AdUnit, .advertisement, .GoogleTextAd, .module-rs, [data-module=radlinks], [type=adimpression] { display: none; }</style>'))),e()&&s.length>0&&(r=t()?2:1,s.attr("content",r))}(),function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(i){function n(){!e&&this.init&&this.init.apply(this,arguments)}var o=this.prototype;e=!0;var r=new this;e=!1;for(var s in i)r[s]="function"==typeof i[s]&&"function"==typeof o[s]&&t.test(i[s])?function(e,t){return function(){var i=this._super;this._super=o[e];var n=t.apply(this,arguments);return this._super=i,n}}(s,i[s]):i[s];return n.prototype=r,n.constructor=n,n.extend=arguments.callee,n}}(),!function(e){var t={};t.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)}).toUpperCase()},t.extend=function(){throw new Error("Fidel.extend is deprecated, please use Fidel.ViewController.extend")};var i=e.Fidel;t.noConflict=function(){return e.Fidel=i,this},e.Fidel=t}(this),!function(e){var t=!1,i=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;e.Class=function(){},e.Class.extend=function(n){function o(i){if(!t){if(this.guid=e.guid(),this.defaults)for(var n in this.defaults)"object"==typeof i&&i[n]||(this[n]=this.defaults[n]);if("object"==typeof i)for(var o in i)this[o]=i[o];this._initialize&&this._initialize.apply(this,arguments),this.init&&this.init.apply(this,arguments)}}var r=this.prototype;t=!0;var s=new this;t=!1;for(var a in n)s[a]="function"==typeof n[a]&&"function"==typeof r[a]&&i.test(n[a])?function(e,t){return function(){var i=this._super;this._super=r[e];var n=t.apply(this,arguments);return this._super=i,n}}(a,n[a]):n[a];return o.prototype=s,o.prototype.proxy=function(e){var t=this;return function(){return e?e.apply(t,arguments):void 0}},o.constructor=o,o.extend=arguments.callee,o}}(Fidel||this),!function(e){var t={};e.publish=function(e,i){for(var n=t[e],o=n?n.length:0;o--;)n[o].apply(this,i||[])},e.subscribe=function(e,i){return t[e]||(t[e]=[]),t[e].push(i),[e,i]},e.unsubscribe=function(e){for(var i=t[e[0]],n=e[1],o=i?i.length:0;o--;)i[o]===n&&i.splice(o,1)},e.Class.prototype.on=e.Class.prototype.bind=function(t,i){return e.subscribe(this.guid+"."+t,this.proxy(i))},e.Class.prototype.emit=e.Class.prototype.trigger=function(t,i){e.publish(this.guid+"."+t,i),e.publish(t,i)},e.Class.prototype.removeListener=e.Class.prototype.unbind=function(t){e.unsubscribe(t)}}(Fidel||this),function(e){var t=/^(\w+)\s*(.*)$/,i=e.Class.extend({_initialize:function(){if(!this.el)throw"el is required";this._subscribeHandles={},this._processedActions={},this.events&&this.delegateEvents(),this.elements&&this.refreshElements(),this.templateSelector&&this.loadTemplate(),this.actionEvent||(this.actionEvent="click"),this.subscribe&&this.bindSubscriptions(),this.delegateActions(),this.getDataElements()},delegateEvents:function(){for(var e in this.events){var i=this.events[e],n=e.match(t),o=n[1],r=n[2],s=this.proxy(this[i]);""===r?this.el.bind(o,s):this.el.delegate(r,o,s)}},delegateActions:function(){for(var e=this.find("[data-action]"),t=0,i=e.length;i>t;t++){var n=$(e[t]),o=n.attr("data-action"),r=this.proxy(this[o]),s=this.actionEvent,a='[data-action="'+o+'"]';this._processedActions[o]||(this.el.delegate(a,s,r),this._processedActions[o]=!0)}},refreshElements:function(){for(var e in this.elements)this[e]=this.find(this.elements[e])},getDataElements:function(){for(var e=this,t=this.find("[data-element]"),i=0,n=t.length;n>i;i++){var o=t[i].getAttribute("data-element");if(!e[o]){var r=this.find('[data-element="'+o+'"]');e[o]=r}}},bindSubscriptions:function(){for(var e in this.subscribe)this._subscribeHandles[e]=Fidel.subscribe(e,this.proxy(this[this.subscribe[e]]))},loadTemplate:function(){this.template=$(this.templateSelector).html()},find:function(e){return $(e,this.el[0])},render:function(e,t){var i=window.str||$;if(i){var n=i.template(this.template,e);t=t?$(t):this.el,t.html(n)}},destroy:function(){for(var e in this._subscribeHandles)Fidel.unsubscribe(this._subscribeHandles[e]);for(var t in this._processedActions)this.el.unbind(t);this.el=null}});e.ViewController=i}(Fidel||this),function(e){e.fn.nomon=function(t){var i=this,t=t||{},n=this.text().split(" ");t.words=t.words||20,n.length<=t.words||(n.splice(t.words,0,'<span style="display: none" data-action-receiver="toggleHiddenText">'),n.push("</span>"),n.push('<a href="#" data-action="toggleHiddenText">Read More</a>'),this.html(n.join(" ")),this.find('a[data-action="toggleHiddenText"]').one("click",function(t){t.preventDefault(),i.find('span[data-action-receiver="toggleHiddenText"]').show(),e(this).hide(),i.trigger("toggedText")}))}}(jQuery),function(e,t,i){function n(e){var t={},n=/^jQuery\d+$/;return i.each(e.attributes,function(e,i){i.specified&&!n.test(i.name)&&(t[i.name]=i.value)}),t}function o(e,t){var n=this,o=i(n);if(n.value==o.attr("placeholder")&&o.hasClass("placeholder"))if(o.data("placeholder-password")){if(o=o.hide().next().show().attr("id",o.removeAttr("id").data("placeholder-id")),e===!0)return o[0].value=t;o.focus()}else n.value="",o.removeClass("placeholder"),n==s()&&n.select()}function r(){var e,t=this,r=i(t),s=this.id;if(""==t.value){if("password"==t.type){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(a){e=i("<input>").attr(i.extend(n(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":r,"placeholder-id":s}).bind("focus.placeholder",o),r.data({"placeholder-textinput":e,"placeholder-id":s}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",s).show()}r.addClass("placeholder"),r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}function s(){try{return t.activeElement}catch(e){}}var a,c,l="placeholder"in t.createElement("input"),d="placeholder"in t.createElement("textarea"),u=i.fn,p=i.valHooks,f=i.propHooks;l&&d?(c=u.placeholder=function(){return this},c.input=c.textarea=!0):(c=u.placeholder=function(){var e=this;return e.filter((l?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":o,"blur.placeholder":r}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},c.input=l,c.textarea=d,a={get:function(e){var t=i(e),n=t.data("placeholder-password");return n?n[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var n=i(e),a=n.data("placeholder-password");return a?a[0].value=t:n.data("placeholder-enabled")?(""==t?(e.value=t,e!=s()&&r.call(e)):n.hasClass("placeholder")?o.call(e,!0,t)||(e.value=t):e.value=t,n):e.value=t}},l||(p.input=a,f.value=a),d||(p.textarea=a,f.value=a),i(function(){i(t).delegate("form","submit.placeholder",function(){var e=i(".placeholder",this).each(o);setTimeout(function(){e.each(r)},10)})}),i(e).bind("beforeunload.placeholder",function(){i(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),$.fn.linky=function(){return this.each(function(){var e=$(this);e.attr("href",e.attr("data-url"))})},$("[data-copy]").each(function(){var e=$(this).attr("data-copy");$(this).html(e)}),$.fn.lazyImage=function(e){var t={errorImg:dmjs.errImg,callback:!1};return e&&$.extend(t,e),this.each(function(){var e=this;$("<img />").bind("load",function(){$(e).attr("src",$(e).attr("data-img")),t.callback&&t.callback.call(e)}).bind("error",function(){t.errorImg&&$(e).attr("src",t.errorImg)}).attr("src",$(e).attr("data-img"))})};var dmjs=window.dmjs||{};if(dmjs.livestrong_newsletter=dmjs.livestrong_newsletter||function(){this.submit(function(e){e.preventDefault();var t=$(".message",this),i=$(this).data("pagetype");t.hide().removeClass("error");var n=[];$("[name=email]",this).val()||n.push(dmjs.platform.isMobile()?"Please enter your email address":"Please fill-in your email address");var o=$("[name=gender]:checked",this).val();if("male"!=o&&"female"!=o&&n.push("Please select a gender"),n.length)t.text(n.pop()).fadeIn();else{var r=$(this);$.ajax({url:"/service/newsletter/subscription/",type:"POST",data:r.serialize(),success:function(){t.text("You have successfully signed up for the newsletter!").fadeIn(),$("[name=email]",r).val(""),"newsletter_landing"==i?(r.hide(),$("#landing_newsletter_message",r.parent()).fadeIn(),setTimeout(function(){window.location="/"},5e3)):dmjs.platform.isMobile()&&($(".newsletter_body").hide(),$("#newsletter_signup .signup_success_hide").hide(),$("#newsletter_mobile_success").show(),$("#newsletter_signup .signup_success").show())},error:function(){t.text("An error occured. Please try again.").fadeIn()}})}return!1})},$.fn.livestrong_newsletter=dmjs.livestrong_newsletter,dmjs.addLoadEvent(function(){$(".newsletter").livestrong_newsletter()}),$(function(){function e(){var e="";"undefined"!=typeof dmjs.user&&(e=dmjs.user.user_id.toString()),dmjs.global.quantcast.userId=e;var t=document.createElement("script");t.type="text/javascript",t.src=dmjs.setting.cdn.cdnImage+"/livestrong/ui/scripts/plugins/quantcast.plugin.js",$("body").append(t)}var t="www.livestrong.com";if(-1===document.cookie.indexOf("loggedin=true"))return $("#loggedin_module_body").hide(),$(".signin_reg_links").show(),void e();if("development"==dmjs.setting.env){var i=location.host;-1!==i.indexOf("ehowdev")?t=i.replace(/ehowdev/,"livestrongdev"):-1!==i.indexOf("livestrongdev")&&(t=i)}$("#login_module_body").hide(),$("#event_notifier").hide(),$.getJSON("http://"+t+"/service/user/profile/?_format=jsonp&callback=?",function(i){window.dmjs=dmjs||{},dmjs.user=dmjs.user||{user_id:i.user_id,username:i.username,user_email:i.user_email},dmjs.platform.isMobile()||(window._bt=window._bt||[],window._bt.identify(dmjs.user.user_id,{email:dmjs.user.user_email})),e(),$(function(){if($("#nav_register_link").hide(),$("#sign_in_link").html("Sign Out").unbind("click"),$("#sign_in_link").attr("href","/logout/"),$("#login_icon").css("display","inline-block"),$("#login_icon").addClass("logged_in_icon"),dmjs.platform.isMobile()){var e=i.avatars[48].split("?")[0],n="http://photos2.demandstudios.com/DM-Resize/",o="";o=e.indexOf(n)>-1?e:n+e.replace("http://",""),$("#login_icon").css("background","url('"+o+"?w=25&h=25&crop_min=1&keep_ratio=1') no-repeat"),$("#login_icon").attr("href","http://"+t+"/profile/"+i.username)}else $("#login_icon").css("background-image","url('"+i.avatars[48]+"')"),$("#loggedin_username").html(i.username),$("#avatar_image").css("background-image","url('"+i.avatars[96]+"')"),$("#user_dashboard").attr("href","http://"+t+"/dashboard/"+i.username),$("#user_profile_avatar, #user_profile").attr("href","http://"+t+"/profile/"+i.username),$("#user_friends").attr("href","http://"+t+"/prof/friends/"+i.username);$("#event_notifier").css({display:"inline-block"}),function(e){var t=new lsapp.Notifications;if("undefined"!=typeof User){var i=e.createElement("script");i.src="https://cdn.firebase.com/js/client/1.0.11/firebase.js",i.async=i.defer=!0,i.onload=i.onreadystatechange=function(){i.readyState&&"complete"!==i.readyState&&"loaded"!==i.readyState||(i.onload=i.onreadystatechange=null,t.init())},e.getElementsByTagName("head")[0].appendChild(i)}}(document)})})}),dmjs.global.facebook.lazy_load){var current_top=$(document).scrollTop();if(current_top>0)loadFacebookAPI(),showFacebookComment();else{var fb_scroll_check=!0,activate_threshold=0;$(window).scroll(function(){var e=$(".js-facebook_comments_section").offset().top;current_top=$(document).scrollTop(),e>=1500&&(activate_threshold=50),current_top>activate_threshold&&fb_scroll_check&&(loadFacebookAPI(),fb_scroll_check=!1,showFacebookComment())})}}else loadFacebookAPI(),showFacebookComment();dmjs.addLoadEvent(function(){$(".ArticlePreview img").lazyImage()},0),dmjs.onFBInit.push(function(){$(".init_facebook_login").click(function(){FB.login(function(e){"undefined"!=typeof e.status&&"connected"==e.status&&(document.location="/api/facebook/login_with_redirect/")},{scope:"email"})})}),dmjs.addLoadEvent(function(){$("#login_module").hide(),$("#login_icon, #sign_in_link, #login_module .close_icon").bind("click",function(e){e.stopImmediatePropagation(),dmjs.platform.isMobile()&&lsapp.resetMobileNav("profile"),$("#login_module").toggle()})}),dmjs.addLoadEvent(function(){$("#search_icon, .search_box .close_icon").bind("click",function(){$("#search_icon").toggleClass("search_expanded_icon"),$(".search_box").toggle(),$("#siteSearchInput").focus()}),$("#siteSearch, #siteSearchfooter").bind("submit",function(){return""===$("input",this).val()?!1:void 0})}),dmjs.addLoadEvent(function(){$("#Featured").data("crawlable")||$("#Featured a").each(function(){var e=$(this).attr("href");e.indexOf("/slideshow/")>0?$(this).find(".horizontal-title").addClass("slideshow"):e.indexOf("/video/")>0?$(this).find(".horizontal-title").addClass("video"):e.indexOf("/article/")>0?$(this).find(".horizontal-title").addClass("article"):e.indexOf("/blog/")>0&&$(this).find(".horizontal-title").addClass("blog")})});var newsletter_popup_manager=function(){var e={is_category_newsletter_seen_cookie_name:"ls_newsletter_seen",session_length_for_newsletter_render:4e4,session_counter:0,days_to_retain_newsletter_cookie:1},t=function(){return dmjs.cookies.readCookie(e.is_category_newsletter_seen_cookie_name)},i=function(t,i){dmjs.cookies.createCookie(e.is_category_newsletter_seen_cookie_name,i,e.days_to_retain_newsletter_cookie)},n=function(){$("body").append(a()),i(e.is_category_newsletter_seen_cookie_name,"true"),o()},o=function(){$(".newsletter_body__header_icon--close").on("click",function(){$(".newsletter_signup_overlay").hide()}),$(".newsletter_body__close").on("click",function(){$(".newsletter_signup_overlay").hide()}),$(".newsletter_form__continue").on("click",function(){$(".newsletter_signup_overlay").hide()}),$("body").on("click",function(e){$(e.target).closest(".newsletter_signup_overlay__body, .newsletter_signup_overlay--success").length||($(".newsletter_signup_overlay").hide(),$(".newsletter_signup_overlay--success").hide(),$("body").off("click",this))}),$(".newsletter_body_signup__form").on("submit",function(e){e.preventDefault();var t=$(this).data("pagetype");r(t)})},r=function(){if(!s())return!1;var e=$(".newsletter_form__email"),t=$("select[name='man_woman']").val(),i=e.val(),n=$("input[name='source']").val(),o=$("#large_newsletter_listid").val(),r={};r.id=o,r.email=i,r.gender=t,r.source=n,$.ajax({url:"/service/newsletter/subscription/",type:"POST",data:r}).done(function(){e.val(""),dataLayer.push({event:"Newsletter_Subscription",gender:t}),$(".newsletter_signup_overlay__body").hide(),$(".newsletter_signup_overlay--success").show()}).fail(function(){$(".newsletter_signup_overlay__body").hide(),console.log("unsuccessful newsletter submission")})},s=function(){var e=$(".newsletter_error_message--gender"),t=$(".newsletter_error_message--email"),i=$(".newsletter_form__email").val(),n=$("select[name='man_woman']").val(),o=!1;return""==n?(o=!0,e.show()):e.hide(),/(.+)@(.+){2,}\.(.+){2,}/.test(i)&&i?t.hide():(o=!0,t.show()),!o},a=function(){return $("#newsletter_template").html()},c=function(){return dmjs.cookies.readCookie("loggedin")};return{newsletter_display_manager:function(){t()||(e.session_counter=setTimeout(function(){c()||n()},e.session_length_for_newsletter_render))},get_session_counter:function(){return e.session_counter}}};$(document).ready(function(){var e=new newsletter_popup_manager;window.clearTimeout(e.get_session_counter()),e.newsletter_display_manager()});