
jQuery(document).ready(function(){
  maximizeHoverMenuInnerBlocks();  
});


function maximizeHoverMenuInnerBlocks(){
  // Fix Mouseout glitch on hover menu block.
  jQuery('[class^=hover-menu-block-]').each(function(){
    var blockClass = '.' + jQuery(this).attr('class');
    
    // Get maxHeight of sections in specific hover block
    var maxHeight = 0;  
    jQuery(blockClass + ' > section').each(function(){
      var sectionHeight = jQuery(this).height();
      if(sectionHeight > maxHeight){
        maxHeight = sectionHeight;
      }
    });
    
    // Set section heights to max height in group
    jQuery(blockClass + ' > section').each(function(){
      jQuery(this).height(maxHeight);
    
    });
  });
}



function toggleGrid(){
  jQuery('#wrapper').toggleClass('showgrid');
};



;

