jQuery(document).ready(function(c){c(".calendar-archives.preview a").on("click",function(f){f.preventDefault()});c(".preview_theme_select li.preview-theme").on("click",function(){var f=(new Date()).getTime();var e=c(this).attr("id");c(".arcw.preview-zone .calendar-archives ").addClass(e);b(e);c("#ac_preview_css").remove();c("head").append('')});c(".button.preview_theme").on("click",function(){console.log("click preview");var f=(new Date()).getTime();var e=c("select.theme_select").val();c(".arcw.preview-zone .calendar-archives ").addClass(e);b(e);c("#ac_preview_css").remove();c("head").append('')});c(".ok_theme").on("click",function(){tb_remove();c("select.theme_select option[value="+c(".preview-theme.selected").attr("id")+"]").attr("selected",true)});c(".cancel_theme").on("click",function(){tb_remove()});function b(e){c(".preview_theme_select li").removeClass("selected");c(".preview_theme_select li#"+e).addClass("selected")}c(".calendar-archives").find(".arrow-down").on("click",function(){c(this).parent().children(".menu").show()});c(".calendar-archives").find(".menu").mouseleave(function(){var e=c(this);c("html").data("arctimer",setTimeout(function(){e.parent().children(".menu").hide()},300))}).mouseenter(function(){if(c("html").data("arctimer")){clearTimeout(c("html").data("timer"))}});if(typeof themer_tab!=="undefined"){a(themer_tab)}c(".nav-tab-wrapper.custom a.nav-tab").click(function(h){h.preventDefault();if(c(this).is(".nav-tab-active, .notab")){return}var f=c(this).index();c("#current_tab").val(f);c(".nav-tab-wrapper.custom a.nav-tab-active").toggleClass("nav-tab-active");c(this).addClass("nav-tab-active");var g=c(".nav-tab-wrapper.custom a.nav-tab-active").attr("href");d(g)});function a(){c("#current_tab").val(themer_tab);c(".nav-tab-wrapper.custom a.nav-tab-active").removeClass("nav-tab-active");var e=c(".nav-tab-wrapper.custom a.nav-tab:eq("+themer_tab+")").toggleClass("nav-tab-active").attr("href");d(e)}function d(e){console.log(e);c(".tabs .tab").removeClass("active-tab");c(".tabs "+e).addClass("active-tab");c("#arwprev").html(c("#codesource"+ +(parseInt(c("#current_tab").val())+1)).html());editor1.resize();editor2.resize()}});