trying to use facebook style tokeninput script which I\'ll use in the same way as FB uses(using jquery-ui to get the modal window) to send messages to friends in a social ne
It appears that you're loading the jquery.tokeninput.js file twice - you shouldn't need it in $(document).ready(...) so long as it comes after jQuery.
Once you've displayed your modal (called $dialog.dialog('open');) try, calling:
$('#demo-input-facebook-theme').tokenInput("clear");
That should clear all of the previous tokens, then you can add any default tokens you want after that.