moved from jQuery to PhoneGap ready funtion