I've created windowing system based on S2.UI.Dialog. You can see the demo here:
I'm trying to implement as many features in original S2.UI.DIalog class as I can and commit it to upstream to contribute with Scripty2, but I don't want to provide code with such a nasty "hacks". The problem is with additional icons on title bar (those to iconize and collapse dialogs). We follow jQuery UI styles, but unfortunately they do not support multiple icons there (just a closing element). Does anyone have an idea how to put additional items there in celever way? At the moment i'm just setting "right" style for each element. If we work that out, I could commit at least toggling/collapsing mechanism.