Sortable update

Sortable update


The sortable update event is not firing. I'm able to sort the content,
but the sort is not being recognized. Below is my code, does anyone
know what is wrong? Thanks.
HTML:
<div id="sortImages" class="ui-tabs-panel ui-widget-content ui-corner-
bottom">
            <ul style="" id="organize" class="organizable ui-sortable">
<li style="" id="51" class="organizable"><img src="Water%20lilies.jpg"
class="thumbnail"></li><li style="" id="50" class="organizable"><img
src="image_thumbnails.php?path="Sunset.jpg" class="thumbnail"></li><li
style="" id="52" class="organizable"><img src="image_thumbnails.php?
path="Winter.jpg" class="thumbnail"></li><li style="" id="49"
class="organizable"><img src="image_thumbnails.php?path="Blue
%20hills.jpg" class="thumbnail"></li></ul>
<div class="clearAll"><input id="saveSort" name="saveSort"
value="Save Sort" type="submit"></div>
</div>
JS:
if (document.getElementById("contentTabs")){
    $('#contentTabs').bind('tabsselect', function(){ var params =
"type=displayThumbnails";
var url =
"cases.php";
                                                 Ajax.post(params, url, false);
                                                 if (typeof(Ajax.response) == "undefined"){
                                                     alert("Ajax response error");
                                                 } else {
                                                         document.getElementById("organize").innerHTML =
Ajax.response;
                                                 }
                                                 });
}
    var order;
    if (document.getElementById("organize")){
        $("#organize").sortable();
        $("#organize").sortable({ cursor: "crosshair" });
        $("#organize").sortable({ update: function(){ order = $
(this).sortable("toArray"); } });
    }
    if (document.getElementById("saveImgOrg")){
        document.getElementById("saveImgOrg").onclick = function(){ saveSort
(order); };
    }