(function($){var editorObj;var methods={saveSelection:function(){$(this).data("editor").focus();if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){$(this).data("currentRange",sel.getRangeAt(0))}}else if(document.selection&&document.selection.createRange){$(this).data("currentRange",document.selection.createRange())}else $(this).data("currentRange",null)},restoreSelection:function(text,mode){var node;typeof text!=="undefined"?text:false;typeof mode!=="undefined"?mode:"";var range=$(this).data("currentRange");if(range){if(window.getSelection){if(text){range.deleteContents();if(mode=="html"){var el=document.createElement("div");el.innerHTML=text;var frag=document.createDocumentFragment(),node,lastNode;while(node=el.firstChild){lastNode=frag.appendChild(node)}range.insertNode(frag)}else range.insertNode(document.createTextNode(text))}sel=window.getSelection();sel.removeAllRanges();sel.addRange(range)}else if(document.selection&&range.select){range.select();if(text){if(mode=="html")range.pasteHTML(text);else range.text=text}}}},restoreIESelection:function(){var range=$(this).data("currentRange");if(range){if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();sel.addRange(range)}else if(document.selection&&range.select){range.select()}}},insertTextAtSelection:function(text,mode){var sel,range,node;typeof mode!=="undefined"?mode:"";if(window.getSelection){sel=window.getSelection();if(sel.getRangeAt&&sel.rangeCount){range=sel.getRangeAt(0);range.deleteContents();var textNode=document.createTextNode(text);if(mode=="html"){var el=document.createElement("div");el.innerHTML=text;var frag=document.createDocumentFragment(),node,lastNode;while(node=el.firstChild){lastNode=frag.appendChild(node)}range.insertNode(frag)}else{range.insertNode(textNode);range.selectNode(textNode)}sel.removeAllRanges();range=range.cloneRange();range.collapse(false);sel.addRange(range)}}else if(document.selection&&document.selection.createRange){range=document.selection.createRange();range.pasteHTML(text);range.select()}},imageWidget:function(){var row=$("
",{"class":"row"}).append($("
",{id:"imgErrMsg"}));var container=$("
",{"class":"tabbable tabs-left"});var navTabs=$("