[jQuery] jQuery does not work when included in another JS file

[jQuery] jQuery does not work when included in another JS file


I'm trying to include jQuery from within another javascript file,
using this..
<-- JavaScript Include -->
function include_js(name) {
var th = document.getElementsByTagName('head')[0];
var s = document.createElement('script');
s.setAttribute('type','text/javascript');
s.setAttribute('src',name);
th.appendChild(s);
}
include_js('jquery.js');
<-- JavaScript Include -->
This however, does not work. It does not recognize jQuery... If I use
this same method but include a js file that simply has an alert in
it... that works.... Any ideas how I can include jQuery like this?
Thanks!