Port dialogs to jQuery

Fixes #13