[jQuery] How to use the simple modal if there are two modal windows need be pop-up on ready method?

[jQuery] How to use the simple modal if there are two modal windows need be pop-up on ready method?


Hi all
How to use the simple modal if there are two modal windows need
be pop-up on ready method?
I use the confirm style of simple modal and only the fist window can
be pop-up, the second doesn't work.
thanks for your help.
thanks
Camel
BTW: the code of javascript is following
<script type="text/javascript">
$(document).ready(function(){
    $('#confirm').modal({
            close:false,
            position: ["20%",],
            overlayId:'confirmModalOverlay',
            containerId:'confirmModalContainer',
            onShow: function (dialog) {
                dialog.data.find('.yes').click(function () {
                    alert("click Yes in the confirm window.");
                    $.modal.close();
                });
            }
     });
});
$(document).ready(function(){
    $('#duplicated').modal({
            close:false,
            position: ["20%",],
            overlayId:'confirmModalOverlay',
            containerId:'confirmModalContainer',
            onShow: function (dialog) {
                dialog.data.find('.yes').click(function () {
                    alert("click Yes");
                    $.modal.close();
                });
            }
     });
});
</script>