text: jQuery(document).ready(function($){function n(n){var i=e();t.offset().top>$(window).scrollTop()&&"mobile"!=i?$("body,html").animate({scrollTop:t.offset().top},100,function(){o(n,!0)}):t.offset().top+t.height()<$(window).scrollTop()+$(window).height()&&"mobile"!=i?$("body,html").animate({scrollTop:t.offset().top+t.height()-$(window).height()},100,function(){o(n,!0)}):o(n,!0)}function o(n,o){if(o){var t=i.find(".bh-fold-content");t.load(n+" .bh-fold-content > *",function(n){setTimeout(function(){$("body").addClass("overflow-hidden"),i.addClass("is-open"),l.addClass("fold-is-open")},100)})}else{var s=e();i.removeClass("is-open"),l.removeClass("fold-is-open"),"mobile"==s||$(".no-csstransitions").length>0?$("body").removeClass("overflow-hidden"):l.find(".bh-item").eq(0).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){$("body").removeClass("overflow-hidden"),l.find(".bh-item").eq(0).off("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend")})}}function e(){return window.getComputedStyle(document.querySelector(".bh-main"),"::before").getPropertyValue("content").replace(/"/g,"").replace(/'/g,"")}var t=$(".bh-gallery"),i=$(".bh-folding-panel"),l=$(".bh-main");t.on("click","a",function(o){o.preventDefault(),n($(this).attr("href"))}),i.on("click",".bh-close",function(n){n.preventDefault(),o("",!1)}),t.on("click",function(n){$(n.target).is(".bh-gallery")&&$(".fold-is-open").length>0&&o("",!1)})});