!function(r){r(function(){var n,t,o=".envira-tabs-nav",i=window.location.hash,a=window.location.hash.replace("!",""),s=null;void 0!==wp.codeEditor&&((n=wp.codeEditor.defaultSettings?_.clone(wp.codeEditor.defaultSettings):{}).codemirror=_.extend({},n.codemirror,{indentUnit:2,tabSize:2,mode:"css"})),i&&0<=i.indexOf("envira-tab-")&&(i=r(a).parent(),t=r(i).data("navigation"),r(t).find(".envira-active").removeClass("envira-active"),r(i).find(".envira-active").removeClass("envira-active"),r(t).find('a[href="'+a+'"]').addClass("envira-active"),r(a).addClass("envira-active"),(i=r("#post").attr("action"))&&(i=i.split("#")[0],r("#post").attr("action",i+window.location.hash)),0<r(a).find("#envira-config-custom-css-test").length&&null===s&&(s=wp.codeEditor.initialize(r("#envira-config-custom-css-test"),n))),r(o).on("click",".nav-tab, a",function(t){t.preventDefault();var t=r(this).closest(o),i=r(t).data("container"),a=r(t).data("update-hashbang"),e=void 0!==r(this).attr("href")?r(this).attr("href"):r(this).data("tab");r(this).hasClass("envira-active")||(void 0===r(this).attr("for")||r("input#"+r(this).attr("for")).prop("checked")||r("input#"+r(this).attr("for")).prop("checked",!0).trigger("change"),r(t).find(".envira-active").removeClass("envira-active"),r(i).find(".envira-active").removeClass("envira-active"),r(this).addClass("envira-active"),r(i).find(e).addClass("envira-active"),"1"==a&&(window.location.hash=e.split("#").join("#!"),"#envira-tabs"==i&&r("html").animate({scrollTop:r(e).offset().top-100},800),(t=r("#post").attr("action"))&&(t=t.split("#")[0],r("#post").attr("action",t+window.location.hash))),0<r(i).find(e).find("#envira-config-custom-css-test").length&&null===s&&(s=wp.codeEditor.initialize(r("#envira-config-custom-css-test"),n)))})})}(jQuery);