function filterPath(n){return n.replace(/^\//,"").replace(/(index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")}function scroolSmooth(n,t){var i=decodeURI(n.hash);if(filterPath(location.pathname)==filterPath(n.pathname)&&location.hostname==n.hostname&&i.replace(/#/,"")){$.pageslide&&$.pageslide.close();var r=$(i),u=$("[name="+i.slice(1)+"]"),f=r.length?r:u.length?u:!1,e=i;return doSmoothScroll(f,t,e),!0}return!1}function adjustScrollOffsetWhenHeaderBecomesFixed(n){n.interval||(n.interval=1e3);n.delay||(n.delay=200);n.fixIt||(n.fixIt=function(){return!0});var t=1+(n.interval/n.delay|0),i=setInterval(function(){if(n.fixIt())n.log&&console.log("fixIt: Fix is done"),clearInterval(i);else{if(--t==0){n.log&&console.log("fixIt: header is not fixed");clearInterval(i);return}n.log&&console.log("fixIt: Waiting for header;"+t+"more attempts")}},n.delay)}function doSmoothScroll(n,t,i){function e(){return r.css("position")!=="fixed"?!1:(u-=r.height(),f.animate({scrollTop:u},t),!0)}if(n){var f=$("html, body"),r=$(".HeaderExternal_wp_outer"),u=n.offset().top;r.css("position")==="fixed"?u-=r.height():adjustScrollOffsetWhenHeaderBecomesFixed({interval:1e4,delay:300,fixIt:e,log:!1});f.animate({scrollTop:getTargetOffset(n)},{duration:t,step:function(t,i){var r=getTargetOffset(n);i.end!==r&&(i.end=r)}});i&&(window.location.hash=i)}}function getTargetOffset(n){var t=$(".HeaderExternal_wp_outer"),i=n.offset().top;return t.css("position")==="fixed"?i-=t.height():i}$(function(){location.hash&&(setTimeout(function(){window.scrollTo(0,0)},1),setTimeout(function(){var n=$(decodeURI(location.hash)),t,i,r,u;(n.length==0&&(n=$("[name="+decodeURI(location.hash).slice(1)+"]")),n.length!=0)&&(t=$('[class*="_masonry-gallery"]'),i=$('[class*="_container_inner"][id*="_newgallery"]'),t.length>0&&(r=setInterval(function(){for(var u=!0,i=0;i0&&(u=setInterval(function(){for(var r=!0,t=0;t