[jQuery] how to Passing Data jQuery UI Dialog?

[jQuery] how to Passing Data jQuery UI Dialog?


I'm put an image, which when it clicks it will delete some data on the
database
<img src="template/default/images/removeGray.gif" id="remove"
onClick="removeEdu(13)">
On above example, when user click it will delete data with id = 13 on
database.
This is the function
function removeEdu(id) {
        $('#dialog').dialog('open');
         return false;
}
And this is for the dialog
$("#dialog").dialog({
            autoOpen:false,
            bgiframe: true,
            resizable: false,
            width : 250,
            modal: true,
            overlay: {
                backgroundColor: '#000',
                opacity: 0.5
            },
            buttons: {
                'Delete': function() {
                    $.post("ajax.php", { id : id },function(){
                            $('#edulist').empty();
                            $('#edulist').load('show.php');
                    } );
                    $(this).dialog('close');
                },
                Cancel: function() {
                    $(this).dialog('close');
                }
            }
        });
But the problem is, how can I pass the id from the function to
variabel on $.post.
Thanx Before