jQuery(document).ready(function(a){function b(){a.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_remove_box"},success:function(a){}})}a(".post-type-cf7_style.post-php").length>0&&a(".meta-box-sortables").sortable({disabled:!0}),a(".cf7_style_page_cf7style-settings .cf7style-tooltip").on("click",function(b){b.preventDefault(),b.stopPropagation(),a(".cf7style-tooltip-content").removeClass("show"),a(this).hasClass("on")?(a(".cf7style-tooltip-content").removeClass("show"),a(".cf7_style_page_cf7style-settings .cf7style-tooltip").removeClass("on")):(a(this).find(".cf7style-tooltip-content").addClass("show"),a(this).addClass("on"))}),a(".cf7_style_page_cf7style-settings").on("click",function(b){a(".cf7style-tooltip-content").removeClass("show"),a(".cf7_style_page_cf7style-settings .cf7style-tooltip").removeClass("on")}),a(".cf7style-tooltip-content").on("click",function(a){a.stopPropagation()}),a(".remove_template_notice").on("click",function(c){c.preventDefault(),a(".template-message-box").fadeOut("slow"),b()}),a(document).on("click",".cf7style-pointer a.close",function(b){b.preventDefault(),a("#cf7_style_allow_tracking").is(":checked")?a.post(ajaxurl,"action=cf7_style_allow_tracking&cf7_style_allow_tracking=1",function(a){}):a.post(ajaxurl,"action=cf7_style_show_tracking&cf7_style_allow_tracking=0",function(a){})}),a('input[name="custom_template_check"]').on("change",function(){a(this).is(":checked")?a(".double-check").show():a(".double-check").hide()}),a(".confirm-remove-template").on("click",function(c){c.preventDefault();var d=a(this).parent();"no"==a('input[name="double_check_template"]:checked').val()?(d.hide(),a('input[name="custom_template_check"]').attr("checked","checked")):(b(),a.ajax({url:ajaxurl,method:"POST",data:{action:"cf7_style_remove_templates"},success:function(b){b&&(a('<p class="succeded">Predefined templates successfully removed.</p>').appendTo(d),setTimeout(function(){d.fadeOut("slow"),d.parent().fadeOut("slow",function(){setTimeout(function(){window.location.reload(!1)},300)})},2e3))}}))})});