Added cross browser support