Fix occurring with specific transitions

jQuery hasClass only accepts a single class, if you are using a transition like 'fade in' or 'scale in' this will not work correctly if the classes are out of order (it does happen) e.g. 'in scale' in the class string. This fixes it.