find elements by class, not by index

this fixes potential issue in ie8 when HTML comments are used
example from docs doesn't work in IE8

In IE8 when html5shiv is used figure tagName is lowercase. Closes #695.
triangle for share modal (css upd)
first round of JS cleanup

- Improved code readability
- down-move-up-handlers.js renamed to gestures.js
- Initial showing or closing transition is now in separate file
(show-hide-transition.js).
update npm dependencies
build (js)