Hi,
You can do the following:
1) On your Master page add a placeholder webpart just above the JavaScript you are currently loading.
2) on the inner page template, add javascript webpart to the newly added placehoder area.
That should od the trick.
good luck!