Add js file in .info theme file. And set it to load first
You can add the scope (header/footer) where to load the JS and also add a weight.

Example options:

$options = array('type' =&gt; 'file', 'scope' =&gt; 'header', 'weight' =&gt; 5));


Play around with these to get the file loaded on the right position that suits your needs. For more detailed information check the documentation.