+ return max(event.pageY || 0, touchCoords(event).y) - parOfs.top;
+ }
+
+ /**
+ * Get X and Y coordinates of a touch event
+ *
+ * @param event
+ * The event object
+ * @return Coordinates object
+ */
+ function touchCoords(event) {
+ var oev = event.originalEvent || {};
+
+ if (oev.touches && oev.touches.length)
+ return { x: oev.touches[0].pageX, y: oev.touches[0].pageY };
+ else
+ return { x: 0, y: 0 };