added touch device detection to script.js.