1) This was solved by reading through the .js of the lightbox (mediaboxadvanced) and finding the function that loads the UL's into a lightbox. Each time the lists are ordered, the lightbox is recalculated:
$( "#sortable1, #sortable2, #my_timeline" ).sortable({
update: function(event, ui) {
Mediabox.scanPage();
}
});
2) This can be done with PHP: jQuery Connected Sortable Lists, Save Order to MySQL
3) Same as 1), on "receive", make each lightbox list attach a "rel" argument to each "a" tag. To prevent it from changing the "rel" tag of non sortable list items, I've added a function to make sure their "rel" tags remain empty.
$( "#sortable1, #sortable2, #my_timeline" ).sortable({
update: function(event, ui) {
Mediabox.scanPage();
}
receive: function(event, ui) {
$(".timeline_content").each(function(i) {
$(this).find("a").attr("rel", "lightbox[set" + (i+1) + "]");
});
$(".non_sortable").each(function(i) {
$(this).find("a").attr("rel", "");
});
}
});