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