/**
 * A wrapper for the jquery.corner plugin that makes a
 * (partial) "hamburger" out of a div by putting its
 * h2 element into its own inner div, then making the whole
 * div have rounded corners on top and bottom.
 */
jQuery.fn.hamburger = function() {
  return this.each(function() {
    var block = jQuery(this);
    block.children("h2").wrap('<div class="block-head"></div>').parent().parent()
      .append(jQuery('<div class="block-body"></div>').append(
      block.children(".block-head").corner("top").siblings().not("script").remove()))
      .children(".block-body").corner("bottom");
  });
}
