Backport of 1.2.1 with some modifications:

- keep compability with WordPress 3.8.1 or later (and the provided jQuery 1.x): extract caption from embedded image and not the image link
- Added "refresh" call at the swipebox opening, so the box won't "crash" when pressing return/enter key with the box already open
- Added event handler so one can show *and* hide navigation/caption bars with mouse clicks as well and not only using touch
- Modified event handler for the navigation bar to use click and not touch, since handling touch as a "tap" may not work properly on some devices