!function(o){OUAccordion={containerClass:".ou-accordion",itemClass:".ou-accordion-item",arrowClass:".ouacrd-icon-wrap",itemContentClass:".ou-accordion-content",init:function(){o(this.containerClass+" .ou-accordion-button").on("click",o.proxy(this._buttonClick,this)),o(this.containerClass+" .ou-accordion-button").on("keypress",o.proxy(this._buttonClick,this)),o(this.containerClass+" .ou-accordion-button").on("focus",o.proxy(this._focusIn,this)),o(this.containerClass+" .ou-accordion-button").on("focusout",o.proxy(this._focusOut,this)),o(this.containerClass).each(function(t,i){"yes"==o(this).attr("data-expand-first")&&o(this).find(".ou-accordion-item").eq(0).children(".ou-accordion-button").trigger("click");var e=o(this).find(".ou-accordion-button").attr("data-schema");null!=typeof e&&"yes"==e&&(o("body").attr("itemtype","https://schema.org/FAQPage"),o("body").attr("itemscope",""))})},_buttonClick:function(t){var i=o(t.target).closest(".ou-accordion-button"),e=i.closest(this.containerClass),n=i.closest(this.itemClass),s=e.find(this.itemContentClass),a=i.siblings(this.itemContentClass);icon=i.find(this.arrowClass),allClassicAccrodion=o(t.target).closest(".oxy-ou-classic-acrd"),speed=i.attr("data-transitionspeed"),this._validClick(t)&&(t.preventDefault(),e.find(".ou-accordion-close-icon").addClass("toggle-icon"),e.find(".ou-accordion-open-icon").removeClass("toggle-icon"),e.find(".ou-accordion-item-active").removeClass("ou-accordion-item-active"),e.find(".ou-accordion-button").attr("aria-expanded","false"),e.find(this.itemContentClass).attr("aria-hidden","true"),null!=typeof speed&&"undefined"!=speed&&""!=speed?s.slideUp(parseInt(speed)):s.slideUp("normal"),"undefined"!=typeof allClassicAccrodion&&o(".oxy-ou-classic-acrd").length&&(o(".oxy-ou-classic-acrd").find(".ou-accordion-close-icon").addClass("toggle-icon"),o(".oxy-ou-classic-acrd").find(".ou-accordion-open-icon").removeClass("toggle-icon"),o(".oxy-ou-classic-acrd").find(".ou-accordion-item-active").removeClass("ou-accordion-item-active"),o(".oxy-ou-classic-acrd").find(".ou-accordion-button").attr("aria-expanded","false"),o(".oxy-ou-classic-acrd").find(this.itemContentClass).attr("aria-hidden","true"),o(".oxy-ou-classic-acrd").find(this.itemContentClass).slideUp("normal")),a.is(":hidden")?(i.attr("aria-expanded","true"),n.addClass("ou-accordion-item-active"),n.find(this.itemContentClass).attr("aria-hidden","false"),n.find(".ou-accordion-close-icon").removeClass("toggle-icon"),n.find(".ou-accordion-open-icon").addClass("toggle-icon"),null!=typeof speed&&"undefined"!=speed&&""!=speed?a.slideDown(parseInt(speed),this._slideDownComplete):a.slideDown("normal",this._slideDownComplete)):(i.attr("aria-expanded","false"),n.removeClass("ou-accordion-item-active"),n.find(this.itemContentClass).attr("aria-hidden","true"),n.find(".ou-accordion-close-icon").addClass("toggle-icon"),n.find(".ou-accordion-open-icon").removeClass("toggle-icon"),null!=typeof speed&&"undefined"!=speed&&""!=speed?a.slideUp(parseInt(speed)):a.slideUp("normal")))},_focusIn:function(t){o(t.target).closest(".ou-accordion-button").attr("aria-selected","true")},_focusOut:function(t){o(t.target).closest(".ou-accordion-button").attr("aria-selected","false")},_slideDownComplete:function(){var t=o(this),i=t.closest(this.containerClass),e=t.parent(),n=o(window);e.offset().top<n.scrollTop()+100&&o("html, body").animate({scrollTop:e.offset().top-100},500,"swing"),i.trigger("ou-accordion-slide-complete"),o(document).trigger("ou-accordion-slide-complete",[i])},_validClick:function(o){return 1==o.which||13==o.which||32==o.which||null==o.which}},o(function(){OUAccordion.init()})}(jQuery);