// $Id: script.js,v 1.1.2.1 2009/09/03 09:15:27 sociotech Exp $

Drupal.behaviors.fusionEqualheights = function (context) {
  $("#header-top-wrapper div.equal-heights div.content").equalHeights();
  $("#header-group-wrapper div.equal-heights div.content").equalHeights();
  $("#preface-top-wrapper div.equal-heights div.content").equalHeights();
  $("#preface-bottom div.equal-heights div.content").equalHeights();
  $("#sidebar-first div.equal-heights div.content").equalHeights();
  $("#content-top div.equal-heights div.content").equalHeights();
  $("#content-region div.equal-heights div.content").equalHeights();
  $("#content-bottom div.equal-heights div.content").equalHeights();
  $("#node-bottom div.equal-heights div.content").equalHeights();
  $("#sidebar-last div.equal-heights div.content").equalHeights();
  $("#postscript-top div.equal-heights div.content").equalHeights();
  $("#postscript-bottom-wrapper div.equal-heights div.content").equalHeights();
  $("#footer-wrapper div.equal-heights div.content").equalHeights();
};

Drupal.behaviors.fusionIE6fixes = function (context) {
  // IE6 & less-specific functions
  // Add hover class to primary menu li elements on hover
  if ($.browser.msie && ($.browser.version < 7)) {
    $('input.form-submit').hover(function() {
      $(this).addClass('hover');
      }, function() {
        $(this).removeClass('hover');
    });
    $('#primary-menu ul.sf-menu li.expanded').hover(function() {
      $(this).addClass('hover');
      }, function() {
        $(this).removeClass('hover');
    });
  };
};

Drupal.behaviors.fusionOverlabel = function (context) {
  $("div.fusion-horiz-login label").overlabel();
};

Drupal.behaviors.fusionSuperfish = function (context) {
  $("#primary-menu ul.sf-menu").superfish({
    hoverClass:  'sfHover',
    delay:       250,
    animation:   {opacity:'show',height:'show'},
    speed:       'fast',
    autoArrows:  false,
    dropShadows: false,
    disableHI:   true
  }).supposition();
};

