Javascript drag and drop to reorder library