Added css for hover effects and fixed bug in js