Moved JS scripts to head and added phonegap.js