What is a $(function() { ... }) function and when is it called in the following example?
<p>I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net. I am learning the following code dealing with javascript, my confusion is for $(function(){...} part of code, when it will be called and what is its function? I did not see any code invokes this function.</p>

<pre><code>&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;title&gt;Test&lt;/title&gt;
    &lt;link type="text/css" href="tabcontrol/themes/base/ui.all.css" rel="stylesheet" /&gt;
    &lt;script type="text/javascript" src="tabcontrol/jquery-1.3.2.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(function() {
            $("#tabs").tabs();
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div class="demo"&gt;

&lt;div id="tabs"&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="#tabs-1"&gt;tab1&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#tabs-2"&gt;tab2&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div id="tabs-1"&gt;
        &lt;p&gt;tab1 info&lt;/p&gt;
    &lt;/div&gt;
    &lt;div id="tabs-2"&gt;
        &lt;p&gt;tab2 info&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>thanks in advance,
George</p>
