title: JavaScript functions in footer
body: <p>I'm currently using html5 boilerplate, which puts jQuery and your plugins into the footer.  The only problem is, I use the same footer.php file in every page.  How do I go about including page specific functions if the plugins aren't loaded yet?  I.e.</p>
  
  <pre><code>&lt;?php include_layout_template('header.php', '../');?&gt;
  &lt;div id='mediaspace'&gt;This text will be replaced&lt;/div&gt;
  
  &lt;!-- Video for this page: --&gt;
  
  &lt;script type='text/javascript'&gt;
    jwplayer('mediaspace').setup({
    'flashplayer': '../resources/player.swf',
    'file': 'http://content.longtailvideo.com/videos/flvplayer.flv',
    'controlbar': 'bottom',
    'width': '470',
    'height': '320'
  });
  &lt;/script&gt;
  
  &lt;?php //This file has the jwplayer function in it: 
  include_layout_template('footer.php', '../'); ?&gt;
  </code></pre>
  
  <p>Doing this I get </p>
  
  <pre><code>Uncaught ReferenceError: jwplayer is not defined 
  </code></pre>
  
  <p>Is it going to be easier to just put the plugin includes in the header? How do people usually tackle stuff like this in boilerplate/loading scripts at the end?</p>