modified draggable.js and mouse.js