'$' is undefined error
<p>trying to use a jqurey plugin and it is not working and this error keeps popping ('$' is undefined error) i am very new to javascript and jqurey so please be as simple as possible </p>

<pre><code>&lt;script type="text/javascript" src="wpscripts/jquery-1.4.1.min.js"&gt;&lt;/script&gt; 
&lt;!--[if IE 6]&gt;
&lt;script src="thumb-images/DD_belatedPNG_0.0.8a-min.js"&gt;&lt;/script&gt;
&lt;script&gt;DD_belatedPNG.fix('#preview_inner div a');&lt;/script&gt;
&lt;![endif]--&gt; 
&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
        var outer = $("#preview_outer");
        var arrow = $("#arrow");
        var thumbs = $("#thumbs span");
        var preview_pos;
        var preview_els = $("#preview_inner div");
        var image_width = preview_els.eq(0).width();
        thumbs.click(function () {
            preview_pos = preview_els.eq(thumbs.index(this)).position();
            outer.stop().animate({ 'scrollLeft': preview_pos.left }, 500);
            arrow.stop().animate({ 'left': $(this).position().left }, 500);
        });
        arrow.css({ 'left': thumbs.eq(0).position().left }).show();
        outer.animate({ 'scrollLeft': 0 }, 0);
        $("#preview_inner").css('width', preview_els.length * image_width);
    });
&lt;/script&gt;
</code></pre>
