!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(this))return null;do{if(t.matches(e))return t;t=t.parentElement}while(null!==t);return null});for(var e=document.querySelectorAll(".menu-toggle"),t=document.querySelectorAll("nav .dropdown-menu-toggle"),o=document.querySelectorAll("nav ul a"),n=document.body,r=document.documentElement,s=function(e,t){if(!t)t=this;if(t.getAttribute("data-nav"))var o=document.getElementById(t.getAttribute("data-nav"));else o=document.getElementById(t.closest("nav").getAttribute("id"));var s=o.getElementsByTagName("ul")[0];if(o.classList.contains("toggled")){if(o.classList.remove("toggled"),r.classList.remove("mobile-menu-open"),s.setAttribute("aria-hidden","true"),t.setAttribute("aria-expanded","false"),n.classList.contains("dropdown-hover"))for(var l=s.querySelectorAll("li.menu-item-has-children"),i=0;i0?s:0)+"px",left:(e>0?e:0)+"px"})})}})}),function(s){s.fn.countTo=function(e){return e=e||{},s(this).each(function(){var t=s.extend({},s.fn.countTo.defaults,{from:s(this).data("from"),to:s(this).data("to"),speed:s(this).data("speed"),refreshInterval:s(this).data("refresh-interval"),decimals:s(this).data("decimals")},e),o=Math.ceil(t.speed/t.refreshInterval),a=(t.to-t.from)/o,i=this,n=s(this),r=0,b=t.from,d=n.data("countTo")||{};function l(s){var e=t.formatter.call(i,s,t);n.text(e)}n.data("countTo",d),d.interval&&clearInterval(d.interval),d.interval=setInterval(function(){r++,l(b+=a),"function"==typeof t.onUpdate&&t.onUpdate.call(i,b);r>=o&&(n.removeData("countTo"),clearInterval(d.interval),b=t.to,"function"==typeof t.onComplete&&t.onComplete.call(i,b))},t.refreshInterval),l(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){"use strict";var e={},t=function(s,e){var t,o,a,i;return function(){a=this,o=[].slice.call(arguments,0),i=new Date;var n=function(){var r=new Date-i;r=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},a=function(e){var t=s(e).offset().top,o=s(e).offset().top+s(e).outerHeight(),a=s(window).scrollTop()+s(window).innerHeight(),i=s(window).scrollTop();return a>t&&ir-30){var f=0;o&&(s(l).css({top:"5px"}),f+=5),s(l).css({height:r-a-d-f+"px"}),s(_).css({height:r-a-f-(d+50)+"px",overflowY:"auto"})}if(o&&s(p).css({height:r-(o?a:0)+"px"}),c){var h=(s(window).width()-s(l).outerWidth())/2;s(l).css({left:h+"px",position:"fixed",margin:0,bottom:a+d+"px"})}else s(l).center();s(l).fadeIn(400),s(p).fadeIn(200),e.essb_morepopup_opened=!0}},e.toggle_less_popup=function(t){s(".essb_morepopup_"+t).fadeOut(200),s(".essb_morepopup_shadow_"+t).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),n=s(o).position().left,r="absolute",b=!1;if("fixed"===s(o).css("position")&&(r="fixed"),s(o).hasClass("essb_displayed_bottombar")&&(b=!0),b){i=s(o).position().top-s(a).outerHeight(!0);var d=s(a).find(".modal-pointer");s(d).hasClass("modal-pointer-up-left")&&(s(d).removeClass("modal-pointer-up-left"),s(d).addClass("modal-pointer-down-left"))}var l=s(o).find(".essb_link_more");s(l).length||(l=s(o).find(".essb_link_more_dots")),s(l).length&&(n="fixed"!=r?s(l).position().left-5:n+s(l).position().left-5);var p=s(o).find(".essb_link_share");s(p).length&&(n="fixed"!=r?s(p).position().left-5:n+s(p).position().left-5),s(a).css({left:n+"px",position:r,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);o-1},e.flyin_close=function(){s(".essb-flyin").fadeOut(200)},e.popup_close=function(){s(".essb-popup").fadeOut(200),s(".essb-popup-shadow").fadeOut(400)},e.copy_link=function(e){var t=window.location.href,o=s(window).width();if(e&&s(".essb_"+e).length){var a=s(".essb_"+e).data("essb-url")||"";""!=a&&(t=a)}if(!s(".essb-copylink-window").length){var i=[];i.push('"),i.push(''),s("body").append(i.join("")),s(".essb-copylink-window .essb_morepopup_close").on("click",function(e){e.preventDefault(),s(".essb-copylink-window").fadeOut(300),s(".essb-copylink-shadow").fadeOut(200)}),s(".essb-copylink-window .essb-copy-link").on("click",function(e){e.preventDefault();var t=document.querySelector("#essb_copy_link_field");try{t.select(),t.setSelectionRange(0,99999),document.execCommand ("copy"),s(".essb-copylink-window .essb_morepopup_header span").html("Copied to clipboard."),setTimeout(function(){s(".essb-copylink-window .essb_morepopup_header span").html(" ")},2e3)}catch(e){s(".essb-copylink-window .essb_morepopup_header span").html("Please use Ctrl/Cmd+C to copy the URL."),setTimeout(function(){s(".essb-copylink-window .essb_morepopup_header span").html(" ")},2e3)}})}s(".essb-copy-message").html(""),s(".essb-copylink-window").css({width:(o>600?600:o-50)+"px"}),s(".essb-copylink-window").center(),s(".essb-copylink-window").fadeIn(300),s(".essb-copylink-shadow").fadeIn(200),s("#essb_copy_link_field").val(t),s("#essb_copy_link_field").focus(),s("#essb_copy_link_field").select()},e.mobile_sharebar_open=function(){var t=s(".essb-mobile-sharebar-window");if(t.length){var o=s(".essb-mobile-sharebar");if(o.length||(o=s(".essb-mobile-sharepoint")),o.length)if(e.is_displayed_sharebar)e.mobile_sharebar_close();else{var a=s(o).outerHeight(),i=s(window).height(),n=s(window).width();i-=a,s("#wpadminbar").length&&s("#wpadminbar").hide();var r=s(".essb-mobile-sharebar-window-content");r.length&&r.css({height:i-60+"px"}),s(t).css({width:n+"px",height:i+"px"}),s(t).fadeIn(400),e.is_displayed_sharebar=!0}}},e.mobile_sharebar_close=function(){var t=s(".essb-mobile-sharebar-window");t.length&&(s(t).fadeOut(400),e.is_displayed_sharebar=!1)},e.update_facebook_counter=function(e,t){/bot|crawl|slurp|spider/i.test(navigator.userAgent)||s.when(s.get("https://graph.facebook.com/?id="+e+"&fields=og_object{engagement}"),t?s.get("https://graph.facebook.com/?id="+t+"&fields=og_object{engagement}"):"").then(function(e,o){if(void 0!==e[0].og_object&&e[0].og_object.engagement){var a=0,i=0;if(a=parseInt(e[0].og_object.engagement.count||0)+parseInt(e[0].og_object.engagement.comments||0)+0,t&&o[0]&&void 0!==o[0].og_object&&o[0].og_object.engagement){a!=(i=parseInt(o[0].og_object.engagement.count||0)+parseInt(o[0].og_object.engagement.comments||0)+0)&&(a+=i)}s.post(essb_settings.ajax_url,{action:"essb_facebook_counter_update",post_id:essb_settings.post_id,count:a,nonce:essb_settings.essb3_nonce},function(s){s&&console.log(s)},"json")}})},e.update_pinterest_counter=function(e,t){/bot|crawl|slurp|spider/i.test(navigator.userAgent)||s.get("https://api.pinterest.com/v1/urls/count.json?callback=?&url="+e,{},function(e){var t=e.count?e.count:0;console.log("total_shares1="+t),s.post(essb_settings.ajax_url,{action:"essb_pinterest_counter_update",post_id:essb_settings.post_id,count:t.toString(),nonce:essb_settings.essb3_nonce},function(s){s&&console.log(s)},"json")},"json")},e.responsiveEventsCanRun=function(e){var t=s(e).hasClass("essb_mobile_hidden"),o=s(e).hasClass("essb_desktop_hidden"),a=s(e).hasClass("essb_tablet_hidden"),i=s(window).width(),n=!0;return i<=768&&t&&(n=!1),i>768&&i<=1100&&a&&(n=!1),i>1100&&o&&(n=!1),s(e).length||(n=!1),n},window.essb=e;var i=function(s){return s=parseInt(s),!isNaN(s)&&isFinite(s)||(s=0),s},n=function(e,t){"undefined"!=typeof essb_settings&&(t=String(t),s.post(essb_settings.ajax_url,{action:"essb_self_postcount",post_id:t,service:e,nonce:essb_settings.essb3_nonce},function(s){},"json"))},r=function(t,o){if(essb_settings&&essb_settings.aftershare_networks){if(-1==(""!=essb_settings.aftershare_networks?essb_settings.aftershare_networks.split(","):[]).indexOf(t))return}else if("subscribe"==t||"comments"==t||"email"==t||"mail"==t)return;if("subscribe"!=t&&"comments"!=t&&"email"!=t&&"mail"!=t&&("function"==typeof l&&l(),"function"==typeof essb_acs_code&&essb_acs_code(t,o),s(".essb-aftershare-subscribe-form").length)){var a=s(".essb-aftershare-subscribe-form").data("salt")||"";""!=a&&e.toggle_subscribe(a)}},b=function(s,e,t){var o=essb_settings.essb3_ga_mode;"ga"in window&&void 0!==window.ga&&"function"==typeof window.ga&&("extended"==o?ga("send","event","social",s+" "+t,e):ga("send","event","social",s,e)),"layers"==o&&"undefined"!=typeof dataLayer&&dataLayer.push({service:s,position:t,url:e,event:"social"})},d=(window.essb_open_mailform=function(t){if(e.essb_mailform_opened)d(t);else{var o=s(".essb_"+t);if(o.length){var a=s(o).attr("data-essb-postid")||"";s("#essb_mail_instance").val(t),s("#essb_mail_post").val(a);var i=s(window).width(),n=s(window).height(),r=400;in-30&&s(".essb_mailform").css({height:n-20+"px"}),s("#essb_mailform_from").val(""),s("#essb_mailform_to").val(""),s("#essb_mailform_c").length&&s("#essb_mailform_c").val(""),"undefined"!=typeof essb_recaptcha&&essb_recaptcha&&essb_recaptcha.recaptchaSitekey&&grecaptcha.render("essb-modal-recaptcha",{sitekey:essb_recaptcha.recaptchaSitekey}),s(".essb_mailform").center(),s(".essb_mailform").slideDown(200),s(".essb_mailform_shadow").fadeIn(200),e.essb_mailform_opened=!0,e.tracking_only("","mail",t)}}},window.essb_close_mailform=function(){s(".essb_mailform").fadeOut(200),s(".essb_mailform_shadow").fadeOut(200),e.essb_mailform_opened=!1}),l=(window.essb_mailform_send=function(){var e=s("#essb_mailform_from").val(),t=s("#essb_mailform_to").val(),o=!!s("#essb_mailform_c").length,a=s(".essb_mailform").attr("data-error")||"",i=o?s("#essb_mailform_c").val():"",n=s("#g-recaptcha-response").val();if(""==e||""==t||""==i&&o)alert(a);else{var r=s("#essb_mail_salt").val(),b=s("#essb_mail_post").val();"undefined"!=typeof essb_settings&&s.post(essb_settings.ajax_url,{action:"essb_mail_action",post_id:b,from:e,to:t,c:i,cu:"",salt:r,recapcha:n,nonce:essb_settings.essb3_nonce},function(s){s&&(alert(s.message),"1"==s.code&&d())},"json")}},window.essbasc_popup_show=function(){if(s(".essbasc-popup").length&&!e.getCookie("essb_aftershare")){var t="undefined"!=typeof essbasc_cookie_live?essbasc_cookie_live:7;0==parseInt(t)&&(t=7);var o=s(window).width(),a=800,i=s(".essbasc-popup").attr("data-popup-width")||"",n=s(".essbasc-popup").attr("data-single")||"";Number(i)&&Number(i)>0&&(a=i),o0&&(r=parseInt(c)),(""==f||"true"==f&&h)&&s(window).on("scroll",t(function(){var e=s(window).scrollTop()/(s(document).height()-s(window).height())*100,t=!0;b&&!n&&er&&(t=!1),b&&n&&(e>r||e0&&(g=parseInt(g),w=!0);var y=!1;""!=v&&Number(v)>0&&(v=parseInt(v),y=!0),e.responsiveEventsCanRun(s(".essb_displayed_float"))&&s(window).on("scroll",t(function(){var e=s(window).scrollTop();y&&(e-=v);var t=e/(s(document).height()-s(window).height())*100;if(e>=u){if(""==m){var o=s(".essb_displayed_float").width();m=o,s(".essb_displayed_float").width(o)}s(".essb_displayed_float").addClass("essb_fixed")}else s(".essb_displayed_float").removeClass("essb_fixed"),""!=m&&s(".essb_displayed_float").width(m);if(w){if(t>=g&&!s(".essb_displayed_float").hasClass("hidden-float"))return s(".essb_displayed_float").addClass("hidden-float"),void s(".essb_displayed_float").fadeOut(100);if(tt?0:Math.round((t-e)/2),s(".essb_sidebar_location_middle").css({top:o+"px",opacity:"1"})};C(),s(window).on("resize",t(C,1))}s(".essb_link_sidebar-close a").each(function(){s(this).on("click",function(e){e.preventDefault();var t=s(this).parent().parent().get(0);s(t).length&&s(t).find(".essb_item").each(function(){s(this).hasClass("essb_link_sidebar-close")?s(this).toggleClass("essb-sidebar-closed-clicked"):s(this).toggleClass("essb-sidebar-closed-item")})})});var k,I,x,N=function(){var e,t=s(window).scrollTop(),o=t/(s(document).height()-s(window).height())*100;if(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){var n=i(s(e).data("sidebar-disappear-pos")||""),r=i(s(e).data("sidebar-appear-pos")||"");if("px"==(s(e).data("sidebar-appear-unit")||"")&&(o=t),"yes"==(s(e).data("sidebar-contenthidden")||"")&&(s(".essb_displayed_top").length||s(".essb_displayed_bottom").length)&&(s(".essb_displayed_top").length&&a(s(".essb_displayed_top"))||s(".essb_displayed_bottom").length&&a(s(".essb_displayed_bottom"))?e.fadeOut(100):e.fadeIn(100)),r>0&&0==n){if(o>=r&&!e.hasClass("active-sidebar"))return e.fadeIn(100),void e.addClass("active-sidebar");if(o0&&0==r){if(o>=n&&!e.hasClass("hidden-sidebar"))return e.fadeOut(100),void e.addClass("hidden-sidebar");if(o0&&n>0){if(o>=r&&o=n)&&e.hasClass("active-sidebar"))return e.fadeOut(100),void e.removeClass("active-sidebar")}}};if(e.responsiveEventsCanRun(s(".essb_displayed_sidebar"))){var P=s(".essb_displayed_sidebar").data("sidebar-contenthidden")||"",T=s(".essb_displayed_sidebar").data("sidebar-appear-pos")||"",j=s(".essb_displayed_sidebar").data("sidebar-disappear-pos")||"";""==T&&""==j&&"yes"!=P||s(window).width()>800&&(s(window).on("scroll",t(N,1)),N())}if(s(".essb-postbar").length){var O=s(".essb_postbar_start"),S=s(".essb_postbar_end");if(O.length){var E,R,z=O.offset().top,D=S.offset().top,H=D-z,U=s(".essb-postbar-progress-bar"),L=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).on("load",function(){z=O.offset().top,D=S.offset().top,H=D-z}),s(window).on("scroll",function(){E=s(window).scrollTop(),(R=L+E-z)<0&&(R=0),R>H&&(R=H);var e=R/H*100;U.css({width:e+"%"})}),s(window).on("resize",function(){z=O.offset().top,D=S.offset().top,H=D-z,L=s(window).height(),s(window).trigger("scroll")}),s(window).trigger("scroll")}}if(s(".essb_displayed_postfloat").length){var M=s(".essb_displayed_postfloat").offset().top-parseFloat(s(".essb_displayed_postfloat").css("marginTop").replace(/auto/,0)),Q="true"==(s(".essb_displayed_postfloat").data("postfloat-stay")||"").toString(),A=s(".essb_displayed_postfloat").data("postfloat-top")||"",F=s(".essb_displayed_postfloat").data("postfloat-selectors")||"",Y=[],B=s(".essb_displayed_postfloat").data("postfloat-percent")||"";if(Number(B)&&0!=Number(B)||(B="",s(".essb_displayed_postfloat").attr("data-postfloat-percent","")),""!=F){Y=F.split(",");for(var W=0;W=Number(o):r>=Number(o))?(s(".essb_displayed_postfloat").css({opacity:"1"}),s(".essb_displayed_postfloat").css({transform:"translateY(0)"})):(s(".essb_displayed_postfloat").css({opacity:"0"}),s(".essb_displayed_postfloat").css({transform:"translateY(50px)"}))}if(e>=M){s(".essb_displayed_postfloat").addClass("essb_postfloat_fixed");var b=s(".essb_displayed_postfloat").offset(),d=s(".essb_displayed_postfloat").outerHeight(),l=parseInt(b.top)+parseInt(d);if(Q){var p=!1;s(".essb-postfloat-monitor").each(function(){a(s(this))&&(p=!0)}),p?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 l>t?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 $=!1,q=function(){if(!$){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")||"",n=s(t).attr("data-postid")||"",r=s(t).attr("data-close-after")||"";if("1"==a||"1"==i){var b="";if("1"==a){if(b="essb_flyin_"+n,"yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}if("1"==i){if(b="essb_flyin_all","yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}}var d=s(window).width(),l=(s("document").height(),400),p=o;if(Number(p)&&Number(p)>0&&(l=p),d0){var c=parseFloat(r);c*=1e3,setTimeout(function(){s(".essb-flyin").fadeOut(200)},c)}s(".essb-flyin").css({width:l+"px"}),s(".essb-flyin").fadeIn(400),$=!0}}},G=!1,X=-1,J=!1;if(e.responsiveEventsCanRun(s(".essb-flyin"))){var K=s(".essb-flyin");if(e.is_after_comment()&&K.hasClass("essb-flyin-oncomment"))return void q();var V=s(K).attr("data-load-percent")||"",Z=s(K).attr("data-load-time")||"",ss=s(K).attr("data-load-end")||"";if("1"==(rs=s(K).attr("data-load-manual")||""))return;""==V&&"1"!=ss||(X=Number(V),G=!1,J="1"==ss,s(window).on("scroll",t(function(){if(!G){var e=s(window).scrollTop(),t=e/(s(document).height()-s(window).height())*100;if(J){if(!s(".essb_break_scroll").length)return;e>=s(".essb_break_scroll").offset().top-parseFloat(s(".essb_break_scroll").css("marginTop").replace(/auto/,0))&&(G=!0,q())}else t>X&&X>0&&(G=!0,q())}},1))),Z&&void 0!==Z?""!=Z&&Number(Z)?setTimeout(function(){q()},1e3*Number(Z)):q():""==V&&"1"!=ss&&q()}}if(s(".essb-popup").length){var es=!1,ts=-1,os=!1,as=!1,is=!1,ns=window.essb_popup_show=function(){if(!is){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")||"",n=s(t).attr("data-postid")||"",r=s(t).attr("data-close-after")||"";if("1"==a||"1"==i){var b="";if("1"==a){if(b="essb_popup_"+n,"yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}if("1"==i){if(b="essb_popup_all","yes"==e.getCookie(b))return;e.setCookie(b,"yes",7)}}var d=s(window).width(),l=(s("document").height(),800),p=o;Number(p)&&Number(p)>0&&(l=p),d0&&(optin_time=1e3*Number(r),setTimeout(function(){e.popup_close()},optin_time)),s(".essb-popup").css({width:l+"px"}),s(".essb-popup").center(),s(".essb-popup").fadeIn(400),s(".essb-popup-shadow").fadeIn(200),is=!0}}};if(e.responsiveEventsCanRun(s(".essb-popup"))){K=s(".essb-popup");if(e.is_after_comment()&&K.hasClass("essb-popup-oncomment"))return void ns();V=s(K).attr("data-load-percent")||"",Z=s(K).attr("data-load-time")||"",ss=s(K).attr("data-load-end")||"";var rs=s(K).attr("data-load-manual")||"",bs=s(K).attr("data-exit-intent")||"";if("1"==rs)return;if(""==V&&"1"!=ss||(ts=Number(V),es=!1,os="1"==ss,s(window).on("scroll",function(){if(!es){var e=s(window).scrollTop(),t=e/(s(document).height()-s(window).height())*100;os?s(".essb_break_scroll").length?e>=s(".essb_break_scroll").offset().top-parseFloat(s(".essb_break_scroll").css("marginTop").replace(/auto/,0))&&(es=!0,ns()):t>90&&(es=!0,ns()):t>ts&&ts>0&&(es=!0,ns())}})),"1"==bs){k=document,I="mouseout",x=function(s){if("input"!=(s=s||window.event).target.tagName.toLowerCase()){var e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);s.clientX>=e-50||s.clientY>=50||null===s.toElement&&null===s.relatedTarget&&function(s){if(!as){var e=s||window.event,t=e.relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(as=!0,ns())}}()}},k.addEventListener?k.addEventListener(I,x,!1):k.attachEvent&&k.attachEvent("on"+I,x)}Z&&void 0!==Z?""!=Z&&Number(Z)?setTimeout(function(){ns()},1e3*Number(Z)):ns():""==V&&"1"!=ss&&"1"!=bs&&ns()}}if(s(".essb_bottombar").length&&e.responsiveEventsCanRun(s(".essb_bottombar"))){K=s(".essb_bottombar");""==(s(K).find(".essb_links").data("bottombar-appear")||"")&&""==(s(K).find(".essb_links").data("bottombar-disappear")||"")||s(window).on("scroll",t(function(){var e,t=s(window).scrollTop()/(s(document).height()-s(window).height())*100;if(s(".essb_bottombar").length&&(e=s(".essb_bottombar")),e&&void 0!==e){var o=i(s(e).find(".essb_links").data("bottombar-appear")||""),a=i(s(e).find(".essb_links").data("bottombar-disappear")||"");if(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(t0&&Number(t)>a&&(e=!0),e?s(".essb-followme").hasClass("active")&&s(".essb-followme").removeClass("active"):s(".essb-followme").hasClass("active")||s(".essb-followme").addClass("active"),""!=fs&&(i>95?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).on("scroll",t(ms,1)),ms()}if(s(".essb-point").length){var gs=!1,vs="",ws=s(".essb-point").attr("data-trigger-scroll")||"",ys=s(".essb-point").attr("data-point-type")||"simple",Cs=Number(s(".essb-point").attr("data-autoclose")||0)||0;e.responsiveEventsCanRun(s(".essb-point"))&&("end"!=ws&&"middle"!=ws||(vs=ws,s(window).on("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"==vs&&e>=t&&!gs&&(s(".essb-point-share-buttons").hasClass("essb-point-share-buttons-active")||(s(".essb-point-share-buttons").addClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").toggleClass("essb-point-open"),gs=!0,Cs>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").removeClass("essb-point-open")},1e3*Cs))),"middle"==vs&&100*e/t>49&&!gs&&(s(".essb-point-share-buttons").hasClass("essb-point-share-buttons-active")||(s(".essb-point-share-buttons").addClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").toggleClass("essb-point-open"),gs=!0,Cs>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").removeClass("essb-point-open")},1e3*Cs)))}))),s(".essb-point").on("click",function(){s(".essb-point-share-buttons").toggleClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").toggleClass("essb-point-open"),Cs>0&&setTimeout(function(){s(".essb-point-share-buttons").removeClass("essb-point-share-buttons-active"),"simple"!=ys&&s(".essb-point").removeClass("essb-point-open")},1e3*Cs)})}if(s(".essb-cornerbar").length){s(".essb-cornerbar .essb_links").length&&s(".essb-cornerbar .essb_links").removeClass("essb_displayed_cornerbar");var ks=s(".essb-cornerbar").attr("data-show")||"",Is=s(".essb-cornerbar").attr("data-hide")||"";function xs(){var e=s(window).scrollTop()/(s(document).height()-s(window).height())*100;if("onscroll"!=ks&&"onscroll50"!=ks||(e>("onscroll"==ks?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"==ks){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")}""!=Is&&(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"))}e.responsiveEventsCanRun(s(".essb-cornerbar"))&&(""==Is&&""==ks||s(window).on("scroll",t(xs,1)),"content"==ks&&xs())}if(s(".essb-sharebooster").length){function Ns(){zs||(s(".essb-sharebooster").center(),s(".essb-sharebooster").fadeIn(400),s(".essb-sharebooster-overlay").fadeIn(200),s("body").addClass("essb-sharebooster-preventscroll"),zs=!0,Number(Rs)&&setTimeout(Ps,1e3*Number(Rs)))}function Ps(){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"==Es?"essb_booster_all":"essb_booster_"+essb_settings.post_id;e.setCookie(s,"yes",Number(Ss)),Ps()};var Ts=s(".essb-sharebooster").attr("data-trigger")||"",js=s(".essb-sharebooster").attr("data-trigger-time")||"",Os=s(".essb-sharebooster").attr("data-trigger-scroll")||"",Ss=s(".essb-sharebooster").attr("data-donotshow")||"",Es=s(".essb-sharebooster").attr("data-donotshowon")||"",Rs=s(".essb-sharebooster").attr("data-autoclose")||"",zs=!1;Number(Ss)||(Ss=7);var Ds="all"==Es?"essb_booster_all":"essb_booster_"+essb_settings.post_id;e.getCookie(Ds)&&(Ts="disabled"),e.responsiveEventsCanRun(s(".essb-sharebooster"))&&(""==Ts&&Ns(),"time"==Ts&&setTimeout(Ns,1e3*Number(js)),"scroll"==Ts&&s(window).on("scroll",t(function(){s(window).scrollTop()/(s(document).height()-s(window).height())*100>Os&&Ns()},1))),s(".essb-sharebooster-close").length&&s(".essb-sharebooster-close").on("click",function(s){s.preventDefault(),Ps()})}if(s(".essb-click2chat").length&&(s(".essb-click2chat").on("click",function(e){e.preventDefault(),s(".essb-click2chat-window").toggleClass("active")}),s(".essb-click2chat-window .chat-close").length&&s(".essb-click2chat-window .chat-close").on("click",function(e){e.preventDefault(),s(".essb-click2chat-window").toggleClass("active")}),s(".essb-click2chat-window .operator").each(function(){s(this).on("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})})),essb_settings.force_pin_description&&essb_settings.pin_description&&s("img").each(function(){s(this).data("pin-description")||s(this).attr("data-pin-description",essb_settings.pin_description)}),essb_settings.pin_pinid_active&&essb_settings.pin_pinid&&s("img").each(function(){s(this).attr("data-pin-id",essb_settings.pin_pinid)}),essb_settings.pin_force_active&&essb_settings.pin_force_image&&s("img").each(function(){s(this).attr("data-pin-media",essb_settings.pin_force_image)}),s(".essb-block-image").each(function(){var e=s(this).data("essb-pin-id")||"",t=s(this).data("essb-pin-description")||"";if("true"==(s(this).data("essb-pin-nopin")||"").toString())return s(this).find("img").attr("data-pin-nopin","true"),void s(this).find("img").addClass("no_pin");""!=e&&s(this).find("img").attr("data-pin-id",e),""!=t&&s(this).find("img").attr("data-pin-description",t)}),essb_settings.force_pin_thumbs){var Hs=window.essbReposiveImagesMap={},Us=window.essbDetectAndLocateImageSize=function(e,t,o){o&&(Hs[t].responsive[e]={}),s("",{load:function(){Hs[t]&&(o?(Hs[t].responsive[e]={w:this.width,h:this.height,done:!0},Ls(t)):(Hs[t].originalSize={w:this.width,h:this.height,done:!0},Ls(t)))},src:e})},Ls=window.essbCompileTheDataPinImage=function(e){var t=0,o=0,a=0,i="";for(var n in Hs[e].responsive){var r=Hs[e].responsive[n]||{};t++,r.done&&(o++,(0==a||aHs[e].originalSize.w&&(s('[data-pinpro-key="'+e+'"]').attr("data-pin-media",i),s('[data-pinpro-key="'+e+'"]').attr("data-media",i),s('[data-pinpro-key="'+e+'"]').attr("data-pin-url",window.location.href),s('[data-pinpro-key="'+e+'"]').removeClass("pin-process"),s('[data-pinpro-key="'+e+'"]').each(Ms))};s("img").each(function(){var e=s(this).attr("srcset")||"",t=Math.random().toString(36).substr(2,9),o=t;if(e&&""!=e){s(this).attr("data-pinpro-key",t),s(this).addClass("pin-process");var a=e.split(", "),i=s(this).attr("src")||"";Hs[o]={source:o,original:i,originalSize:{},responsive:{}},Us(i,o);for(var n=0;n-1)){e.data("media")&&(t=e.data("media")),e.data("lazy-src")&&(t=e.data("lazy-src")),e.data("pin-media")&&(t=e.data("pin-media")),e.data("pin-description")?o=e.data("pin-description"):e.attr("title")?o=e.attr("title"):e.attr("alt")&&(o=e.attr("alt")),essbPinImages.force_custompin&&!essbPinImages.custompin&&(essbPinImages.custompin=document.title),essbPinImages.custompin&&(o=essbPinImages.custompin),""==o&&(o=document.title);var r="http://pinterest.com/pin/create/bookmarklet/?media="+encodeURI(t)+"&url="+encodeURI(document.URL)+"&is_video=false&description="+encodeURIComponent(o),b=e.attr("class"),d=e.attr("style");if("icon_hover"==essbPinImages.button_style&&(i=" essb_hide_name"),"icon"==essbPinImages.button_style&&(i=" essb_force_hide_name essb_force_hide"),"button_name"==essbPinImages.button_style&&(i=" essb_hide_icon"),"vertical"==essbPinImages.button_style&&(i=" essb_vertical_name"),essbPinImages.button_size&&(n=" essb_size_"+essbPinImages.button_size),essbPinImages.animation&&(n+=" "+essbPinImages.animation),essbPinImages.position&&(n+=" essb_pos_"+essbPinImages.position),e.removeClass().attr("style","").wrap('
'),""!=b&&e.parent(".essb-pin").addClass(b),""!=d&&e.parent(".essb-pin").attr("style",d),essbPinImages.reposition){var l=s(e).width();Number(l)&&!isNaN(l)&&Number(l)>0&&e.parent(".essb-pin").css({"max-width":l+"px"})}var p=(new Date).getTime().toString(36);a.push('"),e.after(a.join("")),e.addClass("pin-generated"),e.parent(".essb-pin").hasClass("lazyloading")&&e.parent(".essb-pin").removeClass("lazyloading")}}};if("undefined"!=typeof essbPinImages&&s("body").hasClass("tcb-edit-mode")&&(essbPinImages.active=!1),"undefined"!=typeof essbPinImages&&essbPinImages.active){essbPinImages.min_width&&Number(essbPinImages.min_width)||(essbPinImages.min_width=300),essbPinImages.min_height&&Number(essbPinImages.min_height)||(essbPinImages.min_height=300),s(window).width()<720&&(Number(essbPinImages.min_width_mobile)&&(essbPinImages.min_width=Number(essbPinImages.min_width_mobile)),Number(essbPinImages.min_height_mobile)&&(essbPinImages.min_height=Number(essbPinImages.min_height_mobile))),s(".essb-pin.tve_image").length&&(s(".essb-pin.tve_image .essb_links").remove(),s(".essb-pin img").removeClass("pin-generated")),s(".rll-youtube-player img").each(function(){s(this).addClass("no-pin")}),essbPinImages.hideon&&s(essbPinImages.hideon).each(function(){s(this).addClass("no-pin")}),window.addEventListener("LazyLoad::Initialized",function(e){s(".rll-youtube-player img").each(function(){s(this).addClass("no-pin")})});var Qs=function(){if(essbPinImages.selector)s(essbPinImages.selector).each(Ms);else{if(!s(".essb-pinterest-images").length)return;s(".essb-pinterest-images").parent().find("img").each(Ms)}};essbPinImages.lazyload&&s(window).on("scroll",t(Qs,10)),setTimeout(Qs,1)}("undefined"!=typeof essbPinImages&&!essbPinImages.active||"undefined"==typeof essbPinImages)&&s(".essb-pin.tve_image").length&&(s(".essb-pin.tve_image .essb_links").remove(),s(".essb-pin img").removeClass("pin-generated")),s(".essbfc-container-sidebar").length&&s(".essbfc-container-sidebar").each(function(){s(this).hasClass("essbfc-container-sidebar-transition")&&s(this).removeClass("essbfc-container-sidebar-transition")}),s(".essb-subscribe-captcha").length&&s(".essb-subscribe-captcha").each(function(){var e=s(this).attr("id")||"";""!=e&&"undefined"!=typeof essb_subscribe_recaptcha&&essb_subscribe_recaptcha&&essb_subscribe_recaptcha.recaptchaSitekey&&grecaptcha.render(e,{sitekey:essb_subscribe_recaptcha.recaptchaSitekey})})})}(jQuery); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};return $.each(t,function(t,s){i[s[0].split(" ").join(e+" ")+e]=s[1]}),i}var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],i)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],i)),i+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],i)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1;if(s&&!s.is(":visible")){if(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&i)return this.itemActivate(e),this.menuHide(s),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("