Refactor a UI script by adding and using a new $.swapClasses() method