(function(e,b,g){function a(h,i){return e.getComputedStyle(h).getPropertyValue(i)}function d(j,h){for(var i in h){j.setAttribute(i,h[i])}}function f(i,h){return Array.prototype.filter.call(i.parentNode.children,function(j){return j!==i&&j.classList.contains(h)})}var c=function(i){this.wrapperEl=”.squeezebox”;this.headersClass=”squeezhead”;this.foldersClass=”squeezecnt”;this.closeOthers=true;this.speed=”.7s”;if(i){for(var h in i){this[h]=i[h]}}};c.prototype={init:function(){var h=this;this.wrapper=b.querySelectorAll(this.wrapperEl);Array.prototype.forEach.call(this.wrapper,function(j,i,k){h.getHeights(j);h.setListeners(j)})},getHeights:function(i){var h=this,j=i.getElementsByClassName(h.foldersClass),m=j.length,l,k;while(m–){l=j[m],k=l.style;k.position=”absolute”;k.visibility=”hidden”;k.display=””;k.transition=””;h.showEl(l);d(l,{“data-sq_h”:a(l,”height”),”data-sq_pt”:a(l,”padding-top”),”data-sq_pb”:a(l,”padding-bottom”)});k.position=”relative”;k.visibility=”visible”;h.hideEl(l);h.addTran(l)}},addTran:function(i){var h=this;setTimeout(function(){i.style.transition=”all “+h.speed},100)},hideEl:function(i){var h=i.style;h.maxHeight=0;h.paddingTop=0;h.paddingBottom=0;i.setAttribute(“aria-hidden”,”true”)},showEl:function(i){var h=i.style;h.maxHeight=i.getAttribute(“data-sq_h”);h.paddingTop=i.getAttribute(“data-sq_pt”);h.paddingBottom=i.getAttribute(“data-sq_pb”);i.setAttribute(“aria-hidden”,”false”)},hideSibl:function(i){var h=this;Array.prototype.forEach.call(f(i,h.foldersClass),function(l,j,k){h.hideEl(l)})},setListeners:function(i){var h=this;i.addEventListener(“click”,function(k){var j=k.target;while(j&&!j.classList.contains(h.headersClass)){j=j.parentNode;if(j===i){return}}h.clickedEl=j;h.toggle(j.nextElementSibling)})},toggle:function(h){if(h.getAttribute(“aria-hidden”)===”false”){this.hideEl(h);this.fireCallback(h,”onClose”)}else{if(this.closeOthers){this.hideSibl(h)}this.showEl(h);this.fireCallback(h,”onOpen”)}},fireCallback:function(i,h){(this[h])?this[h](this.wrapper,this.clickedEl,i):null}};e.Squeezebox=c})(window,document);

Menu