function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}var MceInsertSelectorDialog={local_ed:"ed",init:function(e){MceInsertSelectorDialog.local_ed=e,tinyMCEPopup.resizeToInnerSize()},insertWidget:function insertHighlightSection(e,t){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),output='[wysija_form id="'+t+'"]',tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()},insertSubscribers:function(e,t,r){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),shortcodeAttributes=[],0<t&&shortcodeAttributes.push('list_id="'+t+'"'),0<parseInt(r)&&shortcodeAttributes.push('confirmed_subscribers="'+parseInt(r)+'"'),0<shortcodeAttributes.length?shortcodeAttributes=" "+shortcodeAttributes.join(" "):shortcodeAttributes="",output="[wysija_subscribers_count"+shortcodeAttributes+"]",tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(MceInsertSelectorDialog.init,MceInsertSelectorDialog),jQuery(function(e){e("#widget-insert").click(function(){return MceInsertSelectorDialog.insertWidget(MceInsertSelectorDialog.local_ed,e("#widget-wysija--form").val()),!1}),e("#subscribers-insert").click(function(){return MceInsertSelectorDialog.insertSubscribers(MceInsertSelectorDialog.local_ed,e("#wysija-list").val(),e("#confirmedSubscribers").attr("checked")?1:0),!1})});