code: function hasTouchSupport() {
          var support = {}, events = ['touchstart', 'touchmove', 'touchend'],
              el = document.createElement('div'), i;
  
          try {
            for(i=0; i<events.length; i++) {
              var eventName = events[i];
              eventName = 'on' + eventName;
              var isSupported = (eventName in el);
              if (!isSupported) {
                el.setAttribute(eventName, 'return;');
                isSupported = typeof el[eventName] == 'function';
              }
              support[events[i]] = isSupported;
            }
            return support.touchstart && support.touchend && support.touchmove;
          }
          catch(err) {
            return false;
          }
        }
docs: Touch support detection function adapted (under MIT License) from code by Jeffrey Sambells - http://github.com/iamamused/