How to Include JavaScript on a Public Facing Website?
<p>I am building a public facing website and I am using a lot of jQuery and jQueryUI. What I have noticed is that most site on internet that use jQuery and jQueryUI don't have code like this in their pages.</p>

<pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){

    $("a").click(function(event){
      alert("Thanks for visiting!");
    });

    $( "input:submit" ).button();
  });
&lt;/script&gt;
</code></pre>

<p>I know this is a simplistic example but most sites, for example SO have only one obfuscated js file included for all the pages. It doesn't even seem like they use $(document).ready anywhere. On my current site it seems like I would need to include a js file for each page. My question is how is it suppose to be done and is there a best practice on how to use/include javascript in a page?</p>
