Help understanding javascript convention
<p>I see JQuery plug-ins and other javascript library documents set up like this:</p>

<pre><code>(function($,window,undefined){
    ...plug-in code...
});
</code></pre>

<p>Why is it necessary to wrap the script in a function, and what args does can that function receive?</p>
