moved document.ready into onDeviceReady