added JS from jsfiddle into application.js file