Cjuidialog External Path Open

I want to create 10 CJuiDialogs with different content and use them in many files. Can I open them from external file ?? Like js scripts ?? Something like




$('#prompt').click(function() {

$("#/pathToMyDialog/mydialog").dialog("open");

});