function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}function getURLParameter(e){return decodeURI((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,null])[1])}function addError(e){var s=new Array;s[0]=e,addMsg("error",s)}function addNotice(e){var s=new Array;s[0]=e,addMsg("update",s)}function addMsg(e,s){jQuery(".wysija-msg.ajax").html('<div class="allmsgs"></div>'),jQuery(".wysija-msg.ajax .allmsgs ."+e+" ul").length||jQuery(".wysija-msg.ajax .allmsgs").append('<div class="'+e+'"><ul></ul></div>'),jQuery.each(s,function(s,a){jQuery(".wysija-msg.ajax .allmsgs ."+e+" ul").append("<li>"+a+"</li>")})}jQuery(function(e){e(document).ready(function(){if("undefined"!=typeof wysijaAJAX&&void 0!==wysijaAJAX.pluginurl){var s=wysijaAJAX.pluginurl.replace("plugins/wysija-newsletters","themes"),a=wysijaAJAX.pluginurl.replace("wysija-newsletters",""),i="";e('script[src^="'+s+'"]').each(function(){i+="<li>"+e(this).attr("src")+"</li>"}),e('script[src^="'+a+'"]').each(function(){e(this).attr('src:notcontains("wysija-newsletters")')&&(i+="<li>"+e(this).attr("src")+"</li>")}),""!==i&&(e(".wysija-footer").append('<div class="expandquer"><h2 class="errors">WYSIJA POSSIBLE 3rd PARTY CONFLICTS</h2><pre><ol>'+i+"</ol></pre></div>"),e(".wysija-footer pre").hide())}e("#wysija-app").siblings("div.updated, div.error").hide()}),e(document).on("click",".showerrors",function(){return e(".xdetailed-errors").toggle(),!1}),e(document).on("click",".shownotices",function(){return e(".xdetailed-updated").toggle(),!1}),e(document).on("click",".wysija_dismiss_update_notice, .wysija_dismiss_license_notice",function(){return wysijaAJAX.controller="config",wysijaAJAX.task=e(this).attr("class"),e.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){e(".notice-msg").remove()},dataType:"jsonp"}),!1})});