code refactoring

- public method to trigger a djax update programmatically
- make code more standard as explained in http://learn.jquery.com/plugins/basic-plugin-creation/