made adjustments to js so phonegap was loaded before user clicks on anything