This script should be its own file and then should be included/required in this file: https://github.com/RepublicOfKids/coinflip/blob/master/public/js/application.js