JavaScript Self-Executing Anonymous Modules
<p>Expanding on this <a href="http://stackoverflow.com/a/5947280">answer</a> I would like to know how to create new modules that belong to the same namespace (PROJECT). </p>

<pre><code>A.init(); -- will become --&gt; PROJECT.A.init();
</code></pre>

<p>Modules</p>

<pre><code>(function( A, $, undefined ) {
    A.init = function() {
        console.log( "A init" );
    };   
}( window.A = window.A || {}, jQuery ));

(function( B, $, undefined ) {
    B.init = function() {
        console.log( "B init" );
    };   
}( window.B = window.B || {}, jQuery ));

A.init();
B.init();
</code></pre>

<p><a href="http://jsfiddle.net/sKBNA/">http://jsfiddle.net/sKBNA/</a></p>
