Some performance optimization

Moved the bind function inside the plugin.
Saved the html elements to a local variable, to reduce (slow) DOM access.