Jquery alert hello Plugin doesnt work
<p>Im trying to make  simple Jquery plugin. I went through the Jquery documention and I reduced the layout to make a simple alert. This is my Jquery Plugin code. </p>

<pre><code>        (function($){
      $.fn.foo = function(){
        alert("HI");
      };


})(jQuery);
</code></pre>

<p>Than on my main page I have the Jquery reference URL and this code</p>

<pre><code>  &lt;script type="text/javascript"src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
  foo();
    });
&lt;/script&gt;
</code></pre>

<p>I keep getting errors in the debugger
SCRIPT5009: 'foo' is undefined </p>

<p>Please help me fix this.</p>
