More robust hover js
More tidying, abstracting