!function(t){t(document).ready(function(){t(".accordion-container").on("click keydown",".accordion-section-title",function(o){var n,e;"keydown"===o.type&&13!==o.which||(o.preventDefault(),n=t(this),e=n.closest(".accordion-section"),o=e.closest(".accordion-container").find(".open"),n=e.find(d),e.hasClass("cannot-expand")||(e.hasClass("control-panel")?c(e):e.hasClass("open")?(e.toggleClass("open"),n.toggle(!0).slideToggle(150)):(o.removeClass("open"),o.find(d).show().slideUp(150),n.toggle(!1).slideToggle(150),e.toggleClass("open"))))}),t("#customize-header-actions").on("click keydown",".control-panel-back",function(o){"keydown"===o.type&&13!==o.which||(o.preventDefault(),c(t(".current-panel")))})});var d=t(".accordion-section-content");function c(o){var n,e,t=o.closest(".accordion-section"),c=t.closest(".wp-full-overlay"),s=t.closest(".accordion-container"),i=s.find(".open"),a=c.find("#customize-theme-controls > ul > .accordion-section > .accordion-section-title").add("#customize-info > .accordion-section-title"),l=c.find(".control-panel-back"),o=t.find(".accordion-section-title").first(),r=t.find(".control-panel-content");t.hasClass("current-panel")?(t.toggleClass("current-panel"),c.toggleClass("in-sub-panel"),r.delay(180).hide(0,function(){r.css("margin-top","inherit")}),a.attr("tabindex","0"),l.attr("tabindex","-1"),o.focus(),s.scrollTop(0)):(i.removeClass("open"),i.find(d).show().slideUp(0),r.show(0,function(){n=r.offset().top,e=s.scrollTop(),r.css("margin-top",45-n-e),t.toggleClass("current-panel"),c.toggleClass("in-sub-panel"),s.scrollTop(0)}),a.attr("tabindex","-1"),l.attr("tabindex","0"),l.focus())}}(jQuery);