Update glose.js

Coded in a more modular way and added some preset behaviors to have the content adapt to screen width.