Need help deciphering JQuery example
<p>I just started learning jQuery and OO Javascript, so I am trying to figure out which belongs to which and what they do. I came across this code in the JQuery documentation</p>

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

  $sub // a subclass of jQuery
  $sub === jQuery; //= false

  $sub.fn.myCustomMethod = function(){
    return 'just for me';
  }

  $sub(document).ready(function() {
    $sub('body').myCustomMethod(); //= 'just for me'
  });

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

<p>Questions:</p>

<ol>
<li>Why is (function surrounded by ()  ?</li>
<li>What does this mean (jQuery.subclass()); ? Is this a JQuery thing or part of regular javascript?</li>
</ol>

<p>Thanks</p>
