PhoneGap-Cookbook example code