Add an id-attribute to your div.all and classes to the td-tags, e.g:
<div id="acc-1" class="all">
...
<td class="acc-name" width="25%">Name</td>
<td class="acc-lastname" width="25%">Lastname</td>
<td class="acc-street" width="25%">Street</td>
<td class="acc-city" width="25%">City</td>
...
</div>
Then generate 4 associative arrays with Name, Lastname, Street and City as keys and the accordion-item-ids as values like:
var names = {};
$('div.all').each(function() {
names[$(this).find('td.name').text()] = $(this).attr('id');
});
And now you can sort your arrays with array.sort(); and change the order of the accordion.