continued refactoring

- moving script tags to the bottom of the page
- changing '.live' to '.on' according to updated jquery
- making functions to create dialog popup select dropdown