implement cordova.ready to index.html