jQuery dialog into div
===

The problem is: I have a div with a link and on click should open a jQuery dialog above/within the div itself with fadein and out. I created this:

     $(function() {
          $( ".div" ).click(function() {
              $("#dialog").fadeIn(1000).delay(400).fadeOut(1000)
          });
     });

    <div id="dialog" title="Basic dialog" style="display: none">Add to cart</div>

    #dialog{
    background-color: #FFFEDF;
    border: 1px solid #FFECA2;
    width: 123px;
    text-align: center;
    padding: 3px 9px;}

This is an example :)

http://img593.imageshack.us/img593/9852/exampled.jpg

How can i do this?