It seems somehow, the "drinks" names in your folder contain some linejump character, which causes the string name of the animation to be different from the name contained within the array.
Debuggin it by displaying the name found in the array using the alert action of the browser object clearly shows a line jump where there shouldn't be one.
Then, your swipe also acts on every tick of execution (so 60 times in a second).
The content of your array is deleted and soon, there isn't any animation name to pick from within the array.
Those are two things to look into.
Also consider explaining clearly what you are trying to do, what is the user's supposed input, and what it is supposed to do ?