partial implementation of jQuery UI Draggable widget