Create JQuery like plugin structure in custom javascript
<p><strong>I DO NOT WANT TO CREATE A JQUERY PLUGIN</strong></p>

<p>Let's say I have something like this: </p>

<pre><code>// In folib.js
function Foo() {this.Prop = function() {//do something}};
</code></pre>

<p>So my users can reference my JavaScript library and instantiate my object all day</p>

<pre><code>// In consumer
foo = new Foo();
alert(foo.Prop);
</code></pre>

<p>Now, I want to create a JQuery like plugin system for my class, whereas I can create plugin script libraries which extend Foo().</p>

<p>I think I should be doing something like this...</p>

<pre><code>(function( foo ){
    foo.myPlugin = function() {  
       // Do your awesome plugin stuff here
    };
})(Foo);
</code></pre>

<p>But I can't get that working. Any ideas on how this is done in JQuery? I can't figure it out :(</p>
