function ComponentAccordion(){this.config={el:$("ul.collection")},this.init()}mindtools="undefined"==typeof mindtools?new function(){}:mindtools,ComponentAccordion.prototype=function(t,e){var o={init:function(e){t("ul.collection").hide(),t.extend(this.config,e);var o=this.config.el,i=o.length,a=null;try{"object"==typeof localStorage&&(a=JSON.parse(localStorage.getItem("accordionHistory")))}catch(t){}var s=t(".main .category--header h1, .page-main .category--header h1").text(),r=!1;t(".category--reslist ul").hasClass("default-collapse")&&(r=!0);var n="";null==a&&(a={}),null!=a[s]&&(n=a[s]);var l=window.location.hash.substr(1);l=l.replace(new RegExp("%20","g")," ");if(!r&&l.length>0)for(var c=0;c<i;c++){var d=t(o[c]).prev("h2"),g=String(t(d).text()).substr(0,String(t(d).text()).indexOf("(")).trim();l==g&&(n=l,!0)}for(c=0;c<i;c++)this.setupCategory(o[c],a,s),d=t(o[c]).prev("h2"),g=String(t(d).text()).substr(0,String(t(d).text()).indexOf("(")).trim(),r||(0==n.length?0==c&&this.setActive(d):n==g&&(this.setActive(d),this.jumpTo(d)))},setActive:function(t){t.addClass("is-active").siblings("h2").removeClass("is-active"),t.find("span").removeClass("mt-arrow-down").addClass("mt-arrow-up"),t.next("ul").css("display","block"),this.loadImages(t)},loadImages:function(t){"object"==typeof e.LazyLoader&&"function"==typeof e.LazyLoader.load&&e.LazyLoader.load(t[0].nextElementSibling.querySelectorAll("img, source"))},setupCategory:function(e,o,i){var a=this,s=e,r=(t(s).children("li").length,t(s).prev("h2").find("span"),t(s).prev("h2"));r.on("click",function(){var e=t(this);if(a.loadImages(e),e.hasClass("is-active")){if(o[i]="","object"==typeof localStorage)try{localStorage.setItem("accordionHistory",JSON.stringify(o))}catch(t){}e.removeClass("is-active"),e.find("span.mt-arrow-up").removeClass("mt-arrow-up").addClass("mt-arrow-down")}else{var s=String(t(r).text()).substr(0,String(t(r).text()).indexOf("(")).trim();if(o[i]=s,"object"==typeof localStorage)try{localStorage.setItem("accordionHistory",JSON.stringify(o))}catch(t){}e.addClass("is-active").siblings("h2").removeClass("is-active"),t(".mt-arrow-up").removeClass("mt-arrow-up").addClass("mt-arrow-down"),e.find("span").removeClass("mt-arrow-down").addClass("mt-arrow-up")}e.next("ul").animate({height:["toggle","swing"]},300,"linear",function(){a.jumpTo(t(this).prev())}).siblings("ul").slideUp(300)})},jumpTo:function(e){t("html, body").animate({scrollTop:e.offset().top},500)}};return o}(jQuery,mindtools.tools);