Yep, good catch. This should be `close().done(open)` (which isn't nearly as cute... :-) )

See http://stackoverflow.com/questions/5436327/jquery-deferreds-and-promises-then-vs-done for details. `then()` and `done()` are roughly equivalent in jQuery < 1.8, but are different in newer versions.