jQueryUI Sortable Events - Start & Stop

jQueryUI Sortable Events - Start & Stop

Hi everyone,

I need to minimize the widgets on my page on start and maximize them on stop. However, it gets fired several times and throws infinite errors. Please see this page: http://www.kimburda.com/Paul-Bakaus

  1. function onSortableStart(){
  2.     alert("Hello World!");
  3.     //$(".widget .w-minimize").trigger("click");
  4. }
  5.    
  6.     $("#sortable").sortable({
  7.             placeholder: 'ui-state-highlight',
  8.             handle: '.w-header',
  9.             opacity: 0.6,
  10.             revert: 150,         
  11.             update: updateLayoutManager,
  12.             start: onSortableStart
  13.     });
I removed this piece of code from the live site but you can test it with firebug.

Thanks in advance.