jQuery(function(){var e=jQuery("body");if(!(e.length<1)){e.on("expand",".expandable:not(.expanded)",function(e){if(e.currentTarget==e.target){var t=jQuery(e.target);t.find(".expandable-content").first().slideDown("fast"),t.addClass("expanded")}}),e.on("collapse",".expandable.expanded",function(e){if(e.currentTarget==e.target){var t=jQuery(e.target);t.find(".expandable-content").first().slideUp("fast"),t.removeClass("expanded")}}),e.on("toggle",".expandable",function(e){if(e.currentTarget==e.target){var t=jQuery(e.target);t.is(".expanded")?t.trigger("collapse"):t.trigger("expand")}}),e.on("click",".expandable-switch",function(e){var t=jQuery(e.target);if(t.is("a, button")||(t=t.closest("a, button")),!(t.length<1)){e.preventDefault(),e.stopPropagation();var a=t.closest(".expandable"),n=!a.is(".expanded");if(a.trigger("toggle"),t.is("a")){var r=a.attr("data-hash"),o=r?window.location.href:t.attr("href"),i=o.split("#")[0],d=r?i+"#"+r:o,l=n?d:i;jQuery(window).trigger("urlchange",l)}}}),e.on("contentloaded",function(e){jQuery(e.target).find(".expandable-switch").not("a, button").each(function(){var e=jQuery(this),t=jQuery("<button />").attr("type","button").attr("class",e.attr("class")).text(e.text());e.replaceWith(t)})});var t=function(){var t=document.location.hash.replace(/^#/,"");t.length<1||e.find(".expandable#"+t+', .expandable[data-hash="'+t+'"]').first().trigger("expand")};jQuery(window).on("hashchange",function(e){t()}),t()}});