Cross browser fixes in JS. Fixed broken link