added touch support

I added touch support for this plugin

Note: I did some code cleaning too and used "on" for the events
Due to my coding style I also separated the variables.