/* Redactor v9.1.7 Updated: Nov 5, 2013 http://imperavi.com/redactor/ Copyright (c) 2009-2013, Imperavi LLC. License: http://imperavi.com/redactor/license/ Usage: $('#content').redactor(); */ (function(c){var a=0;"use strict";var d=function(e){this[0]=e.startOffset;this[1]=e.endOffset;this.range=e;return this;};d.prototype.equals=function(){return this[0]===this[1];};c.fn.redactor=function(f){var g=[];var e=Array.prototype.slice.call(arguments,1);if(typeof f==="string"){this.each(function(){var j=c.data(this,"redactor");if(typeof j!=="undefined"&&c.isFunction(j[f])){var h=j[f].apply(j,e);if(h!==undefined&&h!==j){g.push(h);}}else{return c.error('No such method "'+f+'" for Redactor');}});}else{this.each(function(){if(!c.data(this,"redactor")){c.data(this,"redactor",b(this,f));}});}if(g.length===0){return this;}else{if(g.length===1){return g[0];}else{return g;}}};function b(f,e){return new b.prototype.init(f,e);}c.Redactor=b;c.Redactor.VERSION="9.1.7";c.Redactor.opts={rangy:false,iframe:false,fullpage:false,css:false,lang:"en",direction:"ltr",placeholder:false,wym:false,mobile:true,cleanup:true,tidyHtml:true,pastePlainText:false,removeEmptyTags:true,templateVars:false,xhtml:false,visual:true,focus:false,tabindex:false,autoresize:true,minHeight:false,maxHeight:false,shortcuts:true,autosave:false,autosaveInterval:60,plugins:false,linkAnchor:true,linkEmail:true,linkProtocol:"http://",linkNofollow:false,linkSize:50,imageFloatMargin:"10px",imageGetJson:false,imageUpload:false,imageUploadParam:"file",fileUpload:false,fileUploadParam:"file",clipboardUpload:true,clipboardUploadUrl:false,dragUpload:true,dnbImageTypes:["image/png","image/jpeg","image/gif"],s3:false,uploadFields:false,observeImages:true,observeLinks:true,modalOverlay:true,tabSpaces:false,tabFocus:true,air:false,airButtons:["formatting","|","bold","italic","deleted","|","unorderedlist","orderedlist","outdent","indent"],toolbar:true,toolbarFixed:false,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarFixedBox:false,toolbarExternal:false,buttonSource:true,buttonSeparator:'
',buttonsCustom:{},buttonsAdd:[],buttons:["html","|","formatting","|","bold","italic","deleted","|","unorderedlist","orderedlist","outdent","indent","|","image","video","file","table","link","|","alignment","|","horizontalrule"],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify","table"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline",tr:"table",td:"table",table:"table"},activeButtonsAdd:false,formattingTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],linebreaks:false,paragraphy:true,convertDivs:true,convertLinks:true,convertImageLinks:false,convertVideoLinks:false,formattingPre:false,phpTags:false,allowedTags:false,deniedTags:["html","head","link","body","meta","script","style","applet"],boldTag:"strong",italicTag:"em",indentValue:20,buffer:[],rebuffer:[],textareamode:false,emptyHtml:"
",invisibleSpace:"",rBlockTest:/^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i,alignmentTags:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],ownLine:["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],contOwnLine:["li","dt","dt","h[1-6]","option","script"],newLevel:["blockquote","div","dl","fieldset","form","frameset","map","ol","p","pre","select","td","th","tr","ul"],blockLevelElements:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","LI","BLOCKQUOTE","OUTPUT","FIGCAPTION","PRE","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE","TD"],langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit"}}};b.fn=c.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,TAB:9,CTRL:17,META:91,LEFT:37,LEFT_WIN:91},init:function(f,e){this.rtePaste=false;this.$element=this.$source=c(f);this.uuid=a++;var g=c.extend(true,{},c.Redactor.opts);this.opts=c.extend({},g,this.$element.data(),e);this.start=true;this.dropdowns=[];this.sourceHeight=this.$source.css("height");this.sourceWidth=this.$source.css("width");if(this.opts.fullpage){this.opts.iframe=true;}if(this.opts.linebreaks){this.opts.paragraphy=false;}if(this.opts.paragraphy){this.opts.linebreaks=false;}if(this.opts.toolbarFixedBox){this.opts.toolbarFixed=true;}this.document=document;this.window=window;this.savedSel=false;this.cleanlineBefore=new RegExp("^<(/?"+this.opts.ownLine.join("|/?")+"|"+this.opts.contOwnLine.join("|")+")[ >]");this.cleanlineAfter=new RegExp("^<(br|/?"+this.opts.ownLine.join("|/?")+"|/"+this.opts.contOwnLine.join("|/")+")[ >]");this.cleannewLevel=new RegExp("^?("+this.opts.newLevel.join("|")+")[ >]");this.rTestBlock=new RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i");if(this.opts.linebreaks===false){if(this.opts.allowedTags!==false){var h=["strong","em","del"];var j=["b","i","strike"];if(c.inArray("p",this.opts.allowedTags)==="-1"){this.opts.allowedTags.push("p");}for(i in h){if(c.inArray(h[i],this.opts.allowedTags)!="-1"){this.opts.allowedTags.push(j[i]);}}}if(this.opts.deniedTags!==false){var l=c.inArray("p",this.opts.deniedTags);if(l!=="-1"){this.opts.deniedTags.splice(l,l);}}}if(this.browser("msie")||this.browser("opera")){this.opts.buttons=this.removeFromArrayByValue(this.opts.buttons,"horizontalrule");}this.opts.curLang=this.opts.langs[this.opts.lang];this.buildStart();},toolbarInit:function(e){return{html:{title:e.html,func:"toggle"},formatting:{title:e.formatting,func:"show",dropdown:{p:{title:e.paragraph,func:"formatBlocks"},blockquote:{title:e.quote,func:"formatQuote",className:"redactor_format_blockquote"},pre:{title:e.code,func:"formatBlocks",className:"redactor_format_pre"},h1:{title:e.header1,func:"formatBlocks",className:"redactor_format_h1"},h2:{title:e.header2,func:"formatBlocks",className:"redactor_format_h2"},h3:{title:e.header3,func:"formatBlocks",className:"redactor_format_h3"},h4:{title:e.header4,func:"formatBlocks",className:"redactor_format_h4"},h5:{title:e.header5,func:"formatBlocks",className:"redactor_format_h5"}}},bold:{title:e.bold,exec:"bold"},italic:{title:e.italic,exec:"italic"},deleted:{title:e.deleted,exec:"strikethrough"},underline:{title:e.underline,exec:"underline"},unorderedlist:{title:"• "+e.unorderedlist,exec:"insertunorderedlist"},orderedlist:{title:"1. "+e.orderedlist,exec:"insertorderedlist"},outdent:{title:"< "+e.outdent,func:"indentingOutdent"},indent:{title:"> "+e.indent,func:"indentingIndent"},image:{title:e.image,func:"imageShow"},video:{title:e.video,func:"videoShow"},file:{title:e.file,func:"fileShow"},table:{title:e.table,func:"show",dropdown:{insert_table:{title:e.insert_table,func:"tableShow"},separator_drop1:{name:"separator"},insert_row_above:{title:e.insert_row_above,func:"tableAddRowAbove"},insert_row_below:{title:e.insert_row_below,func:"tableAddRowBelow"},insert_column_left:{title:e.insert_column_left,func:"tableAddColumnLeft"},insert_column_right:{title:e.insert_column_right,func:"tableAddColumnRight"},separator_drop2:{name:"separator"},add_head:{title:e.add_head,func:"tableAddHead"},delete_head:{title:e.delete_head,func:"tableDeleteHead"},separator_drop3:{name:"separator"},delete_column:{title:e.delete_column,func:"tableDeleteColumn"},delete_row:{title:e.delete_row,func:"tableDeleteRow"},delete_table:{title:e.delete_table,func:"tableDeleteTable"}}},link:{title:e.link,func:"show",dropdown:{link:{title:e.link_insert,func:"linkShow"},unlink:{title:e.unlink,exec:"unlink"}}},fontcolor:{title:e.fontcolor,func:"show"},backcolor:{title:e.backcolor,func:"show"},alignment:{title:e.alignment,func:"show",dropdown:{alignleft:{title:e.align_left,func:"alignmentLeft"},aligncenter:{title:e.align_center,func:"alignmentCenter"},alignright:{title:e.align_right,func:"alignmentRight"},justify:{title:e.align_justify,func:"alignmentJustify"}}},alignleft:{title:e.align_left,func:"alignmentLeft"},aligncenter:{title:e.align_center,func:"alignmentCenter"},alignright:{title:e.align_right,func:"alignmentRight"},justify:{title:e.align_justify,func:"alignmentJustify"},horizontalrule:{exec:"inserthorizontalrule",title:e.horizontalrule}};},callback:function(e,f,g){var h=this.opts[e+"Callback"];if(c.isFunction(h)){if(f===false){return h.call(this,g);}else{return h.call(this,f,g);}}else{return g;}},destroy:function(){clearInterval(this.autosaveInterval);c(window).off(".redactor");this.$source.off("redactor-textarea");this.$element.off(".redactor").removeData("redactor");var f=this.get();if(this.opts.textareamode){this.$box.after(this.$source);this.$box.remove();this.$source.val(f).show();}else{var e=this.$editor;if(this.opts.iframe){e=this.$element;}this.$box.after(e);this.$box.remove();e.removeClass("redactor_editor").removeClass("redactor_editor_wym").removeAttr("contenteditable").html(f).show();}if(this.opts.air){c("#redactor_air_"+this.uuid).remove();}},getObject:function(){return c.extend({},this);},getEditor:function(){return this.$editor;},getBox:function(){return this.$box;},getIframe:function(){return(this.opts.iframe)?this.$frame:false;},getToolbar:function(){return(this.$toolbar)?this.$toolbar:false;},get:function(){return this.$source.val();},getCodeIframe:function(){this.$editor.removeAttr("contenteditable").removeAttr("dir");var e=this.outerHtml(this.$frame.contents().children());this.$editor.attr({contenteditable:true,dir:this.opts.direction});return e;},set:function(e,f,g){e=e.toString();if(this.opts.fullpage){this.setCodeIframe(e);}else{this.setEditor(e,f);}if(g!==false){this.placeholderRemove();}},setEditor:function(e,f){if(f!==false){e=this.cleanSavePreCode(e);e=this.cleanStripTags(e);e=this.cleanConvertProtected(e);e=this.cleanConvertInlineTags(e,true);if(this.opts.linebreaks===false){e=this.cleanConverters(e);}else{e=e.replace(/([\w\W]*?)<\/p>/gi,"$2 "+this.opts.invisibleSpace+" "+this.opts.invisibleSpace+" "+this.opts.invisibleSpace+" ").append(c(l).clone());c(l).replaceWith(j);var g=c(j).next();if(typeof(g[0])!=="undefined"&&g[0].tagName=="BR"){g.remove();}this.selectionEnd(j);}if((this.opts.convertLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&f===this.keyCode.ENTER){this.buildEventKeyupConverters();}if(f===this.keyCode.DELETE||f===this.keyCode.BACKSPACE){return this.formatEmpty(m);}this.callback("keyup",m);this.sync();},buildEventKeyupConverters:function(){this.formatLinkify(this.opts.linkProtocol,this.opts.convertLinks,this.opts.convertImageLinks,this.opts.convertVideoLinks,this.opts.linkSize);setTimeout(c.proxy(function(){if(this.opts.convertImageLinks){this.observeImages();}if(this.opts.observeLinks){this.observeLinks();}},this),5);},buildPlugins:function(){if(!this.opts.plugins){return;}c.each(this.opts.plugins,c.proxy(function(e,f){if(RedactorPlugins[f]){c.extend(this,RedactorPlugins[f]);if(c.isFunction(RedactorPlugins[f].init)){this.init();}}},this));},iframeStart:function(){this.iframeCreate();if(this.opts.textareamode){this.iframeAppend(this.$source);}else{this.$sourceOld=this.$source.hide();this.$source=this.buildCodearea(this.$sourceOld);this.iframeAppend(this.$sourceOld);}},iframeAppend:function(e){this.$source.attr("dir",this.opts.direction).hide();this.$box.insertAfter(e).append(this.$frame).append(this.$source);},iframeCreate:function(){this.$frame=c('').one("load",c.proxy(function(){if(this.opts.fullpage){this.iframePage();if(this.content===""){this.content=this.opts.invisibleSpace;}this.$frame.contents()[0].write(this.content);this.$frame.contents()[0].close();var e=setInterval(c.proxy(function(){if(this.$frame.contents().find("body").html()){clearInterval(e);this.iframeLoad();}},this),0);}else{this.iframeLoad();}},this));},iframeDoc:function(){return this.$frame[0].contentWindow.document;},iframePage:function(){var e=this.iframeDoc();if(e.documentElement){e.removeChild(e.documentElement);}return e;},iframeAddCss:function(e){e=e||this.opts.css;if(this.isString(e)){this.$frame.contents().find("head").append('');}if(c.isArray(e)){c.each(e,c.proxy(function(g,f){this.iframeAddCss(f);},this));}},iframeLoad:function(){this.$editor=this.$frame.contents().find("body").attr({contenteditable:true,dir:this.opts.direction});if(this.$editor[0]){this.document=this.$editor[0].ownerDocument;this.window=this.document.defaultView||window;}this.iframeAddCss();if(this.opts.fullpage){this.setFullpageOnInit(this.$editor.html());}else{this.set(this.content,true,false);}this.buildOptions();this.buildAfter();},placeholderStart:function(e){if(this.isEmpty(e)){if(this.$element.attr("placeholder")){this.opts.placeholder=this.$element.attr("placeholder");}if(this.opts.placeholder===""){this.opts.placeholder=false;}if(this.opts.placeholder!==false){this.opts.focus=false;this.$editor.one("focus.redactor_placeholder",c.proxy(this.placeholderFocus,this));return c('').attr("contenteditable",false).text(this.opts.placeholder);}}return false;},placeholderFocus:function(){this.$editor.find("span.redactor_placeholder").remove();var e="";if(this.opts.linebreaks===false){e=this.opts.emptyHtml;}this.$editor.off("focus.redactor_placeholder");this.$editor.html(e);if(this.opts.linebreaks===false){this.selectionStart(this.$editor.children()[0]);}else{this.focus();}this.sync();},placeholderRemove:function(){this.opts.placeholder=false;this.$editor.find("span.redactor_placeholder").remove();this.$editor.off("focus.redactor_placeholder");},placeholderRemoveFromCode:function(e){return e.replace(/(.*?)<\/span>/i,"");},shortcuts:function(g,f){if(!this.opts.shortcuts){return;}if(!g.altKey){if(f===77){this.shortcutsLoad(g,"removeFormat");}else{if(f===66){this.shortcutsLoad(g,"bold");}else{if(f===73){this.shortcutsLoad(g,"italic");}else{if(f===74){this.shortcutsLoad(g,"insertunorderedlist");}else{if(f===75){this.shortcutsLoad(g,"insertorderedlist");}else{if(f===72){this.shortcutsLoad(g,"superscript");}else{if(f===76){this.shortcutsLoad(g,"subscript");}}}}}}}}else{if(f===48){this.shortcutsLoadFormat(g,"p");}else{if(f===49){this.shortcutsLoadFormat(g,"h1");}else{if(f===50){this.shortcutsLoadFormat(g,"h2");}else{if(f===51){this.shortcutsLoadFormat(g,"h3");}else{if(f===52){this.shortcutsLoadFormat(g,"h4");}else{if(f===53){this.shortcutsLoadFormat(g,"h5");}else{if(f===54){this.shortcutsLoadFormat(g,"h6");}}}}}}}}},shortcutsLoad:function(g,f){g.preventDefault();this.execCommand(f,false);},shortcutsLoadFormat:function(g,f){g.preventDefault();this.formatBlocks(f);},focus:function(){if(!this.browser("opera")){this.window.setTimeout(c.proxy(this.focusSet,this,true),1);}else{this.$editor.focus();}},focusEnd:function(){this.focusSet();},focusSet:function(g){this.$editor.focus();var e=this.getRange();e.selectNodeContents(this.$editor[0]);e.collapse(g||false);var f=this.getSelection();f.removeAllRanges();f.addRange(e);},toggle:function(e){if(this.opts.visual){this.toggleCode(e);}else{this.toggleVisual();}},toggleVisual:function(){var e=this.$source.hide().val();if(typeof this.modified!=="undefined"){this.modified=this.cleanRemoveSpaces(this.modified,false)!==this.cleanRemoveSpaces(e,false);}if(this.modified){if(this.opts.fullpage&&e===""){this.setFullpageOnInit(e);}else{this.set(e);if(this.opts.fullpage){this.buildBindKeyboard();}}}if(this.opts.iframe){this.$frame.show();}else{this.$editor.show();}if(this.opts.fullpage){this.$editor.attr("contenteditable",true);}this.$source.off("keydown.redactor-textarea-indenting");this.$editor.focus();this.selectionRestore();this.observeStart();this.buttonActiveVisual();this.buttonInactive("html");this.opts.visual=true;},toggleCode:function(g){if(g!==false){this.selectionSave();}var e=null;if(this.opts.iframe){e=this.$frame.height();if(this.opts.fullpage){this.$editor.removeAttr("contenteditable");}this.$frame.hide();}else{e=this.$editor.innerHeight();this.$editor.hide();}var f=this.$source.val();if(f!==""&&this.opts.tidyHtml){this.$source.val(this.cleanHtml(f));}this.modified=f;this.$source.height(e).show().focus();this.$source.on("keydown.redactor-textarea-indenting",this.textareaIndenting);this.buttonInactiveVisual();this.buttonActive("html");this.opts.visual=false;},textareaIndenting:function(g){if(g.keyCode===9){var f=c(this);var h=f.get(0).selectionStart;f.val(f.val().substring(0,h)+"\t"+f.val().substring(f.get(0).selectionEnd));f.get(0).selectionStart=f.get(0).selectionEnd=h+1;return false;}},autosave:function(){var e=false;this.autosaveInterval=setInterval(c.proxy(function(){var f=this.get();if(e!==f){c.ajax({url:this.opts.autosave,type:"post",data:this.$source.attr("name")+"="+escape(encodeURIComponent(f)),success:c.proxy(function(g){this.callback("autosave",false,g);e=f;},this)});}},this),this.opts.autosaveInterval*1000);},toolbarBuild:function(){if(this.opts.air){this.opts.buttons=this.opts.airButtons;}else{if(!this.opts.buttonSource){var f=this.opts.buttons.indexOf("html"),g=this.opts.buttons[f+1];this.opts.buttons.splice(f,1);if(g==="|"){this.opts.buttons.splice(f,1);}}}c.extend(this.opts.toolbar,this.opts.buttonsCustom);c.each(this.opts.buttonsAdd,c.proxy(function(h,j){this.opts.buttons.push(j);},this));if(this.opts.toolbar){c.each(this.opts.toolbar.formatting.dropdown,c.proxy(function(h,j){if(c.inArray(h,this.opts.formattingTags)=="-1"){delete this.opts.toolbar.formatting.dropdown[h];}},this));}if(this.opts.buttons.length===0){return false;}this.airEnable();this.$toolbar=c("
");}}e=this.cleanEmpty(e);this.$editor.html(e);this.setNonEditable();this.setSpansVerified();this.sync();},setCodeIframe:function(e){var f=this.iframePage();this.$frame[0].src="about:blank";e=this.cleanConvertProtected(e);e=this.cleanConvertInlineTags(e);e=this.cleanRemoveSpaces(e);f.open();f.write(e);f.close();if(this.opts.fullpage){this.$editor=this.$frame.contents().find("body").attr({contenteditable:true,dir:this.opts.direction});}this.setNonEditable();this.setSpansVerified();this.sync();},setFullpageOnInit:function(e){e=this.cleanSavePreCode(e,true);e=this.cleanConverters(e);e=this.cleanEmpty(e);this.$editor.html(e);this.setNonEditable();this.setSpansVerified();this.sync();},setSpansVerified:function(){var f=this.$editor.find("span");var e="inline";c.each(f,function(){var g=this.outerHTML;var j=new RegExp("<"+this.tagName,"i");var h=g.replace(j,"<"+e);j=new RegExp(""+this.tagName,"i");h=h.replace(j,""+e);c(this).replaceWith(h);});},setSpansVerifiedHtml:function(e){e=e.replace(//,"
"){e="";}if(this.opts.xhtml){var f=["br","hr","img","link","input","meta"];c.each(f,function(g,h){e=e.replace(new RegExp("<"+h+"(.*?[^/$]?)>","gi"),"<"+h+"$1 />");});}e=this.callback("syncBefore",false,e);this.$source.val(e);this.callback("syncAfter",false,e);if(this.start===false){this.callback("change",false,e);}},syncClean:function(e){if(!this.opts.fullpage){e=this.cleanStripTags(e);}e=c.trim(e);e=this.placeholderRemoveFromCode(e);e=e.replace(//gi,"");e=e.replace(//gi,"");e=e.replace(/ /gi," ");if(this.opts.linkNofollow){e=e.replace(//gi,"");e=e.replace(//gi,'');}e=e.replace("","?>");e=e.replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi,'<$1class="noeditable"$2$3>');e=e.replace(/ data-tagblock=""/gi,"");e=e.replace(/
\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi,"$1>");e=e.replace(/([\w\W]*?)<\/span>/i,"$3
");e=e.replace(/(.*?)<\/span>/i,"");e=e.replace(/(.*?)<\/span>/i,"");e=e.replace(/([\w\W]*?)<\/font>/gi,"$2");e=e.replace(/([\w\W]*?)<\/span>/gi,"$2");e=e.replace(/
"+this.opts.invisibleSpace);}c(f).replaceWith(e);this.selectionStart(e);}if(typeof f.nodeValue!=="undefined"&&f.nodeValue!==null){if(f.remove&&f.nodeType===3&&f.nodeValue.match(/[^/\u200B]/g)==null){f.remove();}}},buildEventKeydownInsertLineBreak:function(f){this.bufferSet();f.preventDefault();this.insertLineBreak();this.callback("enter",f);return;},buildEventKeyup:function(m){if(this.rtePaste){return false;}var f=m.which;var h=this.getParent();var l=this.getCurrent();if(!this.opts.linebreaks&&l.nodeType==3&&(h==false||h.tagName=="BODY")){var j=c("").addClass("redactor_toolbar").attr("id","redactor_toolbar_"+this.uuid);if(this.opts.air){this.$air=c('