Take an svg document and generate js code that is compatible with RaphaelJS / Snap.svg