Current File : /home/resuelf/www/wp-content/cache/minify/0c713.js_old
jQuery(function($){if("undefined"!=typeof ezTOC){function e(){if(0!==$(".ez-toc-widget-container.ez-toc-affix").length){var e=30;void 0!==ezTOC.scroll_offset&&(e=parseInt(ezTOC.scroll_offset));$(ezTOC.affixSelector).stick_in_parent({inner_scrolling:!1,offset_top:e})}$.fn.shrinkTOCWidth=function(){$(this).css({width:"auto",display:"table"});/MSIE 7\./.test(navigator.userAgent)&&$(this).css("width","")};1===parseInt(ezTOC.smooth_scroll)&&$("a.ez-toc-link").on("click",function(){var e=$(this),t="",i=e.prop("hostname"),o=e.prop("pathname"),s=e.prop("search"),e=e.prop("hash");0<o.length&&"/"!==o.charAt(0)&&(o="/"+o);if(window.location.hostname===i&&window.location.pathname===o&&window.location.search===s&&""!==e){t='[id="'+e.replace("#","")+'"]';if(0===$(t).length){console.log("ezTOC scrollTarget Not Found: "+t);t=""}o=void 0!==ezTOC.scroll_offset?-1*ezTOC.scroll_offset:0<(i=$("#wpadminbar")).length&&i.is(":visible")?-30:0;t&&$.smoothScroll({scrollTarget:t,offset:o,beforeScroll:r,afterScroll:function(){l();c()}})}});if(void 0!==ezTOC.visibility_hide_by_default){var t=$("ul.ez-toc-list"),e=$("a.ez-toc-toggle"),i=ezTOC.visibility_hide_by_default;e.css("display","inline");Cookies&&1==Cookies.get("ezTOC_hidetoc")?e.data("visible",!1):e.data("visible",!0);i&&e.data("visible",!1);e.data("visible")||t.hide();e.on("click",function(e){e.preventDefault();if($(this).data("visible")){$(this).data("visible",!1);Cookies&&(i?Cookies.set("ezTOC_hidetoc",null,{path:"/"}):Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"}));t.hide("fast")}else{$(this).data("visible",!0);Cookies&&(i?Cookies.set("ezTOC_hidetoc","1",{expires:30,path:"/"}):Cookies.set("ezTOC_hidetoc",null,{path:"/"}));t.show("fast")}})}var o=$("span.ez-toc-section").toArray(),s=o.reduce(function(e,t){e[t.id]=$('.ez-toc-widget-container .ez-toc-list a[href="#'+$(t).attr("id")+'"]');return e},{}),a=$.map(s,function(e,t){return e}),n=function(){var e=5;void 0!==ezTOC.smooth_scroll&&1===parseInt(ezTOC.smooth_scroll)&&(e=void 0!==ezTOC.scroll_offset?parseInt(ezTOC.scroll_offset):30);var t=$("#wpadminbar");t.length&&(e+=t.height());return e}();c();function l(){var t,e=function(e,t){var i=$(window).scrollTop()+e+1,o=t[0],s=i-$(o).offset().top;t.forEach(function(e){var t=i-$(e).offset().top;if(0<t&&t<s){s=t;o=e}});return o}(n,o);if(e){e=s[e.id],t=e,a.forEach(function(e){t!==e&&e.parent().hasClass("active")&&e.parent().removeClass("active")});(e=e.parent()).hasClass("active")||e.addClass("active");e=function(e){var e=$(e),t=e.html(),t=(e.parent().append('<li id="ez-toc-height-test" class="active">'+t+"</li>"),$("#ez-toc-height-test")),i=t.height();t.remove();return i-e.children("ul").first().height()}(e);$("#ez-toc-active-height").remove();$('<style id="ez-toc-active-height">.ez-toc-widget-container ul.ez-toc-list li.active::before {height:'+e+"px;} </style>").appendTo("head")}}function c(){0<o.length&&$(".ez-toc-widget-container").length&&$(window).on("load resize scroll",l)}function r(){$(window).off("load resize scroll",l)}}ezTOC.init=function(){e()};e()}});