added moar JS logic for snapsvg