switching between food and buildings animates a slider, and changed button opacity based on which tab is selected