got the index of the tappedView and added the animations based on if the cards are above or below the tappedView