/home/arranoyd/magicraft/wp-content/plugins/popup-maker/deprecated/assets/js/admin.min.js
/**
* Popup Maker v1.3.6
*/
var PopMakeAdmin;!function(){"use strict";PopMakeAdmin={init:function(){jQuery("body.post-type-popup form#post").length&&(PopMakeAdmin.initialize_popup_page(),PopMakeAdmin.attachQuickSearchListeners(),PopMakeAdmin.attachTabsPanelListeners()),jQuery("body.post-type-popup_theme form#post").length&&PopMakeAdmin.initialize_theme_page(),PopMakeAdmin.initialize_color_pickers(),PopMakeAdmin.initialize_range_sliders(),PopMakeAdmin.initialize_marketing(),jQuery(document).keydown(function(e){return"115"!==e.which&&"83"!==e.which||!e.ctrlKey&&!e.metaKey?!0:(e.preventDefault(),jQuery("body.post-type-popup form#post, body.post-type-popup_theme form#post").submit(),!1)})},initialize_marketing:function(){jQuery("#menu-posts-popup ul li:eq(-1)").addClass("popmake-menu-highlight"),jQuery(".popmake-newsletter-optin").show(),jQuery("#posts-filter").length?jQuery("#wpbody-content > .wrap > h2:first").after(jQuery(".popmake-newsletter-optin")):jQuery("#titlediv").length?jQuery("#titlediv").append(jQuery(".popmake-newsletter-optin")):jQuery(".about-text").length&&jQuery(".popmake-badge").length?jQuery(".nav-tab-wrapper").after(jQuery(".popmake-newsletter-optin")):jQuery("#poststuff .tabwrapper").length?jQuery("#poststuff .tabwrapper").prepend(jQuery(".popmake-newsletter-optin")):jQuery("#poststuff").length&&jQuery("#poststuff").prepend(jQuery(".popmake-newsletter-optin")),jQuery(".popmake-optin-dismiss").on("click",function(e){var t=jQuery(this);e.preventDefault(),jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"popmake_optin",popmake_nonce:popmake_admin_ajax_nonce,optin_dismiss:!0,optin_name:t.data("optin-name"),optin_type:t.data("optin-type")}}).done(function(e){e.success&&t.parents(".popmake-optin").slideUp(function(){jQuery(this).remove()})})})},attachTabsPanelListeners:function(){jQuery("#poststuff").bind("click",function(e){var t,o,n,i,r,a,p,s,l,u,c,_,d,h,y=jQuery(e.target);if(y.hasClass("nav-tab-link"))o=y.data("type"),n=y.parents(".posttypediv, .taxonomydiv").first(),jQuery("input",n).removeAttr("checked"),jQuery(".tabs-panel-active",n).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),jQuery("#"+o,n).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),jQuery(".tabs",n).removeClass("tabs"),y.parent().addClass("tabs"),jQuery(".quick-search",n).focus(),e.preventDefault();else if(y.hasClass("select-all"))t=/#(.*)$/.exec(e.target.href),t&&t[1]&&(i=jQuery("#"+t[1]+" .tabs-panel-active .menu-item-title input"),i.length===i.filter(":checked").length?i.removeAttr("checked"):i.prop("checked",!0));else if(y.hasClass("submit-add-to-menu")){for(r=y.parents(".options"),a=jQuery('.tabs-panel-active input[type="checkbox"]:checked',r),p=jQuery("textarea",r),s=jQuery(".tagchecklist",r),l=p.val().split(","),u=0;u<l.length;u+=1)l[u]=parseInt(l[u],10);a.each(function(){c=jQuery(this),_=parseInt(c.val(),10),d=c.parent("label").siblings(".menu-item-title").val(),-1===jQuery.inArray(_,l)&&l.push(_),s.append('<span><a class="ntdelbutton" data-id="'+_+'">X</a> '+d+"</span>")}),p.text(l.join(",")),e.preventDefault()}else y.hasClass("ntdelbutton")&&(c=y,h=parseInt(c.data("id"),10),r=y.parents(".options"),p=jQuery("textarea",r),s=jQuery(".tagchecklist",r),l=p.val().split(","),l=jQuery.grep(l,function(e){return parseInt(e,10)!==parseInt(h,10)}),c.parent("span").remove(),p.text(l.join(",")))})},attachQuickSearchListeners:function(){var e;jQuery(".quick-search").keypress(function(t){var o=jQuery(this);return 13===t.which?(PopMakeAdmin.updateQuickSearchResults(o),!1):(e&&clearTimeout(e),void(e=setTimeout(function(){PopMakeAdmin.updateQuickSearchResults(o)},400)))}).attr("autocomplete","off")},updateQuickSearchResults:function(e){var t,o,n=2,i=e.val();i.length<n||(t=e.parents(".tabs-panel"),o={action:"menu-quick-search","response-format":"markup",menu:null,"menu-settings-column-nonce":jQuery("#menu-settings-column-nonce").val(),q:i,type:e.attr("name")},jQuery(".spinner",t).show(),jQuery.post(ajaxurl,o,function(e){PopMakeAdmin.processQuickSearchQueryResponse(e,o,t)}))},processQuickSearchQueryResponse:function(e,t,o){var n,i,r,a=jQuery("form#post"),p={},s=/menu-item[(\[\^]\]*/,l=jQuery("<div>").html(e).find("li");return l.length?(l.each(function(){if(r=jQuery(this),n=s.exec(r.html()),n&&n[1]){for(i=n[1];a.elements["menu-item["+i+"][menu-item-type]"]||p[i];)i-=1;p[i]=!0,i!==n[1]&&r.html(r.html().replace(new RegExp("menu-item\\["+n[1]+"\\]","g"),"menu-item["+i+"]"))}}),jQuery(".categorychecklist",o).html(l),jQuery(".spinner",o).hide(),void jQuery('[name^="menu-item"]').removeAttr("name")):(jQuery(".categorychecklist",o).html("<li><p>noResultsFound</p></li>"),void jQuery(".spinner",o).hide())},initialize_color_pickers:function(){var e=this;jQuery(".color-picker").wpColorPicker({change:function(t){e.throttle(setTimeout(function(){e.update_theme()},5),250);var o=jQuery(t.currentTarget);o.hasClass("background-color")&&o.parents("table").find(".background-opacity").show()},clear:function(t){e.update_theme();var o=jQuery(t.currentTarget).prev();o.hasClass("background-color")&&o.parents("table").find(".background-opacity").hide()}})},initialize_range_sliders:function(){var e,t,o,n,i,r=jQuery('<input type="range"/>'),a=jQuery('<button class="popmake-range-plus">+</button>'),p=jQuery('<button class="popmake-range-minus">-</button>');jQuery(document).on("input",'input[type="range"]',function(){var e=jQuery(this);e.siblings(".popmake-range-manual").val(e.val())}),jQuery(".popmake-range-manual").each(function(){var e=jQuery(this),t=e.data("force-minmax"),s=parseInt(e.prop("min"),0),l=parseInt(e.prop("max"),0),u=parseInt(e.prop("step"),0),c=parseInt(e.val(),0);o=r.clone(),n=a.clone(),i=p.clone(),t&&c>l&&(c=l,e.val(c)),o.prop({min:s||0,max:t||l&&l>c?l:1.5*c,step:u||1.5*c/100,value:c}).on("change input",function(){e.trigger("input")}),e.next().after(i,n),e.before(o)}),jQuery(document).on("click",".popmake-range-manual",function(){var e=jQuery(this);e.prop("readonly",!1)}).on("focusout",".popmake-range-manual",function(){var e=jQuery(this);e.prop("readonly",!0)}).on("change",".popmake-range-manual",function(){var e=jQuery(this),t=parseInt(e.prop("max"),0),n=parseInt(e.prop("step"),0),i=e.data("force-minmax"),r=parseInt(e.val(),0);o=e.prev(),i&&r>t&&(r=t,e.val(r)),o.prop({max:i||t&&t>r?t:1.5*r,step:n||1.5*r/100,value:r})}).on("click",".popmake-range-plus",function(e){e.preventDefault();var t=jQuery(this).siblings(".popmake-range-manual"),n=parseInt(t.prop("step"),0),i=parseInt(t.val(),0),r=i+n;o=t.prev(),t.val(r).trigger("input"),o.val(r)}).on("click",".popmake-range-minus",function(e){e.preventDefault();var t=jQuery(this).siblings(".popmake-range-manual"),n=parseInt(t.prop("step"),0),i=parseInt(t.val(),0),r=i-n;o=t.prev(),t.val(r).trigger("input"),o.val(r)}),e=document.createElement("input"),e.setAttribute("type","range"),"text"===e.type&&jQuery("input[type=range]").each(function(e,n){t=jQuery(n),o=jQuery("<div />").slider({min:parseInt(t.attr("min"),10)||0,max:parseInt(t.attr("max"),10)||100,value:parseInt(t.attr("value"),10)||0,step:parseInt(t.attr("step"),10)||1,slide:function(e,t){jQuery(this).prev("input").val(t.value)}}),t.after(o).hide()})},initialize_popup_page:function(){var e=function(e){var t,o,n=e.siblings(".options");e.is(":checked")?(n.show(),"popup_targeting_condition_on_entire_site"===e.attr("id")?(t=e.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),o=e.parents(".targeting_condition").siblings(".targeting_condition"),o.hide(),jQuery("> *",o).prop("disabled",!0),t.show(),jQuery("> *",t).prop("disabled",!1)):jQuery("*",n).prop("disabled",!1)):(n.hide(),"popup_targeting_condition_on_entire_site"===e.attr("id")?(t=e.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),o=e.parents(".targeting_condition").siblings(".targeting_condition"),o.show(),jQuery("> *",o).prop("disabled",!1),t.hide(),jQuery("> *",t).prop("disabled",!0)):jQuery("*",n).prop("disabled",!0))},t=function(e){var t=e.parents(".options").find('input[type="checkbox"]:eq(0)'),o=t.attr("name").indexOf("exclude")>=0,n=o?t.attr("name").replace("popup_targeting_condition_exclude_on_specific_",""):t.attr("name").replace("popup_targeting_condition_on_specific_",""),i=jQuery(o?"#exclude_on_specific_"+n:"#on_specific_"+n);e.is(":checked")&&("true"===e.val()?(t.prop("checked",!0),i.show(),jQuery("*",i).prop("disabled",!1)):""===e.val()&&(t.prop("checked",!1),i.hide(),jQuery("*",i).prop("disabled",!0)))},o=function(){"custom"===jQuery("#popup_display_size").val()?(jQuery(".custom-size-only").show(),jQuery(".responsive-size-only").hide(),jQuery("#popup_display_custom_height_auto").is(":checked")?jQuery(".custom-size-height-only").hide():jQuery(".custom-size-height-only").show()):(jQuery(".custom-size-only").hide(),"auto"!==jQuery("#popup_display_size").val()?(jQuery(".responsive-size-only").show(),jQuery("#popup_display_custom_height_auto").prop("checked",!1)):jQuery(".responsive-size-only").hide())},n=function(){jQuery(".animation-speed, .animation-origin").hide(),"fade"===jQuery("#popup_display_animation_type").val()?jQuery(".animation-speed").show():"none"!==jQuery("#popup_display_animation_type").val()&&jQuery(".animation-speed, .animation-origin").show()},i=function(){var e=jQuery("#popup_display_location"),t=e.parents("table"),o=e.val();jQuery("tr.top, tr.right, tr.left, tr.bottom",t).hide(),o.indexOf("top")>=0&&jQuery("tr.top").show(),o.indexOf("left")>=0&&jQuery("tr.left").show(),o.indexOf("bottom")>=0&&jQuery("tr.bottom").show(),o.indexOf("right")>=0&&jQuery("tr.right").show()},r=function(){jQuery("#popup_auto_open_session_cookie").is(":checked")?jQuery(".not-session-cookie").hide():jQuery(".not-session-cookie").show()},a=function(){jQuery("#popup_auto_open_enabled").is(":checked")?(jQuery(".auto-open-enabled").show(),r()):jQuery(".auto-open-enabled").hide()},p=function(){jQuery("#popup_auto_open_cookie_key").val((new Date).getTime().toString(16))},s=function(){""!==jQuery("#popuptitle").val()?jQuery("#popmake-preview .popmake-title").show().html(jQuery("#popuptitle").val()):jQuery("#popmake-preview .popmake-title").hide()},l=function(){var e="";jQuery("#wp-content-wrap").hasClass("tmce-active")?(console.log(1),e=tinyMCE.activeEditor.getContent()):(console.log(2),e=jQuery("#content").val()),jQuery.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"popmake_popup_preview_content",popmake_nonce:popmake_admin_ajax_nonce,popup_id:jQuery("#post_ID").val(),popup_content:e}}).done(function(e){e.success&&(jQuery("#popmake-preview .popmake-content").html(e.content),jQuery("#popmake-preview").popmake("open"))})},u=function(){var e,t=jQuery("[name^='popup_display_']").serializeArray(),o=jQuery("#popmake-preview"),n=o.data("popmake");for(e=0;t.length>e;e+=1)0===t[e].name.indexOf("popup_display_")&&(n.meta.display[t[e].name.replace("popup_display_","")]=t[e].value);o.removeClass("theme-"+n.theme_id),n.theme_id=jQuery("#popup_theme").val(),jQuery("#popmake-preview").addClass("theme-"+n.theme_id).data("popmake",n)};jQuery("#popuptitlediv").insertAfter("#titlediv"),jQuery('[name^="menu-item"]').removeAttr("name"),jQuery("#trigger-popmake-preview").on("click",function(e){return e.preventDefault(),e.stopPropagation(),s(),u(),l(),!1}),jQuery(document).on("keydown","#popuptitle",function(e){var t=e.keyCode||e.which;9===t&&(e.preventDefault(),jQuery("#title").focus())}).on("keydown","#title, #popuptitle",function(e){var t,o=e.keyCode||e.which;e.shiftKey||9!==o||(e.preventDefault(),t="title"===jQuery(this).attr("id")?"#popuptitle":"#insert-media-button",jQuery(t).focus())}).on("keydown","#popuptitle, #insert-media-button",function(e){var t,o=e.keyCode||e.which;e.shiftKey&&9===o&&(e.preventDefault(),t="popuptitle"===jQuery(this).attr("id")?"#title":"#popuptitle",jQuery(t).focus())}).on("submit","#post",function(e){var t=jQuery("#title").val();(0===t.length||0===t.replace(/\s/g,"").length)&&(console.log(1),e.preventDefault(),jQuery("div#notice").remove(),jQuery("<div id='notice' class='error below-h2'><p>A name is required for all popups.</p></div>").insertAfter("h2"),jQuery("#title").focus(),jQuery("#publishing-action .spinner").removeClass("is-active"),jQuery("#publish").removeClass("disabled"),jQuery("#title").prop("required","required"))}).on("click","#popup_display_custom_height_auto",function(){o()}).on("click","#popup_auto_open_session_cookie",function(){r()}).on("click","#popup_auto_open_enabled",function(){a()}).on("click",".popmake-reset-auto-open-cookie-key",function(){p()}).on("change","#popup_display_size",function(){"custom"!==jQuery("#popup_display_size").val()&&"auto"!==jQuery("#popup_display_size").val()&&jQuery("#popup_display_position_fixed, #popup_display_scrollable_content").prop("checked",!1),o()}).on("change","#popup_display_animation_type",function(){n()}).on("change","#popup_display_location",function(){i()}),jQuery('#popmake_popup_targeting_condition_fields .targeting_condition > input[type="checkbox"]').on("click",function(){e(jQuery(this))}).each(function(){e(jQuery(this))}),jQuery('input[type="radio"][id*="popup_targeting_condition_"]').on("click",function(){t(jQuery(this))}).each(function(){t(jQuery(this))}),jQuery(".posttypediv, .taxonomydiv").each(function(){var e=jQuery(this),t=jQuery("> ul li"),o=jQuery(".tabs-panel",e);t.removeClass("tabs"),t.eq(0).addClass("tabs"),o.removeClass("tabs-panel-active").addClass("tabs-panel-inactive").removeAttr("style"),o.eq(0).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")}),o(),n(),i(),a(),""===jQuery("#popup_auto_open_cookie_key").val()&&p()},theme_page_listeners:function(){var e=this;jQuery(document).on("change","select.font-family",function(){jQuery("select.font-weight option, select.font-style option",jQuery(this).parents("table")).prop("selected",!1),e.update_font_selectboxes()}).on("change","select.font-weight, select.font-style",function(){e.update_font_selectboxes()}).on("change input focusout","select, input",function(){e.update_theme()}).on("change","select.border-style",function(){var e=jQuery(this);"none"===e.val()?e.parents("table").find(".border-options").hide():e.parents("table").find(".border-options").show()}).on("change","#popup_theme_close_location",function(){var e=jQuery(this),t=e.parents("table");jQuery("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",t).hide(),jQuery("tr."+e.val(),t).show()})},update_theme:function(){var e,t=jQuery("[name^='popup_theme_']").serializeArray(),o={};for(e=0;t.length>e;e+=1)0===t[e].name.indexOf("popup_theme_")&&(o[t[e].name.replace("popup_theme_","")]=t[e].value);this.retheme_popup(o)},theme_preview_scroll:function(){var e=jQuery("#popmake-theme-editor .empreview, body.post-type-popup_theme form#post #popmake_popup_theme_preview"),t=e.parent(),o=e.offset().top-50;jQuery(window).on("scroll",function(){jQuery("> .postbox:visible",t).index(e)===jQuery("> .postbox:visible",t).length-1&&jQuery(window).scrollTop()>=o?e.css({left:e.offset().left,width:e.width(),height:e.height(),position:"fixed",top:50}):e.removeAttr("style")})},update_font_selectboxes:function(){return jQuery("select.font-family").each(function(){var e,t,o=jQuery(this),n=o.parents("table").find("select.font-weight"),i=o.parents("table").find("select.font-style"),r=n.find("option"),a=i.find("option");if(void 0!==popmake_google_fonts[o.val()]){if(e=popmake_google_fonts[o.val()],r.hide(),a.hide(),e.variants.length)for(t=0;e.variants.length>t;t+=1)"regular"===e.variants[t]?(jQuery('option[value="normal"]',n).show(),jQuery('option[value="normal"]',i).show()):(e.variants[t].indexOf("italic")>=0&&jQuery('option[value="italic"]',i).show(),jQuery('option[value="'+parseInt(e.variants[t],10)+'"]',n).show())}else r.show(),a.show();n.parents("tr:first").show(),n.find("option:visible").length<=1?n.parents("tr:first").hide():n.parents("tr:first").show(),i.parents("tr:first").show(),i.find("option:visible").length<=1?i.parents("tr:first").hide():i.parents("tr:first").show()})},convert_theme_for_preview:function(){},convert_meta_to_object:function(e){var t,o,n,i={};for(n in e)e.hasOwnProperty(n)&&(t=n.split(/_(.+)?/)[0],o=n.split(/_(.+)?/)[1],void 0===i[t]&&(i[t]={}),i[t][o]=e[n]);return i},initialize_theme_page:function(){jQuery("#popuptitlediv").insertAfter("#titlediv");var e=this,t=jQuery("#popup_theme_close_location").parents("table");switch(e.update_theme(),e.theme_page_listeners(),e.theme_preview_scroll(),e.update_font_selectboxes(),jQuery(document).on("click",".popmake-preview",function(e){e.preventDefault(),jQuery("#popmake-preview, #popmake-overlay").css({visibility:"visible"}).show()}).on("click",".popmake-close",function(){jQuery("#popmake-preview, #popmake-overlay").hide()}),jQuery("select.border-style").each(function(){var e=jQuery(this);"none"===e.val()?e.parents("table").find(".border-options").hide():e.parents("table").find(".border-options").show()}),jQuery(".color-picker.background-color").each(function(){var e=jQuery(this);""===e.val()?e.parents("table").find(".background-opacity").hide():e.parents("table").find(".background-opacity").show()}),jQuery("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",t).hide(),jQuery("#popup_theme_close_location").val()){case"topleft":jQuery("tr.topleft",t).show();break;case"topright":jQuery("tr.topright",t).show();break;case"bottomleft":jQuery("tr.bottomleft",t).show();break;case"bottomright":jQuery("tr.bottomright",t).show()}},retheme_popup:function(e){var t,o=jQuery(".empreview .example-popup-overlay, #popmake-overlay"),n=jQuery(".empreview .example-popup, #popmake-preview"),i=jQuery(".title, .popmake-title",n),r=jQuery(".content, .popmake-content",n),a=jQuery(".close-popup, .popmake-close",n),p="yes"===e.container_boxshadow_inset?"inset ":"",s="yes"===e.close_boxshadow_inset?"inset ":"";switch(this.convert_theme_for_preview(e),void 0!==popmake_google_fonts[e.title_font_family]&&(t="//fonts.googleapis.com/css?family="+e.title_font_family,"normal"!==e.title_font_weight&&(t+=":"+e.title_font_weight),"italic"===e.title_font_style&&(-1===t.indexOf(":")&&(t+=":"),t+="italic"),jQuery("body").append('<link href="'+t+'" rel="stylesheet" type="text/css">')),void 0!==popmake_google_fonts[e.content_font_family]&&(t="//fonts.googleapis.com/css?family="+e.content_font_family,"normal"!==e.content_font_weight&&(t+=":"+e.content_font_weight),"italic"===e.content_font_style&&(-1===t.indexOf(":")&&(t+=":"),t+="italic"),jQuery("body").append('<link href="'+t+'" rel="stylesheet" type="text/css">')),void 0!==popmake_google_fonts[e.close_font_family]&&(t="//fonts.googleapis.com/css?family="+e.close_font_family,"normal"!==e.close_font_weight&&(t+=":"+e.close_font_weight),"italic"===e.close_font_style&&(-1===t.indexOf(":")&&(t+=":"),t+="italic"),jQuery("body").append('<link href="'+t+'" rel="stylesheet" type="text/css">')),o.removeAttr("style").css({backgroundColor:this.convert_hex(e.overlay_background_color,e.overlay_background_opacity)}),n.removeAttr("style").css({padding:e.container_padding+"px",backgroundColor:this.convert_hex(e.container_background_color,e.container_background_opacity),borderStyle:e.container_border_style,borderColor:e.container_border_color,borderWidth:e.container_border_width+"px",borderRadius:e.container_border_radius+"px",boxShadow:p+e.container_boxshadow_horizontal+"px "+e.container_boxshadow_vertical+"px "+e.container_boxshadow_blur+"px "+e.container_boxshadow_spread+"px "+this.convert_hex(e.container_boxshadow_color,e.container_boxshadow_opacity)}),i.removeAttr("style").css({color:e.title_font_color,lineHeight:e.title_line_height+"px",fontSize:e.title_font_size+"px",fontFamily:e.title_font_family,fontStyle:e.title_font_style,fontWeight:e.title_font_weight,textAlign:e.title_text_align,textShadow:e.title_textshadow_horizontal+"px "+e.title_textshadow_vertical+"px "+e.title_textshadow_blur+"px "+this.convert_hex(e.title_textshadow_color,e.title_textshadow_opacity)}),r.removeAttr("style").css({color:e.content_font_color,fontFamily:e.content_font_family,fontStyle:e.content_font_style,fontWeight:e.content_font_weight}),a.html(e.close_text).removeAttr("style").css({padding:e.close_padding+"px",height:e.close_height>0?e.close_height+"px":"auto",width:e.close_width>0?e.close_width+"px":"auto",backgroundColor:this.convert_hex(e.close_background_color,e.close_background_opacity),color:e.close_font_color,lineHeight:e.close_line_height+"px",fontSize:e.close_font_size+"px",fontFamily:e.close_font_family,fontWeight:e.close_font_weight,fontStyle:e.close_font_style,borderStyle:e.close_border_style,borderColor:e.close_border_color,borderWidth:e.close_border_width+"px",borderRadius:e.close_border_radius+"px",boxShadow:s+e.close_boxshadow_horizontal+"px "+e.close_boxshadow_vertical+"px "+e.close_boxshadow_blur+"px "+e.close_boxshadow_spread+"px "+this.convert_hex(e.close_boxshadow_color,e.close_boxshadow_opacity),textShadow:e.close_textshadow_horizontal+"px "+e.close_textshadow_vertical+"px "+e.close_textshadow_blur+"px "+this.convert_hex(e.close_textshadow_color,e.close_textshadow_opacity)}),e.close_location){case"topleft":a.css({top:e.close_position_top+"px",left:e.close_position_left+"px"});break;case"topright":a.css({top:e.close_position_top+"px",right:e.close_position_right+"px"});break;case"bottomleft":a.css({bottom:e.close_position_bottom+"px",left:e.close_position_left+"px"});break;case"bottomright":a.css({bottom:e.close_position_bottom+"px",right:e.close_position_right+"px"})}jQuery(document).trigger("popmake-admin-retheme",[e])},serialize_form:function(e){var t={};return jQuery("[name]",e).each(function(){var e,o,n=jQuery(this).attr("name"),i=jQuery(this).val(),r=n.split("["),a=t,p=r.length;for(e=0;p>e;e+=1)o=r[e].replace("]",""),a[o]||(a[o]={}),e!==r.length-1?a=a[o]:e===r.length-1&&(a[o]=i)}),t},convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16),r="rgba("+o+","+n+","+i+","+t/100+")";return r},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e(),window.setTimeout(n,t),o=!0)}}},jQuery(document).ready(function(){PopMakeAdmin.init()})}();