Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5948)
+++ /CKEditor/trunk/CHANGES.html	(revision 5949)
@@ -70,4 +70,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/6332">#6332</a> : IE: V2 skin bottom dialog's border broken.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/5646">#5646</a> : Parser incorreclty removes inline element when there's only one comment node enclosed.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6189">#6189</a> : Minor code size reduction.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/6427">#6427</a> : Ukrainian;</li>
Index: /CKEditor/trunk/_source/plugins/a11yhelp/dialogs/a11yhelp.js
===================================================================
--- /CKEditor/trunk/_source/plugins/a11yhelp/dialogs/a11yhelp.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/a11yhelp/dialogs/a11yhelp.js	(revision 5949)
@@ -7,5 +7,5 @@
 {
 	var lang = editor.lang.accessibilityHelp,
-		id = CKEDITOR.tools.getNextNumber();
+		id = CKEDITOR.tools.getNextId();
 
 	// CharCode <-> KeyChar.
@@ -126,6 +126,6 @@
 	function buildHelpContents()
 	{
-		var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="cke_' + id + '_arialbl" tabIndex="-1">%1</div>' +
-				'<span id="cke_' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
+		var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' +
+				'<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
 			sectionTpl = '<h1>%1</h1><dl>%2</dl>',
 			itemTpl = '<dt>%1</dt><dd>%2</dd>';
Index: /CKEditor/trunk/_source/plugins/basicstyles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/basicstyles/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/basicstyles/plugin.js	(revision 5949)
@@ -30,13 +30,13 @@
 		};
 
-		var config = editor.config;
-		var lang = editor.lang;
+		var config = editor.config, 
+			lang = editor.lang;
 
-		addButtonCommand( 'Bold'		, lang.bold			, 'bold'		, config.coreStyles_bold );
+		addButtonCommand( 'Bold'		, lang.bold		, 'bold'		, config.coreStyles_bold );
 		addButtonCommand( 'Italic'		, lang.italic		, 'italic'		, config.coreStyles_italic );
-		addButtonCommand( 'Underline'	, lang.underline	, 'underline'	, config.coreStyles_underline );
+		addButtonCommand( 'Underline'	, lang.underline		, 'underline'	, config.coreStyles_underline );
 		addButtonCommand( 'Strike'		, lang.strike		, 'strike'		, config.coreStyles_strike );
-		addButtonCommand( 'Subscript'	, lang.subscript	, 'subscript'	, config.coreStyles_subscript );
-		addButtonCommand( 'Superscript'	, lang.superscript	, 'superscript'	, config.coreStyles_superscript );
+		addButtonCommand( 'Subscript'	, lang.subscript		, 'subscript'	, config.coreStyles_subscript );
+		addButtonCommand( 'Superscript'	, lang.superscript		, 'superscript'	, config.coreStyles_superscript );
 	}
 });
Index: /CKEditor/trunk/_source/plugins/bidi/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/bidi/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/bidi/plugin.js	(revision 5949)
@@ -6,6 +6,6 @@
 (function()
 {
-	var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 };
-	var directSelectionGuardElements = {};
+	var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
+		directSelectionGuardElements = {};
 	CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr:1, p:1, div:1, li:1 } );
 
