jquery plugin change $('#somediv').foo to $.foo
<p>I'm writing a jquery plugin and its working well but it needs an outer->outer wrapper #id (#somediv) ie:</p>

<pre><code>$('#somediv').foo({
     wrap : 'example',
     one  : 'red',
     two  : 'blue',
  });
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div id="somediv"&gt;
 &lt;&lt;div id="example"&gt;
&lt;!-- Do stuff --&gt;
 &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>to me the outer->outer wrapper (#somediv) is not needed and would like to be able to remove the need for it and simply have one wrapper which is actually the <code>wrap : 'example',</code> option and call the plugin options like this:</p>

<pre><code>$.foo({
     wrap : 'example',
     one  : 'red',
     two  : 'blue',
  });
</code></pre>

<p>HTML:</p>

<pre><code> &lt;div id="example"&gt;
&lt;!-- Do stuff --&gt;
 &lt;/div&gt;
</code></pre>

<p>so as the title says how can I change change <code>$('#somediv').foo</code> to <code>$.foo</code>?</p>

<p><strong>Basic plugin layout:</strong></p>

<pre><code>;(function($) {
    $.fn.foo = function(opts) {
        var defaults = {
         wrap : 'example',
         one  : 'red',
         two  : 'blue'
        };
        var opts = $.extend(defaults, opts);
        return this.each(function() {

//  Do stuff

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

<p>As usual all help is appreciated and thanks in advance.</p>
