Added method for toggling css classes.