Lazy loading and dependency resolution
<p>some time ago, I was reading an article(a library built by some guy) about how his library can do </p>

<ol>
<li>lazy loading of JS</li>
<li>resolve dependencies between JS
(typically encountered when trying
to "include" one js from another)</li>
<li>include files only once. thought
specified multiple times regardless
of how they are called (either
directly specifying it as file or
specifying it as one of the
dependencies)</li>
</ol>

<p><strong>I forgot to bookmark it, what a mistake</strong>. Can some one point me to something which can do the above. I know DOJO and YUI library have something like this, but I am looking for something which I can use with jQuery</p>

<p>I am probably looking for one more feature as well.</p>

<ul>
<li>My site has asp.net user controls
(reusable server side code snippets)
which have some JS. Some of them get
fired right away, when the page is
loading which gives a bad user
experience. <a href="http://developer.yahoo.com/performance/rules.html#js_bottom" rel="nofollow">Yahoo performance
guidelines</a> specify that JS should
be at the bottom of the page, but
this is not possible in my case as
this would require me to separate the
JS and the corresponding server side
control into different files and
maintenance would be difficult. I
definitely can put a  jQuery
document.ready() in my user control
JS to make sure that it fires only
after the DOM has loaded, but I am
looking for a simpler solution.</li>
</ul>

<p>Is there anyway that I could say "begin executing <strong>any</strong> JS only after DOM has loaded" in a global way than just writing "document.ready" within every user control ?</p>
