modified browser check to be jquery independent