implemented drag and drop with JQuery.