Replaced references to jQuery data command with the use of attributes.
Replaced double equals (==) with triple equals (===). Fixed a few bugs.