jQuery(function($){"use strict";function checkArrow(){var scrollTop=$w.scrollTop(),documentHeight=$d.height(),nearFooter=window.piViewportHeight+scrollTop>=documentHeight-footerHeight;scrollTop>=treshold?$arrow.addClass(classActive):$arrow.removeClass(classActive),nearFooter&&"lg"!==window.piCurrentBound?$arrow.addClass(classBottom):$arrow.removeClass(classBottom)}var scrollCheckTmt,$w=$(window),$d=$(document),$arrow=$(".pi-scroll-top-arrow"),classActive="pi-active",classBottom="pi-scroll-top-arrow-footer",footerHeight=100,treshold=400;$arrow.length&&($w.on("scroll resize",function(){clearTimeout(scrollCheckTmt),scrollCheckTmt=setTimeout(function(){checkArrow()},100)}),$arrow.on("click",function(){$arrow.removeClass(classActive)}))});