Best way to add methods to jquery plugin
<p>The "official" documentation <a href="http://docs.jquery.com/Plugins/Authoring#Namespacing" rel="nofollow">http://docs.jquery.com/Plugins/Authoring#Namespacing</a> states that methods should be added to a jQuery plugin as shown below.  I haven't seen this design pattern implemented often.  It seems like if other plugins use var method, there might be conflicts.  Is this really the preferred method, or should I be doing it differently?</p>

<pre><code>(function( $ ){

 var methods = {
  method1: function( options ) {},
  method2: function( ) {}
 };

 $.fn.tooltip = function( method ) {
  if ( methods[method] ) {
   return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
  } else if ( typeof method === 'object' || ! method ) {
   return methods.init.apply( this, arguments );
  }
 };

})( jQuery );
</code></pre>
