Changed from Cordova.js to Phonegap.js