JS for the new doc styles