Switched to using toggleClass rather than if/else