JS updated

Added functions for hot and cold app to .js file.