some changes to tooltips.r; add tooltip.js