var pos = [navegadorDragable.offsetLeft,navegadorDragable.offsetTop];

function startDrag(e) {
	var elemento=$( "#idelemento" )[0];

	if (e.type === 'touchstart') {
		elemento.onmousedown = null;
		elemento.ontouchmove = moveDrag;
		elemento.ontouchend = function () {
			elemento.ontouchmove = null;
			elemento.ontouchend = null;
			}
	} else {
		document.onmousemove = moveDrag;
		document.onmouseup = function () {
			document.onmousemove = null;
			document.onmouseup = null;
			}
		}
    
	pos = [elemento.offsetLeft,elemento.offsetTop];

	return false;
	}

function moveDrag (e) {
	var elemento=$( "#idelemento" );
	var currentPos = getCoors(e);

	var deltaX = currentPos[0] - origin[0];
	var deltaY = currentPos[1] - origin[1];

	elemento.css( "left", (pos[0] + deltaX) + 'px' );
	elemento.css( "top", (pos[1] + deltaY) + 'px' );

	return false;
	}

function getCoors(e) {
	var coors = [];

	if (e.touches && e.touches.length) { 
		coors[0] = e.touches[ e.touches.length-1 ].clientX;
		coors[1] = e.touches[ e.touches.length-1 ].clientY;
	} else {
		coors[0] = e.clientX;
		coors[1] = e.clientY;
		}

	return coors;
	}