Animate cards from left and right when switching between views