Added switchClass function

This is just a simple extension of classie. I've found it use and thought I'd share it.