There are different versions of the haunted deck on the market. Most use IT in one way or another to make the animation happen.
The haunted deck effect in general is having a card selected, returned to the deck and then the deck begins to move and the spot where the deck 'cuts itself' is where the selected card is.
This is a classic for a reason, people love this kind of stuff!