onDeviceReady function instead of jQuery