Loadinf flowplayer in a jQuery UI Dialog problem.

Loadinf flowplayer in a jQuery UI Dialog problem.

Hi everyone,
Hi all,
I have a link which when clicked opens up a jQuery UI Dialog.
The file looks something like this
<script type="text/javascript">
        $(document).ready(function(){
            alert("loaded");
            $('.videobox').click(function(event){
        alert("follow");
        event.preventDefault();
        var url = event.target;   
       
        var dialogOpts = {
                title: "Dialog",
                modal: true,
                autoOpen: false,
                height: 500,
                width: 800
                };
       
        var $dialog = $('<div> </div>').load('mydata.html').dialog(dialogOpts);
       
        var urll = $('.bb-mdo-content-subcontentlink').attr('href');       
        $dialog.dialog('open');   
        return false;
    });
        })

    </script>
</head>

<body>
    <div>
        <a class="videobox" href="google.com">
            Click me!
        </a>
    </div>   
</body>
The data in the dialog is loaded through ajax which is a html file "mydata.html" which has the following code.

<body>
<div id="player" style="width:640px;height:360px;"></div>
<script>

$f("player", "flowplayer-3.2.2.swf", {
clip: {
url: 'myvideo.flv',
autoPlay: true,
autoBuffering: true
},
onLoad: function(){
alert("player loaded");
}
})
</script>
</body>

When i click on the link dialog opens up and the flowplayer gets loaded,  and the alert "player loaded gets executed, but if i click on the link for the second time the player is not loaded. I am not sure what might be the problem. Can anybody help me pointing out the issue?