I got this script which works perfect when i am not using jquery's alert plugin. But i need to use alert plugin and after learning from a tutorial i implemented it. But the script does not seem to work.
<script type = "text/javascript">
$(document).ready(function() {
    var pos = $("tr.verify").attr('id');
    var frmId = $('#'+ pos).find("form").attr('id');
    $('#'+ frmId).click(function(event) {
    jConfirm('Are you sure you want to verify?', 'Confirmation Dialog', 
    function(r) {
        if(r==true)
        {   
        $.ajax({
        type: "POST",
        url: "verify.php",
        data: $("form#" + frmId).serialize(),
        success: function(msg){
            if(msg.indexOf("success") > -1)
            {
                //success in registaration
            var inputsub = $("form#" + frmId).find('input[type=submit]').attr('id');
            $('#' + inputsub).val('verified').attr('disabled','disabled');
            } //end of if
            else if(msg.indexOf("Error") > -1)
            {
                alert(msg);
            } //end of else if
            } // end of success event
            }); //end of ajax code
    }  // end of if r == true
    return false;
    }); //the alert code
    }); //end of form submit
    }); //Main document ready code
</script>