client javascript code refactoring
- moved scripts to header and init functions to ready() callback
- popup message windows created through jquery