Fixed date/time errors, migrated to jquery