Tested on Firefox 3.5. Fixes #1.
Tested on Chrome 7+.
Some tests on mobile. Fixes #3.