Index: /CKEditor/branches/features/kama/_source/skins/kama/skin.js
===================================================================
--- /CKEditor/branches/features/kama/_source/skins/kama/skin.js	(revision 3547)
+++ /CKEditor/branches/features/kama/_source/skins/kama/skin.js	(revision 3548)
@@ -27,5 +27,6 @@
 				uiColor: null,
 
-				getUiColor : function() {
+				getUiColor : function()
+				{
 					return this.uiColor;
 				},
@@ -33,8 +34,8 @@
 				setUiColor : function( color )
 				{
-					var editor = this,
-						uiStyle = this.container.getDocument().getBody().append('style'),
-						cssId = '#cke_' + editor.name.replace('.', '\\.'),
-						cssSelectors =
+					var uiStyle = CKEDITOR.document.getHead().append('style'),
+						cssId = '#cke_' + editor.name.replace('.', '\\.');
+
+					var cssSelectors =
 						[
 							cssId + " .cke_wrapper",
@@ -42,19 +43,22 @@
 							cssId + "_dialog a.cke_dialog_tab",
 							cssId + "_dialog .cke_dialog_footer"
-						],
-						cssSrc = cssSelectors.join( ',' )
+						];
+
+					var cssSrc = cssSelectors.join( ',' )
 							+ "{ background-color: ${color} !important; }";
-					
+
 					uiStyle.setAttribute("type", "text/css");
-					
-					return (this.setUiColor = function( color )
-					{
-						var css = cssSrc.replace( '${color}', color );
-						editor.uiColor = color;
-						if ( CKEDITOR.env.ie )
-							uiStyle.$.styleSheet.cssText = css;
-						else
-							uiStyle.setHtml( css );
-					})( color );
+
+					return ( this.setUiColor =
+						function( color )
+						{
+							var css = cssSrc.replace( '${color}', color );
+							editor.uiColor = color;
+							
+							if ( CKEDITOR.env.ie )
+								uiStyle.$.styleSheet.cssText = css;
+							else
+								uiStyle.setHtml( css );
+						})( color );
 				}
 			});
@@ -62,14 +66,5 @@
 			// Apply UI color if specified in config.
 			if ( editor.config.uiColor )
-			{
-				// Delay to gain access to container element.
-				CKEDITOR.tools.setTimeout( function()
-					{
-						if ( !this.container )
-							CKEDITOR.tools.setTimeout( arguments.callee, 1000, this );
-						else
-							this.setUiColor( this.config.uiColor );
-					}, 1000, editor);
-			}
+				editor.setUiColor( editor.config.uiColor );
 		}
 	};
