Sorting the Friends Gallery and the Friends icons in the widget

I'd like to make the friends gallery and the friends icons that appear in the widget sortable -- so that the user can order/organize them and their state will be remembered.

I know there is a lot of jQuery functionality built into Elgg so I'm guessing there's a way to do this but Im not sure how.

The functionality would be similar to drap/dropping the widgets on the homepage -- so I tried adding the 'ui-sortble' class but that didnt work.

I'm using the friends gallery plugin. I also added jQuery to that js file to make it sortable -- but the sort isnt stored on returning to the page. I could try adding cookies but Im sure there's a better way...


Thanks for any help!