sample javascript plugin for phyonegap