Changed .class properties to ['class'] to prevent IE8 JS errors, IE8 treats class as an identifier instead of a property