Been playing about with this for a while, but I'm not sure I fully understand what it is you're trying to do. On clicking the dialogify button this should create a dialog with tabbed content, which is copied from #tabs (here as a normal div, but otherwise as a template) - is that right?
The problem I'm seeing is that because #tabs is cloned, the divs containing the tabbed content are also cloned and hence there are multiple divs with the same id including tab content - so the tabs in the dialog don't work.
Is that the problem? Or am I way off beam?