var tdToTop={};jQuery().ready(function(){tdToTop.init()});
(function(){tdToTop={$element:void 0,style:"",init:function(){var a=jQuery(".td-scroll-up");if(a.length){tdToTop.$element=a;tdToTop.style="undefined"!==typeof a.data("style")?a.data("style"):"style1";switch(tdToTop.style){case "style2":jQuery("body").css({position:"relative","overflow-x":"hidden"})}a.on("click",function(a){return tdToTop.handle_click_event(a)})}},td_events_scroll:function(a){if("undefined"!==typeof tdToTop.$element)switch(400<a?tdToTop.$element.hasClass("td-scroll-up-visible")||tdToTop.$element.addClass("td-scroll-up-visible"):
tdToTop.$element.hasClass("td-scroll-up-visible")&&tdToTop.$element.removeClass("td-scroll-up-visible"),tdToTop.style){case "style2":var b=tdToTop.$element.find(".td-scroll-up-progress-circle path"),c=b.get(0).getTotalLength(),d=jQuery(document).height()-jQuery(window).height();b.css({"stroke-dashoffset":c-a*c/d});a=jQuery(".td-footer-template-wrap");a.length&&(tdUtil.isInViewport(a)?tdToTop.$element.css({position:"absolute",bottom:a.outerHeight()+4}):tdToTop.$element.css({position:"fixed",bottom:4}))}},
handle_click_event:function(a){a.preventDefault();tdToTop.$element.hasClass("td-scroll-up-visible")&&tdToTop.$element.removeClass("td-scroll-up-visible");td_more_articles_box.is_box_visible=!1;jQuery(".td-more-articles-box").removeClass("td-front-end-display-block");tdUtil.scrollToPosition(0,1200)}}})();
