Committer: atyurin
LJSUP-13681: Font is jumping in the Visual redactorU trunk/htdocs/js/ck/ckeditor-dev.js U trunk/htdocs/js/ck/ckeditor.js U trunk/htdocs/js/ck/config.js U trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/ckeditor-dev.js =================================================================== --- trunk/htdocs/js/ck/ckeditor-dev.js 2012-09-19 15:06:51 UTC (rev 22932) +++ trunk/htdocs/js/ck/ckeditor-dev.js 2012-09-20 06:51:53 UTC (rev 22933) @@ -123,5 +123,5 @@ if(!u)w='auto';else if(!isNaN(w))w+='px';var y='',z=o.config.width;if(z){if(!isNaN(z))z+='px';y+='width: '+z+';';}var A=t&&n(o,'top'),B=n(o,'bottom');A&&(A.setHtml(t),t='');B&&(B.setHtml(v),v='');var C='<style>.'+o.skinClass+'{visibility:hidden;}</style>';if(m[o.skinClass])C='';else m[o.skinClass]=1;var D=h.createFromHtml(['<span id="cke_',q,'" class="',o.skinClass,' ',o.id,' cke_editor_',q,'" dir="',o.lang.dir,'" title="',b.gecko?' ':'','" lang="',o.langCode,'"'+(b.webkit?' tabindex="'+x+'"':'')+' role="application"'+' aria-labelledby="cke_',q,'_arialbl"'+(y?' style="'+y+'"':'')+'>'+'<span id="cke_',q,'_arialbl" class="cke_voice_label">'+o.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',o.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_top_',q,'" class="cke_top" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_contents_',q,'" class="cke_contents" style="height:',w,'" role="presentation">',u,'</td></tr><tr',v?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',q,'" class="cke_bottom" role="presentation">',v,'</td></tr></tbody></table>'+C+'</span>'+'</span>'+'</span>'].join(''));D.getChild([1,0,0,0,0]).unselectable();D.getChild([1,0,0,0,2]).unselectable();if(s==1)D.insertAfter(r);else r.append(D);o.container=D;D.disableContextMenu();o.on('contentDirChanged',function(E){var F=(o.lang.dir!=E.data?'add':'remove')+'Class';D.getChild(1)[F]('cke_mixed_dir_content');var G=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];G&&G.getParent().getParent()[F]('cke_mixed_dir_content');});o.fireOnce('themeLoaded');o.fireOnce('uiReady');},buildDialog:function(o){var p=e.getNextNumber(),q=h.createFromHtml(['<div class="',o.id,'_dialog cke_editor_',o.name.replace('.','\\.'),'_dialog cke_skin_',o.skinName,'" dir="',o.lang.dir,'" lang="',o.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',o.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+o.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+p).replace(/%/g,'cke_dialog_')),r=q.getChild([0,0,0,0,0]),s=r.getChild(0),t=r.getChild(1); if(c&&!b.ie6Compat){var u=b.isCustomDomain(),v='javascript:void(function(){'+encodeURIComponent('document.open();'+(u?'document.domain="'+document.domain+'";':'')+'document.close();')+'}())',w=h.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+v+'"'+' tabIndex="-1"'+'></iframe>');w.appendTo(r.getParent());}s.unselectable();t.unselectable();return{element:q,parts:{dialog:q.getChild(0),title:s,close:t,tabs:r.getChild(2),contents:r.getChild([3,0,0,0]),footer:r.getChild([3,0,1,0])}};},destroy:function(o){var p=o.container,q=o.element;if(p){p.clearCustomData();p.remove();}if(q){q.clearCustomData();o.elementMode==1&&q.show();delete o.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var v=this;var q=v.container,r=a.document.getById('cke_contents_'+v.name),s=b.webkit&&v.document&&v.document.getWindow().$.frameElement,t=p?q.getChild(1):q;t.setSize('width',m,true);s&&(s.style.width='1%');var u=o?0:(t.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-u,0)+'px');s&&(s.style.width='100%');v.fire('resize');};a.editor.prototype.getResizable=function(m){return m?a.document.getById('cke_contents_'+this.name):this.container;};(function(){j.add('xml',{});a.xml=function(m){var n=null;if(typeof m=='object')n=m;else{var o=(m||'').replace(/ /g,'\xa0');if(window.DOMParser)n=new DOMParser().parseFromString(o,'text/xml');else if(window.ActiveXObject){try{n=new ActiveXObject('MSXML2.DOMDocument');}catch(p){try{n=new ActiveXObject('Microsoft.XmlDom');}catch(p){}}if(n){n.async=false;n.resolveExternals=false;n.validateOnParse=false;n.loadXML(o);}}}this.baseXml=n;};a.xml.prototype={selectSingleNode:function(m,n){var o=this.baseXml;if(n||(n=o))if(c||n.selectSingleNode)return n.selectSingleNode(m);else if(o.evaluate){var p=o.evaluate(m,n,null,9,null);return p&&p.singleNodeValue||null;}return null;},selectNodes:function(m,n){var o=this.baseXml,p=[];if(n||(n=o))if(c||n.selectNodes)return n.selectNodes(m);else if(o.evaluate){var q=o.evaluate(m,n,null,5,null);if(q){var r;while(r=q.iterateNext())p.push(r);}}return p;},getInnerXml:function(m,n){var o=this.selectSingleNode(m,n),p=[];if(o){o=o.firstChild;while(o){if(o.xml)p.push(o.xml);else if(window.XMLSerializer)p.push(new XMLSerializer().serializeToString(o));o=o.nextSibling;}}return p.length?p.join(''):null;}};})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p; if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return!(K.is('a')||K.getElementsByTag('a').count())||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',z,",null,'",u,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option" aria-posinset="1" aria-setsize="',y,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',v,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var A=0;A<x.length;A++){if(A%8===0)w.push('</tr><tr>');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',E,'" onclick="CKEDITOR.tools.callFunction(',z,",'",C,"','",u,"'); return false;\" href=\"javascript:void('",E,'\')" role="option" aria-posinset="',A+2,'" aria-setsize="',y,'"><span class="cke_colorbox" style="background-color:#',D,'"></span></a></td>'); -}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont','ljuser2');}else o.push('dialog','image','link','font');m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2; -m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'link'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})(); +}if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont','ljcut2','ljuser2');}else o.push('dialog','image','link','font');m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');m.contentsLangDirection='ltr'; +m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'link'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})(); Modified: trunk/htdocs/js/ck/ckeditor.js =================================================================== --- trunk/htdocs/js/ck/ckeditor.js 2012-09-19 15:06:51 UTC (rev 22932) +++ trunk/htdocs/js/ck/ckeditor.js 2012-09-20 06:51:53 UTC (rev 22933) @@ -123,7 +123,7 @@ if(!u)w='auto';else if(!isNaN(w))w+='px';var y='',z=o.config.width;if(z){if(!isNaN(z))z+='px';y+='width: '+z+';';}var A=t&&n(o,'top'),B=n(o,'bottom');A&&(A.setHtml(t),t='');B&&(B.setHtml(v),v='');var C='<style>.'+o.skinClass+'{visibility:hidden;}</style>';if(m[o.skinClass])C='';else m[o.skinClass]=1;var D=h.createFromHtml(['<span id="cke_',q,'" class="',o.skinClass,' ',o.id,' cke_editor_',q,'" dir="',o.lang.dir,'" title="',b.gecko?' ':'','" lang="',o.langCode,'"'+(b.webkit?' tabindex="'+x+'"':'')+' role="application"'+' aria-labelledby="cke_',q,'_arialbl"'+(y?' style="'+y+'"':'')+'>'+'<span id="cke_',q,'_arialbl" class="cke_voice_label">'+o.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',o.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_top_',q,'" class="cke_top" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_contents_',q,'" class="cke_contents" style="height:',w,'" role="presentation">',u,'</td></tr><tr',v?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',q,'" class="cke_bottom" role="presentation">',v,'</td></tr></tbody></table>'+C+'</span>'+'</span>'+'</span>'].join(''));D.getChild([1,0,0,0,0]).unselectable();D.getChild([1,0,0,0,2]).unselectable();if(s==1)D.insertAfter(r);else r.append(D);o.container=D;D.disableContextMenu();o.on('contentDirChanged',function(E){var F=(o.lang.dir!=E.data?'add':'remove')+'Class';D.getChild(1)[F]('cke_mixed_dir_content');var G=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];G&&G.getParent().getParent()[F]('cke_mixed_dir_content');});o.fireOnce('themeLoaded');o.fireOnce('uiReady');},buildDialog:function(o){var p=e.getNextNumber(),q=h.createFromHtml(['<div class="',o.id,'_dialog cke_editor_',o.name.replace('.','\\.'),'_dialog cke_skin_',o.skinName,'" dir="',o.lang.dir,'" lang="',o.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',o.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+o.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+p).replace(/%/g,'cke_dialog_')),r=q.getChild([0,0,0,0,0]),s=r.getChild(0),t=r.getChild(1); if(c&&!b.ie6Compat){var u=b.isCustomDomain(),v='javascript:void(function(){'+encodeURIComponent('document.open();'+(u?'document.domain="'+document.domain+'";':'')+'document.close();')+'}())',w=h.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+v+'"'+' tabIndex="-1"'+'></iframe>');w.appendTo(r.getParent());}s.unselectable();t.unselectable();return{element:q,parts:{dialog:q.getChild(0),title:s,close:t,tabs:r.getChild(2),contents:r.getChild([3,0,0,0]),footer:r.getChild([3,0,1,0])}};},destroy:function(o){var p=o.container,q=o.element;if(p){p.clearCustomData();p.remove();}if(q){q.clearCustomData();o.elementMode==1&&q.show();delete o.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var v=this;var q=v.container,r=a.document.getById('cke_contents_'+v.name),s=b.webkit&&v.document&&v.document.getWindow().$.frameElement,t=p?q.getChild(1):q;t.setSize('width',m,true);s&&(s.style.width='1%');var u=o?0:(t.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-u,0)+'px');s&&(s.style.width='100%');v.fire('resize');};a.editor.prototype.getResizable=function(m){return m?a.document.getById('cke_contents_'+this.name):this.container;};(function(){j.add('xml',{});a.xml=function(m){var n=null;if(typeof m=='object')n=m;else{var o=(m||'').replace(/ /g,'\xa0');if(window.DOMParser)n=new DOMParser().parseFromString(o,'text/xml');else if(window.ActiveXObject){try{n=new ActiveXObject('MSXML2.DOMDocument');}catch(p){try{n=new ActiveXObject('Microsoft.XmlDom');}catch(p){}}if(n){n.async=false;n.resolveExternals=false;n.validateOnParse=false;n.loadXML(o);}}}this.baseXml=n;};a.xml.prototype={selectSingleNode:function(m,n){var o=this.baseXml;if(n||(n=o))if(c||n.selectSingleNode)return n.selectSingleNode(m);else if(o.evaluate){var p=o.evaluate(m,n,null,9,null);return p&&p.singleNodeValue||null;}return null;},selectNodes:function(m,n){var o=this.baseXml,p=[];if(n||(n=o))if(c||n.selectNodes)return n.selectNodes(m);else if(o.evaluate){var q=o.evaluate(m,n,null,5,null);if(q){var r;while(r=q.iterateNext())p.push(r);}}return p;},getInnerXml:function(m,n){var o=this.selectSingleNode(m,n),p=[];if(o){o=o.firstChild;while(o){if(o.xml)p.push(o.xml);else if(window.XMLSerializer)p.push(new XMLSerializer().serializeToString(o));o=o.nextSibling;}}return p.length?p.join(''):null;}};})();(function(){var m=a.lang[a.lang.detect()]||{}; jQuery.extend(m,LJ.pageVar('rtedata'));a.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;var n=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',checked:true,html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',checked:true,html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',checked:true,html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',checked:true,html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',checked:Site.remote_is_sup?true:false,html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',checked:false,html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],o={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJUserLink:{html:encodeURIComponent(m.LJUser_WizardNotice+'<br /><a href="#" lj-cmd="LJUserLink">'+m.LJUser_WizardNoticeLink+'</a>')},LJLink:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink">'+m.LJLink_WizardNoticeLink+'</a>')},image:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="image">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')}},p={},q; -function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd)a.note.hide();};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){o[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(o[D].node);q=true;t.execCommand(D);a.note.hide(true);}return false;};function C(){if(!window.switchedRteOn)a.note.hide(true);if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(o.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);v=1;x=D;E===true?C():u=setTimeout(C,1000);},hide:function(D){if(v){v=0;if(u)u=clearTimeout(u);if(y.parentNode)D===true?C():u=setTimeout(C,500);}}};};var s=f;s.$block['lj-template']=1;s.$block['lj-raw']=1;s.$block['lj-cut']=1;s.$block['lj-spoiler']=1;s.$block['lj-poll']=1;s.$block['lj-repost']=1;s.$block['lj-pq']=1;s.$block['lj-pi']=1;s.$empty['lj-random']=1;s.$nonEditable['lj-template']=1;s['lj-template']={};s['lj-map']={};s['lj-repost']={};s['lj-raw']=s.div;s['lj-poll']={'lj-pq':1};s['lj-pq']={'#':1,'lj-pi':1};s['lj-pi']={'#':1};s.$block.iframe=s.$inline.iframe;delete s.$inline.iframe;e.extend(s['lj-cut']={},s.$block);e.extend(s['lj-spoiler']={},s.$block);e.extend(s['lj-cut'],s.$inline);e.extend(s['lj-spoiler'],s.$inline);e.extend(s.div,s.$block);e.extend(s.$body,s.$block);delete s['lj-cut']['lj-cut'];j.add('livejournal_old',{init:function(t){function u(B){var C=B.data.element||B.data.getTarget(); +function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd)a.note.hide();};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){o[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(o[D].node);q=true;t.execCommand(D);a.note.hide(true);}return false;};function C(){if(!window.switchedRteOn)a.note.hide(true);if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(o.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);v=1;x=D;E===true?C():u=setTimeout(C,1000);},hide:function(D){if(v){v=0;if(u)u=clearTimeout(u);if(y.parentNode)D===true?C():u=setTimeout(C,500);}}};};var s=f;s.$block['lj-template']=1;s.$block['lj-raw']=1;s.$block['lj-cut']=1;s.$block['lj-spoiler']=1;s.$block['lj-poll']=1;s.$block['lj-repost']=1;s.$block['lj-pq']=1;s.$block['lj-pi']=1;s.$nonEditable['lj-template']=1;s['lj-template']={};s['lj-map']={};s['lj-repost']={};s['lj-raw']=s.div;s['lj-poll']={'lj-pq':1};s['lj-pq']={'#':1,'lj-pi':1};s['lj-pi']={'#':1};s.$block.iframe=s.$inline.iframe;delete s.$inline.iframe;e.extend(s['lj-cut']={},s.$block);e.extend(s['lj-spoiler']={},s.$block);e.extend(s['lj-cut'],s.$inline);e.extend(s['lj-spoiler'],s.$inline);e.extend(s.div,s.$block);e.extend(s.$body,s.$block);delete s['lj-cut']['lj-cut'];j.add('livejournal_old',{init:function(t){function u(B){var C=B.data.element||B.data.getTarget(); if(C.type!=1)C=C.getParent();while(C){var D=C.getAttribute('lj-cmd');if(o.hasOwnProperty(D)){var E=t.getCommand(D);if(E.state==1){var F=new d.selection(t.document);o[D].node=C.is('body')?new h.get(C.getWindow().$.frameElement):C;F.selectElement(o[D].node);B.data.dialog='';q=true;E.exec();break;}}C=C.getParent();}};function v(B){var C=this;if(C.$!=t.document.$){C.$.className=(C.frame.getAttribute('lj-class')||'')+' lj-selected';if(C.getAttribute('lj-cmd')=='LJPollLink')C.frame.setStyle('height',C.getDocument().$.body.scrollHeight+'px');new d.selection(t.document).selectElement(C.frame);}B.data.getKey()==1&&B.data.preventDefault();};function w(B){if(B.data.getKey()==46){var C=new d.selection(t.document).getRanges(),D=C.length;while(D--)C[D].deleteContents();}};function x(){var E=this;var B=E.$.contentWindow,C=B.document,D=new h.get(C.body);if(D.on){D.on('dblclick',u);D.on('click',v);D.on('keyup',w);if(E.getAttribute('lj-cmd')=='LJPollLink'&&E.hasAttribute('style'))C.body.className='lj-poll lj-poll-open';}C=new h.get(C);C.frame=D.frame=E;};function y(){var B=t.document.getElementsByTag('iframe'),C=B.count(),D,E,F,G,H;q=false;while(C--){D=B.getItem(C),E=D.getAttribute('lj-cmd'),F=D.$.contentWindow,G=F.document,H=D.getAttribute('lj-style')||'';D.removeListener('load',x);D.on('load',x);G.open();G.write('<!DOCTYPE html><html style="'+H+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body scroll="no" class="'+(D.getAttribute('lj-class')||'')+'" style="'+H+'" '+(E?'lj-cmd="'+E+'"':'')+'>'+decodeURIComponent(D.getAttribute('lj-content')||'')+'</body>'+'</html>');G.close();}};function z(B){if(t.onSwitch===true){delete t.onSwitch;return;}var C,D=B.name=='click',E=B.name=='selectionChange'||D,F=B.data.element||B.data.getTarget(),G,H;if(D&&(B.data.getKey()==1||B.data.$.button==0))B.data.preventDefault();if(F.type!=1)F=F.getParent();G=F;if(E){var I=t.document.getElementsByTag('iframe'),J,K;if(D&&G.is('iframe')){K=G.$.contentWindow.document.body;K.className=(G.getAttribute('lj-class')||'')+' lj-selected';if(G.getAttribute('lj-cmd')=='LJPollLink')G.setStyle('height',K.scrollHeight+'px');}for(var L=0,M=I.count();L<M;L++){J=I.getItem(L);if(J.$!=G.$){K=J.$.contentWindow.document.body;K.className=J.getAttribute('lj-class')||'';if(J.getAttribute('lj-cmd')=='LJPollLink'&&K.className=='lj-poll')J.removeAttribute('style');}}}do{var N=G.getAttribute('lj-cmd');if(!N&&G.type==1){var O=G.getParent();if(G.is('img')&&O.getParent()&&!O.getParent().hasAttribute('lj:user')){N='image'; G.setAttribute('lj-cmd',N);}else if(G.is('a')&&!O.hasAttribute('lj:user')){N='LJLink';G.setAttribute('lj-cmd',N);}}if(N&&o.hasOwnProperty(N)){if(E){o[N].node=G;t.getCommand(N).setState(1);}(C||(C={}))[N]={content:o[N].html,node:G};}}while(G=G.getParent());if(E)for(H in o){if(o.hasOwnProperty(H)&&(!C||!C.hasOwnProperty(H))){delete o[H].node;t.getCommand(H).setState(2);}}C?a.note.show(C):a.note.hide();};(function(){function B(G){return G.slice(-2)=='/>'?G:G.slice(0,-1)+'/>';};function C(G){var H=new Poll(G);return '<iframe class="lj-poll-wrap" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+H.outputLJtags()+'" lj-content="'+H.outputHTML()+'"></iframe>';};function D(G,H,I){return '<iframe class="lj-embed-wrap" lj-class="lj-embed" frameborder="0" allowTransparency="true" lj-data="'+encodeURIComponent(I)+'"'+H+'></iframe>';};function E(G,H,I,J){return H+I.replace(/\n/g,'')+J;};function F(G,H,I,J){var K=H||I||m.LJRepost_Value,L=J.replace(/"/g,'"');J=L+('<br /><input type="button" value="'+K+'" />').replace(/"/g,'"');return '<iframe class="lj-repost-wrap" lj-class="lj-repost" frameborder="0" allowTransparency="true" lj-text="'+L+'" lj-button="'+K+'" lj-content="'+J+'"></iframe>';};t.dataProcessor.toHtml=function(G,H){G=G.replace(/<lj [^>]*?>/gi,B).replace(/<lj-map [^>]*?>/gi,B).replace(/<lj-template[^>]*?>/gi,B).replace(/(<lj-cut[^>]*?)\/>/gi,'$1>').replace(/<((?!br)[^\s>]+)([^>]*?)\/>/gi,'<$1$2></$1>').replace(/<lj-poll.*?>[\s\S]*?<\/lj-poll>/gi,C).replace(/<lj-repost\s*(?:button\s*=\s*(?:"([^"]*?)")|(?:"([^']*?)"))?.*?>([\s\S]*?)<\/lj-repost>/gi,F).replace(/<lj-embed(.*?)>([\s\S]*?)<\/lj-embed>/gi,D);if(!$('event_format').checked){G=G.replace(/(<lj-raw.*?>)([\s\S]*?)(<\/lj-raw>)/gi,E);if(!window.switchedRteOn)G=G.replace(/\n/g,'<br />');}G=a.htmlDataProcessor.prototype.toHtml.call(this,G,H);if(c)G='<xml:namespace ns="livejournal" prefix="lj" />'+G;return G;};})();t.dataProcessor.toDataFormat=function(B,C){B=a.htmlDataProcessor.prototype.toDataFormat.call(this,B,C);if(!$('event_format').checked)B=B.replace(/<br\s*\/>/gi,'\n');return B.replace(/\t/g,' ');};t.dataProcessor.writer.indentationChars='';t.dataProcessor.writer.lineBreakChars='';t.on('selectionChange',z);t.on('doubleclick',u);t.on('afterCommandExec',y);t.on('dialogHide',y);t.on('dataReady',function(){if(!a.note)r(t);if(c){t.document.getBody().on('dragend',y);t.document.getBody().on('paste',function(){setTimeout(y,0);});}t.document.on('click',z);t.document.on('mouseout',a.note.hide); t.document.on('mouseover',z);t.document.getBody().on('keyup',w);y();});(function(){var B=top.Site.siteroot+'/tools/endpoints/ljuser.bml';function C(D,E,F){if(D.error){alert(D.error);return;}if(D.success){D.ljuser=D.ljuser.replace('<span class="useralias-value">*</span>','');p[E]=D.ljuser;var G=new h.createFromHtml(D.ljuser);G.setAttribute('lj-cmd','LJUserLink');if(F)F.$.parentNode.replaceChild(G.$,F.$);else t.insertElement(G);}};t.addCommand('LJUserLink',{exec:function(D){var E='',F=new d.selection(D.document),G=o.LJUserLink.node,H;if(G){a.note&&a.note.hide(true);H=o.LJUserLink.node.getElementsByTag('b').getItem(0).getText();E=prompt(m.UserPrompt,H);}else if(F.getType()==2)E=F.getSelectedText();if(E=='')E=prompt(m.UserPrompt,E);if(!E||H==E)return;parent.HTTPReq.getJSON({data:parent.HTTPReq.formEncoded({username:E}),method:'POST',url:B,onData:function(I){C(I,E,G);}});}});t.ui.addButton('LJUserLink',{label:m.LJUser,command:'LJUserLink'});})();if(window.ljphotoEnabled&&window.ljphotoMigrationStatus===LJ.getConst('LJPHOTO_MIGRATION_NONE'))t.ui.addButton('image',{label:m.LJImage_Title,command:'image'});else{t.addCommand('LJImage',{exec:function(){if(typeof InOb!=='undefined')InOb.handleInsertImageBeta('upload');else jQuery('.b-updatepage-event-section').editor('handleImageUpload','upload');},editorFocus:false});t.ui.addButton('image',{label:m.LJImage_Title,command:'LJImage'});}t.addCommand('LJLink',{exec:function(B){!q&&this.state==1?B.execCommand('unlink'):B.openDialog('link');a.note&&a.note.hide(true);},editorFocus:false});t.ui.addButton('LJLink',{label:t.lang.link.toolbar,command:'LJLink'});(function(){function B(C){if(C&&C.length&&window.switchedRteOn){var D=new h('iframe',t.document);D.setAttribute('lj-data',encodeURIComponent(C));D.setAttribute('lj-class','lj-embed');D.setAttribute('class','lj-embed-wrap');D.setAttribute('frameBorder',0);D.setAttribute('allowTransparency','true');t.insertElement(D);y();}};t.addCommand('LJEmbedLink',{exec:function(){top.LJ_IPPU.textPrompt(m.LJEmbedPromptTitle,m.LJEmbedPrompt,B,{width:'350px'});}});t.ui.addButton('LJEmbedLink',{label:m.LJEmbed,command:'LJEmbedLink'});})();function A(B,C,D){var E,F=o[C].node;if(F){if(E=prompt(D.title,F.getAttribute('text')||D.text))if(E==D.text)F.removeAttribute('text');else F.setAttribute('text',E);}else{if(E=prompt(D.title,D.text)){t.focus();var G=new d.selection(t.document),H=G.getRanges(),I=new h('iframe',t.document),J=I.clone();I.setAttribute('lj-cmd',C);I.setAttribute('lj-class',B+' '+B+'-open'); @@ -133,7 +133,7 @@ if(Q&&Q.checked||R&&!P.htmlOpt&&(R.indexOf(P.abbr)+1||R.indexOf(P.id)+1)){K.push(P.id);L+=P.html;}if(Q&&n[O]&&Q.checked!=n[O].checked)N=true;}L+='</span>';if(K.length){if(M){o.LJLike.node.setAttribute('buttons',K.join(','));o.LJLike.node.setAttribute('lj-content',encodeURIComponent(L));o.LJLike.node.removeAttribute('defaults');}else{M=new h('iframe',t.document);M.setAttribute('lj-class','lj-like');M.setAttribute('class','lj-like-wrap');M.setAttribute('buttons',K.join(','));M.setAttribute('lj-content',encodeURIComponent(L));M.setAttribute('lj-cmd','LJLike');M.setAttribute('frameBorder',0);M.setAttribute('allowTransparency','true');M.setAttribute('defaults',!N);t.insertElement(M);}}else if(M)o.LJLike.node.remove();F.hide();}}),a.dialog.cancelButton];b.mac&&J.reverse();return{title:m.LJLike_name,width:145,height:Site.remote_is_sup?180:145,resizable:false,contents:[{id:'LJLike_Options',elements:[{type:'html',html:D}]}],onShow:function(){var K=t.getCommand('LJLike'),L=E=0,M=K.state==1,N=o.LJLike.node&&o.LJLike.node.getAttribute('buttons');a.note&&a.note.hide(true);for(;L<C;L++){var O=N?!!(N.indexOf(n[L].abbr)+1||N.indexOf(n[L].id)+1):n[L].checked,P=document.getElementById('like-'+n[L].abbr);if(P){if(O&&!M)E++;P.checked=O;}}if(E>0)F.getButton('LJLike_Ok').getElement().removeClass('btn-disabled');},onLoad:function(){F=this;G=F.parts.contents.getElementsByTag('input');for(var K=0;K<C;K++){var L=G.getItem(K);L&&L.on('click',B);}},buttons:J};});t.addCommand('LJLike',new a.dialogCommand('LJLikeDialog'));t.ui.addButton('LJLike',{label:m.LJLike_name,command:'LJLike'});})();},afterInit:function(t){var u=t.dataProcessor;function v(w,x,y,z){z=z||'text';var A=new a.htmlParser.element('iframe');A.attributes['lj-class']=x+' '+x+'-open';A.attributes['class']=x+'-wrap';A.attributes['lj-cmd']=y;A.attributes.frameBorder=0;A.attributes.allowTransparency='true';if(w.attributes.hasOwnProperty(z))A.attributes.text=w.attributes[z];w.children.unshift(A);var B=new a.htmlParser.element('iframe');B.attributes['lj-class']=x+' '+x+'-close';B.attributes['class']=x+'-wrap';B.attributes.frameBorder=0;B.attributes.allowTransparency='true';w.children.push(B);delete w.name;};u.dataFilter.addRules({elements:{'lj-like':function(w){var x=[],y=new a.htmlParser.element('iframe');y.attributes['lj-class']='lj-like';y.attributes['class']='lj-like-wrap';if(w.attributes.hasOwnProperty('style'))y.attributes['lj-style']=w.attributes.style;y.attributes['lj-cmd']='LJLike';y.attributes['lj-content']='<span class="lj-like-wrapper">'; y.attributes.frameBorder=0;y.attributes.allowTransparency='true';var z=w.attributes.buttons&&w.attributes.buttons.split(',')||n.defaultButtons,A=w.attributes.buttons?true:false,B=z.length;for(var C=0;C<B;C++){var D=z[C].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),E=n[D];if(E&&(A||E.checked)){y.attributes['lj-content']+=encodeURIComponent(E.html);x.push(D);}}if(!w.attributes.buttons)y.attributes.defaults=true;y.attributes['lj-content']+='</span>';y.attributes.buttons=x.join(',');return y;},lj:(function(){function w(x){var y=t.document.getElementsByTag('lj');for(var z=0,A=y.count();z<A;z++){var B=y.getItem(z);if(B){var C=B.getAttribute('user'),D=B.getAttribute('title');if(x==(D?C+':'+D:C)){var E=new h.createFromHtml(p[x],t.document);E.setAttribute('lj-cmd','LJUserLink');B.insertBeforeMe(E);B.remove();}}}t.removeListener('dataReady',w);};return function(x){var y=x.attributes.user;if(!y||!y.length)return;var z=x.attributes.title,A=z?y+':'+z:y;if(p.hasOwnProperty(A)){var B=new a.htmlParser.fragment.fromHtml(p[A]).children[0];B.attributes['lj-cmd']='LJUserLink';return B;}else{var C={username:y};if(z)C.usertitle=z;HTTPReq.getJSON({data:HTTPReq.formEncoded(C),method:'POST',url:Site.siteroot+'/tools/endpoints/ljuser.bml',onError:function(D){alert(D+' "'+y+'"');},onData:function(D){if(D.error)return alert(D.error+' "'+y+'"');if(!D.success)return;p[A]=D.ljuser;D.ljuser=D.ljuser.replace('<span class="useralias-value">*</span>','');if(t.document)w(A);else t.on('dataReady',function(){w(A);});}});}};})(),'lj-map':function(w){var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.url?encodeURIComponent(w.attributes.url):'';x.attributes['lj-class']='lj-map';x.attributes['class']='lj-map-wrap';x.attributes['lj-content']='<p class="lj-map">map</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},'lj-raw':function(w){w.name='lj:raw';},'lj-wishlist':function(w){w.name='lj:wishlist';},'lj-template':function(w){var x=new a.htmlParser.element('iframe');x.attributes['lj-class']='lj-template';x.attributes['class']='lj-template-wrap';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';x.attributes['lj-attributes']=encodeURIComponent(LiveJournal.JSON.stringify(w.attributes));return x; },'lj-cut':function(w){v(w,'lj-cut','LJCut');},'lj-spoiler':function(w){v(w,'lj-spoiler','LJSpoiler','title');},iframe:function(w){if(w.attributes['lj-class']&&w.attributes['lj-class'].indexOf('lj-')+1==1)return w;var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.src?encodeURIComponent(w.attributes.src):'';x.attributes['lj-class']='lj-iframe';x.attributes['class']='lj-iframe-wrap';x.attributes['lj-content']='<p class="lj-iframe">iframe</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},a:function(w){if(w.parent.attributes&&!w.parent.attributes['lj:user'])w.attributes['lj-cmd']='LJLink';},img:function(w){var x=w.parent&&w.parent.parent;if(!x||!x.attributes||!x.attributes['lj:user'])w.attributes['lj-cmd']='image';},div:function(w){if(w.attributes['class']=='lj-cut')v(w,'lj-cut','LJCut');}}},5);u.htmlFilter.addRules({elements:{iframe:function(w){var x=w,y=false,z='text',A=/lj-[a-z]+/i.exec(w.attributes['lj-class']);if(A)A=A[0];else return w;switch(A){case 'lj-like':x=new a.htmlParser.element('lj-like');if(w.attributes.defaults!='true')x.attributes.buttons=w.attributes.buttons;if(w.attributes.hasOwnProperty('lj-style'))x.attributes.style=w.attributes['lj-style'];x.isEmpty=true;x.isOptionalClose=true;break;case 'lj-embed':x=new a.htmlParser.element('lj-embed');x.attributes.id=w.attributes.id;if(w.attributes.hasOwnProperty('source_user'))x.attributes.source_user=w.attributes.source_user;x.children=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children;x.isOptionalClose=true;break;case 'lj-map':x=new a.htmlParser.element('lj-map');x.attributes.url=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.isOptionalClose=x.isEmpty=true;break;case 'lj-iframe':x=new a.htmlParser.element('iframe');x.attributes.src=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.attributes.frameBorder=0;break;case 'lj-poll':x=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children[0]; -break;case 'lj-repost':x=new a.htmlParser.element('lj-repost');x.attributes.button=w.attributes['lj-button'];x.children=new a.htmlParser.fragment.fromHtml(w.attributes['lj-text']).children;break;case 'lj-template':x=new a.htmlParser.element('lj-template');x.attributes=LiveJournal.JSON.parse(encodeURIComponent(w.attributes['lj-attributes']));x.isOptionalClose=x.isEmpty=true;break;case 'lj-spoiler':y=true;z='title';case 'lj-cut':if(w.attributes['lj-class'].indexOf(A+'-open')+1){var B=w.next,C=0;x=new a.htmlParser.element(A);if(w.attributes.hasOwnProperty('text'))x.attributes[z]=w.attributes.text;while(B){if(B.name=='iframe'){var D=B.attributes['lj-class'];if(D.indexOf(A+'-close')+1){if(y&&C)C--;else{x.next=B;break;}}else if(D.indexOf(A+'-open')+1)if(y)C++;else{x.next=B;break;}}B.parent.children.remove(B);x.add(B);var E=B.next;B.next=null;B=E;}}else x=false;break;default:if(!w.children.length)x=false;}return x;},span:function(w){var x=w.attributes['lj:user'];if(x){var y=new a.htmlParser.element('lj');y.attributes.user=x;try{var z=w.children[1].children[0].children[0].value;}catch(A){return false;}if(z&&z!=x)y.attributes.title=z;y.isOptionalClose=y.isEmpty=true;return y;}else if(w.attributes.style=='display: none;'||!w.children.length)return false;},div:function(w){if(!w.children.length)return false;},'lj:raw':function(w){w.name='lj-raw';},'lj:wishlist':function(w){w.name='lj-wishlist';}},attributes:{'lj-cmd':function(){return false;},contenteditable:function(){return false;}}});},requires:['fakeobjects','domiterator']});})();(function(){var m=a.lang[a.lang.detect()]||{};jQuery.extend(m,LJ.pageVar('rtedata'));if(Site.page.ljpost)a.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;else a.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;function n(t,u,v){v=v||{};v&&jQuery.extend(v,{fromDoubleClick:this.execFromEditor});LiveJournal.run_hook('rteButton',u,jQuery('.cke_button_'+t),v);this.execFromEditor=false;};var o=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',checked:true,html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',checked:true,html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',checked:true,html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',checked:true,html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',checked:Site.remote_is_sup?true:false,html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',checked:false,html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],p={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJLink2:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink2">'+m.LJLink_WizardNoticeLink+'</a>')},LJImage:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="LJImage">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')},LJEmbedLink:{},LJMap:{}},q={}; +break;case 'lj-repost':x=new a.htmlParser.element('lj-repost');x.attributes.button=w.attributes['lj-button'];x.children=new a.htmlParser.fragment.fromHtml(w.attributes['lj-text']).children;break;case 'lj-template':x=new a.htmlParser.element('lj-template');x.attributes=LiveJournal.JSON.parse(encodeURIComponent(w.attributes['lj-attributes']));x.isOptionalClose=x.isEmpty=true;break;case 'lj-spoiler':y=true;z='title';case 'lj-cut':if(w.attributes['lj-class'].indexOf(A+'-open')+1){var B=w.next,C=0;x=new a.htmlParser.element(A);if(w.attributes.hasOwnProperty('text'))x.attributes[z]=w.attributes.text;while(B){if(B.name=='iframe'){var D=B.attributes['lj-class'];if(D.indexOf(A+'-close')+1){if(y&&C)C--;else{x.next=B;break;}}else if(D.indexOf(A+'-open')+1)if(y)C++;else{x.next=B;break;}}B.parent.children.remove(B);x.add(B);var E=B.next;B.next=null;B=E;}}else x=false;break;default:if(!w.children.length)x=false;}return x;},span:function(w){var x=w.attributes['lj:user'];if(x){var y=new a.htmlParser.element('lj');y.attributes.user=x;try{var z=w.children[1].children[0].children[0].value;}catch(A){return false;}if(z&&z!=x)y.attributes.title=z;y.isOptionalClose=y.isEmpty=true;return y;}else if(w.attributes.style=='display: none;'||!w.children.length)return false;},div:function(w){if(!w.children.length)return false;},'lj:raw':function(w){w.name='lj-raw';},'lj:wishlist':function(w){w.name='lj-wishlist';}},attributes:{'lj-cmd':function(){return false;},contenteditable:function(){return false;}}});},requires:['fakeobjects','domiterator']});})();(function(){a.editor.prototype.lightSetData=function(t){this.document.getBody().setHtml(this.dataProcessor.toHtml(t));this.fire('contentDom');};var m=a.lang[a.lang.detect()]||{};jQuery.extend(m,LJ.pageVar('rtedata'));if(Site.page.ljpost)a.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;else a.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;function n(t,u,v){v=v||{};v&&jQuery.extend(v,{fromDoubleClick:this.execFromEditor});LiveJournal.run_hook('rteButton',u,jQuery('.cke_button_'+t),v);this.execFromEditor=false;};var o=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',checked:true,html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',checked:true,html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',checked:true,html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',checked:true,html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',checked:Site.remote_is_sup?true:false,html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',checked:false,html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],p={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJLink2:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink2">'+m.LJLink_WizardNoticeLink+'</a>')},LJImage:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="LJImage">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')},LJEmbedLink:{},LJMap:{}},q={}; function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd){}};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){p[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(p[D].node);t.execFromEditor=true;t.execCommand(D);}return false;};function C(){if(!window.switchedRteOn){}if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(p.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);... (truncated)