Add JavaScript at the bottom of a page How can I add JavaScript scripts to bottom of a page, in my template?
I think you can do it with drupal_add_js(); it seems that the scope key option is your friend!