title: Extending jQueryUI widgets without conflicts
body: <p>I'm interested in extending the behavior of jqueryUI's dialog widget. In the past I've overridden functions like this:</p>
  
  <pre><code>//Custom dragging
  $.ui.dialog.prototype._makeDraggable = function () {}
  </code></pre>
  
  <p>But I think I should change to using the widget factory to create a new widget instead that inherits from dialog.</p>
  
  <p>I believe the code should look like this:</p>
  
  <pre><code>(function($, undefined) {
    $.widget('cs.dialog', $.ui.dialog, {
      // definition of the widget goes here
    });
  }(jQuery));
  </code></pre>
  
  <p>My question is will this cause a conflict even though my dialog widget is in the cs namespace and jquery's is in the ui namespace? I believe jquery attaches the widget method to $.fn so I think it would. </p>
  
  <p>If so, what's the purpose of the namespace if you still get conflicts? DO I need to name my widget "cs.csDialog" to keep it unique? I feel like there's something missing in my understanding of this.</p>
  
  <p>Thanks for any help or clarification.</p>