Fixed issues found with jshint. Added touchend to click event for iPad support