$(function(){
//  var heights = {};
//  $('div.blockGuide').each(function(i){
//    heights[i] = $(this).height() * 1;
//  });
  // Accordion
  $("#accordion").accordion({
    header: "h3",
    alwaysOpen: false,
    active: false,
    change : function(event, ui){
      for(var i = 0; i < 2; i++) {
//      console.info(ui);
        var h = 0;
        $(ui.newContent).each(function(){
          h+= $(this).outerHeight();
//          console.info($(this).outerHeight(), h);
        });
      //$(ui.newHeader).siblings('div').animate({height : h + 'px'}, 'fast');
        $(ui.newContent.prevObject).height(h + 'px');
      }
    }
  });
  
  //hover states on the static widgets
//  $('#dialog_link, ul#icons li').hover(
//    function() { $(this).addClass('ui-state-hover'); }, 
//    function() { $(this).removeClass('ui-state-hover'); }
//  );
//  $('div.blockGuide').each(function(i){
//    $(this).height(heights[i] + 'px');
//  });
  
});
