Asp.Net&JavaScript: Problem With Image Slide
<p>I'm trying to slide background on hover.
I used the code below in HTML webpage once and it worked correctly.
But when I tried to use it in my ASPX page, first it gave this error:
"Microsoft JScript RunTime Error: '$' is undeclared"
So I deleted the 1st $ before function(). But I couldn't make it work still.
Any ideas why it does not work?
Code is:</p>

<pre><code>&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
        $(function () {
            $("#vertical div a").hover(function () {
                $("img", this).stop().animate({ top: "-173px" }, { queue: false, duration: 400 });
            }, function () {
                $("img", this).stop().animate({ top: "0px" }, { queue: false, duration: 400 });
            });
        });
    &lt;/script&gt;
    &lt;style type="text/css"&gt;
        .altikisilik
        {
            display: block;
            background: url('Images/Default/Brazil_bg.png') top;
        }

        #vertical div
        {
            position: relative;
            overflow: hidden;
        }
        #vertical img
        {
            position: absolute;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div id="vertical" class="clear" runat="server"&gt;
        &lt;div&gt;
            &lt;a class="altikisilik" href="Default.aspx"&gt;
                &lt;img src="Images/Default/Brazil.png" border="0" alt="Brazil" /&gt;
            &lt;/a&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
</code></pre>
