jquery popup is not working
<p>i want to open a pop in my mvc3 razor application for that i am witting following  code .
When i click button .nothing happen . and i see a error in Error console " $(#dialog).dialog is not a function ".  I am new to jquery , can any one help me what mistake i am doing.</p>

<pre><code> $(function () {   
        $('#dialog').dialog({
            autoOpen: false,
            width: 400,
            resizable: false,
            title: 'hi there',
            modal: true,
            open: function(event, ui) {
                //Load the Edit action which will return 
                // the partial view _Edit
                $(this).load("@Url.Action("Edit")");
            },
            buttons: {
                "Close": function () {
                    $(this).dialog("close");
                }
            }
        });

        $('#Button1').click(function () {
            $('#dialog').dialog('open');
        });
    });  
</code></pre>
