jQuery Dialog Open (more than once) ?
I found some jQuery code online for the jQuery Dialog and it works great. Problem i am having is when i click on the linked image to open dialog it opens like it should but if i close the dialog and click the linked image again it will not reopen the jQuery Dialog.

Here is the jQuery code:

    $(document).ready(function(){
           $('#gravatarprofilemoreinfoshow').click(function(){
               $('#gravatarprofilemoreinfo').dialog({
                   modal:true,
                   resizable: false,
                   draggable: true,
                   width: '486px',
                   height: 'auto',
                   hide: 'size',
                   autoOpen: true,
                   buttons:{ "Close": function() { $(this).dialog("close"); } },
                   close: function(ev, ui) { $(this).remove(); }
               });
           });
       });

The HTML markup is:

    <a href="#" id="gravatarprofilemoreinfoshow" rel="/somelink" >
    <img class="profileimgright profileimgframe" alt="Profile Image" src="/url/to/image" />
    </a>

If someone could help adjust the code correctly that would be a so much appreciated. Also is there a way to alter the code so it does not depend on unique id's ?

Reason i ask is i would like to use the jquery code above across my site to show different information but the code above requires a unique name (sorry not sure what they call it in jquery) and want the code to be reusable across my website.

Thanks  
PHPLOVER
jQuery Dialog Open (more than once) ?
===

I found some jQuery code online for the jQuery Dialog and it works great. Problem i am having is when i click on the linked image to open dialog it opens like it should but if i close the dialog and click the linked image again it will not reopen the jQuery Dialog.

Here is the jQuery code:

    $(document).ready(function(){
           $('#gravatarprofilemoreinfoshow').click(function(){
               $('#gravatarprofilemoreinfo').dialog({
                   modal:true,
                   resizable: false,
                   draggable: true,
                   width: '486px',
                   height: 'auto',
                   hide: 'size',
                   autoOpen: true,
                   buttons:{ "Close": function() { $(this).dialog("close"); } },
                   close: function(ev, ui) { $(this).remove(); }
               });
           });
       });

The HTML markup is:

    <a href="#" id="gravatarprofilemoreinfoshow" rel="/somelink" >
    <img class="profileimgright profileimgframe" alt="Profile Image" src="/url/to/image" />
    </a>

If someone could help adjust the code correctly that would be a so much appreciated. Also is there a way to alter the code so it does not depend on unique id's ?

Reason i ask is i would like to use the jquery code above across my site to show different information but the code above requires a unique name (sorry not sure what they call it in jquery) and want the code to be reusable across my website.

Thanks  
PHPLOVER