Use flag rather than switch for jQuery upgrade

This will allow us to enable the upgrade for staff only.