Updated for Cordova 2.6.0, added implementation for multiple buttons