Fixed issue #25. Updated logic in tooltip.js, so that tooltips are not inserted into SVG containers.