First of all I don't think this is going to work for you. jQuery Mobile panel will work ONLY as a part of data-role="page"
div. This will change with version 1.4 but currently you are stuck. Basically your whole content must be wrapped with this DIV:
<div data-role="page" id="pageID"></div>
This bug is opened in a jQuery Mobile GitHub repository, link. As you can see it is planed for version 1.4. I would advise you to wait for it. Version 1.4 should come around Q2 of this year.
Even if you go this road you will need to prevent jQuery Mobile from restyling your content. It can be prevented easily if you customize jQM framework with their customization tool.
Next step would be do remove document ready event and replace it with correct jQuery Mobile page event- Problem here is that document ready sometimes can trigger before page is loaded into the DOM and your panel will not be attached. To find out more about page events read my other answer: jQuery Mobile: document ready vs page events.
And finally when you dynamically create panel you need to force jQuery Mobile to style it correctly. For that look at my other answer: Query Mobile: Markup Enhancement of dynamically added content. Search for chapter: Enhance a full page content (header, content, footer).