How to execute jQuery on body elements?
If your question is "How do I add theme javascript to the footer instead of the header?", I have this snippet in my starter theme's template.php file:

/**
 * Add a custom, theme-specific JS file. Added here so it can be placed in the
 * footer instead of the header which is where the info file places JS.
 */
$options = array(
  'type' =&gt; 'file',
  'scope' =&gt; 'footer',
); 
drupal_add_js(drupal_get_path('theme', 'bootstrap_starter') . '/js/theme.js', $options);


Change bootstrap_starter to the name of your theme and make sure the folder js contains a file named theme.js within your theme folder.

See drupal_add_js() for more info.