function initDragAndDrop( dialog )
	{
		var lastCoords = null,
			abstractDialogCoords = null,
			element = dialog.getElement().getFirst(),
			editor = dialog.getParentEditor(),
			magnetDistance = editor.config.dialog_magnetDistance,
			margins = editor.skin.margins || [ 0, 0, 0, 0 ];

		if ( typeof magnetDistance == 'undefined' )
			magnetDistance = 20;

		function mouseMoveHandler( evt )
		{
			var dialogSize = dialog.getSize(),
				viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(),
				x = evt.data.$.screenX,
				y = evt.data.$.screenY,
				dx = x - lastCoords.x,
				dy = y - lastCoords.y,
				realX, realY;

			lastCoords = { x : x, y : y };
			abstractDialogCoords.x += dx;
			abstractDialogCoords.y += dy;

			if ( abstractDialogCoords.x + margins[3] < magnetDistance )
				realX = - margins[3];
			else if ( abstractDialogCoords.x - margins[1] > viewPaneSize.width - dialogSize.width - magnetDistance )
				realX = viewPaneSize.width - dialogSize.width + margins[1];
			else
				realX = abstractDialogCoords.x;

			if ( abstractDialogCoords.y + margins[0] < magnetDistance )
				realY = - margins[0];
			else if ( abstractDialogCoords.y - margins[2] > viewPaneSize.height - dialogSize.height - magnetDistance )
				realY = viewPaneSize.height - dialogSize.height + margins[2];
			else
				realY = abstractDialogCoords.y;

			dialog.move( realX, realY );

			evt.data.preventDefault();
		}

		function mouseUpHandler( evt )
		{
			CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler );
			CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler );

			if ( CKEDITOR.env.ie6Compat )
			{
				var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
				coverDoc.removeListener( 'mousemove', mouseMoveHandler );
				coverDoc.removeListener( 'mouseup', mouseUpHandler );
			}
		}

		dialog.parts.title.on( 'mousedown', function( evt )
			{
				dialog._.updateSize = true;

				lastCoords = { x : evt.data.$.screenX, y : evt.data.$.screenY };

				CKEDITOR.document.on( 'mousemove', mouseMoveHandler );
				CKEDITOR.document.on( 'mouseup', mouseUpHandler );
				abstractDialogCoords = dialog.getPosition();

				if ( CKEDITOR.env.ie6Compat )
				{
					var coverDoc = coverElement.getChild( 0 ).getFrameDocument();
					coverDoc.on( 'mousemove', mouseMoveHandler );
					coverDoc.on( 'mouseup', mouseUpHandler );
				}

				evt.data.preventDefault();
			}, dialog );
	}
Removes a UI element definition from the content definition.
@param {String} id The id of the UI element definition to be
		removed.
@returns {CKEDITOR.dialog.uiElementDefinition} The element
		definition removed.
@example