Modal Confirmation Custom Dialog Box
<p>I wonder whether someone may be able to help me please.</p>

<p>I've put together a script which allows a user to view their uploaded images in a gallery format as shown <a href="http://www.mapmyfinds.co.uk/development/gallerytest.php#/0" rel="nofollow">here</a>.</p>

<p>Using the jQuery demo <a href="http://jqueryui.com/demos/dialog/modal-confirmation.html" rel="nofollow">here</a>, I'm now trying to implement a custom dialog box to appear when the user selects a image to be deleted. I already have the error message written as shown in the extract below:</p>

<pre><code>Galleria.ready(function() {
    this.$('thumblink').click();

    $(".galleria-image").append("&lt;span class='btn-delete'&gt;&lt;/span&gt;");  
    $(".btn-delete").live("click", function() {
        var img = $(this).closest(".galleria-image").find("img");      
        alert('Deleting image... ' + $(img).attr("src"));     
        return false; 
    }); 
});
</code></pre>

<p>The problem I'm having is that I can't find a way to create the <code>div</code> around it which is necessary for the dialog box. I'm relatively new to Javascript, so perhaps this is a really basic error, but I just wondered whether someone could have a look at this please and let me know where I've gone wrong?</p>

<p>Many thanks and regards</p>
