cross-browser support for mouseenter/mouseleave events in templates