replaced code with TouchSwipe jQuery plugin

https://github.com/mattbryson/TouchSwipe-Jquery-Plugin