title: ckeditor issue in jquery ui dialog
body: <p>I use ckeditor for richtextbox editing in MVC3 .
  In normal View, ckeditor is working good ,but when I try to use it with jQuery ui Dialog  I have some problems with it.</p>
  
  <p>My dialog:</p>
  
  <pre><code>$(document).ready(function() {
      jQuery.noConflict();
      jQuery("#contentOpen").live("click", function(e) {
        e.preventDefault();
          jQuery('&lt;div /&gt;', {
              class: 'customPopUp',
              id: "popUpDialog",
          }).appendTo("body")
  
              .load(this.href, function() {
                jQuery(this).dialog({
                      close: function() {
                          if (CKEDITOR.instances['NewsCulture_Content']) {
                              CKEDITOR.instances['NewsCulture_Content'].destroy();
                          }
                          jQuery(this).remove();
                      },
  
                      open: jQuery(function() {
                        jQuery('#NewsCulture_Content').ckeditor();
  
                      }),
                      width: 'auto',
                      height: 'auto',
                  });
              });
      });
  });
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@{
    Layout = null;
   }     
  
  &lt;script src="@Url.Content("~/Scripts/ckeditor/ckeditor.js")" type="text/javascript"&gt;/script&gt; 
  &lt;script src="@Url.Content("~/Scripts/ckeditor/adapters/jQuery.js")" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>@model CyberSystems.ViewModel.ViewModels.System.VmSysNewsCreatre
  
     @using (Ajax.BeginForm("News_Room_AddNew", "Administration", null,
          new AjaxOptions {HttpMethod = "POST", OnComplete = "addBarNewsCompelte"}, new {id = "addRoomNewsForm"}))
  {
  
        @Html.TextAreaFor(c=&gt;c.NewsCulture.Content)
  }
  </code></pre>
  
  <p>First time everything is fine and it looks like in the <a href="http://imageshack.com/a/img823/1079/v0v4.png" rel="nofollow">picture1</a> ;
  After two click on same plugin (Styles) something  is going wrong  , <a href="http://imageshack.com/a/img823/1079/v0v4.png" rel="nofollow">picture2</a>.
  I have no idea what is the problem , any ideas will be appreciated...</p>