3380 & 2928: rewrite ibox (modal dialogs) plugin

http://code.google.com/p/otwarchive/issues/detail?id=3380, http://code.google.com/p/otwarchive/issues/detail?id=2928