jQuery(document).ready(function(s){jQuery.fn.essb_toggle_more=function(){return this.each(function(){s(this).removeClass("essb_after_more"),s(this).addClass("essb_before_less")})},jQuery.fn.essb_toggle_less=function(){return this.each(function(){s(this).addClass("essb_after_more"),s(this).removeClass("essb_before_less")})},jQuery.fn.extend({center:function(){return this.each(function(){var s=(jQuery(window).height()-jQuery(this).outerHeight())/2,e=(jQuery(window).width()-jQuery(this).outerWidth())/2;jQuery(this).css({position:"fixed",margin:0,top:(s>0?s:0)+"px",left:(e>0?e:0)+"px"})})},centerH:function(s){return this.each(function(){var e=(jQuery(window).width()-jQuery(this).outerWidth())/2;jQuery(this).css({position:"fixed",margin:0,bottom:(s>0?s:0)+"px",left:(e>0?e:0)+"px"})})}}),jQuery.fn.isInViewport=function(){var e=s(this).offset().top,t=e+s(this).outerHeight(),o=s(window).scrollTop(),a=o+s(window).height();return t>o&&e=o&&(r.removeData("countTo"),clearInterval(l.interval),b=t.to,"function"==typeof t.onComplete&&t.onComplete.call(i,b))},t.refreshInterval),d(b)})},s.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:function(s,e){return s.toFixed(e.decimals)},onUpdate:null,onComplete:null}}(jQuery),function(s){var e={},t=function(s,e){var t,o,a,i;return function(){a=this,o=[].slice.call(arguments,0),i=new Date;var r=function(){var n=new Date-i;n=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)};e.add_event=function(s,t){e.events||(e.events={}),e.events[s]=t},e.trigger=function(s,t){e.events&&e.events[s]&&e.events[s](t)},e.window=function(e,t,o,n){var b,l=s(".essb_"+o),d=s(l).attr("data-essb-postid")||"",c=s(l).attr("data-essb-position")||"",p="twitter"==t?"500":"800",f="twitter"==t?"300":"500",_=screen.width/2-Number(p)/2,u=screen.height/2-Number(f)/2;if(n||(b=window.open(e,"essb_share_window","height="+("twitter"==t?"300":"500")+",width="+("twitter"==t?"500":"800")+",resizable=1,scrollbars=yes,top="+u+",left="+_)),"undefined"!=typeof essb_settings&&(essb_settings.essb3_stats&&"undefined"!=typeof essb_handle_stats&&essb_handle_stats(t,d,o),essb_settings.essb3_ga&&r(t,e,c)),"undefined"!=typeof essb_settings&&void 0===essb_settings.stop_postcount&&a(t,d),"undefined"!=typeof essb_abtesting_logger&&essb_abtesting_logger(t,d,o),"undefined"!=typeof essb_conversion_tracking&&essb_conversion_tracking(t,d,o),!n)var h=window.setInterval(function(){!1!==b.closed&&(window.clearInterval(h),i(t,d),"booster"==c&&"undefined"!=typeof essb_booster_close_from_action&&essb_booster_close_from_action())},200)},e.tracking_only=function(t,o,a,r){""==t&&(t=document.URL),e.window(t,o,a,!0);var n=s(".essb_"+a),b=s(n).attr("data-essb-position")||"";if(r){var l=s(".essb_"+a).attr("data-essb-postid")||"";i(o,l),"booster"==b&&"undefined"!=typeof essb_booster_close_from_action&&essb_booster_close_from_action()}},e.pinterest_picker=function(s){e.tracking_only("","pinterest",s);var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("charset","UTF-8"),t.setAttribute("src","//assets.pinterest.com/js/pinmarklet.js?r="+99999999*Math.random()),document.body.appendChild(t)},e.print=function(s){e.tracking_only("","print",s),window.print()},e.setCookie=function(s,e,t){var o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3);var a="expires="+o.toGMTString();document.cookie=s+"="+e+"; "+a+"; path=/"},e.getCookie=function(s){for(var e=s+"=",t=document.cookie.split(";"),o=0;or-30){var f=0;o&&(s(l).css({top:"5px"}),f+=30),s(l).css({height:r-a-b-f+"px"}),s(p).css({height:r-a-f-(b+30)+"px",overflowY:"auto"})}if(s(d).css({height:r-a+"px"}),c){var _=(s(window).width()-s(l).outerWidth())/2;s(l).css({left:_+"px",position:"fixed",margin:0,bottom:a+b+"px"})}else s(l).center();s(l).fadeIn(400),s(d).fadeIn(200),e.essb_morepopup_opened=!0}},e.toggle_less_popup=function(t){var o=".essb_morepopup_shadow_"+t;s(".essb_morepopup_"+t).fadeOut(200),s(o).fadeOut(200),e.essb_morepopup_opened=!1},e.toggle_more_inline=function(t){var o=s(".essb_"+t);if(o.length){var a=".essb_morepopup_"+t,i=s(o).position().top+s(o).outerHeight(!0),r=s(o).position().left,n="absolute",b=!1;if("fixed"===s(o).css("position")&&(n="fixed"),s(o).hasClass("essb_displayed_bottombar")&&(b=!0),b){i=s(o).position().top-s(a).outerHeight(!0);var l=s(a).find(".modal-pointer");s(l).hasClass("modal-pointer-up-left")&&(s(l).removeClass("modal-pointer-up-left"),s(l).addClass("modal-pointer-down-left"))}var d=s(o).find(".essb_link_more");s(d).length||(d=s(o).find(".essb_link_more_dots")),s(d).length&&(r="fixed"!=n?s(d).position().left-5:r+s(d).position().left-5);var c=s(o).find(".essb_link_share");s(c).length&&(r="fixed"!=n?s(c).position().left-5:r+s(c).position().left-5),s(a).css({left:r+"px",position:n,margin:0,top:i+"px"}),s(a).fadeIn(200),e.essb_morepopup_opened=!0}},e.subscribe_popup_close=function(e){s(".essb-subscribe-form-"+e).fadeOut(400),s(".essb-subscribe-form-overlay-"+e).fadeOut(400)},e.sharebutton=function(e){s(".essb-windowcs-"+e).length&&(s(".essb-windowcs-"+e).fadeIn(200),s(".essb-windowcs-"+e+" .inner-content").center())},e.sharebutton_close=function(e){s(".essb-windowcs-"+e).length&&s(".essb-windowcs-"+e).fadeOut(200)},e.toggle_subscribe=function(t){if(s(".essb-subscribe-form-"+t).length)if(e.essb_subscribe_opened||(e.essb_subscribe_opened={}),"1"!=(s(".essb-subscribe-form-"+t).attr("data-popup")||""))s(".essb-subscribe-form-"+t).hasClass("essb-subscribe-opened")?(s(".essb-subscribe-form-"+t).slideUp("fast"),s(".essb-subscribe-form-"+t).removeClass("essb-subscribe-opened")):(s(".essb-subscribe-form-"+t).slideDown("fast"),s(".essb-subscribe-form-"+t).addClass("essb-subscribe-opened"),e.essb_subscribe_opened[t]||(e.essb_subscribe_opened[t]=t,e.tracking_only("","subscribe",t,!0)));else{var o=s(window).width(),a=(s("document").height(),600);o0&&(i=parseInt(d)),(""==p||"true"==p&&f)&&s(window).scroll(t(function(){var e=s(window).scrollTop()/(s(document).height()-s(window).height())*100,t=!0;r&&!a&&ei&&(t=!1),r&&a&&(e>i||e0&&(h=parseInt(h),g=!0);var v=!1;""!=m&&Number(m)>0&&(m=parseInt(m),v=!0),s(window).scroll(t(function(){var e=s(window).scrollTop();v&&(e-=m);var t=e/(s(document).height()-s(window).height())*100;if(e>=_){if(""==u){var o=s(".essb_displayed_float").width();u=o,s(".essb_displayed_float").width(o)}s(".essb_displayed_float").addClass("essb_fixed")}else s(".essb_displayed_float").removeClass("essb_fixed"),""!=u&&s(".essb_displayed_float").width(u);if(g){if(t>=h&&!s(".essb_displayed_float").hasClass("hidden-float"))return s(".essb_displayed_float").addClass("hidden-float"),void s(".essb_displayed_float").fadeOut(100);if(t800&&s(window).scroll(t(function(){var e,t=s(window).scrollTop(),o=t/(s(document).height()-s(window).height())*100,a=essb_settings.sidebar_disappear_pos||"",i=essb_settings.sidebar_appear_pos||"";if("px"==(essb_settings.sidebar_appear_unit||"")&&(o=t),s(".essb_displayed_sidebar").length&&(e=s(".essb_displayed_sidebar")),s(".essb_displayed_sidebar_right").length&&(e=s(".essb_displayed_sidebar_right")),e&&void 0!==e){if(a=parseInt(a),i=parseInt(i),isNaN(a)&&(a=0),isNaN(i)&&(i=0),i>0&&0==a){if(o>=i&&!e.hasClass("active-sidebar"))return e.fadeIn(100),void e.addClass("active-sidebar");if(o0&&0==i){if(o>=a&&!e.hasClass("hidden-sidebar"))return e.fadeOut(100),void e.addClass("hidden-sidebar");if(o0&&a>0){if(o>=i&&o=a)&&e.hasClass("active-sidebar"))return e.fadeOut(100),void e.removeClass("active-sidebar")}}},1)),s(".essb-postbar").length){var w=s(".essb_postbar_start"),y=s(".essb_postbar_end");if(w.length){var C,k,x=w.offset().top,I=y.offset().top,T=I-x,N=s(".essb-postbar-progress-bar"),j=s(window).height();s(".essb-postbar-prev-post a").on("mouseenter touchstart",function(){s(this).next("div").css("top","-162px")}),s(".essb-postbar-close-prev").on("click",function(){s(".essb-postbar-prev-post a").next("div").css("top","46px")}),s(".essb-postbar-next-post a").on("mouseenter touchstart",function(){s(this).next("div").css("top","-162px")}),s(".essb-postbar-close-next").on("click",function(){s(".essb-postbar-next-post a").next("div").css("top","46px")}),s(window).load(function(){x=w.offset().top,I=y.offset().top,T=I-x}),s(window).on("scroll",function(){C=s(window).scrollTop(),(k=j+C-x)<0&&(k=0),k>T&&(k=T);var e=k/T*100;N.css({width:e+"%"})}),s(window).on("resize",function(){x=w.offset().top,I=y.offset().top,T=I-x,j=s(window).height(),s(window).trigger("scroll")}),s(window).trigger("scroll")}}if(s(".essb_displayed_postfloat").length){if(s(".essb_break_scroll").length)var O=s(".essb_break_scroll").position().top;var Q=s(".essb_displayed_postfloat").offset().top-parseFloat(s(".essb_displayed_postfloat").css("marginTop").replace(/auto/,0)),D=(u="",!1);"undefined"!=typeof essb_settings&&(D=essb_settings.essb3_postfloat_stay);var H=0;"undefined"!=typeof essb_settings&&void 0!==essb_settings.postfloat_top&&(H=essb_settings.postfloat_top,H=parseInt(H),isNaN(H)&&(H=0),Q-=H),s(window).scroll(t(function(){if(s(this).scrollTop()>=Q){s(".essb_displayed_postfloat").addClass("essb_postfloat_fixed");var e=s(".essb_displayed_postfloat").offset(),t=s(".essb_displayed_postfloat").outerHeight(),o=parseInt(e.top)+parseInt(t);D||(o>O?s(".essb_displayed_postfloat").hasClass("essb_postfloat_breakscroll")||s(".essb_displayed_postfloat").addClass("essb_postfloat_breakscroll"):s(".essb_displayed_postfloat").hasClass("essb_postfloat_breakscroll")&&s(".essb_displayed_postfloat").removeClass("essb_postfloat_breakscroll"))}else s(".essb_displayed_postfloat").removeClass("essb_postfloat_fixed")},1))}if(s(".essb-flyin").length){var A=!1,F=function(){if(!A){var t=s(".essb-flyin");if(t.length){var o=s(t).attr("data-width")||"",a=s(t).attr("data-close-hide")||"",i=s(t).attr("data-close-hide-all")||"",r=s(t).attr("data-postid")||"",n=s(t).attr("data-close-after")||"";if("1"==a||"1"==i){var b="",l="essb_flyin_";if("1"==a){if(b=l+r,"yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}if("1"==i){if(b=l+"all","yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}}var d=s(window).width(),c=(s("document").height(),400),p=o;if(Number(p)&&Number(p)>0&&(c=p),d0){var f=parseFloat(n);f*=1e3,setTimeout(function(){s(".essb-flyin").fadeOut(200)},f)}s(".essb-flyin").css({width:c+"px"}),s(".essb-flyin").fadeIn(400),A=!0}}},M=!1,U=-1,E=!1,P=s(".essb-flyin");if("true"==e.get_url_parameter("essb_popup")&&P.hasClass("essb-flyin-oncomment"))return void F();var B=s(P).attr("data-load-percent")||"",L=s(P).attr("data-load-time")||"",S=s(P).attr("data-load-end")||"";if("1"==(V=s(P).attr("data-load-manual")||""))return;""==B&&"1"!=S||(U=Number(B),M=!1,E="1"==S,s(window).scroll(t(function(){if(!M){var e=s(window).scrollTop(),t=e/(s(document).height()-s(window).height())*100;if(E){if(!s(".essb_break_scroll").length)return;e>=s(".essb_break_scroll").offset().top-parseFloat(s(".essb_break_scroll").css("marginTop").replace(/auto/,0))&&(M=!0,F())}else t>U&&U>0&&(M=!0,F())}},1))),L&&void 0!==L?""!=L&&Number(L)?setTimeout(function(){F()},1e3*Number(L)):F():""==B&&"1"!=S&&F()}if(s(".essb-popup").length){var W=!1,Y=-1,z=!1,R=!1,$=!1,G=window.essb_popup_show=function(){if(!$){var t=s(".essb-popup");if(t.length){var o=s(t).attr("data-width")||"",a=s(t).attr("data-close-hide")||"",i=s(t).attr("data-close-hide-all")||"",r=s(t).attr("data-postid")||"",n=s(t).attr("data-close-after")||"";if("1"==a||"1"==i){var b="",l="essb_popup_";if("1"==a){if(b=l+r,"yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}if("1"==i){if(b=l+"all","yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}}var d=s(window).width(),c=(s("document").height(),800),p=o;Number(p)&&Number(p)>0&&(c=p),d0&&(optin_time=1e3*Number(n),setTimeout(function(){e.popup_close()},optin_time)),s(".essb-popup").css({width:c+"px"}),s(".essb-popup").center(),s(".essb-popup").fadeIn(400),s(".essb-popup-shadow").fadeIn(200),$=!0}}};P=s(".essb-popup");if("true"==e.get_url_parameter("essb_popup")&&P.hasClass("essb-popup-oncomment"))return void G();B=s(P).attr("data-load-percent")||"",L=s(P).attr("data-load-time")||"",S=s(P).attr("data-load-end")||"";var V=s(P).attr("data-load-manual")||"",q=s(P).attr("data-exit-intent")||"";if("1"==V)return;""==B&&"1"!=S||(Y=Number(B),W=!1,z="1"==S,s(window).scroll(function(){if(!W){var e=s(window).scrollTop(),t=e/(s(document).height()-s(window).height())*100;z?s(".essb_break_scroll").length?e>=s(".essb_break_scroll").offset().top-parseFloat(s(".essb_break_scroll").css("marginTop").replace(/auto/,0))&&(W=!0,G()):t>90&&(W=!0,G()):t>Y&&Y>0&&(W=!0,G())}})),"1"==q&&s(document).mouseout(function(s){if(!R){var e=s||window.event,t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(R=!0,G())}}),L&&void 0!==L?""!=L&&Number(L)?setTimeout(function(){G()},1e3*Number(L)):G():""==B&&"1"!=S&&"1"!=q&&G()}if(s(".essb_bottombar").length&&(""==(essb_settings.bottombar_appear||"")&&""==(essb_settings.bottombar_disappear||"")||s(window).scroll(t(function(){var e,t=s(window).scrollTop()/(s(document).height()-s(window).height())*100,o=essb_settings.bottombar_appear||"",a=essb_settings.bottombar_disappear||"";if(s(".essb_bottombar").length&&(e=s(".essb_bottombar")),e&&void 0!==e){if(o=parseInt(o),a=parseInt(a),isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>0){if(t>=o&&!e.hasClass("essb_active_bottombar"))return void e.addClass("essb_active_bottombar");if(t0){if(t>=a&&!e.hasClass("hidden-float"))return e.addClass("hidden-float"),void e.css({opacity:"0"});if(t0){if(t>=o&&!e.hasClass("essb_active_topbar"))return void e.addClass("essb_active_topbar");if(t0){if(t>=a&&!e.hasClass("hidden-float"))return e.addClass("hidden-float"),void e.css({opacity:"0"});if(t0)){if(t>=o&&!e.hasClass("essb_active_postfloat"))return void e.addClass("essb_active_postfloat");if(t95?s(".essb-followme").hasClass("essb-followme-hiddenend")||(s(".essb-followme").addClass("essb-followme-hiddenend"),s(".essb-followme").slideUp(100)):s(".essb-followme").hasClass("essb-followme-hiddenend")&&(s(".essb-followme").removeClass("essb-followme-hiddenend"),s(".essb-followme").slideDown(100)))}s(window).scroll(t(as,1)),as()}if(s(".essb-point").length){var is=!1,rs="",ns=s(".essb-point").attr("data-trigger-scroll")||"",bs=s(".essb-point").attr("data-point-type")||"simple",ls=Number(s(".essb-point").attr("data-autoclose")||0)||0;"end"!=ns&&"middle"!=ns||(rs=ns,s(window).scroll(function(){var e=s(window).scrollTop()+s(window).height()-200,t=s(".essb_break_scroll").offset().top-parseFloat(s(".essb_break_scroll").css("marginTop").replace(/auto/,0));"end"==rs&&e>=t&&!is&&(s(".essb-point-share-buttons").hasClass("essb-point-share-buttons-active")||(s(".essb-point-share-buttons").addClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").toggleClass("essb-point-open"),is=!0,ls>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").removeClass("essb-point-open")},1e3*ls))),"middle"==rs&&100*e/t>49&&!is&&(s(".essb-point-share-buttons").hasClass("essb-point-share-buttons-active")||(s(".essb-point-share-buttons").addClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").toggleClass("essb-point-open"),is=!0,ls>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").removeClass("essb-point-open")},1e3*ls)))})),s(".essb-point").on("click",function(){s(".essb-point-share-buttons").toggleClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").toggleClass("essb-point-open"),ls>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=bs&&s(".essb-point").removeClass("essb-point-open")},1e3*ls)})}if(s(".essb-cornerbar").length){s(".essb-cornerbar .essb_links").length&&s(".essb-cornerbar .essb_links").removeClass("essb_displayed_cornerbar");var ds=s(".essb-cornerbar").attr("data-show")||"",cs=s(".essb-cornerbar").attr("data-hide")||"";function ps(){var e=s(window).scrollTop()/(s(document).height()-s(window).height())*100;if("onscroll"!=ds&&"onscroll50"!=ds||(e>("onscroll"==ds?5:45)?s(".essb-cornerbar").hasClass("essb-cornerbar-hidden")&&s(".essb-cornerbar").removeClass("essb-cornerbar-hidden"):s(".essb-cornerbar").hasClass("essb-cornerbar-hidden")||s(".essb-cornerbar").addClass("essb-cornerbar-hidden")),"content"==ds){var t=!1;s(".essb_displayed_top").each(function(){o(s(this))&&(t=!0)}),s(".essb_displayed_bottom").each(function(){o(s(this))&&(t=!0)}),t?s(".essb-cornerbar").hasClass("essb-cornerbar-hidden")||s(".essb-cornerbar").addClass("essb-cornerbar-hidden"):s(".essb-cornerbar").hasClass("essb-cornerbar-hidden")&&s(".essb-cornerbar").removeClass("essb-cornerbar-hidden")}""!=cs&&(e>90?s(".essb-cornerbar").hasClass("essb-cornerbar-hiddenend")||s(".essb-cornerbar").addClass("essb-cornerbar-hiddenend"):s(".essb-cornerbar").hasClass("essb-cornerbar-hiddenend")&&s(".essb-cornerbar").removeClass("essb-cornerbar-hiddenend"))}""==cs&&""==ds||s(window).scroll(t(ps,1)),"content"==ds&&ps()}if(s(".essb-sharebooster").length){function fs(){ys||(s(".essb-sharebooster").center(),s(".essb-sharebooster").fadeIn(400),s(".essb-sharebooster-overlay").fadeIn(200),s("body").addClass("essb-sharebooster-preventscroll"),ys=!0,Number(ws)&&setTimeout(_s,1e3*Number(ws)))}function _s(){s(".essb-sharebooster").fadeOut(200),s(".essb-sharebooster-overlay").fadeOut(400),s("body").removeClass("essb-sharebooster-preventscroll")}window.essb_booster_close_from_action=function(){var s="all"==vs?"essb_booster_all":"essb_booster_"+essb_settings.post_id;e.setCookie(s,"yes",Number(gs)),_s()};var us=s(".essb-sharebooster").attr("data-trigger")||"",hs=s(".essb-sharebooster").attr("data-trigger-time")||"",ms=s(".essb-sharebooster").attr("data-trigger-scroll")||"",gs=s(".essb-sharebooster").attr("data-donotshow")||"",vs=s(".essb-sharebooster").attr("data-donotshowon")||"",ws=s(".essb-sharebooster").attr("data-autoclose")||"",ys=!1;Number(gs)||(gs=7);var Cs="all"==vs?"essb_booster_all":"essb_booster_"+essb_settings.post_id;e.getCookie(Cs)&&(us="disabled"),""==us&&fs(),"time"==us&&setTimeout(fs,1e3*Number(hs)),"scroll"==us&&s(window).scroll(t(function(){s(window).scrollTop()/(s(document).height()-s(window).height())*100>ms&&fs()},1)),s(".essb-sharebooster-close").length&&s(".essb-sharebooster-close").click(function(s){s.preventDefault(),_s()})}essb_settings.facebook_client&&e.update_facebook_counter(essb_settings.facebook_post_url||"",essb_settings.facebook_post_recovery_url||""),essb_settings.pinterest_client&&e.update_pinterest_counter(essb_settings.facebook_post_url||"",essb_settings.facebook_post_recovery_url||""),s(".essb-click2chat").length&&(s(".essb-click2chat").click(function(e){e.preventDefault(),s(".essb-click2chat-window").toggleClass("active")}),s(".essb-click2chat-window .chat-close").length&&s(".essb-click2chat-window .chat-close").click(function(e){e.preventDefault(),s(".essb-click2chat-window").toggleClass("active")}),s(".essb-click2chat-window .operator").each(function(){s(this).click(function(e){e.preventDefault();var t=s(this).attr("data-app")||"",o=s(this).attr("data-number")||"",a=s(this).attr("data-message")||"",i="";/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),"whatsapp"==t&&(i="https://api.whatsapp.com/send?phone="+o+"&text="+a),"viber"==t&&(i="viber://chat?number="+o+"&text="+a),window.location.href=i})}))})}(jQuery);