Index: /CKEditor/trunk/_source/plugins/button/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/button/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/button/plugin.js	(revision 5949)
@@ -71,5 +71,5 @@
 	{
 		var env = CKEDITOR.env,
-			id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(),
+			id = this._.id = CKEDITOR.tools.getNextId(),
 			classes = '',
 			command = this.command, // Get the command name.
Index: /CKEditor/trunk/_source/plugins/clipboard/dialogs/paste.js
===================================================================
--- /CKEditor/trunk/_source/plugins/clipboard/dialogs/paste.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/clipboard/dialogs/paste.js	(revision 5949)
@@ -11,8 +11,8 @@
 	function onPasteFrameLoad( win )
 	{
-		var doc =  new CKEDITOR.dom.document( win.document ),
+		var doc = new CKEDITOR.dom.document( win.document ),
 			docElement = doc.$;
 
-		doc.getById( "cke_actscrpt" ).remove();
+		doc.getById( 'cke_actscrpt' ).remove();
 
 		CKEDITOR.env.ie ?
Index: /CKEditor/trunk/_source/plugins/clipboard/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/clipboard/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/clipboard/plugin.js	(revision 5949)
@@ -17,8 +17,8 @@
 			body = doc.getBody();
 
-		var	enabled = false;
+		var enabled = 0;
 		var onExec = function()
 		{
-			enabled = true;
+			enabled = 1;
 		};
 
@@ -169,9 +169,9 @@
 
 		// If the browser supports it, get the data directly
-		if (mode == 'text' && evt.data && evt.data.$.clipboardData)
+		if ( mode == 'text' && evt.data && evt.data.$.clipboardData )
 		{
 			// evt.data.$.clipboardData.types contains all the flavours in Mac's Safari, but not on windows.
 			var plain = evt.data.$.clipboardData.getData( 'text/plain' );
-			if (plain)
+			if ( plain )
 			{
 				evt.data.preventDefault();
@@ -255,5 +255,5 @@
 	function fixCut( editor )
 	{
-		if ( !CKEDITOR.env.ie || editor.document.$.compatMode == 'BackCompat' )
+		if ( !CKEDITOR.env.ie || CKEDITOR.env.quirks )
 			return;
 
@@ -349,5 +349,5 @@
 				{
 					var body = editor.document.getBody();
-					body.on( ( (mode == 'text' && CKEDITOR.env.ie) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',
+					body.on( ( (mode == 'text' && CKEDITOR.env.ie ) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',
 						function( evt )
 						{
Index: /CKEditor/trunk/_source/plugins/colorbutton/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/colorbutton/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/colorbutton/plugin.js	(revision 5949)
@@ -162,5 +162,5 @@
 
 			// Render the "More Colors" button.
-			if ( config.colorButton_enableMore )
+			if ( config.colorButton_enableMore === undefined || config.colorButton_enableMore )
 			{
 				output.push(
@@ -175,5 +175,5 @@
 								lang.more,
 							'</a>' +
-						'</td>' );	// It is later in the code.
+						'</td>' );	// tr is later in the code.
 			}
 
@@ -192,5 +192,4 @@
  * config.colorButton_enableMore = false;
  */
-CKEDITOR.config.colorButton_enableMore = true;
 
 /**
Index: /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js
===================================================================
--- /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js	(revision 5949)
@@ -15,11 +15,9 @@
 		var dialog;
 
-		function spacer()
-		{
-			return {
-				type : 'html',
-				html : '&nbsp;'
-			};
-		}
+		var spacer =
+		{
+			type : 'html',
+			html : '&nbsp;'
+		};
 
 		function clearSelected()
@@ -31,9 +29,9 @@
 		function updateSelected( evt )
 		{
-			if ( ! (evt instanceof CKEDITOR.dom.event ) )
+			if ( ! ( evt instanceof CKEDITOR.dom.event ) )
 				evt = new CKEDITOR.dom.event( evt );
 
 			var target = evt.getTarget(),
-					color;
+				color;
 
 			if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) )
@@ -43,5 +41,5 @@
 		function updateHighlight( event )
 		{
-			if ( ! (event instanceof CKEDITOR.dom.event ) )
+			if ( ! ( event instanceof CKEDITOR.dom.event ) )
 				event = event.data;
 
@@ -62,11 +60,9 @@
 		}
 
-		var onMouseout = $tools.addFunction( clearHighlight );
-
-		var onClick = updateSelected,
-				onClickHandler = CKEDITOR.tools.addFunction( onClick );
-
-		var onFocus = updateHighlight,
-				onBlur = clearHighlight;
+		var onMouseout = $tools.addFunction( clearHighlight ),
+			onClick = updateSelected,
+			onClickHandler = CKEDITOR.tools.addFunction( onClick ),
+			onFocus = updateHighlight,
+			onBlur = clearHighlight;
 
 		var onKeydownHandler = CKEDITOR.tools.addFunction( function( ev )
@@ -75,6 +71,6 @@
 			var element = ev.getTarget();
 			var relative, nodeToMove;
-			var keystroke = ev.getKeystroke();
-			var rtl = editor.lang.dir == 'rtl';
+			var keystroke = ev.getKeystroke(),
+				rtl = editor.lang.dir == 'rtl';
 
 			switch ( keystroke )
@@ -178,5 +174,5 @@
 		{
 			// Create the base colors array.
-			var aColors = ['00','33','66','99','cc','ff'];
+			var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
 
 			// This function combines two ranges of three values from the color array into a row.
@@ -185,5 +181,5 @@
 				for ( var i = rangeA ; i < rangeA + 3 ; i++ )
 				{
-					var row = table.$.insertRow(-1);
+					var row = table.$.insertRow( -1 );
 
 					for ( var j = rangeB ; j < rangeB + 3 ; j++ )
@@ -288,5 +284,5 @@
 									}
 								},
-								spacer(),
+								spacer,
 								{
 									type : 'vbox',
@@ -321,5 +317,5 @@
 											}
 										},
-										spacer(),
+										spacer,
 										{
 											type : 'button',
Index: /CKEditor/trunk/_source/plugins/contextmenu/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/contextmenu/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/contextmenu/plugin.js	(revision 5949)
@@ -26,5 +26,5 @@
 	$ : function( editor )
 	{
-		this.id = 'cke_' + CKEDITOR.tools.getNextNumber();
+		this.id = CKEDITOR.tools.getNextId();
 		this.editor = editor;
 		this._.listeners = [];
Index: /CKEditor/trunk/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/dialog/plugin.js	(revision 5949)
@@ -34,4 +34,5 @@
 (function()
 {
+	var cssLength = CKEDITOR.tools.cssLength;
 	function isTabVisible( tabId )
 	{
@@ -502,5 +503,5 @@
 		}
 
-		this.parts['tabs'].on( 'click', function( evt )
+		this.parts[ 'tabs' ].on( 'click', function( evt )
 				{
 					var target = evt.data.getTarget();
@@ -991,24 +992,21 @@
 			}
 
-			var selected = this._.tabs[id];
-			selected[0].addClass( 'cke_dialog_tab_selected' );
-
-			// [IE] a unvisible input[type='text'] will enlarge it's width
-			// if it's value is long when it show( #5649 )
-			// so we clear it's value before it shows and then recover it
+			var selected = this._.tabs[ id ];
+			selected[ 0 ].addClass( 'cke_dialog_tab_selected' );
+			
+			// [IE] an invisible input[type='text'] will enlarge it's width 
+			// if it's value is long when it shows, so we clear it's value
+			// before it shows and then recover it (#5649)
 			if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat )
 			{
-				clearOrRecoverTextInputValue( selected[1] );
-				selected[1].show();
+				clearOrRecoverTextInputValue( selected[ 1 ] );
+				selected[ 1 ].show();
 				setTimeout( function()
 				{
-					clearOrRecoverTextInputValue( selected[1], true );
+					clearOrRecoverTextInputValue( selected[ 1 ], 1 );
 				}, 0 );
 			}
 			else
-			{
-				selected[1].show();
-			}
-
+				selected[ 1 ].show();
 
 			this._.currentTabId = id;
@@ -1818,7 +1816,8 @@
 	{
 		var win = CKEDITOR.document.getWindow();
-		var backgroundColorStyle = editor.config.dialog_backgroundCoverColor || 'white',
-			backgroundCoverOpacity = editor.config.dialog_backgroundCoverOpacity,
-			baseFloatZIndex = editor.config.baseFloatZIndex,
+		var config = editor.config,
+			backgroundColorStyle = config.dialog_backgroundCoverColor || 'white',
+			backgroundCoverOpacity = config.dialog_backgroundCoverOpacity,
+			baseFloatZIndex = config.baseFloatZIndex,
 			coverKey = CKEDITOR.tools.genKey(
 					backgroundColorStyle,
@@ -2251,12 +2250,12 @@
 						{
 							if ( widths[i] )
-								styles.push( 'width:' + CKEDITOR.tools.cssLength( widths[i] ) );
+								styles.push( 'width:' + cssLength( widths[i] ) );
 						}
 						else
 							styles.push( 'width:' + Math.floor( 100 / childHtmlList.length ) + '%' );
 						if ( height )
-							styles.push( 'height:' + CKEDITOR.tools.cssLength( height ) );
+							styles.push( 'height:' + cssLength( height ) );
 						if ( elementDefinition && elementDefinition.padding != undefined )
-							styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
+							styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
 						if ( styles.length > 0 )
 							html.push( 'style="' + styles.join('; ') + '" ' );
@@ -2311,5 +2310,5 @@
 			vbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition )
 			{
-				if (arguments.length < 3 )
+				if ( arguments.length < 3 )
 					return;
 
@@ -2326,5 +2325,5 @@
 					if ( elementDefinition && elementDefinition.expand )
 						html.push( 'height:100%;' );
-					html.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ), ';' );
+					html.push( 'width:' + cssLength( width || '100%' ), ';' );
 					html.push( '"' );
 					html.push( 'align="', CKEDITOR.tools.htmlEncode(
@@ -2337,11 +2336,11 @@
 						html.push( '<tr><td role="presentation" ' );
 						if ( width )
-							styles.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ) );
+							styles.push( 'width:' + cssLength( width || '100%' ) );
 						if ( heights )
-							styles.push( 'height:' + CKEDITOR.tools.cssLength( heights[i] ) );
+							styles.push( 'height:' + cssLength( heights[i] ) );
 						else if ( elementDefinition && elementDefinition.expand )
 							styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
 						if ( elementDefinition && elementDefinition.padding != undefined )
-							styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
+							styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
 						if ( styles.length > 0 )
 							html.push( 'style="', styles.join( '; ' ), '" ' );
Index: /CKEditor/trunk/_source/plugins/dialogadvtab/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialogadvtab/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/dialogadvtab/plugin.js	(revision 5949)
@@ -133,6 +133,4 @@
 						'default' : '',
 
-						onChange : function(){},
-
 						getStyle : function( name, defaultValue )
 						{
@@ -160,5 +158,5 @@
 							}
 
-							this.setValue( styles, true );
+							this.setValue( styles, 1 );
 
 						},
Index: /CKEditor/trunk/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 5949)
@@ -381,5 +381,5 @@
 						attributes.checked = 'checked';
 
-					if (typeof myDefinition.controlStyle != 'undefined')
+					if ( typeof myDefinition.controlStyle != 'undefined' )
 						myDefinition.style = myDefinition.controlStyle;
 
@@ -463,5 +463,5 @@
 						cleanInnerDefinition( labelDefinition );
 
-						if (typeof inputDefinition.controlStyle != 'undefined')
+						if ( typeof inputDefinition.controlStyle != 'undefined' )
 							inputDefinition.style = inputDefinition.controlStyle;
 
@@ -623,5 +623,5 @@
 					}
 
-					if (typeof myDefinition.controlStyle != 'undefined')
+					if ( typeof myDefinition.controlStyle != 'undefined' )
 						myDefinition.style = myDefinition.controlStyle;
 
@@ -932,5 +932,5 @@
 					this._.disabled = false;
 					var element = this.getElement();
-					element && element.removeClass( 'disabled' );
+					element && element.removeClass( 'cke_disabled' );
 				},
 
@@ -942,5 +942,5 @@
 				{
 					this._.disabled = true;
-					this.getElement().addClass( 'disabled' );
+					this.getElement().addClass( 'cke_disabled' );
 				},
 
@@ -1385,16 +1385,17 @@
 				reset : function()
 				{
-					var frameElement = CKEDITOR.document.getById( this._.frameId ),
+					var _ = this._,
+						frameElement = CKEDITOR.document.getById( _.frameId ),
 						frameDocument = frameElement.getFrameDocument(),
-						elementDefinition = this._.definition,
-						buttons = this._.buttons,
+						elementDefinition = _.definition,
+						buttons = _.buttons,
 						callNumber = this.formLoadedNumber,
 						unloadNumber = this.formUnloadNumber,
-						langDir = this._.dialog._.editor.lang.dir,
-						langCode = this._.dialog._.editor.langCode;
+						langDir = _.dialog._.editor.lang.dir,
+						langCode = _.dialog._.editor.langCode;
 
 					// The callback function for the iframe, but we must call tools.addFunction only once
 					// so we store the function number in this.formLoadedNumber
-					if (!callNumber)
+					if ( !callNumber )
 					{
 						callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction(
Index: /CKEditor/trunk/_source/plugins/div/dialogs/div.js
===================================================================
--- /CKEditor/trunk/_source/plugins/div/dialogs/div.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/div/dialogs/div.js	(revision 5949)
@@ -141,6 +141,6 @@
 
 			// Get all ranges from the selection.
-			var selection = editor.document.getSelection();
-			var ranges = selection.getRanges();
+			var selection = editor.document.getSelection(),
+				ranges = selection.getRanges();
 			var bookmarks = selection.createBookmarks();
 			var i, iterator;
@@ -438,5 +438,5 @@
 			onLoad : function()
 			{
-				setupFields.call(this);
+				setupFields.call( this );
 
 				// Preparing for the 'elementStyle' field.
Index: /CKEditor/trunk/_source/plugins/div/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/div/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/div/plugin.js	(revision 5949)
@@ -96,5 +96,5 @@
 					editor.contextMenu.addListener( function( element, selection )
 						{
-							if ( !element || element.isReadOnly())
+							if ( !element || element.isReadOnly() )
 								return null;
 
Index: /CKEditor/trunk/_source/plugins/domiterator/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/domiterator/plugin.js	(revision 5949)
@@ -21,9 +21,9 @@
 
 		this.range = range;
-		this.forceBrBreak = false;
+		this.forceBrBreak = 0;
 
 		// Whether include <br>s into the enlarged range.(#3730).
-		this.enlargeBr = true;
-		this.enforceRealBlocks = false;
+		this.enlargeBr = 1;
+		this.enforceRealBlocks = 0;
 
 		this._ || ( this._ = {} );
@@ -81,5 +81,5 @@
 				if ( this._.lastNode &&
 						this._.lastNode.type == CKEDITOR.NODE_TEXT &&
-						!CKEDITOR.tools.trim( this._.lastNode.getText( ) ) &&
+						!CKEDITOR.tools.trim( this._.lastNode.getText() ) &&
 						this._.lastNode.getParent().isBlockBoundary() )
 				{
@@ -113,11 +113,11 @@
 				// closeRange indicates that a paragraph boundary has been found,
 				// so the range can be closed.
-				var closeRange = false,
-						parentPre = currentNode.hasAscendant( 'pre' );
+				var closeRange = 0,
+					parentPre = currentNode.hasAscendant( 'pre' );
 
 				// includeNode indicates that the current node is good to be part
 				// of the range. By default, any non-element node is ok for it.
 				var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ),
-					continueFromSibling = false;
+					continueFromSibling = 0;
 
 				// If it is an element node, let's check if it can be part of the
@@ -133,5 +133,5 @@
 						// happen only if ForceBrBreak.
 						if ( nodeName == 'br' )
-							includeNode = true;
+							includeNode = 1;
 						else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' )
 						{
@@ -155,5 +155,5 @@
 						}
 
-						closeRange = true;
+						closeRange = 1;
 					}
 					else
@@ -172,5 +172,5 @@
 							continue;
 						}
-						includeNode = true;
+						includeNode = 1;
 					}
 				}
@@ -180,5 +180,5 @@
 					// other unicode whitespaces) before/after a block node.
 					if ( beginWhitespaceRegex.test( currentNode.getText() ) )
-						includeNode = false;
+						includeNode = 0;
 				}
 
@@ -205,5 +205,5 @@
 								&& !parentPre && { br : 1 } ) )
 						{
-							closeRange = true;
+							closeRange = 1;
 							isLast = isLast || ( parentNode.equals( lastNode) );
 							break;
@@ -211,7 +211,7 @@
 
 						currentNode = parentNode;
-						includeNode = true;
+						includeNode = 1;
 						isLast = ( currentNode.equals( lastNode ) );
-						continueFromSibling = true;
+						continueFromSibling = 1;
 					}
 				}
Index: /CKEditor/trunk/_source/plugins/editingblock/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/editingblock/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/editingblock/plugin.js	(revision 5949)
@@ -212,5 +212,4 @@
  * config.startupFocus = true;
  */
-CKEDITOR.config.startupFocus = false;
 
 /**
Index: /CKEditor/trunk/_source/plugins/enterkey/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/enterkey/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/enterkey/plugin.js	(revision 5949)
@@ -70,5 +70,5 @@
 				{
 					nextBlock.breakParent( node );
-					nextBlock.move( nextBlock.getNext(), true );
+					nextBlock.move( nextBlock.getNext(), 1 );
 				}
 			}
@@ -318,5 +318,5 @@
 		}
 		else
-			return enter( editor, editor.config.shiftEnterMode, true );
+			return enter( editor, editor.config.shiftEnterMode, 1 );
 	}
 
@@ -336,5 +336,5 @@
 			{
 				editor.fire( 'saveSnapshot' );	// Save undo step.
-				if ( mode == CKEDITOR.ENTER_BR || editor.getSelection().getStartElement().hasAscendant( 'pre', true ) )
+				if ( mode == CKEDITOR.ENTER_BR || editor.getSelection().getStartElement().hasAscendant( 'pre', 1 ) )
 					enterBr( editor, mode, null, forceMode );
 				else
Index: /CKEditor/trunk/_source/plugins/entities/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/entities/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/entities/plugin.js	(revision 5949)
@@ -215,5 +215,4 @@
  * config.entities_processNumerical = 'force';		//Convert from "&nbsp;" into "&#160;";
  */
-CKEDITOR.config.entities_processNumerical = false;
 
 /**
Index: /CKEditor/trunk/_source/plugins/filebrowser/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/filebrowser/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/filebrowser/plugin.js	(revision 5949)
@@ -341,5 +341,5 @@
 			for ( var i = 0 ; i < ids.length ; i++ )
 			{
-				if ( isConfigured( definition, tabId, ids[i]) )
+				if ( isConfigured( definition, tabId, ids[i] ) )
 					return true;
 			}
Index: /CKEditor/trunk/_source/plugins/find/dialogs/find.js
===================================================================
--- /CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/find/dialogs/find.js	(revision 5949)
@@ -72,5 +72,5 @@
 		// 1. Defined as full match style to avoid compromising ordinary text color styles.
 		// 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually.
-		var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return false; } },
+		var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return 0; } },
 			editor.config.find_highlight ) );
 
@@ -88,5 +88,5 @@
 			walker.guard = matchWord ? nonCharactersBoundary : null;
 			walker[ 'evaluator' ] = findEvaluator;
-			walker.breakOnFalse = true;
+			walker.breakOnFalse = 1;
 
 			this._ = {
@@ -112,5 +112,5 @@
 				var currentTextNode = this.textNode;
 				// Already at the end of document, no more character available.
-				if (  currentTextNode === null )
+				if ( currentTextNode === null )
 					return cursorStep.call( this );
 
@@ -143,5 +143,5 @@
 						// already reach document end.
 						if ( this._.matchWord && !currentTextNode
-							 ||this._.walker._.end )
+							 || this._.walker._.end )
 							break;
 
@@ -176,5 +176,5 @@
 				rangeLength : rangeLength,
 				highlightRange : null,
-				isMatched : false
+				isMatched : 0
 			};
 		};
@@ -512,5 +512,5 @@
 				if ( matchCyclic && !cyclicRerun )
 				{
-					this.searchRange = getSearchRange( true );
+					this.searchRange = getSearchRange( 1 );
 					this.matchRange = null;
 					return arguments.callee.apply( this,
@@ -532,5 +532,5 @@
 
 				// Successiveness of current replace/find.
-				var result = false;
+				var result = 0;
 
 				// 1. Perform the replace when there's already a match here.
@@ -562,5 +562,5 @@
 					this.matchRange._.isReplaced = true;
 					this.replaceCounter++;
-					result = true;
+					result = 1;
 				}
 				else
@@ -596,15 +596,16 @@
 		}
 
+		var lang = editor.lang.findAndReplace;
 		return {
-			title : editor.lang.findAndReplace.title,
+			title : lang.title,
 			resizable : CKEDITOR.DIALOG_RESIZE_NONE,
 			minWidth : 350,
 			minHeight : 165,
-			buttons : [ CKEDITOR.dialog.cancelButton ],		//Cancel button only.
+			buttons : [ CKEDITOR.dialog.cancelButton ],		// Cancel button only.
 			contents : [
 				{
 					id : 'find',
-					label : editor.lang.findAndReplace.find,
-					title : editor.lang.findAndReplace.find,
+					label : lang.find,
+					title : lang.find,
 					accessKey : '',
 					elements : [
@@ -617,5 +618,5 @@
 									type : 'text',
 									id : 'txtFindFind',
-									label : editor.lang.findAndReplace.findWhat,
+									label : lang.findWhat,
 									isChanged : false,
 									labelLayout : 'horizontal',
@@ -626,5 +627,5 @@
 									align : 'left',
 									style : 'width:100%',
-									label : editor.lang.findAndReplace.find,
+									label : lang.find,
 									onClick : function()
 									{
@@ -634,5 +635,5 @@
 													dialog.getValueOf( 'find', 'txtFindWordChk' ),
 													dialog.getValueOf( 'find', 'txtFindCyclic' ) ) )
-											alert( editor.lang.findAndReplace
+											alert( lang
 												.notFoundMsg );
 									}
@@ -650,5 +651,5 @@
 									isChanged : false,
 									style : 'margin-top:28px',
-									label : editor.lang.findAndReplace.matchCase
+									label : lang.matchCase
 								},
 								{
@@ -656,5 +657,5 @@
 									id : 'txtFindWordChk',
 									isChanged : false,
-									label : editor.lang.findAndReplace.matchWord
+									label : lang.matchWord
 								},
 								{
@@ -663,5 +664,5 @@
 									isChanged : false,
 									'default' : true,
-									label : editor.lang.findAndReplace.matchCyclic
+									label : lang.matchCyclic
 								}
 							]
@@ -671,5 +672,5 @@
 				{
 					id : 'replace',
-					label : editor.lang.findAndReplace.replace,
+					label : lang.replace,
 					accessKey : 'M',
 					elements : [
@@ -682,5 +683,5 @@
 									type : 'text',
 									id : 'txtFindReplace',
-									label : editor.lang.findAndReplace.findWhat,
+									label : lang.findWhat,
 									isChanged : false,
 									labelLayout : 'horizontal',
@@ -691,5 +692,5 @@
 									align : 'left',
 									style : 'width:100%',
-									label : editor.lang.findAndReplace.replace,
+									label : lang.replace,
 									onClick : function()
 									{
@@ -701,5 +702,5 @@
 													dialog.getValueOf( 'replace', 'txtReplaceWordChk' ),
 													dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) )
-											alert( editor.lang.findAndReplace
+											alert( lang
 												.notFoundMsg );
 									}
@@ -715,5 +716,5 @@
 									type : 'text',
 									id : 'txtReplace',
-									label : editor.lang.findAndReplace.replaceWith,
+									label : lang.replaceWith,
 									isChanged : false,
 									labelLayout : 'horizontal',
@@ -724,5 +725,5 @@
 									align : 'left',
 									style : 'width:100%',
-									label : editor.lang.findAndReplace.replaceAll,
+									label : lang.replaceAll,
 									isChanged : false,
 									onClick : function()
@@ -734,5 +735,5 @@
 
 										// Scope to full document.
-										finder.searchRange = getSearchRange( true );
+										finder.searchRange = getSearchRange( 1 );
 										if ( finder.matchRange )
 										{
@@ -751,9 +752,9 @@
 										if ( finder.replaceCounter )
 										{
-											alert( editor.lang.findAndReplace.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) );
+											alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) );
 											editor.fire( 'saveSnapshot' );
 										}
 										else
-											alert( editor.lang.findAndReplace.notFoundMsg );
+											alert( lang.notFoundMsg );
 									}
 								}
@@ -769,5 +770,5 @@
 									id : 'txtReplaceCaseChk',
 									isChanged : false,
-									label : editor.lang.findAndReplace
+									label : lang
 										.matchCase
 								},
@@ -776,5 +777,5 @@
 									id : 'txtReplaceWordChk',
 									isChanged : false,
-									label : editor.lang.findAndReplace
+									label : lang
 										.matchWord
 								},
@@ -784,5 +785,5 @@
 									isChanged : false,
 									'default' : true,
-									label : editor.lang.findAndReplace
+									label : lang
 										.matchCyclic
 								}
@@ -796,17 +797,17 @@
 				var dialog = this;
 
-				//keep track of the current pattern field in use.
+				// Keep track of the current pattern field in use.
 				var patternField, wholeWordChkField;
 
-				//Ignore initial page select on dialog show
-				var isUserSelect = false;
-				this.on('hide', function()
-						{
-							isUserSelect = false;
-						} );
-				this.on('show', function()
-						{
-							isUserSelect = true;
-						} );
+				// Ignore initial page select on dialog show
+				var isUserSelect = 0;
+				this.on( 'hide', function()
+						{
+							isUserSelect = 0;
+						});
+				this.on( 'show', function()
+						{
+							isUserSelect = 1;
+						});
 
 				this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc )
@@ -826,5 +827,5 @@
 								wholeWordChkFieldId );
 
-							// prepare for check pattern text filed 'keyup' event
+							// Prepare for check pattern text filed 'keyup' event
 							if ( !currPage.initialized )
 							{
@@ -834,6 +835,6 @@
 							}
 
+							// Synchronize fields on tab switch.
 							if ( isUserSelect )
-								// synchronize fields on tab switch.
 								syncFieldsBetweenTabs.call( this, pageId );
 						};
Index: /CKEditor/trunk/_source/plugins/flash/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/flash/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/flash/plugin.js	(revision 5949)
@@ -6,13 +6,7 @@
 (function()
 {
-	var flashFilenameRegex = /\.swf(?:$|\?)/i,
-		numberRegex = /^\d+(?:\.\d+)?$/;
+	var flashFilenameRegex = /\.swf(?:$|\?)/i;
 
-	function cssifyLength( length )
-	{
-		if ( numberRegex.test( length ) )
-			return length + 'px';
-		return length;
-	}
+	var cssifyLength = CKEDITOR.tools.cssLength;
 
 	function isFlashEmbed( element )
Index: /CKEditor/trunk/_source/plugins/floatpanel/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/floatpanel/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/floatpanel/plugin.js	(revision 5949)
@@ -17,12 +17,6 @@
 	{
 		// Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level]
-		var key =
-			doc.getUniqueId() +
-			'-' + parentElement.getUniqueId() +
-			'-' + editor.skinName +
-			'-' + editor.lang.dir +
-			( ( editor.uiColor && ( '-' + editor.uiColor ) ) || '' ) +
-			( ( definition.css && ( '-' + definition.css ) ) || '' ) +
-			( ( level && ( '-' + level ) ) || '' );
+		var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir,
+			editor.uiColor || '', definition.css || '', level || '' );
 
 		var panel = panels[ key ];
@@ -47,5 +41,5 @@
 		$ : function( editor, parentElement, definition, level )
 		{
-			definition.forceIFrame = true;
+			definition.forceIFrame = 1;
 
 			var doc = parentElement.getDocument(),
@@ -105,5 +99,5 @@
 
 				this.allowBlur( false );
-				isShowing = true;
+				isShowing = 1;
 
 				var element = this.element,
@@ -314,5 +308,5 @@
 					this.onShow.call( this );
 
-				isShowing = false;
+				isShowing = 0;
 			},
 
Index: /CKEditor/trunk/_source/plugins/forms/dialogs/button.js
===================================================================
--- /CKEditor/trunk/_source/plugins/forms/dialogs/button.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/forms/dialogs/button.js	(revision 5949)
@@ -13,8 +13,8 @@
 			delete this.button;
 			var element = this.getParentEditor().getSelection().getSelectedElement();
-			if ( element && element.getName() == "input" )
+			if ( element && element.is( 'input' ) )
 			{
 				var type = element.getAttribute( 'type' );
-				if ( type == "button" || type == "reset" || type == "submit" )
+				if ( type in { button:1, reset:1, submit:1 } )
 				{
 					this.button = element;
Index: /CKEditor/trunk/_source/plugins/forms/dialogs/checkbox.js
===================================================================
--- /CKEditor/trunk/_source/plugins/forms/dialogs/checkbox.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/forms/dialogs/checkbox.js	(revision 5949)
@@ -15,5 +15,5 @@
 			var element = this.getParentEditor().getSelection().getSelectedElement();
 
-			if ( element && element.getAttribute( 'type' ) == "checkbox" )
+			if ( element && element.getAttribute( 'type' ) == 'checkbox' )
 			{
 				this.checkbox = element;
@@ -32,8 +32,6 @@
 				element = editor.document.createElement( 'input' );
 				element.setAttribute( 'type', 'checkbox' );
+				editor.insertElement( element );
 			}
-
-			if ( isInsertMode )
-				editor.insertElement( element );
 			this.commitContent( { element : element } );
 		},
@@ -95,5 +93,5 @@
 								if ( CKEDITOR.env.ie )
 								{
-									// Remove attribute 'value' of checkbox #4721.
+									// Remove attribute 'value' of checkbox (#4721).
 									var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
 									element.copyAttributes( checkbox, { value: 1 } );
@@ -124,6 +122,6 @@
 							if ( CKEDITOR.env.ie )
 							{
-								var isElementChecked = !!element.getAttribute( 'checked' );
-								var isChecked = !!this.getValue();
+								var isElementChecked = !!element.getAttribute( 'checked' ),
+									isChecked = !!this.getValue();
 
 								if ( isElementChecked != isChecked )
Index: /CKEditor/trunk/_source/plugins/forms/dialogs/radio.js
===================================================================
--- /CKEditor/trunk/_source/plugins/forms/dialogs/radio.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/forms/dialogs/radio.js	(revision 5949)
@@ -14,5 +14,5 @@
 
 			var element = this.getParentEditor().getSelection().getSelectedElement();
-			if ( element && element.getName() == "input" && element.getAttribute( 'type' ) == "radio" )
+			if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' )
 			{
 				this.radioButton = element;
Index: /CKEditor/trunk/_source/plugins/forms/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/forms/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/forms/plugin.js	(revision 5949)
@@ -192,8 +192,11 @@
 					switch ( type )
 					{
-						case 'text' : case 'password':
+						case 'text' :
+						case 'password' :
 							evt.data.dialog = 'textfield';
 							break;
-						case 'button' : case 'submit' : case 'reset' :
+						case 'button' :
+						case 'submit' :
+						case 'reset' :
 							evt.data.dialog = 'button';
 							break;
Index: /CKEditor/trunk/_source/plugins/htmlwriter/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/htmlwriter/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/htmlwriter/plugin.js	(revision 5949)
@@ -58,9 +58,9 @@
 		this.lineBreakChars = '\n';
 
-		this.forceSimpleAmpersand = false;
-
-		this.sortAttributes = true;
-
-		this._.indent = false;
+		this.forceSimpleAmpersand = 0;
+
+		this.sortAttributes = 1;
+
+		this._.indent = 0;
 		this._.indentation = '';
 		this._.rules = {};
@@ -255,5 +255,5 @@
 			if ( this._.output.length > 0 )
 				this._.output.push( this.lineBreakChars );
-			this._.indent = true;
+			this._.indent = 1;
 		},
 
@@ -269,5 +269,5 @@
 		{
 			this._.output.push( this._.indentation );
-			this._.indent = false;
+			this._.indent = 0;
 		},
 
Index: /CKEditor/trunk/_source/plugins/iframedialog/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/iframedialog/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/iframedialog/plugin.js	(revision 5949)
@@ -75,5 +75,5 @@
 					cssWidth = CKEDITOR.tools.cssLength( elementDefinition.width ),
 					cssHeight = CKEDITOR.tools.cssLength( elementDefinition.height );
-				_.frameId = CKEDITOR.tools.getNextNumber() + '_iframe';
+				_.frameId = CKEDITOR.tools.getNextId() + '_iframe';
 
 				// IE BUG: Parent container does not resize to contain the iframe automatically.
Index: /CKEditor/trunk/_source/plugins/indent/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/indent/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/indent/plugin.js	(revision 5949)
@@ -268,5 +268,5 @@
 					currentOffset = Math.max( currentOffset, 0 );
 					currentOffset = Math.ceil( currentOffset / editor.config.indentOffset ) * editor.config.indentOffset;
-					element.setStyle( indentCssProperty, currentOffset ? currentOffset + editor.config.indentUnit : '' );
+					element.setStyle( indentCssProperty, currentOffset ? currentOffset + ( editor.config.indentUnit || 'px' ) : '' );
 					if ( element.getAttribute( 'style' ) === '' )
 						element.removeAttribute( 'style' );
@@ -394,33 +394,6 @@
 CKEDITOR.tools.extend( CKEDITOR.config,
 	{
-		indentOffset : 40,
-		indentUnit : 'px',
-		indentClasses : null
+		indentOffset : 40
 	});
-
-/**
- * Size of each indentation step
- * @type Number
- * @example
- * config.indentOffset = 40;
- */
-
- /**
- * Unit for the indentation style
- * @type String
- * @example
- * config.indentUnit = 'px';
- */
-
- /**
- * List of classes to use for indenting the contents.
- * @type Array
- * @example
- * // Don't use classes for indenting. (this is the default value)
- * config.indentClasses = null;
- * @example
- * // Use the classes 'Indent1', 'Indent2', 'Indent3'
- * config.indentClasses = ['Indent1', 'Indent2', 'Indent3'];
- */
 
 /**
Index: /CKEditor/trunk/_source/plugins/justify/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/justify/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/justify/plugin.js	(revision 5949)
@@ -184,7 +184,2 @@
 	});
 })();
-
-CKEDITOR.tools.extend( CKEDITOR.config,
-	{
-		justifyClasses : null
-	} );
Index: /CKEditor/trunk/_source/plugins/keystrokes/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/keystrokes/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/keystrokes/plugin.js	(revision 5949)
@@ -29,12 +29,8 @@
 
 		for ( var i = 0 ; i < keystrokesConfig.length ; i++ )
-		{
 			keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1];
-		}
 
 		for ( i = 0 ; i < blockedConfig.length ; i++ )
-		{
 			blockedKeystrokes[ blockedConfig[i] ] = 1;
-		}
 	}
 });
Index: /CKEditor/trunk/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/trunk/_source/plugins/link/dialogs/link.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/link/dialogs/link.js	(revision 5949)
@@ -244,7 +244,5 @@
 			var item = elements.getItem( i );
 			if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )
-			{
 				anchors.push( editor.restoreRealElement( item ) );
-			}
 		}
 
@@ -364,6 +362,9 @@
 	}
 
+	var commonLang = editor.lang.common,
+		linkLang = editor.lang.link;
+
 	return {
-		title : editor.lang.link.title,
+		title : linkLang.title,
 		minWidth : 350,
 		minHeight : 230,
@@ -371,6 +372,6 @@
 			{
 				id : 'info',
-				label : editor.lang.link.info,
-				title : editor.lang.link.info,
+				label : linkLang.info,
+				title : linkLang.info,
 				elements :
 				[
@@ -378,11 +379,11 @@
 						id : 'linkType',
 						type : 'select',
-						label : editor.lang.link.type,
+						label : linkLang.type,
 						'default' : 'url',
 						items :
 						[
-							[ editor.lang.link.toUrl, 'url' ],
-							[ editor.lang.link.toAnchor, 'anchor' ],
-							[ editor.lang.link.toEmail, 'email' ]
+							[ linkLang.toUrl, 'url' ],
+							[ linkLang.toAnchor, 'anchor' ],
+							[ linkLang.toEmail, 'email' ]
 						],
 						onChange : linkTypeChanged,
@@ -410,5 +411,5 @@
 										id : 'protocol',
 										type : 'select',
-										label : editor.lang.common.protocol,
+										label : commonLang.protocol,
 										'default' : 'http://',
 										items :
@@ -419,5 +420,5 @@
 											[ 'ftp://\u200E', 'ftp://' ],
 											[ 'news://\u200E', 'news://' ],
-											[ editor.lang.link.other , '' ]
+											[ linkLang.other , '' ]
 										],
 										setup : function( data )
@@ -437,5 +438,5 @@
 										type : 'text',
 										id : 'url',
-										label : editor.lang.common.url,
+										label : commonLang.url,
 										required: true,
 										onLoad : function ()
@@ -478,5 +479,5 @@
 												return true;
 
-											var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noUrl );
+											var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );
 											return func.apply( this );
 										},
@@ -514,5 +515,5 @@
 								hidden : 'true',
 								filebrowser : 'info:url',
-								label : editor.lang.common.browseServer
+								label : commonLang.browseServer
 							}
 						]
@@ -529,5 +530,5 @@
 								type : 'fieldset',
 								id : 'selectAnchorText',
-								label : editor.lang.link.selectAnchor,
+								label : linkLang.selectAnchor,
 								setup : function( data )
 								{
@@ -548,5 +549,5 @@
 												id : 'anchorName',
 												'default' : '',
-												label : editor.lang.link.anchorName,
+												label : linkLang.anchorName,
 												style : 'width: 100%;',
 												items :
@@ -583,5 +584,5 @@
 												id : 'anchorId',
 												'default' : '',
-												label : editor.lang.link.anchorId,
+												label : linkLang.anchorId,
 												style : 'width: 100%;',
 												items :
@@ -625,5 +626,5 @@
 								id : 'noAnchors',
 								style : 'text-align: center;',
-								html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>',
+								html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '</div>',
 								// Focus the first element defined in above html.
 								focus : true,
@@ -652,5 +653,5 @@
 								type : 'text',
 								id : 'emailAddress',
-								label : editor.lang.link.emailAddress,
+								label : linkLang.emailAddress,
 								required : true,
 								validate : function()
@@ -662,5 +663,5 @@
 										return true;
 
-									var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noEmail );
+									var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );
 									return func.apply( this );
 								},
@@ -685,5 +686,5 @@
 								type : 'text',
 								id : 'emailSubject',
-								label : editor.lang.link.emailSubject,
+								label : linkLang.emailSubject,
 								setup : function( data )
 								{
@@ -702,5 +703,5 @@
 								type : 'textarea',
 								id : 'emailBody',
-								label : editor.lang.link.emailBody,
+								label : linkLang.emailBody,
 								rows : 3,
 								'default' : '',
@@ -729,6 +730,6 @@
 			{
 				id : 'target',
-				label : editor.lang.link.target,
-				title : editor.lang.link.target,
+				label : linkLang.target,
+				title : linkLang.target,
 				elements :
 				[
@@ -741,16 +742,16 @@
 								type : 'select',
 								id : 'linkTargetType',
-								label : editor.lang.common.target,
+								label : commonLang.target,
 								'default' : 'notSet',
 								style : 'width : 100%;',
 								'items' :
 								[
-									[ editor.lang.common.notSet, 'notSet' ],
-									[ editor.lang.link.targetFrame, 'frame' ],
-									[ editor.lang.link.targetPopup, 'popup' ],
-									[ editor.lang.common.targetNew, '_blank' ],
-									[ editor.lang.common.targetTop, '_top' ],
-									[ editor.lang.common.targetSelf, '_self' ],
-									[ editor.lang.common.targetParent, '_parent' ]
+									[ commonLang.notSet, 'notSet' ],
+									[ linkLang.targetFrame, 'frame' ],
+									[ linkLang.targetPopup, 'popup' ],
+									[ commonLang.targetNew, '_blank' ],
+									[ commonLang.targetTop, '_top' ],
+									[ commonLang.targetSelf, '_self' ],
+									[ commonLang.targetParent, '_parent' ]
 								],
 								onChange : targetChanged,
@@ -772,5 +773,5 @@
 								type : 'text',
 								id : 'linkTargetName',
-								label : editor.lang.link.targetFrameName,
+								label : linkLang.targetFrameName,
 								'default' : '',
 								setup : function( data )
@@ -799,5 +800,5 @@
 							{
 								type : 'fieldset',
-								label : editor.lang.link.popupFeatures,
+								label : linkLang.popupFeatures,
 								children :
 								[
@@ -809,5 +810,5 @@
 												type : 'checkbox',
 												id : 'resizable',
-												label : editor.lang.link.popupResizable,
+												label : linkLang.popupResizable,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -816,5 +817,5 @@
 												type : 'checkbox',
 												id : 'status',
-												label : editor.lang.link.popupStatusBar,
+												label : linkLang.popupStatusBar,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -830,5 +831,5 @@
 												type : 'checkbox',
 												id : 'location',
-												label : editor.lang.link.popupLocationBar,
+												label : linkLang.popupLocationBar,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -838,5 +839,5 @@
 												type : 'checkbox',
 												id : 'toolbar',
-												label : editor.lang.link.popupToolbar,
+												label : linkLang.popupToolbar,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -852,5 +853,5 @@
 												type : 'checkbox',
 												id : 'menubar',
-												label : editor.lang.link.popupMenuBar,
+												label : linkLang.popupMenuBar,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -860,5 +861,5 @@
 												type : 'checkbox',
 												id : 'fullscreen',
-												label : editor.lang.link.popupFullScreen,
+												label : linkLang.popupFullScreen,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -874,5 +875,5 @@
 												type : 'checkbox',
 												id : 'scrollbars',
-												label : editor.lang.link.popupScrollBars,
+												label : linkLang.popupScrollBars,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -882,5 +883,5 @@
 												type : 'checkbox',
 												id : 'dependent',
-												label : editor.lang.link.popupDependent,
+												label : linkLang.popupDependent,
 												setup : setupPopupParams,
 												commit : commitPopupParams
@@ -897,5 +898,5 @@
 												widths : [ '30%', '70%' ],
 												labelLayout : 'horizontal',
-												label : editor.lang.link.popupWidth,
+												label : linkLang.popupWidth,
 												id : 'width',
 												setup : setupPopupParams,
@@ -907,5 +908,5 @@
 												labelLayout : 'horizontal',
 												widths : [ '55%', '45%' ],
-												label : editor.lang.link.popupLeft,
+												label : linkLang.popupLeft,
 												id : 'left',
 												setup : setupPopupParams,
@@ -923,5 +924,5 @@
 												labelLayout : 'horizontal',
 												widths : [ '30%', '70%' ],
-												label : editor.lang.link.popupHeight,
+												label : linkLang.popupHeight,
 												id : 'height',
 												setup : setupPopupParams,
@@ -932,5 +933,5 @@
 												type :  'text',
 												labelLayout : 'horizontal',
-												label : editor.lang.link.popupTop,
+												label : linkLang.popupTop,
 												widths : [ '55%', '45%' ],
 												id : 'top',
@@ -949,6 +950,6 @@
 			{
 				id : 'upload',
-				label : editor.lang.link.upload,
-				title : editor.lang.link.upload,
+				label : linkLang.upload,
+				title : linkLang.upload,
 				hidden : true,
 				filebrowser : 'uploadButton',
@@ -958,5 +959,5 @@
 						type : 'file',
 						id : 'upload',
-						label : editor.lang.common.upload,
+						label : commonLang.upload,
 						style: 'height:40px',
 						size : 29
@@ -965,5 +966,5 @@
 						type : 'fileButton',
 						id : 'uploadButton',
-						label : editor.lang.common.uploadSubmit,
+						label : commonLang.uploadSubmit,
 						filebrowser : 'info:url',
 						'for' : [ 'upload', 'upload' ]
@@ -973,6 +974,6 @@
 			{
 				id : 'advanced',
-				label : editor.lang.link.advanced,
-				title : editor.lang.link.advanced,
+				label : linkLang.advanced,
+				title : linkLang.advanced,
 				elements :
 				[
@@ -990,5 +991,5 @@
 										type : 'text',
 										id : 'advId',
-										label : editor.lang.link.id,
+										label : linkLang.id,
 										setup : setupAdvParams,
 										commit : commitAdvParams
@@ -997,12 +998,12 @@
 										type : 'select',
 										id : 'advLangDir',
-										label : editor.lang.link.langDir,
+										label : linkLang.langDir,
 										'default' : '',
 										style : 'width:110px',
 										items :
 										[
-											[ editor.lang.common.notSet, '' ],
-											[ editor.lang.link.langDirLTR, 'ltr' ],
-											[ editor.lang.link.langDirRTL, 'rtl' ]
+											[ commonLang.notSet, '' ],
+											[ linkLang.langDirLTR, 'ltr' ],
+											[ linkLang.langDirRTL, 'rtl' ]
 										],
 										setup : setupAdvParams,
@@ -1013,5 +1014,5 @@
 										id : 'advAccessKey',
 										width : '80px',
-										label : editor.lang.link.acccessKey,
+										label : linkLang.acccessKey,
 										maxLength : 1,
 										setup : setupAdvParams,
@@ -1028,5 +1029,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.name,
+										label : linkLang.name,
 										id : 'advName',
 										setup : setupAdvParams,
@@ -1036,5 +1037,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.langCode,
+										label : linkLang.langCode,
 										id : 'advLangCode',
 										width : '110px',
@@ -1046,5 +1047,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.tabIndex,
+										label : linkLang.tabIndex,
 										id : 'advTabIndex',
 										width : '80px',
@@ -1070,5 +1071,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.advisoryTitle,
+										label : linkLang.advisoryTitle,
 										'default' : '',
 										id : 'advTitle',
@@ -1079,5 +1080,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.advisoryContentType,
+										label : linkLang.advisoryContentType,
 										'default' : '',
 										id : 'advContentType',
@@ -1095,5 +1096,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.cssClasses,
+										label : linkLang.cssClasses,
 										'default' : '',
 										id : 'advCSSClasses',
@@ -1104,5 +1105,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.charset,
+										label : linkLang.charset,
 										'default' : '',
 										id : 'advCharset',
@@ -1119,5 +1120,5 @@
 									{
 										type : 'text',
-										label : editor.lang.link.styles,
+										label : linkLang.styles,
 										'default' : '',
 										id : 'advStyles',
@@ -1388,5 +1389,5 @@
 			var linkType = this.getContentElement( 'info', 'linkType' ),
 					urlField;
-			if ( linkType && linkType.getValue( ) == 'url' )
+			if ( linkType && linkType.getValue() == 'url' )
 			{
 				urlField = this.getContentElement( 'info', 'url' );
Index: /CKEditor/trunk/_source/plugins/list/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/list/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/list/plugin.js	(revision 5949)
@@ -81,5 +81,5 @@
 				currentListItem = null,
 				paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
-			while ( true )
+			while ( 1 )
 			{
 				var item = listArray[ currentIndex ];
@@ -88,10 +88,10 @@
 					if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() )
 					{
-						rootNode = listArray[ currentIndex ].parent.clone( false, true );
+						rootNode = listArray[ currentIndex ].parent.clone( false, 1 );
 						retval.append( rootNode );
 					}
-					currentListItem = rootNode.append( item.element.clone( false, true ) );
+					currentListItem = rootNode.append( item.element.clone( 0, 1 ) );
 					for ( var i = 0 ; i < item.contents.length ; i++ )
-						currentListItem.append( item.contents[i].clone( true, true ) );
+						currentListItem.append( item.contents[i].clone( 1, 1 ) );
 					currentIndex++;
 				}
@@ -128,5 +128,5 @@
 
 					for ( i = 0 ; i < item.contents.length ; i++ )
-						currentListItem.append( item.contents[i].clone( true, true ) );
+						currentListItem.append( item.contents[i].clone( 1, 1 ) );
 
 					if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
@@ -447,7 +447,5 @@
 					if ( enclosedNode && enclosedNode.is
 						&& this.type == enclosedNode.getName() )
-					{
-						setState.call( this, editor, CKEDITOR.TRISTATE_ON );
-					}
+							setState.call( this, editor, CKEDITOR.TRISTATE_ON );
 				}
 			}
@@ -491,5 +489,5 @@
 						pathElementsCount = pathElements.length,
 						listNode = null,
-						processedFlag = false,
+						processedFlag = 0,
 						blockLimit = path.blockLimit,
 						element;
@@ -517,5 +515,5 @@
 								CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
 							}
-							processedFlag = true;
+							processedFlag = 1;
 							break;
 						}
@@ -570,8 +568,8 @@
 						sibling.remove();
 						// Move children order by merge direction.(#3820)
-						sibling.moveChildren( listNode, rtl ? true : false );
+						sibling.moveChildren( listNode, rtl );
 					}
 				} )();
-				mergeSibling( true );
+				mergeSibling( 1 );
 			}
 
Index: /CKEditor/trunk/_source/plugins/listblock/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/listblock/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/listblock/plugin.js	(revision 5949)
@@ -82,5 +82,5 @@
 					{
 						var pendingHtml = this._.pendingHtml,
-							id = 'cke_' + CKEDITOR.tools.getNextNumber();
+							id = CKEDITOR.tools.getNextId();
 
 						if ( !this._.started )
@@ -110,5 +110,5 @@
 						this._.close();
 
-						var id = 'cke_' + CKEDITOR.tools.getNextNumber();
+						var id = CKEDITOR.tools.getNextId();
 
 						this._.groups[ title ] = id;
Index: /CKEditor/trunk/_source/plugins/liststyle/dialogs/liststyle.js
===================================================================
--- /CKEditor/trunk/_source/plugins/liststyle/dialogs/liststyle.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/liststyle/dialogs/liststyle.js	(revision 5949)
@@ -13,5 +13,5 @@
 
 		range.shrink( CKEDITOR.SHRINK_TEXT );
-		return range.getCommonAncestor().getAscendant( listTag, true );
+		return range.getCommonAncestor().getAscendant( listTag, 1 );
 	}
 
@@ -29,8 +29,9 @@
 	function listStyle( editor, startupPage )
 	{
+		var lang = editor.lang.list;
 		if ( startupPage == 'bulletedListStyle' )
 		{
 			return {
-				title : editor.lang.list.bulletedTitle,
+				title : lang.bulletedTitle,
 				minWidth : 300,
 				minHeight : 50,
@@ -44,13 +45,13 @@
 							{
 								type : 'select',
-								label : editor.lang.list.type,
+								label : lang.type,
 								id : 'type',
 								style : 'width: 150px; margin: auto;',
 								items :
 								[
-									[ editor.lang.list.notset, '' ],
-									[ editor.lang.list.circle, 'circle' ],
-									[ editor.lang.list.disc,  'disc' ],
-									[ editor.lang.list.square, 'square' ]
+									[ lang.notset, '' ],
+									[ lang.circle, 'circle' ],
+									[ lang.disc,  'disc' ],
+									[ lang.square, 'square' ]
 								],
 								setup : function( element )
@@ -96,10 +97,10 @@
 			var listStyleOptions =
 			[
-				[ editor.lang.list.notset, '' ],
-				[ editor.lang.list.lowerRoman, 'lower-roman' ],
-				[ editor.lang.list.upperRoman, 'upper-roman' ],
-				[ editor.lang.list.lowerAlpha, 'lower-alpha' ],
-				[ editor.lang.list.upperAlpha, 'upper-alpha' ],
-				[ editor.lang.list.decimal, 'decimal' ]
+				[ lang.notset, '' ],
+				[ lang.lowerRoman, 'lower-roman' ],
+				[ lang.upperRoman, 'upper-roman' ],
+				[ lang.lowerAlpha, 'lower-alpha' ],
+				[ lang.upperAlpha, 'upper-alpha' ],
+				[ lang.decimal, 'decimal' ]
 			];
 
@@ -107,13 +108,13 @@
 			{
 				listStyleOptions.concat( [
-					[ editor.lang.list.armenian, 'armenian' ],
-					[ editor.lang.list.decimalLeadingZero, 'decimal-leading-zero' ],
-					[ editor.lang.list.georgian, 'georgian' ],
-					[ editor.lang.list.lowerGreek, 'lower-greek' ]
+					[ lang.armenian, 'armenian' ],
+					[ lang.decimalLeadingZero, 'decimal-leading-zero' ],
+					[ lang.georgian, 'georgian' ],
+					[ lang.lowerGreek, 'lower-greek' ]
 				]);
 			}
 
 			return {
-				title : editor.lang.list.numberedTitle,
+				title : lang.numberedTitle,
 				minWidth : 300,
 				minHeight : 50,
@@ -131,8 +132,8 @@
 								[
 									{
-										label : editor.lang.list.start,
+										label : lang.start,
 										type : 'text',
 										id : 'start',
-										validate : CKEDITOR.dialog.validate.integer( editor.lang.list.validateStartNumber ),
+										validate : CKEDITOR.dialog.validate.integer( lang.validateStartNumber ),
 										setup : function( element )
 										{
@@ -147,5 +148,5 @@
 									{
 										type : 'select',
-										label : editor.lang.list.type,
+										label : lang.type,
 										id : 'type',
 										style : 'width: 100%;',
Index: /CKEditor/trunk/_source/plugins/maximize/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/maximize/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/maximize/plugin.js	(revision 5949)
@@ -11,6 +11,6 @@
 			return [];
 
-		var hijackRecord = [];
-		var hijackNames = [ 'style', 'className' ];
+		var hijackRecord = [],
+			hijackNames = [ 'style', 'className' ];
 		for ( var i = 0 ; i < hijackNames.length ; i++ )
 		{
@@ -130,10 +130,10 @@
 		{
 			var lang = editor.lang;
-			var mainDocument = CKEDITOR.document;
-			var mainWindow = mainDocument.getWindow();
+			var mainDocument = CKEDITOR.document,
+				mainWindow = mainDocument.getWindow();
 
 			// Saved selection and scroll position for the editing area.
-			var savedSelection;
-			var savedScroll;
+			var savedSelection,
+				savedScroll;
 
 			// Saved scroll position for the outer window.
Index: /CKEditor/trunk/_source/plugins/menu/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/menu/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/menu/plugin.js	(revision 5949)
@@ -191,7 +191,7 @@
 						{
 							clearTimeout( this._.showSubTimeout );
-							this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay, this, [ index ] );
+							this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay || 400, this, [ index ] );
 						},
-						this);
+						this );
 
 					this._.itemOutFn = CKEDITOR.tools.addFunction( function( index )
@@ -199,5 +199,5 @@
 							clearTimeout( this._.showSubTimeout );
 						},
-						this);
+						this );
 
 					this._.itemClickFn = CKEDITOR.tools.addFunction( function( index )
@@ -216,5 +216,5 @@
 								this.onClick && this.onClick( item );
 						},
-						this);
+						this );
 				}
 
@@ -222,6 +222,6 @@
 				sortItems( items );
 
-				var chromeRoot = editor.container.getChild( 1 );
-				var mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
+				var chromeRoot = editor.container.getChild( 1 ),
+					mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
 
 				// Build the HTML that composes the menu and its items.
@@ -391,5 +391,4 @@
  * config.menu_subMenuDelay = 0;
  */
-CKEDITOR.config.menu_subMenuDelay = 400;
 
 /**
Index: /CKEditor/trunk/_source/plugins/newpage/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/newpage/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/newpage/plugin.js	(revision 5949)
@@ -20,5 +20,5 @@
 				{
 					var command = this;
-					editor.setData( editor.config.newpage_html, function()
+					editor.setData( editor.config.newpage_html || '', function()
 					{
 						// Save the undo snapshot after all document changes are affected. (#4889)
@@ -52,3 +52,2 @@
  * config.newpage_html = '&lt;p&gt;Type your text here.&lt;/p&gt;';
  */
-CKEDITOR.config.newpage_html = '';
Index: /CKEditor/trunk/_source/plugins/panel/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/panel/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/panel/plugin.js	(revision 5949)
@@ -32,5 +32,5 @@
 		});
 
-	this.id = CKEDITOR.tools.getNextNumber();
+	this.id = CKEDITOR.tools.getNextId();
 	this.document = document;
 
@@ -74,5 +74,5 @@
 	render : function( editor, output )
 	{
-		var id = 'cke_' + this.id;
+		var id = this.id;
 
 		output.push(
@@ -131,5 +131,5 @@
 			if ( this.forceIFrame || this.css.length )
 			{
-				var iframe = this.document.getById( 'cke_' + this.id + '_frame' ),
+				var iframe = this.document.getById( this.id + '_frame' ),
 					parentDiv = iframe.getParent(),
 					dir = parentDiv.getAttribute( 'dir' ),
@@ -174,5 +174,5 @@
 					{
 						var keystroke = evt.data.getKeystroke(),
-							dir = this.document.getById( 'cke_' + this.id ).getAttribute( 'dir' );
+							dir = this.document.getById( this.id ).getAttribute( 'dir' );
 
 						// Delegate key processing to block.
@@ -187,5 +187,5 @@
 						{
 							if ( this.onEscape && this.onEscape( keystroke ) === false )
-								evt.data.preventDefault( );
+								evt.data.preventDefault();
 						}
 					},
@@ -196,5 +196,5 @@
 			}
 			else
-				holder = this.document.getById( 'cke_' + this.id );
+				holder = this.document.getById( this.id );
 
 			this._.holder = holder;
@@ -226,5 +226,5 @@
 			current = this._.currentBlock,
 			holder = this.forceIFrame ?
-				this.document.getById( 'cke_' + this.id + '_frame' )
+				this.document.getById( this.id + '_frame' )
 				: this._.holder;
 
Index: /CKEditor/trunk/_source/plugins/popup/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/popup/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/popup/plugin.js	(revision 5949)
@@ -55,5 +55,5 @@
 			popupWindow.location.href = url;
 		}
-		catch (e)
+		catch ( e )
 		{
 			popupWindow = window.open( url, null, options, true );
Index: /CKEditor/trunk/_source/plugins/removeformat/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/removeformat/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/removeformat/plugin.js	(revision 5949)
@@ -36,5 +36,5 @@
 
 				var filter = CKEDITOR.plugins.removeformat.filter;
-				var ranges = editor.getSelection().getRanges( true ),
+				var ranges = editor.getSelection().getRanges( 1 ),
 					iterator = ranges.createIterator(),
 					range;
@@ -51,6 +51,6 @@
 
 					// The style will be applied within the bookmark boundaries.
-					var startNode	= bookmark.startNode;
-					var endNode		= bookmark.endNode;
+					var startNode	= bookmark.startNode,
+						endNode		= bookmark.endNode;
 
 					// We need to check the selection boundaries (bookmark spans) to break
@@ -67,6 +67,6 @@
 					{
 						// Let's start checking the start boundary.
-						var path = new CKEDITOR.dom.elementPath( node );
-						var pathElements = path.elements;
+						var path = new CKEDITOR.dom.elementPath( node ),
+							pathElements = path.elements;
 
 						for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ )
@@ -104,5 +104,5 @@
 							// Remove elements nodes that match with this style rules.
 							if ( tagsRegex.test( currentNode.getName() ) )
-								currentNode.remove( true );
+								currentNode.remove( 1 );
 							else
 							{
Index: /CKEditor/trunk/_source/plugins/resize/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/resize/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/resize/plugin.js	(revision 5949)
@@ -84,7 +84,7 @@
 					{
 						var direction = '';
-						if ( resizeHorizontal && !resizeVertical)
+						if ( resizeHorizontal && !resizeVertical )
 							direction = ' cke_resizer_horizontal';
-						if ( !resizeHorizontal && resizeVertical)
+						if ( !resizeHorizontal && resizeVertical )
 							direction = ' cke_resizer_vertical';
 
Index: /CKEditor/trunk/_source/plugins/scayt/dialogs/options.js
===================================================================
--- /CKEditor/trunk/_source/plugins/scayt/dialogs/options.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/scayt/dialogs/options.js	(revision 5949)
@@ -12,5 +12,5 @@
 		i,
 		contents = [],
-		userDicActive = false,
+		userDicActive = 0,
 		dic_buttons = [
 			// [0] contains buttons for creating
@@ -19,35 +19,40 @@
 			"dic_rename,dic_delete"
 		],
-		optionsIds= [ 'mixedCase','mixedWithDigits','allCaps','ignoreDomainNames' ];
+		optionsIds = [ 'mixedCase', 'mixedWithDigits', 'allCaps', 'ignoreDomainNames' ];
 
 	// common operations
 
-	function getBOMAllOptions () {
+	function getBOMAllOptions()
+	{
 		 return document.forms.optionsbar["options"];
 	}
-	function getBOMAllLangs () {
+	function getBOMAllLangs()
+	{
 		 return document.forms.languagesbar["scayt_lang"];
 	}
 
-	function setCheckedValue(radioObj, newValue) {
-		if (!radioObj)
+	function setCheckedValue( radioObj, newValue )
+	{
+		if ( !radioObj )
 			return;
 		var radioLength = radioObj.length;
-		if (radioLength == undefined) {
-			radioObj.checked = (radioObj.value == newValue.toString());
+		if ( radioLength == undefined )
+		{
+			radioObj.checked = radioObj.value == newValue.toString();
 			return;
 		}
-		for (var i = 0; i < radioLength; i++) {
+		for ( var i = 0; i < radioLength; i++ )
+		{
 			radioObj[i].checked = false;
-			if (radioObj[i].value == newValue.toString()) {
+			if ( radioObj[i].value == newValue.toString() )
 				radioObj[i].checked = true;
-			}
-		}
-	}
-
+		}
+	}
+
+	var lang = editor.lang.scayt;
 	var tags_contents =  [
 				{
 					id : 'options',
-					label : editor.lang.scayt.optionsTab,
+					label : lang.optionsTab,
 					elements : [
 						{
@@ -78,5 +83,5 @@
 				{
 					id : 'langs',
-					label : editor.lang.scayt.languagesTab,
+					label : lang.languagesTab,
 					elements : [
 						{
@@ -93,5 +98,5 @@
 				{
 					id : 'dictionaries',
-					label : editor.lang.scayt.dictionariesTab,
+					label : lang.dictionariesTab,
 					elements : [
 						{
@@ -124,5 +129,5 @@
 				{
 					id : 'about',
-					label : editor.lang.scayt.aboutTab,
+					label : lang.aboutTab,
 					elements : [
 						{
@@ -137,5 +142,5 @@
 
 	var dialogDefiniton = {
-		title : editor.lang.scayt.title,
+		title : lang.title,
 		minWidth : 360,
 		minHeight : 220,
@@ -184,8 +189,8 @@
 		{
 			var o = getBOMAllOptions();
-			for (i in o)
+			for ( var i in o )
 				o[i].checked = false;
 
-			setCheckedValue(getBOMAllLangs(),"");
+			setCheckedValue( getBOMAllLangs(), "" );
 		},
 		contents : contents
@@ -196,5 +201,5 @@
 	tags = CKEDITOR.plugins.scayt.uiTabs;
 
-	for ( i in tags )
+	for ( var i in tags )
 	{
 		if ( tags[ i ] == 1 )
@@ -202,5 +207,5 @@
 	}
 	if ( tags[2] == 1 )
-		userDicActive = true;
+		userDicActive = 1;
 
 
@@ -209,5 +214,5 @@
 		var dialog = this,
 			lang_list = dialog.data.scayt.getLangList(),
-			buttons = [ 'dic_create','dic_delete','dic_rename','dic_restore' ],
+			buttons = [ 'dic_create', 'dic_delete', 'dic_rename', 'dic_restore' ],
 			labels = optionsIds,
 			i;
@@ -283,7 +288,7 @@
 
 		var langList = [];
-		if (tags[1] ==1 )
-		{
-			for ( i in lang_list.rtl )
+		if ( tags[1] ==1 )
+		{
+			for ( var i in lang_list.rtl )
 				langList[ langList.length ] = createOption( i, lang_list.ltr );
 
@@ -315,6 +320,6 @@
 			var suc_massage = captions["succ_dic_create"];
 
-			window.scayt.createUserDictionary(dic_name,
-				function(arg)
+			window.scayt.createUserDictionary( dic_name,
+				function( arg )
 				{
 					hide_dic_buttons ( all_buttons );
@@ -323,5 +328,5 @@
 					dic_success_message (suc_massage);
 				},
-				function(arg)
+				function( arg )
 				{
 					err_massage = err_massage.replace("%s" ,arg.dname );
@@ -337,6 +342,6 @@
 			var err_massage = captions["err_dic_rename"] || "";
 			var suc_massage = captions["succ_dic_rename"] || "";
-			window.scayt.renameUserDictionary(dic_name,
-				function(arg)
+			window.scayt.renameUserDictionary( dic_name,
+				function( arg )
 					{
 						suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -344,5 +349,5 @@
 						dic_success_message ( suc_massage );
 					},
-				function(arg)
+				function( arg )
 					{
 						err_massage = err_massage.replace("%s" , arg.dname  );
@@ -352,5 +357,5 @@
 		};
 
-		dic.dic_delete = function ( el, dic_name , dic_buttons )
+		dic.dic_delete = function( el, dic_name , dic_buttons )
 		{
 			var all_buttons = dic_buttons[0] + ',' + dic_buttons[1];
@@ -360,5 +365,5 @@
 			// try to delete dictionary
 			window.scayt.deleteUserDictionary(
-				function(arg)
+				function( arg )
 				{
 					suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -368,5 +373,5 @@
 					dic_success_message( suc_massage );
 				},
-				function(arg)
+				function( arg )
 				{
 					err_massage = err_massage.replace("%s" , arg.dname );
@@ -375,5 +380,5 @@
 		};
 
-		dic.dic_restore = dialog.dic_restore || function ( el, dic_name , dic_buttons )
+		dic.dic_restore = dialog.dic_restore || function( el, dic_name , dic_buttons )
 			{
 				// try to restore existing dictionary
@@ -383,5 +388,5 @@
 
 				window.scayt.restoreUserDictionary(dic_name,
-					function(arg)
+					function( arg )
 					{
 						suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -390,5 +395,5 @@
 						dic_success_message( suc_massage );
 					},
-					function(arg)
+					function( arg )
 					{
 						err_massage = err_massage.replace("%s" , arg.dname );
@@ -409,5 +414,7 @@
 				var id = el.getId();
 				dic[ id ].apply( null, [ el, dic_name, dic_buttons ] );
-			}catch(err){
+			}
+			catch(err)
+			{
 				dic_error_message(" Dictionary error. ");
 			}
@@ -432,5 +439,5 @@
 		var dialog = this;
 		// for enabled options tab
-		if (tags[0] == 1){
+		if ( tags[0] == 1 ){
 			var opto = getBOMAllOptions();
 
@@ -467,6 +474,6 @@
 		if ( tags[1] == 1 )
 		{
-			var domLang = doc.getById("cke_option"+dialog.sLang);
-			setCheckedValue(domLang.$,dialog.sLang);
+			var domLang = doc.getById("cke_option" + dialog.sLang);
+			setCheckedValue( domLang.$,dialog.sLang );
 		}
 
@@ -488,5 +495,5 @@
 
 				},
-				function ()
+				function()
 				{
 					doc.getById( 'dic_name' ).setValue("");
@@ -497,33 +504,27 @@
 	};
 
-	function dic_error_message ( m )
+	function dic_error_message( m )
 	{
 		doc.getById('dic_message').setHtml('<span style="color:red;">' + m + '</span>' );
 	}
-	function dic_success_message ( m )
+	function dic_success_message( m )
 	{
 		doc.getById('dic_message').setHtml('<span style="color:blue;">' + m + '</span>') ;
 	}
-	function display_dic_buttons ( sIds )
-	{
-
+	function display_dic_buttons( sIds )
+	{
 		sIds = String( sIds );
 		var aIds = sIds.split(',');
 		for ( var i=0, l = aIds.length; i < l ; i+=1)
-		{
 			doc.getById( aIds[i] ).$.style.display = "inline";
-		}
-
-	}
-	function hide_dic_buttons ( sIds )
+	}
+	function hide_dic_buttons( sIds )
 	{
 		sIds = String( sIds );
 		var aIds = sIds.split(',');
 		for ( var i = 0, l = aIds.length; i < l ; i += 1 )
-		{
 			doc.getById( aIds[i] ).$.style.display = "none";
-		}
-	}
-	function set_dic_name ( dic_name )
+	}
+	function set_dic_name( dic_name )
 	{
 		doc.getById('dic_name').$.value= dic_name;
Index: /CKEditor/trunk/_source/plugins/scayt/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/scayt/plugin.js	(revision 5949)
@@ -11,16 +11,17 @@
 (function()
 {
-	var commandName 	= 'scaytcheck',
-		openPage		= '';
+	var commandName  = 'scaytcheck',
+		openPage = '';
 
 	// Checks if a value exists in an array
-	function in_array(needle, haystack)
+	function in_array( needle, haystack )
 	{
-		var found = false, key;
-		for (key in haystack)
-		{
-			if ((haystack[key] === needle) || ( haystack[key] == needle))
-			{
-				found = true;
+		var found = 0,
+			key;
+		for ( key in haystack )
+		{
+			if ( haystack[ key ] == needle )
+			{
+				found = 1;
 				break;
 			}
@@ -35,4 +36,5 @@
 		var createInstance = function()	// Create new instance every time Document is created.
 		{
+			var config = editor.config;
 			// Initialise Scayt instance.
 			var oParams = {};
@@ -41,8 +43,8 @@
 			// syntax : AppName.AppVersion@AppRevision
 			oParams.assocApp  = 'CKEDITOR.' + CKEDITOR.version + '@' + CKEDITOR.revision;
-			oParams.customerid = editor.config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';
-			oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';
-			oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';
-			oParams.sLang = editor.config.scayt_sLang || 'en_US';
+			oParams.customerid = config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';
+			oParams.customDictionaryIds = config.scayt_customDictionaryIds || '';
+			oParams.userDictionaryName = config.scayt_userDictionaryName || '';
+			oParams.sLang = config.scayt_sLang || 'en_US';
 
 			// Introduce SCAYT onLoad callback. (#5632)
@@ -67,14 +69,12 @@
 
 			var scayt_custom_params = window.scayt_custom_params;
-			if ( typeof scayt_custom_params == 'object')
+			if ( typeof scayt_custom_params == 'object' )
 			{
 				for ( var k in scayt_custom_params )
-				{
 					oParams[ k ] = scayt_custom_params[ k ];
-				}
 			}
 			// needs for restoring a specific scayt control settings
-			if ( plugin.getControlId(editor) )
-				oParams.id = plugin.getControlId(editor);
+			if ( plugin.getControlId( editor ) )
+				oParams.id = plugin.getControlId( editor );
 
 			var scayt_control = new window.scayt( oParams );
@@ -86,5 +86,5 @@
 
 			// Copy config.
-			var	lastInstance = plugin.instances[ editor.name ];
+			var lastInstance = plugin.instances[ editor.name ];
 			if ( lastInstance )
 			{
@@ -101,5 +101,5 @@
 			var fTabs  = [];
 
-			for (var i = 0,l=4; i<l; i++)
+			for ( var i = 0, l=4; i < l; i++ )
 			    fTabs.push( uiTabs[i] && plugin.uiTabs[i] );
 
@@ -133,5 +133,5 @@
 		editor.on( 'beforeCommandExec', function( ev )		// Disable SCAYT before Source command execution.
 			{
-				if ( (ev.data.name == 'source' ||  ev.data.name == 'newpage') && editor.mode == 'wysiwyg' )
+				if ( ( ev.data.name == 'source' || ev.data.name == 'newpage' ) && editor.mode == 'wysiwyg' )
 				{
 					var scayt_instance = plugin.getScayt( editor );
@@ -258,5 +258,5 @@
 		// Override Image.equals method avoid CK snapshot module to add SCAYT markup to snapshots. (#5546)
 		var undoImagePrototype = CKEDITOR.plugins.undo.Image.prototype;
-		undoImagePrototype.equals =	 CKEDITOR.tools.override( undoImagePrototype.equals, function( org )
+		undoImagePrototype.equals = CKEDITOR.tools.override( undoImagePrototype.equals, function( org )
 		{
 			return function( otherImage )
@@ -299,5 +299,5 @@
 				this.controlInfo[ editor.name ][ infoOpt ] = o[ infoOpt ];
 		},
-		isControlRestored : function ( editor )
+		isControlRestored : function( editor )
 		{
 			if ( editor &&
@@ -309,13 +309,13 @@
 			return false;
 		},
-		markControlRestore : function ( editor )
-		{
-			this.setControlInfo( editor,{ restored:true } );
-		},
-		setControlId: function (editor, id)
-		{
-			this.setControlInfo( editor,{ id:id } );
-		},
-		getControlId: function (editor)
+		markControlRestore : function( editor )
+		{
+			this.setControlInfo( editor, { restored:true } );
+		},
+		setControlId: function( editor, id )
+		{
+			this.setControlInfo( editor, { id:id } );
+		},
+		getControlId: function( editor )
 		{
 			if ( editor &&
@@ -328,9 +328,9 @@
 			return null;
 		},
-		setPaused: function ( editor , bool )
-		{
-			this.setControlInfo( editor,{ paused:bool } );
-		},
-		isPaused: function (editor)
+		setPaused: function( editor , bool )
+		{
+			this.setControlInfo( editor, { paused:bool } );
+		},
+		isPaused: function( editor )
 		{
 			if ( editor &&
@@ -338,5 +338,5 @@
 					this.controlInfo[editor.name] )
 			{
-				return this.controlInfo[editor.name].paused ;
+				return this.controlInfo[editor.name].paused;
 			}
 			return undefined;
@@ -467,5 +467,5 @@
 				//
 				// now focus is set certainly
-				scayt_control.focus( );
+				scayt_control.focus();
 				scayt_control.setDisabled( isEnabled );
 			}
@@ -503,6 +503,6 @@
 		init : function( editor )
 		{
-			var moreSuggestions = {};
-			var mainSuggestions = {};
+			var moreSuggestions = {},
+				mainSuggestions = {};
 
 			// Scayt command.
@@ -517,7 +517,7 @@
 			confuiTabs = confuiTabs.split( ',' );
 			// check array length ! always must be 3 filled with 1 or 0
-			for (var i=0,l=3; i<l; i++)
-			{
-				var flag = parseInt(confuiTabs[i] || '1' ,10);
+			for ( var i=0, l=3; i < l; i++ )
+			{
+				var flag = parseInt( confuiTabs[i] || '1', 10 );
 				uiTabs.push( flag );
 			}
@@ -528,16 +528,18 @@
 			var uiMuneItems = {};
 
+			var lang = editor.lang.scayt;
+
 			// always added
 			uiMuneItems.scaytToggle =
 				{
-					label : editor.lang.scayt.enable,
+					label : lang.enable,
 					command : commandName,
 					group : menuGroup
 				};
 
-			if (uiTabs[0] == 1)
+			if ( uiTabs[0] == 1 )
 				uiMuneItems.scaytOptions =
 				{
-					label : editor.lang.scayt.options,
+					label : lang.options,
 					group : menuGroup,
 					onClick : function()
@@ -548,8 +550,8 @@
 				};
 
-			if (uiTabs[1] == 1)
+			if ( uiTabs[1] == 1 )
 				uiMuneItems.scaytLangs =
 				{
-					label : editor.lang.scayt.langs,
+					label : lang.langs,
 					group : menuGroup,
 					onClick : function()
@@ -559,8 +561,8 @@
 					}
 				};
-			if (uiTabs[2] == 1)
+			if ( uiTabs[2] == 1 )
 				uiMuneItems.scaytDict =
 				{
-					label : editor.lang.scayt.dictionariesTab,
+					label : lang.dictionariesTab,
 					group : menuGroup,
 					onClick : function()
@@ -580,6 +582,5 @@
 						editor.openDialog( commandName );
 					}
-				}
-			;
+				};
 
 			uiTabs[3] = 1; // about us tab is always on
@@ -590,6 +591,6 @@
 				editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON,
 					{
-						label : editor.lang.scayt.title,
-						title : CKEDITOR.env.opera ? editor.lang.scayt.opera_title : editor.lang.scayt.title,
+						label : lang.title,
+						title : CKEDITOR.env.opera ? lang.opera_title : lang.title,
 						className : 'cke_button_scayt',
 						onRender: function()
@@ -605,5 +606,5 @@
 							var isEnabled = plugin.isScaytEnabled( editor );
 
-							editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ];
+							editor.getMenuItem( 'scaytToggle' ).label = lang[ isEnabled ? 'disable' : 'enable' ];
 
 							return {
@@ -674,5 +675,5 @@
 										exec: function()
 										{
-											scayt_control.replace(el, s);
+											scayt_control.replace( el, s );
 										}
 									};
@@ -700,5 +701,5 @@
 							editor.addMenuItem( 'scayt_moresuggest',
 							{
-								label : editor.lang.scayt.moreSuggestions,
+								label : lang.moreSuggestions,
 								group : 'scayt_moresuggest',
 								order : 10,
@@ -718,5 +719,5 @@
 								}
 							};
-							addButtonCommand( editor, 'ignore', editor.lang.scayt.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );
+							addButtonCommand( editor, 'ignore', lang.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );
 							mainSuggestions[ 'scayt_ignore' ] = CKEDITOR.TRISTATE_OFF;
 						}
@@ -729,5 +730,5 @@
 								}
 							};
-							addButtonCommand(editor, 'ignore_all', editor.lang.scayt.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
+							addButtonCommand(editor, 'ignore_all', lang.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
 							mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF;
 						}
@@ -740,5 +741,5 @@
 								}
 							};
-							addButtonCommand(editor, 'add_word', editor.lang.scayt.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
+							addButtonCommand(editor, 'add_word', lang.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
 							mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF;
 						}
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5949)
@@ -152,5 +152,5 @@
 							{
 								// Enable selections to be saved.
-								saveEnabled = true;
+								saveEnabled = 1;
 
 								saveSelection();
@@ -165,5 +165,5 @@
 
 								// Disable selections from being saved.
-								saveEnabled = false;
+								saveEnabled = 0;
 								restoreEnabled = 1;
 							});
@@ -186,5 +186,5 @@
 						// Listening on document element ensures that
 						// scrollbar is included. (#5280)
-						html.on( 'mousedown', function ()
+						html.on( 'mousedown', function()
 						{
 							// Lock restore selection now, as we have
@@ -194,5 +194,5 @@
 						});
 
-						html.on( 'mouseup', function ()
+						html.on( 'mouseup', function()
 						{
 							restoreEnabled = 1;
@@ -241,5 +241,5 @@
 								scroll = null;
 
-								saveEnabled = true;
+								saveEnabled = 1;
 								setTimeout( function()
 									{
@@ -253,5 +253,5 @@
 							function()
 							{
-								saveEnabled = true;
+								saveEnabled = 1;
 								saveSelection();
 							});
@@ -264,5 +264,5 @@
 						function disableSave()
 						{
-							saveEnabled = false;
+							saveEnabled = 0;
 						}
 
@@ -406,5 +406,5 @@
 
 		this.document = document;
-		this.isLocked = false;
+		this.isLocked = 0;
 		this._ =
 		{
@@ -746,5 +746,5 @@
 						// Drop range spans inside one ready-only node.
 						var parent = range.getCommonAncestor();
-						if ( parent.isReadOnly())
+						if ( parent.isReadOnly() )
 							ranges.splice( i, 1 );
 
@@ -856,5 +856,5 @@
 							// selected node on the start which doesn't have
 							// visual impact. ( #3231 )
-							while ( true )
+							while ( 1 )
 							{
 								var startContainer = range.startContainer,
@@ -892,5 +892,5 @@
 					{
 						range = sel.createRange();
-						range.collapse( true );
+						range.collapse( 1 );
 
 						node = range.parentElement();
@@ -965,5 +965,5 @@
 			this._.cache.nativeSel = {};
 
-			this.isLocked = true;
+			this.isLocked = 1;
 
 			// Save this selection inside the DOM document.
@@ -985,5 +985,5 @@
 						ranges = !selectedElement && lockedSelection.getRanges();
 
-					this.isLocked = false;
+					this.isLocked = 0;
 					this.reset();
 
@@ -999,5 +999,5 @@
 			if  ( !lockedSelection || !restore )
 			{
-				this.isLocked = false;
+				this.isLocked = 0;
 				this.reset();
 			}
@@ -1040,5 +1040,5 @@
 					range.select();
 				}
-				catch(e)
+				catch( e )
 				{
 					// If failed, select it as a text range.
Index: /CKEditor/trunk/_source/plugins/showblocks/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/showblocks/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/showblocks/plugin.js	(revision 5949)
@@ -154,3 +154,2 @@
  * config.startupOutlineBlocks = true;
  */
-CKEDITOR.config.startupOutlineBlocks = false;
Index: /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5949)
@@ -55,6 +55,6 @@
 		var relative, nodeToMove;
 
-		var keystroke = ev.getKeystroke();
-		var rtl = editor.lang.dir == 'rtl';
+		var keystroke = ev.getKeystroke(),
+			rtl = editor.lang.dir == 'rtl';
 		switch ( keystroke )
 		{
Index: /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5949)
@@ -113,6 +113,6 @@
 		var element = ev.getTarget();
 		var relative, nodeToMove;
-		var keystroke = ev.getKeystroke();
-		var rtl = editor.lang.dir == 'rtl';
+		var keystroke = ev.getKeystroke(),
+			rtl = editor.lang.dir == 'rtl';
 
 		switch ( keystroke )
@@ -348,5 +348,5 @@
 								{
 									var firstChar = this.getElement().getElementsByTag( 'a' ).getItem( 0 );
-									setTimeout(function()
+									setTimeout( function()
 									{
 										firstChar.focus();
Index: /CKEditor/trunk/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 5949)
@@ -1326,5 +1326,5 @@
 			// Bookmark the range so we can re-select it after processing.
 			bookmarks = selection.createBookmarks(),
-			ranges = selection.getRanges( true ),
+			ranges = selection.getRanges( 1 ),
 			func = remove ? this.removeFromRange : this.applyToRange,
 			range;
Index: /CKEditor/trunk/_source/plugins/stylescombo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 5949)
@@ -27,5 +27,5 @@
 
 						// Put all styles into an Array.
-						for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
+						for ( var i = 0, count = stylesDefinitions.length ; i < count ; i++ )
 						{
 							var styleDefinition = stylesDefinitions[ i ];
@@ -72,5 +72,5 @@
 								// combo.
 								var lastType;
-								for ( var i = 0 ; i < stylesList.length ; i++ )
+								for ( var i = 0, count = stylesList.length ; i < count ; i++ )
 								{
 									style = stylesList[ i ];
@@ -127,5 +127,5 @@
 
 								// For each element into the elements path.
-								for ( var i = 0, element ; i < elements.length ; i++ )
+								for ( var i = 0, count = elements.length, element ; i < count ; i++ )
 								{
 									element = elements[i];
@@ -155,7 +155,6 @@
 							editor.focus();
 
-						var selection = editor.getSelection();
-
-						var element = selection.getSelectedElement(),
+						var selection = editor.getSelection(),
+							element = selection.getSelectedElement(),
 							elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() );
 
Index: /CKEditor/trunk/_source/plugins/tab/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tab/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/tab/plugin.js	(revision 5949)
@@ -39,6 +39,6 @@
 				{
 					var sel = editor.getSelection(),
-							ancestor = sel.getCommonAncestor(),
-							cell;
+						ancestor = sel.getCommonAncestor(),
+						cell;
 
 					if ( ( cell = ( ancestor.getAscendant( 'td', true ) || ancestor.getAscendant( 'th', true ) ) ) )
Index: /CKEditor/trunk/_source/plugins/table/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/table/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/table/plugin.js	(revision 5949)
@@ -59,8 +59,8 @@
 			editor.contextMenu.addListener( function( element, selection )
 				{
-					if ( !element || element.isReadOnly())
+					if ( !element || element.isReadOnly() )
 						return null;
 
-					var isTable	= element.is( 'table' ) || element.hasAscendant( 'table' );
+					var isTable = element.hasAscendant( 'table', 1 );
 
 					if ( isTable )
Index: /CKEditor/trunk/_source/plugins/tableresize/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tableresize/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/tableresize/plugin.js	(revision 5949)
@@ -394,5 +394,5 @@
 		}
 
-		target.getAscendant( 'table', true ).removeCustomData( '_cke_table_pillars' );
+		target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' );
 		evt.removeListener();
 	}
@@ -424,8 +424,8 @@
 							pillars;
 
-						if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', true ) )
+						if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) )
 							return;
 
-						table = target.getAscendant( 'table', true );
+						table = target.getAscendant( 'table', 1 );
 
 						if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) )
Index: /CKEditor/trunk/_source/plugins/tabletools/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 5949)
@@ -147,5 +147,5 @@
 
 		// Create a clone of the row.
-		var newRow = row.clone( true );
+		var newRow = row.clone( 1 );
 
 		insertBefore ?
@@ -217,5 +217,5 @@
 		// Get the cell where the selection is placed in.
 		var startElement = selection.getStartElement();
-		var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
+		var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 );
 
 		if ( !cell )
@@ -235,5 +235,5 @@
 				continue;
 
-			cell = ( new CKEDITOR.dom.element( $row.cells[ cellIndex ] ) ).clone( false );
+			cell = ( new CKEDITOR.dom.element( $row.cells[ cellIndex ] ) ).clone( 0 );
 
 			if ( !CKEDITOR.env.ie )
@@ -340,5 +340,5 @@
 	{
 		var startElement = selection.getStartElement();
-		var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
+		var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 );
 
 		if ( !cell )
Index: /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js
===================================================================
--- /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5949)
@@ -16,5 +16,5 @@
 				container.setHtml( '' );
 
-				for ( var i = 0 ; i < templatesDefinitions.length ; i++ )
+				for ( var i = 0, totalDefs = templatesDefinitions.length ; i < totalDefs ; i++ )
 				{
 					var definition = CKEDITOR.getTemplates( templatesDefinitions[ i ] ),
@@ -45,5 +45,5 @@
 
 				if ( template.image && imagesPath )
-					html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"' + ( CKEDITOR.env.ie6Compat? ' onload="this.width=this.width"' : '' ) + ' alt="" title=""></td>';
+					html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"' + ( CKEDITOR.env.ie6Compat ? ' onload="this.width=this.width"' : '' ) + ' alt="" title=""></td>';
 
 				html += '<td style="white-space:normal;"><span class="cke_tpl_title">' + template.title + '</span><br/>';
@@ -81,10 +81,10 @@
 						var range = new CKEDITOR.dom.range( editor.document );
 						range.moveToElementEditStart( editor.document.getBody() );
-						range.select( true );
-						setTimeout( function ()
+						range.select( 1 );
+						setTimeout( function()
 						{
 							editor.fire( 'saveSnapshot' );
 						}, 0 );
-					} );
+					});
 
 					editor.fire( 'saveSnapshot' );
@@ -147,5 +147,7 @@
 			var listContainer;
 
-			var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber();
+			var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber(),
+				lang = editor.lang.templates,
+				config = editor.config;
 			return {
 				title :editor.lang.templates.title,
@@ -158,5 +160,5 @@
 					{
 						id :'selectTpl',
-						label : editor.lang.templates.title,
+						label : lang.title,
 						elements :
 						[
@@ -170,9 +172,9 @@
 										html :
 											'<span>'  +
-												editor.lang.templates.selectPromptMsg +
+												lang.selectPromptMsg +
 											'</span>'
 									},
 									{
-										id : "templatesList",
+										id : 'templatesList',
 										type : 'html',
 										focus: true,
@@ -181,11 +183,11 @@
 												'<div class="cke_tpl_loading"><span></span></div>' +
 											'</div>' +
-											'<span class="cke_voice_label" id="' + templateListLabelId + '">' + editor.lang.templates.options+ '</span>'
+											'<span class="cke_voice_label" id="' + templateListLabelId + '">' + lang.options+ '</span>'
 									},
 									{
 										id : 'chkInsertOpt',
 										type : 'checkbox',
-										label : editor.lang.templates.insertOption,
-										'default' : editor.config.templates_replaceContent
+										label : lang.insertOption,
+										'default' : config.templates_replaceContent
 									}
 								]
@@ -202,7 +204,7 @@
 					listContainer = templatesListField.getElement();
 
-					CKEDITOR.loadTemplates( editor.config.templates_files, function()
-						{
-							var templates = editor.config.templates.split( ',' );
+					CKEDITOR.loadTemplates( config.templates_files, function()
+						{
+							var templates = ( config.templates || 'default' ).split( ',' );
 
 							if ( templates.length )
@@ -215,5 +217,5 @@
 								listContainer.setHtml(
 									'<div class="cke_tpl_empty">' +
-										'<span>' + editor.lang.templates.emptyListMsg + '</span>' +
+										'<span>' + lang.emptyListMsg + '</span>' +
 									'</div>' );
 							}
@@ -223,5 +225,5 @@
 				},
 
-				onHide : function ()
+				onHide : function()
 				{
 					this._.element.removeListener( 'keydown', keyNavigation );
Index: /CKEditor/trunk/_source/plugins/templates/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/templates/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/templates/plugin.js	(revision 5949)
@@ -43,5 +43,5 @@
 
 		// Look for pending template files to get loaded.
-		for ( var i = 0 ; i < templateFiles.length ; i++ )
+		for ( var i = 0, count = templateFiles.length ; i < count ; i++ )
 		{
 			if ( !loadedTemplatesFiles[ templateFiles[ i ] ] )
@@ -52,5 +52,5 @@
 		}
 
-		if ( toLoad.length > 0 )
+		if ( toLoad.length )
 			CKEDITOR.scriptLoader.load( toLoad, callback );
 		else
@@ -69,5 +69,4 @@
  * config.templates = 'my_templates';
  */
-CKEDITOR.config.templates = 'default';
 
 /**
Index: /CKEditor/trunk/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 5949)
@@ -158,5 +158,5 @@
 						editor.toolbox = new toolbox();
 
-						var labelId = 'cke_' + CKEDITOR.tools.getNextNumber();
+						var labelId = CKEDITOR.tools.getNextId();
 
 						var output = [ '<div class="cke_toolbox" role="toolbar" aria-labelledby="', labelId, '"' ],
@@ -188,5 +188,5 @@
 								continue;
 
-							var toolbarId = 'cke_' + CKEDITOR.tools.getNextNumber(),
+							var toolbarId = CKEDITOR.tools.getNextId(),
 								toolbarObj = { id : toolbarId, items : [] };
 
@@ -284,11 +284,11 @@
 								{
 									editor.execCommand( 'toolbarCollapse' );
-								} );
+								});
 
 							editor.on( 'destroy', function () {
 									CKEDITOR.tools.removeFunction( collapserFn );
-								} );
-
-							var collapserId = 'cke_' + CKEDITOR.tools.getNextNumber();
+								});
+
+							var collapserId = CKEDITOR.tools.getNextId();
 
 							editor.addCommand( 'toolbarCollapse',
@@ -296,11 +296,11 @@
 									exec : function( editor )
 									{
-										var collapser = CKEDITOR.document.getById( collapserId );
-										var toolbox = collapser.getPrevious();
-										var contents = editor.getThemeSpace( 'contents' );
-										var toolboxContainer = toolbox.getParent();
-										var contentHeight = parseInt( contents.$.style.height, 10 );
-										var previousHeight = toolboxContainer.$.offsetHeight;
-										var collapsed = !toolbox.isVisible();
+										var collapser = CKEDITOR.document.getById( collapserId ),
+											toolbox = collapser.getPrevious(),
+											contents = editor.getThemeSpace( 'contents' ),
+											toolboxContainer = toolbox.getParent(),
+											contentHeight = parseInt( contents.$.style.height, 10 ),
+											previousHeight = toolboxContainer.$.offsetHeight,
+											collapsed = !toolbox.isVisible();
 
 										if ( !collapsed )
Index: /CKEditor/trunk/_source/plugins/undo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 5949)
@@ -134,5 +134,5 @@
 			{
 				if ( undoManager.currentImage && new Image( editor ).equals( undoManager.currentImage ) )
-					setTimeout( function () { undoManager.update(); }, 0 );
+					setTimeout( function() { undoManager.update(); }, 0 );
 			});
 		}
@@ -340,5 +340,5 @@
 			this.index = -1;
 
-			this.limit = this.editor.config.undoStackSize;
+			this.limit = this.editor.config.undoStackSize || 20;
 
 			this.currentImage = null;
@@ -546,5 +546,4 @@
  * config.undoStackSize = 50;
  */
-CKEDITOR.config.undoStackSize = 20;
 
 /**
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5948)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 5949)
@@ -93,4 +93,5 @@
 				marker.scrollIntoView();
 				marker.remove();
+				marker = null;
 			}
 
@@ -133,5 +134,5 @@
 				range.deleteContents();
 
-				clone = !i && element || element.clone( true );
+				clone = !i && element || element.clone( 1 );
 
 				// If we're inserting a block at dtd-violated position, split
@@ -140,5 +141,5 @@
 				if ( isBlock )
 				{
-					while ( ( current = range.getCommonAncestor( false, true ) )
+					while ( ( current = range.getCommonAncestor( 0, 1 ) )
 							&& ( dtd = CKEDITOR.dtd[ current.getName() ] )
 							&& !( dtd && dtd [ elementName ] ) )
@@ -531,5 +532,5 @@
 						CKEDITOR.env.gecko && CKEDITOR.tools.setTimeout( activateEditing, 0, null, editor );
 
-						domWindow	= editor.window		= new CKEDITOR.dom.window( domWindow );
+						domWindow	= editor.window	= new CKEDITOR.dom.window( domWindow );
 						domDocument	= editor.document	= new CKEDITOR.dom.document( domDocument );
 
@@ -1071,5 +1072,5 @@
 	if ( CKEDITOR.env.gecko )
 	{
-		( function ()
+		(function()
 		{
 			var body = document.body;
