refactor the javascript for on hover fade in