title: Jquery UI Dialog Center
body: <p>I have a problem with centering a Jquery UI Dialog.</p>
  
  <p>I'm bringing some images dynamically from FLICKR, when I click on my thumbnail, the image is positioned at the botton right of the page,
  if I close the dialog and click the thumbnail again, then the Dialog opens in the correct centered position.</p>
  
  <p>Why doesn't it appear at the right (centered) position on the first click?</p>
  
  <p>Here is my JS</p>
  
  <p>I have used this as my starting point <a href="http://jqueryui.com/demos/dialog/#animated" rel="nofollow">http://jqueryui.com/demos/dialog/#animated</a></p>
  
  <pre><code>$(function() {
      $( "#MYdialog" ).dialog({
           autoOpen: false,
          resizable: false,
          position: 'middle',
          draggable: false,
          width: 'auto',
          center: true, 
          modal: true,
          show: "fade",
          hide: "fade",             
      });
  });
  </code></pre>