title: jQuery UI Dialog Code Help
body: <p>Okay, don't laugh, but my friend gave me a fix to a jQuery UI code before I asked for another fix here, and now I have no idea how to combine the two.  I'm a total n00b so please help me out here.  I tried, but keep getting a syntax error?</p>
  
  <p>I need to merge this (I think it goes right after title):</p>
  
  <pre><code>beforeClose: function(){   $(this).remove();   }
  </code></pre>
  
  <p>Into this:</p>
  
  <pre><code>function openDialog(url) {
      $("&lt;div class='popupDialog'&gt;Loading...&lt;/div&gt;")
          .dialog({
              autoOpen: false,
              closeOnEscape: true,
              width: '900',
              height: 'auto',
              modal: true,
              title: 'Bonus Features'
          }).bind('dialogclose', function() {
              jdialog.dialog('destroy');
          }).load(url, function() {
              $(this).dialog("option", "position", ['center', 'center'] ).bind('dialogopen', function() {
                      adjustJQueryDialogOverlay();
                  });
                  $(this).dialog("open");
          });
  }
  
  $(window).resize(function() {
      $(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
  });
  </code></pre>
  
  <p>Can anyone please help?  Thanks.</p>