changed to use onready of phonegap instead