Jquery dialogs

The first commit has the real changes.  The second commit fixes formatting (sorry, the odd numbers of spaces on indents was bugging me...), and makes the diff think the whole file changed.