!function(t,n,e,i){function a(n,e){this.element=n,this.options=t.extend({},s,e),this._defaults=s,this._name=o,this.init()}var o="accordion",s={transitionSpeed:300,transitionEasing:"ease",controlElement:"[data-control]",contentElement:"[data-content]",groupElement:"[data-accordion-group]",singleOpen:!0};a.prototype.init=function(){function i(t,n,e){var i;return function(){function a(){e||t.apply(o,s),i=null}var o=this,s=arguments;i?clearTimeout(i):e&&t.apply(o,s),i=setTimeout(a,n||100)}}function a(t){n.requestAnimationFrame?requestAnimationFrame(t):n.webkitRequestAnimationFrame?webkitRequestAnimationFrame(t):n.mozRequestAnimationFrame?mozRequestAnimationFrame(t):setTimeout(t,1e3/60)}function o(t,n){n?v.css({"-webkit-transition":"",transition:""}):v.css({"-webkit-transition":"max-height "+m.transitionSpeed+"ms "+m.transitionEasing,transition:"max-height "+m.transitionSpeed+"ms "+m.transitionEasing})}function s(n){var e=0;n.children().each(function(){e+=t(this).outerHeight(!0)}),n.data("oHeight",e)}function c(n,e,i,a){var o,s=n.filter(".open").find("> [data-content]"),c=s.find("[data-accordion].open > [data-content]");m.singleOpen||(c=c.not(e.siblings("[data-accordion].open").find("> [data-content]"))),o=s.add(c),n.hasClass("open")&&o.each(function(){var n=t(this).data("oHeight");switch(a){case"+":t(this).data("oHeight",n+i);break;case"-":t(this).data("oHeight",n-i);break;default:throw"updateParentHeight method needs an operation"}t(this).css("max-height",t(this).data("oHeight"))})}function r(t){if(t.hasClass("open")){var n=t.find("> [data-content]"),e=n.find("[data-accordion].open > [data-content]"),i=n.add(e);s(i),i.css("max-height",i.data("oHeight"))}}function d(t,n){if(t.trigger("accordion.close"),w){if(H){c(t.parents("[data-accordion]"),t,n.data("oHeight"),"-")}n.css(x),t.removeClass("open")}else n.css("max-height",n.data("oHeight")),n.animate(x,m.transitionSpeed),t.removeClass("open")}function h(t,n){if(t.trigger("accordion.open"),w){if(o(n),H){c(t.parents("[data-accordion]"),t,n.data("oHeight"),"+")}a(function(){n.css("max-height",n.data("oHeight"))}),t.addClass("open")}else n.animate({"max-height":n.data("oHeight")},m.transitionSpeed,function(){n.css({"max-height":"none"})}),t.addClass("open")}function f(n){var e=(n.closest(m.groupElement),n.siblings("[data-accordion]").filter(".open")),i=e.find("[data-accordion]").filter(".open"),a=e.add(i);a.each(function(){var n=t(this);d(n,n.find(m.contentElement))}),a.removeClass("open")}function u(){var t=!!m.singleOpen&&g.parents(m.groupElement).length>0;s(v),t&&f(g),g.hasClass("open")?d(g,v):h(g,v)}var l=this,m=l.options,g=t(l.element),p=g.find("> "+m.controlElement),v=g.find("> "+m.contentElement),E=g.parents("[data-accordion]").length,H=E>0,x={"max-height":0,overflow:"hidden"},w=function(){var t=e.body||e.documentElement,n=t.style,i="transition";if("string"==typeof n[i])return!0;var a=["Moz","webkit","Webkit","Khtml","O","ms"];i="Transition";for(var o=0;o<a.length;o++)if("string"==typeof n[a[o]+i])return!0;return!1}();!function(){v.each(function(){var n=t(this);0!=n.css("max-height")&&(n.closest("[data-accordion]").hasClass("open")?(o(n),s(n),n.css("max-height",n.data("oHeight"))):n.css({"max-height":0,overflow:"hidden"}))}),g.attr("data-accordion")||(g.attr("data-accordion",""),g.find(m.controlElement).attr("data-control",""),g.find(m.contentElement).attr("data-content",""))}(),function(){p.on("click",u),p.on("accordion.toggle",function(){if(m.singleOpen&&p.length>1)return!1;u()}),p.on("accordion.refresh",function(){r(g)}),t(n).on("resize",i(function(){r(g)}))}()},t.fn[o]=function(n){return this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new a(this,n))})}}(jQuery,window,document),function(t){!function(t){t(document).ready(function(){t("#osf-accordion-container [data-accordion]").accordion()})}(jQuery)}(jQuery);
//# sourceMappingURL=woocommerce-accordion.js.map
