(function(){this.init_sortable_menu=function(){var e;if(0!==(e=$("#menu")).length)return e.sortable({items:"> *:not(#menu_reorder, #menu_reorder_done)",axis:"x",cursor:"crosshair",connectWith:".nested",update:function(){return $.post("/refinery/update_menu_positions",e.sortable("serialize",{key:"menu[]",expression:/plugin_([\w]*)$/}))}}).tabs(),e.sortable("disable"),e.find("#menu_reorder").click(function(e){return trigger_reordering(e,!0)}),e.find("#menu_reorder_done").click(function(e){return trigger_reordering(e,!1)})}}).call(this);