$(document).ready(function() {
 $('.mainMenu > li > ul').each(function(i,o){ 
      $(this).prev().attr('rel', 'toggle[' + o.id + ']');
      var hide = '1';
      if ($(this).parent().attr('class') == 'active')  hide = '0';  
       animatedcollapse.addDiv( o.id, 'fade=0,height=auto,hide=' + hide + ',group=common') ;
   } ); 
  animatedcollapse.ontoggle=function($, divobj, state){ }
  animatedcollapse.init();
   
   });  
