Adding some JS for the narrow (~mobile) version transitions