Added logic for animating tab bar changes