One pull request to end them all

This merges multiple patches from forks on github.

Specifically: 
Style (trailing spaces) has been fixed by multiple parties
on() vs live() in newer versions of jquery
Fixes to SVG behaviour (use of getBBox())
Ability to inject a custom css class
... and more.