Update backbone.statemachine.js
Update backbone.statemachine.js

Let's make sure that the element we're attempting to change the class name of actually has the className attribute.  The window element, for example, does not. 
sebpiq/backbone.statemachine,sebpiq/backbone.statemachine