ASP.NET Master Page and jQuery
<p>I've got a single site.js file which has a </p>

<pre><code>$(document).ready(function () {
    initMenu();
});
</code></pre>

<p>and the corresponding MasterPage:</p>

<pre><code>&lt;head&gt;
    &lt;script src="@Url.Content("~/Scripts/jquery-1.4.1.min.js")" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="@Url.Content("~/Scripts/Site.js")" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
</code></pre>

<p>In the above example <code>initMenu()</code> is required to run on all pages, so naturally the site.js is put in the master page.</p>

<p>However, there are some pages which requires a different set of initialization code so it does not feel to make all pages run the following initialization.  </p>

<pre><code>$(document).ready(function () {
        initMenu();
        showGallery(); &lt;-- Problem?
    });
</code></pre>

<p>How should i structure the JS references so all pages can share a common initialization and other pages do not?</p>
