Changed ready function

Used device ready of phonegap instead of jquery document ready.