Prevented slide switch while animating

Added isAnimating var set to true while animating, set to false when finished.