function titleize(t){return null==t?t:(parts=[],$.each(t.replace(/\./,"").replace(/[-_]/," ").split(" "),function(t,e){parts.push(e.substring(0,1).toUpperCase()+e.substring(1))}),parts.join(" "))}if(!WYMeditor)var WYMeditor={};!function(){if(window.console&&console.firebug)WYMeditor.console=window.console;else{var t=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];WYMeditor.console={};for(var e=0;e
"+WYMeditor.TOOLS+"
"+WYMeditor.CONTAINERS+WYMeditor.CLASSES+"
"+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"
"+WYMeditor.LOGO+"
",logoHtml:"WYMeditor",iframeHtml:"
",editorStyles:[],toolsHtml:"

{Tools}

",toolsItemHtml:"
  • "+WYMeditor.TOOL_TITLE+"
  • ",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:"Superscript",css:"wym_tools_superscript"},{name:"Subscript",title:"Subscript",css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"},{name:"Paste",title:"Paste_From_Word",css:"wym_tools_paste"},{name:"ToggleHtml",title:"HTML",css:"wym_tools_html"},{name:"Preview",title:"Preview",css:"wym_tools_preview"}],containersHtml:"

    {Containers}

    ",containersItemHtml:"
  • "+WYMeditor.CONTAINER_TITLE+"
  • ",containersItems:[{name:"P",title:"Paragraph",css:"wym_containers_p"},{name:"H1",title:"Heading_1",css:"wym_containers_h1"},{name:"H2",title:"Heading_2",css:"wym_containers_h2"},{name:"H3",title:"Heading_3",css:"wym_containers_h3"},{name:"H4",title:"Heading_4",css:"wym_containers_h4"},{name:"H5",title:"Heading_5",css:"wym_containers_h5"},{name:"H6",title:"Heading_6",css:"wym_containers_h6"},{name:"PRE",title:"Preformatted",css:"wym_containers_pre"},{name:"BLOCKQUOTE",title:"Blockquote",css:"wym_containers_blockquote"},{name:"TH",title:"Table_Header",css:"wym_containers_th"}],classesHtml:"

    {Classes}

    ",classesItemHtml:"
  • "+WYMeditor.CLASS_TITLE+"
  • ",classesItems:[],statusHtml:"

    {Status}

    ",htmlHtml:"

    {Source_Code}

    ",boxSelector:".wym_box",toolsSelector:".wym_tools",toolsListSelector:" ul",containersSelector:".wym_containers",classesSelector:".wym_classes",htmlSelector:".wym_html",iframeSelector:".wym_iframe iframe",iframeBodySelector:".wym_iframe",statusSelector:".wym_status",toolSelector:".wym_tools a",containerSelector:".wym_containers a",classSelector:".wym_classes a",classUnhiddenSelector:".wym_classes",classHiddenSelector:".wym_classes_hidden",htmlValSelector:".wym_html_val",hrefSelector:".wym_href",srcSelector:".wym_src",titleSelector:".wym_title",targetSelector:".wym_target",altSelector:".wym_alt",textSelector:".wym_text",sizeSelector:".wym_size",rowsSelector:".wym_rows",colsSelector:".wym_cols",captionSelector:".wym_caption",summarySelector:".wym_summary",submitSelector:".wym_submit",cancelSelector:".wym_cancel",previewSelector:"",dialogTypeSelector:".wym_dialog_type",dialogLinkSelector:".wym_dialog_link",dialogImageSelector:".wym_dialog_image",dialogTableSelector:".wym_dialog_table",dialogPasteSelector:".wym_dialog_paste",dialogPreviewSelector:".wym_dialog_preview",updateSelector:".wymupdate",updateEvent:"click",dialogFeatures:{width:560,height:300},dialogFeaturesPreview:"menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=yes,width=560,height=300,top=0,left=0",dialogHtml:""+WYMeditor.DIALOG_TITLE+""+WYMeditor.DIALOG_BODY+"",dialogLinkHtml:"",dialogImageHtml:"
    {Image}
    ",dialogTableHtml:"
    ",dialogPasteHtml:"
    {Paste_From_Word}
    ",dialogPreviewHtml:"
    ",dialogStyles:[],stringDelimiterLeft:"{",stringDelimiterRight:"}",preInit:null,preBind:null,postInit:null,preInitDialog:null,postInitDialog:null},t),this.each(function(){new WYMeditor.editor($(this),t)})},$.extend({wymeditors:function(t){return WYMeditor.INSTANCES[t]}}),WYMeditor.loadCss=function(t){$("").attr("href",t).appendTo($("head").get(0))},WYMeditor.INIT_DIALOG=function(i,t){t=t||i.selected();var e=$("#"+i._options.dialogId),s=$(e.find("iframe").contents());e.find("#wym_dialog_type").val();if(i._selected_image)var o=$(i._selected_image);else o=$(i._doc.body).find("#"+i._current_unique_stamp);e.find("input[type=text], textarea").first().focus(),s.find("body").addClass("wym_iframe_body").find("#cancel_button").add(e.find(".close_dialog")).click(function(t){i.close_dialog(t,!0)}),$(".ui-dialog-titlebar .ui-dialog-titlebar-close").click(function(t){i.close_dialog(t,!0)}),$.isFunction(i._options.preInitDialog)&&i._options.preInitDialog(i,window),$(i._options.dialogLinkSelector).find(i._options.submitSelector).click(function(t){if(0<(sUrl=$(i._options.hrefSelector).val()).length)if(null!=o.get(0)){var e=$("").attr({href:sUrl,title:$(i._options.titleSelector).val()});null!=(target=$(i._options.targetSelector).val())&&0").append(e).html()))}else i._exec(WYMeditor.CREATE_LINK,i._current_unique_stamp),$("a[href="+i._current_unique_stamp+"]",i._doc.body).attr(WYMeditor.HREF,sUrl).attr(WYMeditor.TITLE,$(i._options.titleSelector).val()).attr(WYMeditor.TARGET,$(i._options.targetSelector).val());i.close_dialog(t)}),i._selected_image&&(imgDialog=$(i._options.dialogImageSelector),img=$(i._selected_image),size=img.attr(WYMeditor.REL)||s.find("#existing_image_size_area li.selected a").attr(WYMeditor.REL)||s.find("#existing_image_size_area li.selected a").attr("rel")||"",src=img.attr(WYMeditor.SRC),0"].join("")),span.html())),(node=$(this._doc.body).find("#"+this._current_unique_stamp))&&(node.attr("id",node.attr("_id_before_replaceable")||""),node.removeAttr("_id_before_replaceable")),1==this._undo_on_cancel?this._exec("undo"):1==this._redo_on_cancel&&this._exec("redo")),$.browser.msie&&parseInt($.browser.version)<8&&this._iframe.contentWindow.focus(),$("#"+wym._options.dialogId).dialog("close").remove(),$(this._doc).find("a[href]").click(function(t){t.preventDefault()}),t&&t.preventDefault()},RegExp.escape=function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},WYMeditor.editor.prototype.init=function(){if($.browser.msie)var WymClass=new WYMeditor.WymClassExplorer(this);else if($.browser.mozilla)var WymClass=new WYMeditor.WymClassMozilla(this);else if($.browser.opera)var WymClass=new WYMeditor.WymClassOpera(this);else if($.browser.webkit)var WymClass=new WYMeditor.WymClassSafari(this);if(WymClass){$.isFunction(this._options.preInit)&&this._options.preInit(this);var SaxListener=new WYMeditor.XhtmlSaxListener;for(var prop in $.extend(SaxListener,WymClass),this.parser=new WYMeditor.XhtmlParser(SaxListener),(this._options.styles||this._options.stylesheet)&&this.configureEditorUsingRawCss(),this.helper=new WYMeditor.XmlHelper,WymClass)this[prop]=WymClass[prop];this._box=$(this._element).hide().after(this._options.boxHtml).next().addClass("wym_box_"+this._index),$.isFunction($.fn.data)&&($.data(this._box.get(0),WYMeditor.WYM_INDEX,this._index),$.data(this._element.get(0),WYMeditor.WYM_INDEX,this._index));var h=WYMeditor.Helper,iframeHtml=this._options.iframeHtml;iframeHtml=h.replaceAll(iframeHtml,WYMeditor.INDEX,this._index),iframeHtml=h.replaceAll(iframeHtml,WYMeditor.IFRAME_BASE_PATH,this._options.iframeBasePath);var boxHtml=$(this._box).html();boxHtml=h.replaceAll(boxHtml,WYMeditor.LOGO,this._options.logoHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.TOOLS,this._options.toolsHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.CONTAINERS,this._options.containersHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.CLASSES,this._options.classesHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.HTML,this._options.htmlHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.IFRAME,iframeHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.STATUS,this._options.statusHtml);for(var aTools=eval(this._options.toolsItems),sTools="",i=0;i"+WYMeditor.APPLY_CLASS+"<",">"+this._options.stringDelimiterLeft+WYMeditor.APPLY_CLASS+this._options.stringDelimiterRight+"<"),boxHtml=h.replaceAll(boxHtml,WYMeditor.CLASSES_ITEMS,sClasses);for(var aContainers=eval(this._options.containersItems),sContainers="",i=0;i").join(">\n")});s=s.replace(/src=\"system\/images/g,'src="/system/images'),$(s).find(bad_spans="span[id|=wym], span[id=undefined]").add($(s).filter(bad_spans)).each(function(t,e){html_to_replace_with=i.parser.parse($(e).html()),html_to_replace=i.parser.parse($(e).wrap("
    ").parent().html()),$.browser.msie&&(html_to_replace=new RegExp(html_to_replace.replace(/(\ [^\=]+\=)([^\ >]+)/,'$1"$2"'),"ig")),s=s.replace(html_to_replace,html_to_replace_with)}),s=(s=(s=s.replace(/(\ ?id=(\"|\')last\_paste(\"|\'))/gim,"")).replace(/[%$]+wym-[^%$]*[%$]+/gim,"")).replace(/^$/,""),$(i._element).val(s),$(i._box).find(i._options.htmlValSelector).not(".hasfocus").val(s)},WYMeditor.editor.prototype.dialog=function(t){var e=this;e.update();var i=this._wym._options.dialogPath+t+"?wymeditor=true&"+window.location.href.match(/switch_locale=[a-z]{2}(?:-[A-Z]{2})?/);e._current_unique_stamp=e.uniqueStamp(),e._undo_on_cancel=!1,e._redo_on_cancel=!1;var s=this.selected();t!=WYMeditor.DIALOG_TABLE&&e.format_block(),t==WYMeditor.DIALOG_LINK&&$.browser.mozilla&&(selection=e._iframe.contentWindow.getSelection(),matches=$($(s).html().match(new RegExp(RegExp.escape(selection.anchorNode.textContent)+"(.*)"+RegExp.escape(selection.focusNode.textContent)))),null!=matches&&0selection.focusOffset?(start_node=selection.focusNode,start=selection.focusOffset,end_node=selection.anchorNode,end=selection.anchorOffset):(start_node=selection.anchorNode,start=selection.anchorOffset,end_node=selection.focusNode,end=selection.focusOffset),"undefined"==typeof start_node.insertData){for(var r=start_node.childNodes.length-1,a=start_node;"function"!=typeof end_node.insertData||!r;)start_node=a.childNodes[r--];start=0}if("undefined"==typeof end_node.insertData){for(var n=end_node.childNodes.length-1,l=end_node;"function"!=typeof end_node.insertData||!n;)end_node=l.childNodes[n--];end=end_node.length}start_tag="%%"+e._current_unique_stamp+"%%",end_tag="$$"+e._current_unique_stamp+"$$",start_node===end_node&&(end+=start_tag.length),start_node.insertData(start,start_tag),end_node.insertData(end,end_tag),$(s).html($(s).html().replace(start_tag,"").replace(end_tag,""))}else e.wrap("","");else e.wrap("","")}else e._selected_image||(o._id_before_replaceable=o.id,o.id=""+this._current_unique_stamp,$(o).attr("_id_before_replaceable",o._id_before_replaceable)),t!=WYMeditor.DIALOG_PASTE&&t!=WYMeditor.DIALOG_TABLE&&(i+=-1==i.indexOf("?")?"?":"&",port=0
    "),t){case WYMeditor.DIALOG_TABLE:dialog_container.html(e.replaceStrings(e._options.dialogTableHtml)).dialog($.extend(e._options.dialogInlineFeatures,{title:dialog_title})),ajax_loaded_callback();break;case WYMeditor.DIALOG_PASTE:dialog_container.html(e.replaceStrings(e._options.dialogPasteHtml)).dialog($.extend(e._options.dialogInlineFeatures,{title:dialog_title})),ajax_loaded_callback();break;default:$("").appendTo(dialog_container),dialog_container.dialog($.extend(e._options.dialogFeatures,{title:dialog_title})).load(i,ajax_loaded_callback)}},WYMeditor.editor.prototype.dialog_ajax_callback=function(t){wym=this,_selected=t,$("#"+wym._options.dialogId+".editor_dialog").css("height","auto"),(iframes=$("#"+this._options.dialogId).find("iframe")).load(function(){WYMeditor.INIT_DIALOG(wym,_selected,!0),$(this).unbind("load")}),0==iframes.length&&WYMeditor.INIT_DIALOG(this,t)},WYMeditor.editor.prototype.toggleHtml=function(){$(this._box).find(this._options.htmlSelector).toggle()},WYMeditor.editor.prototype.uniqueStamp=function(){return"wym-"+(new Date).getTime()},WYMeditor.editor.prototype.paste=function(t){var e;wym=this,wym.format_block(),replaceable=$(wym._doc.body).find("#"+wym._current_unique_stamp),container=replaceable.get(0)||this.selected();var i=t.replace(/&/g,"&").replace(//g,">").split(wym._newLine+wym._newLine),s=new RegExp(wym._newLine,"g");if(container&&container.tagName.toLowerCase()!=WYMeditor.BODY)for(contentAfterBreak="",insertedContentAfterBreak="",x=i.length-1;0<=x;x--)if(e=i[x].replace(s,"
    "),0==x)1.*")),e=matches[1]+e+$(container).html(),p.html(e),null!=insertedContentAfterBreak&&0"+contentAfterBreak+"

    "))):$(container).html($(container).html().replace(/^$/,"")+e);else{if(i.length-1==x){var o=$(container).parent().html().match(new RegExp(".*([\\s\\S]*)"));o&&o[1]&&(contentAfterBreak=o[1].split("

    ")[0]),e="

    "+e+"

    "}else e="

    "+e+"

    ";""==insertedContentAfterBreak?insertedContentAfterBreak+=e:insertedContentAfterBreak=e+insertedContentAfterBreak}else for(x=0;x"),0==x&&0==$(container).html().replace(//,"").length?$(container).html(e):$(wym._doc.body).append("

    "+e+"

    ");null!=replaceable.get(0)&&("span"==replaceable.get(0).tagName.toLowerCase()&&replaceable.replaceWith(replaceable.html()),replaceable.attr("id",replaceable.get(0)._id_before_replaceable||null))},WYMeditor.editor.prototype.insert=function(t){null!=this._iframe.contentWindow.getSelection().focusNode?this._exec(WYMeditor.INSERT_HTML,t):this.paste(t)},WYMeditor.editor.prototype.wrap=function(t,e,i){t=void 0!==t?t:"",e=void 0!==e?e:"",null==i&&(i=this._iframe.contentWindow.getSelection()),null!=i.focusNode&&this._exec(WYMeditor.INSERT_HTML,t+i.toString()+e)},WYMeditor.editor.prototype.unwrap=function(t){null==t&&(t=this._iframe.contentWindow.getSelection()),null!=t.focusNode&&this._exec(WYMeditor.INSERT_HTML,t.toString())},WYMeditor.editor.prototype.setFocusToNode=function(t,e){var i=this._doc.createRange(),s=this._iframe.contentWindow.getSelection();e=e?0:1,i.selectNodeContents(t),s.addRange(i),s.collapse(t,e),this._iframe.contentWindow.focus()},WYMeditor.editor.prototype.addCssRules=function(t,e){var i=t.styleSheets[0];if(i)for(var s=0;s":" />")},WYMeditor.XmlHelper.prototype.contentTag=function(t,e,i){return"<"+t+((i=i||!1)?this.tagOptions(i):"")+">"+e+""},WYMeditor.XmlHelper.prototype.cdataSection=function(t){return""},WYMeditor.XmlHelper.prototype.escapeOnce=function(t){return this._fixDoubleEscape(this.escapeEntities(t))},WYMeditor.XmlHelper.prototype._fixDoubleEscape=function(t){return t.replace(/&([a-z]+|(#\d+));/gi,"&$1;")},WYMeditor.XmlHelper.prototype.tagOptions=function(t){var e=this;for(var i in e._formated_options="",t){var s=t[i];"function"!=typeof s&&0\s]*))/g);if(i.toString()!=t)for(var s in i){var o=i[s];if("function"!=typeof o&&0!=o.length){var r=new RegExp("(\\w+)\\s*"+o);if(match=t.match(r)){var a=o.replace(/^[\s=]+/,""),n=a.charAt(0);""!=(n='"'==n?'"':"'"==n?"'":"")&&(a='"'==n?a.replace(/^"|"+$/g,""):a.replace(/^'|'+$/g,"")),t=t.replace(match[0],""),e.push([match[1],a])}}}return e},WYMeditor.ParallelRegex=function(t){return this._case=t,this._patterns=[],this._labels=[],this._regex=null,this},WYMeditor.ParallelRegex.prototype.addPattern=function(t,e){e=e||!0;var i=this._patterns.length;this._patterns[i]=t,this._labels[i]=e,this._regex=null},WYMeditor.ParallelRegex.prototype.match=function(t){if(0==this._patterns.length)return[!1,""];var e=t.match(this._getCompoundedRegex());if(!e)return[!1,""];for(var i=e[0],s=1;s","Comment")},WYMeditor.XhtmlLexer.prototype.addScriptTokens=function(t){this.addEntryPattern("","Script")},WYMeditor.XhtmlLexer.prototype.addCssTokens=function(t){this.addEntryPattern("","Css")},WYMeditor.XhtmlLexer.prototype.addTagTokens=function(t){this.addSpecialPattern("<\\s*[a-z0-9:-]+\\s*>",t,"OpeningTag"),this.addEntryPattern("<[a-z0-9:-]+[\\/ \\>]+",t,"OpeningTag"),this.addInTagDeclarationTokens("OpeningTag"),this.addSpecialPattern("",t,"ClosingTag")},WYMeditor.XhtmlLexer.prototype.addInTagDeclarationTokens=function(t){this.addSpecialPattern("\\s+",t,"Ignore"),this.addAttributeTokens(t),this.addExitPattern("/>",t),this.addExitPattern(">",t)},WYMeditor.XhtmlLexer.prototype.addAttributeTokens=function(t){this.addSpecialPattern("\\s*[a-z-_0-9]*:?[a-z-_0-9]+\\s*(?==)\\s*",t,"TagAttributes"),this.addEntryPattern('=\\s*"',t,"DoubleQuotedAttribute"),this.addPattern('\\\\"',"DoubleQuotedAttribute"),this.addExitPattern('"',"DoubleQuotedAttribute"),this.addEntryPattern("=\\s*'",t,"SingleQuotedAttribute"),this.addPattern("\\\\'","SingleQuotedAttribute"),this.addExitPattern("'","SingleQuotedAttribute"),this.addSpecialPattern("=\\s*[^>\\s]*",t,"UnquotedAttribute")},WYMeditor.XhtmlParser=function(t,e){e=e||"Text";return this._Lexer=new WYMeditor.XhtmlLexer(this),this._Listener=t,this._mode=e,this._matches=[],this._last_match="",this._current_match="",this},WYMeditor.XhtmlParser.prototype.parse=function(t){return this._Lexer.parse(this.beforeParsing(t)),this.afterParsing(this._Listener.getResult())},WYMeditor.XhtmlParser.prototype.beforeParsing=function(t){return(t.match(/class="MsoNormal"/)||t.match(/ns = "urn:schemas-microsoft-com/))&&this._Listener.avoidStylingTagsAndAttributes(),this._Listener.beforeParsing(t)},WYMeditor.XhtmlParser.prototype.afterParsing=function(t){return this._Listener._avoiding_tags_implicitly&&this._Listener.allowStylingTagsAndAttributes(),this._Listener.afterParsing(t)},WYMeditor.XhtmlParser.prototype.Ignore=function(){return!0},WYMeditor.XhtmlParser.prototype.Text=function(t){return this._Listener.addContent(t),!0},WYMeditor.XhtmlParser.prototype.Comment=function(t,e){return this._addNonTagBlock(t,e,"addComment")},WYMeditor.XhtmlParser.prototype.Script=function(t,e){return this._addNonTagBlock(t,e,"addScript")},WYMeditor.XhtmlParser.prototype.Css=function(t,e){return this._addNonTagBlock(t,e,"addCss")},WYMeditor.XhtmlParser.prototype._addNonTagBlock=function(t,e,i){switch(e){case WYMeditor.LEXER_ENTER:this._non_tag=t;break;case WYMeditor.LEXER_UNMATCHED:this._non_tag+=t;break;case WYMeditor.LEXER_EXIT:switch(i){case"addComment":this._Listener.addComment(this._non_tag+t);break;case"addScript":this._Listener.addScript(this._non_tag+t);break;case"addCss":this._Listener.addCss(this._non_tag+t)}}return!0},WYMeditor.XhtmlParser.prototype.OpeningTag=function(t,e){switch(e){case WYMeditor.LEXER_ENTER:this._tag=this.normalizeTag(t),this._tag_attributes={};break;case WYMeditor.LEXER_SPECIAL:this._callOpenTagListener(this.normalizeTag(t));break;case WYMeditor.LEXER_EXIT:this._callOpenTagListener(this._tag,this._tag_attributes)}return!0},WYMeditor.XhtmlParser.prototype.ClosingTag=function(t){return this._callCloseTagListener(this.normalizeTag(t)),!0},WYMeditor.XhtmlParser.prototype._callOpenTagListener=function(t,e){e=e||{};this.autoCloseUnclosedBeforeNewOpening(t),this._Listener.isBlockTag(t)?(this._Listener._tag_stack.push(t),this._Listener.fixNestingBeforeOpeningBlockTag(t,e),this._Listener.openBlockTag(t,e),this._increaseOpenTagCounter(t)):this._Listener.isInlineTag(t)?this._Listener.inlineTag(t,e):(this._Listener.openUnknownTag(t,e),this._increaseOpenTagCounter(t)),this._Listener.last_tag=t,this._Listener.last_tag_opened=!0,this._Listener.last_tag_attributes=e},WYMeditor.XhtmlParser.prototype._callCloseTagListener=function(t){if(this._decreaseOpenTagCounter(t))if(this.autoCloseUnclosedBeforeTagClosing(t),this._Listener.isBlockTag(t)){var e=this._Listener._tag_stack.pop();if(0==e)return;e!=t&&(t=e),this._Listener.closeBlockTag(t)}else this._Listener.closeUnknownTag(t);else this._Listener.closeUnopenedTag(t);this._Listener.last_tag=t,this._Listener.last_tag_opened=!1},WYMeditor.XhtmlParser.prototype._increaseOpenTagCounter=function(t){this._Listener._open_tags[t]=this._Listener._open_tags[t]||0,this._Listener._open_tags[t]++},WYMeditor.XhtmlParser.prototype._decreaseOpenTagCounter=function(t){return!!this._Listener._open_tags[t]&&(this._Listener._open_tags[t]--,0==this._Listener._open_tags[t]&&(this._Listener._open_tags[t]=undefined),!0)},WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeNewOpening=function(t){this._autoCloseUnclosed(t,!1)},WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeTagClosing=function(t){this._autoCloseUnclosed(t,!0)},WYMeditor.XhtmlParser.prototype._autoCloseUnclosed=function(t,e){e=e||!1;if(this._Listener._open_tags)for(var i in this._Listener._open_tags){0]*)|([\s<\/>]*)$/gm,"").toLowerCase();var e=this._Listener.getTagReplacements();return e[t]?e[t]:t},WYMeditor.XhtmlParser.prototype.TagAttributes=function(t,e){return WYMeditor.LEXER_SPECIAL==e&&(this._current_attribute=t),!0},WYMeditor.XhtmlParser.prototype.DoubleQuotedAttribute=function(t,e){return WYMeditor.LEXER_UNMATCHED==e&&(this._tag_attributes[this._current_attribute]=t),!0},WYMeditor.XhtmlParser.prototype.SingleQuotedAttribute=function(t,e){return WYMeditor.LEXER_UNMATCHED==e&&(this._tag_attributes[this._current_attribute]=t),!0},WYMeditor.XhtmlParser.prototype.UnquotedAttribute=function(t){return this._tag_attributes[this._current_attribute]=t.replace(/^=/,""),!0},WYMeditor.XhtmlSaxListener=function(){return this.output="",this.helper=new WYMeditor.XmlHelper,this._open_tags={},this.validator=WYMeditor.XhtmlValidator,this._tag_stack=[],this.avoided_tags=["area"],this.entities={" ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","­":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ƒ":"ƒ","ˆ":"ˆ","˜":"˜","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","•":"•","…":"…","‰":"‰","′":"′","″":"″","‹":"‹","›":"›","‾":"‾","⁄":"⁄","€":"€","ℑ":"ℑ","℘":"℘","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},this.block_tags=["a","abbr","acronym","address","area","b","base","bdo","big","blockquote","body","button","caption","cite","code","col","colgroup","dd","del","div","dfn","dl","dt","em","fieldset","form","head","h1","h2","h3","h4","h5","h6","html","i","iframe","ins","kbd","label","legend","li","map","noscript","object","ol","optgroup","option","p","pre","q","samp","script","select","small","span","strong","style","sub","sup","table","tbody","td","textarea","tfoot","th","thead","title","tr","tt","ul","var","extends","meter","section","article","aside","details","header","footer","nav","dialog","figure","figcaption","address","hgroup","mark","time","canvas","audio","video","output","progress","ruby","rt","rp","summary","command"],this.inline_tags=["br","embed","hr","img","input","param","source","wbr"],this},WYMeditor.XhtmlSaxListener.prototype.shouldCloseTagAutomatically=function(t,e,i){i=i||!1;return!("td"!=t||!(i&&"tr"==e||!i&&"td"==e))||!("option"!=t||!(i&&"select"==e||!i&&"option"==e))},WYMeditor.XhtmlSaxListener.prototype.beforeParsing=function(t){return this.output="",t},WYMeditor.XhtmlSaxListener.prototype.afterParsing=function(t){return t=this.replaceNamedEntities(t),t=this.joinRepeatedEntities(t),t=this.removeEmptyTags(t)},WYMeditor.XhtmlSaxListener.prototype.replaceNamedEntities=function(t){for(var e in this.entities)t=t.replace(new RegExp(e,"g"),this.entities[e]);return t},WYMeditor.XhtmlSaxListener.prototype.joinRepeatedEntities=function(t){var e="em|strong|sub|sup|acronym|pre|del|address";return t.replace(new RegExp("<\\1>",""),"").replace(new RegExp("(s*<("+e+")>s*){2}(.*)(s*s*){2}",""),"<$2>$3<$2>")},WYMeditor.XhtmlSaxListener.prototype.removeEmptyTags=function(t){return t.replace(new RegExp("<("+this.block_tags.join("|").replace(/\|td/,"").replace(/\|th/,"")+")>(
    | | |\\s)*","g"),"")},WYMeditor.XhtmlSaxListener.prototype.removeBrInPre=function(t){var e=t.match(new RegExp("]*>(.*?)","gmi"));if(e)for(var i=0;i","g"),String.fromCharCode(13,10)));return t},WYMeditor.XhtmlSaxListener.prototype.getResult=function(){return this.output},WYMeditor.XhtmlSaxListener.prototype.getTagReplacements=function(){return{b:"strong",i:"em"}},WYMeditor.XhtmlSaxListener.prototype.addContent=function(t){this.output+=t},WYMeditor.XhtmlSaxListener.prototype.addComment=function(t){this.remove_comments&&(this.output+=t)},WYMeditor.XhtmlSaxListener.prototype.addScript=function(t){this.remove_scripts||(this.output+=t)},WYMeditor.XhtmlSaxListener.prototype.addCss=function(t){this.remove_embeded_styles||(this.output+=t)},WYMeditor.XhtmlSaxListener.prototype.openBlockTag=function(t,e){this.output+=this.helper.tag(t,this.validator.getValidTagAttributes(t,e),!0)},WYMeditor.XhtmlSaxListener.prototype.inlineTag=function(t,e){this.output+=this.helper.tag(t,this.validator.getValidTagAttributes(t,e))},WYMeditor.XhtmlSaxListener.prototype.openUnknownTag=function(t,e){"area"===t&&(this.output+=this.helper.tag(t,e,!0))},WYMeditor.XhtmlSaxListener.prototype.closeBlockTag=function(t){this.output=this.output.replace(/
    $/,"")+this._getClosingTagContent("before",t)+""+this._getClosingTagContent("after",t)},WYMeditor.XhtmlSaxListener.prototype.closeUnknownTag=function(){},WYMeditor.XhtmlSaxListener.prototype.closeUnopenedTag=function(t){this.output+=""},WYMeditor.XhtmlSaxListener.prototype.avoidStylingTagsAndAttributes=function(){this.avoided_tags=["div","span"],this.validator.skipped_attributes=["style"],this.validator.skipped_attribute_values=["MsoNormal","main1"],this._avoiding_tags_implicitly=!0},WYMeditor.XhtmlSaxListener.prototype.allowStylingTagsAndAttributes=function(){this.avoided_tags=[],this.validator.skipped_attributes=[],this.validator.skipped_attribute_values=[],this._avoiding_tags_implicitly=!1},WYMeditor.XhtmlSaxListener.prototype.isBlockTag=function(t){return!WYMeditor.Helper.contains(this.avoided_tags,t)&&WYMeditor.Helper.contains(this.block_tags,t)},WYMeditor.XhtmlSaxListener.prototype.isInlineTag=function(t){return!WYMeditor.Helper.contains(this.avoided_tags,t)&&WYMeditor.Helper.contains(this.inline_tags,t)},WYMeditor.XhtmlSaxListener.prototype.insertContentAfterClosingTag=function(t,e){this._insertContentWhenClosingTag("after",t,e)},WYMeditor.XhtmlSaxListener.prototype.insertContentBeforeClosingTag=function(t,e){this._insertContentWhenClosingTag("before",t,e)},WYMeditor.XhtmlSaxListener.prototype.fixNestingBeforeOpeningBlockTag=function(t){"li"==t||"ul"!=t&&"ol"!=t||!this.last_tag||this.last_tag_opened||"li"!=this.last_tag||(this.output=this.output.replace(/<\/li>$/,""),this.insertContentAfterClosingTag(t,""))},WYMeditor.XhtmlSaxListener.prototype._insertContentWhenClosingTag=function(t,e,i){this["_insert_"+t+"_closing"]||(this["_insert_"+t+"_closing"]=[]),this["_insert_"+t+"_closing"][e]||(this["_insert_"+t+"_closing"][e]=[]),this["_insert_"+t+"_closing"][e].push(i)},WYMeditor.XhtmlSaxListener.prototype._getClosingTagContent=function(t,e){return this["_insert_"+t+"_closing"]&&this["_insert_"+t+"_closing"][e]&&0\\s]*\\*/","Ignore","WymCss"),this.addExitPattern("/\\*[\\s]*\\*/","WymCss")),this.addSpecialPattern("[\\sa-z1-6]*\\.[a-z-_0-9]+","WymCss","WymCssStyleDeclaration"),this.addEntryPattern("/\\*","WymCss","WymCssComment"),this.addExitPattern("\\*/","WymCssComment"),this.addEntryPattern("{","WymCss","WymCssStyle"),this.addExitPattern("}","WymCssStyle"),this.addEntryPattern("/\\*","WymCssStyle","WymCssFeedbackStyle"),this.addExitPattern("\\*/","WymCssFeedbackStyle"),this},WYMeditor.WymCssParser=function(){return this._in_style=!1,this._has_title=!1,this.only_wym_blocks=!0,this.css_settings={classesItems:[],editorStyles:[],dialogStyles:[]},this},WYMeditor.WymCssParser.prototype.parse=function(t,e){e=void 0===e?this.only_wym_blocks:e;this._Lexer=new WYMeditor.WymCssLexer(this,e),this._Lexer.parse(t)},WYMeditor.WymCssParser.prototype.Ignore=function(){return!0},WYMeditor.WymCssParser.prototype.WymCssComment=function(t,e){return!t.match(/end[a-z0-9\s]*wym[a-z0-9\s]*/im)&&(e==WYMeditor.LEXER_UNMATCHED&&(this._in_style?this._current_item[this._current_element]&&(this._current_item[this._current_element].expressions?this._current_item[this._current_element].expressions.push(t):this._current_item[this._current_element].expressions=[t]):(this._has_title=!0,this._current_item={title:WYMeditor.Helper.trim(t)}),this._in_style=!0),!0)},WYMeditor.WymCssParser.prototype.WymCssStyle=function(t,e){return e==WYMeditor.LEXER_UNMATCHED?""!=(t=WYMeditor.Helper.trim(t))&&(this._current_item[this._current_element].style=t):e==WYMeditor.LEXER_EXIT&&(this._in_style=!1,this._has_title=!1,this.addStyleSetting(this._current_item)),!0},WYMeditor.WymCssParser.prototype.WymCssFeedbackStyle=function(t,e){return e==WYMeditor.LEXER_UNMATCHED&&(this._current_item[this._current_element].feedback_style=t.replace(/^([\s\/\*]*)|([\s\/\*]*)$/gm,"")),!0},WYMeditor.WymCssParser.prototype.WymCssStyleDeclaration=function(t){var e="";if(0<(t=t.replace(/^([\s\.]*)|([\s\.*]*)$/gm,"")).indexOf(".")){var i=t.split(".");this._current_element=i[1];e=i[0]}else this._current_element=t;return this._has_title||(this._current_item={title:(e?e.toUpperCase()+": ":"")+this._current_element},this._has_title=!0),this._current_item[this._current_element]||(this._current_item[this._current_element]={name:this._current_element}),e&&(this._current_item[this._current_element].tags?this._current_item[this._current_element].tags.push(e):this._current_item[this._current_element].tags=[e]),!0},WYMeditor.WymCssParser.prototype.addStyleSetting=function(t){for(var e in t){var i=t[e];"object"==typeof i&&"title"!=e&&(this.css_settings.classesItems.push({name:WYMeditor.Helper.trim(i.name),title:t.title,expr:WYMeditor.Helper.trim((i.expressions||i.tags).join(", "))}),i.feedback_style&&this.css_settings.editorStyles.push({name:"."+WYMeditor.Helper.trim(i.name),css:i.feedback_style}),i.style&&this.css_settings.dialogStyles.push({name:"."+WYMeditor.Helper.trim(i.name),css:i.style}))}},$.fn.isPhantomNode=function(){return 3==this[0].nodeType&&!/[^\t\n\r ]/.test(this[0].data)},WYMeditor.isPhantomNode=function(t){return 3==t.nodeType&&!/[^\t\n\r ]/.test(t.data)},WYMeditor.isPhantomString=function(t){return!/[^\t\n\r ]/.test(t)},$.fn.parentsOrSelf=function(t){var e=this;return 3==e[0].nodeType&&(e=e.parents().slice(0,1)),1==e.filter(t).size()?e:e.parents(t).slice(0,1)},WYMeditor.Helper={replaceAll:function(t,e,i){return t.replace(new RegExp(e,"g"),i)},insertAt:function(t,e,i){return t.substr(0,i)+e+t.substring(i)},trim:function(t){return t.replace(/^(\s*)|(\s*)$/gm,"")},contains:function(t,e){for(var i=0;i"))},WYMeditor.WymClassExplorer.prototype.initIframe=function(iframe){this._iframe=iframe,this._doc=iframe.contentWindow.document;var styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,$("html",this._doc).attr("dir",this._options.direction),$("html",this._doc).addClass("ie"),$(this._doc.body).html(this._wym._html);var wym=this;this._doc.body.onfocus=function(){wym._doc.designMode="on",wym._doc=iframe.contentWindow.document},this._doc.onbeforedeactivate=function(){wym.saveCaret()},this._doc.onkeyup=function(){wym.saveCaret(),wym.keyup()},this._doc.onclick=function(){wym.saveCaret()},this._doc.body.onbeforepaste=function(){wym._iframe.contentWindow.event.returnValue=!1},this._doc.body.onpaste=function(){wym._iframe.contentWindow.event.returnValue=!1,wym.paste(window.clipboardData.getData("Text"))},this._initialized&&($.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),$.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()),this._initialized=!0,this._doc.designMode="on";try{this._doc=iframe.contentWindow.document}catch(e){}},WYMeditor.WymClassExplorer.prototype._exec=function(t,e){var i=this;switch(t){case WYMeditor.INDENT:case WYMeditor.OUTDENT:var s=i.findUp(i.container(),WYMeditor.LI);if(s){var o=s.parentNode.parentNode;(1]*)>/gi,"").replace(/<\/em>/gi,"").replace(/]*)>/gi,"").replace(/<\/strong>/gi,""),$(this._doc.body).html(t),this.enableDesignMode()},WYMeditor.WymClassMozilla.prototype._exec=function(t,e){if(!this.selected())return!1;switch(t){case WYMeditor.INDENT:case WYMeditor.OUTDENT:var i=this.selected(),s=this._iframe.contentWindow.getSelection().anchorNode;if("#text"==s.nodeName&&(s=s.parentNode),i=this.findUp(i,WYMeditor.BLOCKS),s=this.findUp(s,WYMeditor.BLOCKS),i&&i==s&&i.tagName.toLowerCase()==WYMeditor.LI){var o=i.parentNode.parentNode;(1

    "))))},WYMeditor.WymClassMozilla.prototype.keyup=function(t){if(null!=(wym=WYMeditor.INSTANCES[this.title])){wym._selected_image=null,$(wym._iframe).contents().find(".selected_by_wym").removeClass("selected_by_wym");var e=null;13!=t.keyCode||t.shiftKey?-1!=$.inArray(t.keyCode,[8,17,46,224])||t.metaKey||t.ctrlKey||wym.format_block():($(wym._doc.body).children(WYMeditor.BR).remove(),(e=wym.selected())&&e.tagName.toLowerCase()==WYMeditor.PRE&&wym._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P))}},WYMeditor.WymClassMozilla.prototype.enableDesignMode=function(){if("off"==this._doc.designMode)try{this._doc.designMode="on",this._doc.execCommand("styleWithCSS","",!1)}catch(t){}},WYMeditor.WymClassMozilla.prototype.openBlockTag=function(t,e){e=this.validator.getValidTagAttributes(t,e);if("span"===t&&e.style){var i=this.getTagForStyle(e.style);i&&(t=i,this._tag_stack.pop(),this._tag_stack.push(t),e.style="")}this.output+=this.helper.tag(t,e,!0)},WYMeditor.WymClassMozilla.prototype.getTagForStyle=function(t){return/bold/.test(t)?"strong":/italic/.test(t)?"em":/sub/.test(t)?"sub":!!/super/.test(t)&&"super"}, /* * WYMeditor : what you see is What You Mean web-based editor * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * * For further information visit: * http://www.wymeditor.org/ * * File Name: * jquery.wymeditor.opera.js * Opera specific class and functions. * See the documentation for more info. * * File Authors: * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) */ WYMeditor.WymClassOpera=function(t){this._wym=t,this._class="class",this._newLine="\r\n"},WYMeditor.WymClassOpera.prototype.initIframe=function(iframe){this._iframe=iframe,this._doc=iframe.contentWindow.document;var styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,$("html",this._doc).attr("dir",this._options.direction),this._doc.designMode="on",this.html(this._wym._html),$.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),$(this._doc).bind("keydown",this.keydown),$(this._doc).bind("keyup",this.keyup),$(this._doc).bind("paste",this.intercept_paste),$.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()},WYMeditor.WymClassOpera.prototype._exec=function(t,e){e?this._doc.execCommand(t,!1,e):this._doc.execCommand(t)},WYMeditor.WymClassOpera.prototype.selected=function(){var t=this._iframe.contentWindow.getSelection().focusNode;return t?"#text"==t.nodeName?t.parentNode:t:null},WYMeditor.WymClassOpera.prototype.addCssRule=function(t,e){t.insertRule(e.name+" {"+e.css+"}",t.cssRules.length)},WYMeditor.WymClassOpera.prototype.keydown=function(t){var e=WYMeditor.INSTANCES[this.title],i=e._iframe.contentWindow.getSelection();startNode=i.getRangeAt(0).startContainer,$(startNode).parentsOrSelf(WYMeditor.MAIN_CONTAINERS.join(","))[0]||$(startNode).parentsOrSelf("li")||t.keyCode==WYMeditor.KEY.ENTER||t.keyCode==WYMeditor.KEY.LEFT||t.keyCode==WYMeditor.KEY.UP||t.keyCode==WYMeditor.KEY.RIGHT||t.keyCode==WYMeditor.KEY.DOWN||t.keyCode==WYMeditor.KEY.BACKSPACE||t.keyCode==WYMeditor.KEY.DELETE||e._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P)},WYMeditor.WymClassOpera.prototype.keyup=function(){var t=WYMeditor.INSTANCES[this.title];t._selected_image=null,$(t._iframe).contents().find(".selected_by_wym").removeClass("selected_by_wym")}, /* * WYMeditor : what you see is What You Mean web-based editor * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ * Dual licensed under the MIT (MIT-license.txt) * and GPL (GPL-license.txt) licenses. * * For further information visit: * http://www.wymeditor.org/ * * File Name: * jquery.wymeditor.safari.js * Safari specific class and functions. * See the documentation for more info. * * File Authors: * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg) * Scott Lewis (lewiscot a-t gmail dotcom) */ WYMeditor.WymClassSafari=function(t){this._wym=t,this._class="class",this._newLine="\n"},WYMeditor.WymClassSafari.prototype.initIframe=function(iframe){this._iframe=iframe,this._doc=iframe.contentDocument;var styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,$("html",this._doc).attr("dir",this._options.direction),this._doc.designMode="on",this.html(this._wym._html),$.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),$(this._doc).bind("keydown",this.keydown),$(this._doc).bind("keyup",this.keyup),$(this._doc).bind("paste",this.intercept_paste),$.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()},WYMeditor.WymClassSafari.prototype._exec=function(t,e){var i=this;if(!i.selected())return!1;switch(t){case WYMeditor.INDENT:case WYMeditor.OUTDENT:var s=i.selected(),o=i._iframe.contentWindow.getSelection().anchorNode;if("#text"==o.nodeName&&(o=o.parentNode),s=i.findUp(s,WYMeditor.BLOCKS),o=i.findUp(o,WYMeditor.BLOCKS),s&&s==o&&s.tagName.toLowerCase()==WYMeditor.LI){var r=s.parentNode.parentNode;(1"+WYMeditor.TOOLS_ITEMS+"",toolsItemHtml:"
  • "+WYMeditor.TOOL_TITLE+"
  • ",classesHtml:"",classesItemHtml:"
  • "+WYMeditor.CLASS_TITLE+"
  • ",classesItemHtmlMultiple:"
  • "+WYMeditor.CLASS_TITLE+"
      {classesItemHtml}
  • ",containersHtml:"
      "+WYMeditor.CONTAINERS_ITEMS+"
    ",containersItemHtml:"
  • ",boxHtml:"
    "+WYMeditor.CONTAINERS+WYMeditor.TOOLS+WYMeditor.CLASSES+"
    "+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"
    ",iframeHtml:"
    ",dialogImageHtml:"",dialogLinkHtml:"",dialogTableHtml:"
    "+form_actions+"
    ",dialogPasteHtml:"
    "+form_actions+"
    ",dialogPath:"/refinery/dialogs/",dialogFeatures:{width:866,height:455,modal:!0,draggable:!0,resizable:!1,autoOpen:!0,open:onOpenDialog,close:onCloseDialog},dialogInlineFeatures:{width:600,height:485,modal:!0,draggable:!0,resizable:!1,autoOpen:!0,open:onOpenDialog,close:onCloseDialog},dialogId:"editor_dialog",dialogHtml:""+WYMeditor.DIALOG_TITLE+"
    "+WYMeditor.DIALOG_BODY+"
    ",postInit:function(t){if(wymeditors_loaded+=1,WYMeditor.INSTANCES.length==wymeditors_loaded)for($(".wym_loading_overlay").remove(),i=0;i WYMeditor ",i.write(html),i.close();var s=i.head||$(i).find("head").get(0);$("").appendTo(s),$("").appendTo(s),$("").appendTo(s)}null!=(id_of_editor=e._element.parent().attr("id"))&&$(i.body).addClass(id_of_editor),e.initIframe(t)},WYMeditor.init=function(){(wymeditor_inputs=$(".wymeditor").filter(function(){for(i=0;i