function replaceSifrFonts () {
  var gillsanslight = {
    "src": "/includes/javascript/gillsanslight.swf",
    "ratios": [10,1.32,16,1.27,17,1.23,18,1.25,25,1.23,29,1.21,34,1.22,35,1.2,36,1.21,48,1.2,73,1.19,77,1.18,78,1.19,1.18]
  };
  sIFR.activate(gillsanslight);

  sIFR.replace(gillsanslight, {
    "selector": "h1",
    "offsetTop" : 0,
    "css": {
      ".sIFR-root": {
        "font-size": "26px",
        "color": "#666666"
      }
    },
    "wmode": "transparent"
  });

  sIFR.replace(gillsanslight, {
    "selector": ".layered div",
    "offsetTop" : 0,
    "css": {
      ".sIFR-root": {
        "font-size": "44px",
        "color": "#ffffff",
        "cursor": "pointer"
      },
      "a": {
        "color": "#ffffff",
        "text-decoration": "none"
      },
      "a:hover": {
        "color": "#ffffff",
        "text-decoration": "underline"
      }
    },
    "wmode": "transparent"
  });
}

function isMouseOver(target, evt) {
  var mouseX = evt.clientX;
  var mouseY = evt.clientY;
  var clientLeft = target.cumulativeOffset()[0];
  var clientTop =  target.cumulativeOffset()[1];
  var clientWidth= target.getDimensions().width;
  var clientHeight= target.getDimensions().height;
  return clientLeft <= mouseX &&
         mouseX <= (clientLeft + clientWidth) &&
         clientTop <= mouseY &&
         mouseY <= (clientHeight + clientTop);
}

function rollon(evt) {
  var multiplier = 0;
  var nodes = this.up().childElements();
  var i;
  for (i=0; i<nodes.length;i++) {
    if (nodes[i]==this) multiplier = i;
  }
  var topOffset = (-125 + (multiplier * 29)) + 'px';
  this.getElementsByClassName('rollover')[0].setStyle({"display":"block", 'top':topOffset});
}
function rolloff(evt) {
  this.getElementsByClassName('rollover')[0].setStyle({"display":"none"});
}

function initInfoPopups() {
  // IE 6 smells so bad that we can't show the rollovers.
  if (!isIE6) {
    $$(".layered div div").each( function(objThis) {
      objThis.onmouseover=rollon
      objThis.onmouseout=rolloff
    });
  }
}

function initPromoCalloutComponents() {
  $$(".layered > div").each(function (objThis) {
    objThis.setStyle({'position':'absolute','left':'0px','top':'170px','width':'425px','height':'auto','margin':'10px 10px 0 10px'});
  });

  $$("div.promoCalloutComponent").each(function (objThis) {
    objThis.style.cursor = "pointer";
    objThis.onmouseover = promoCalloutComponent_onmouseover;
    objThis.onmouseout = promoCalloutComponent_onmouseout;
    objThis.onmouseout();
    objThis.select(".outline").each(function (objThis) {
      objThis.style.zIndex = 1000;
    })

    Event.observe(objThis, "click", function() {
      var href=this.getElementsByTagName("A")[0].href;
      s_getObjectID=href;
      location.href=href;
    });
  })
}
function promoCalloutComponent_onmouseover () {
  new Effect.Parallel([
    new Effect.Morph(this.select(".captionBackground")[0], {
      "style": "top: 65px; height: 65px;"
    }),
    new Effect.Morph(this.select(".captionArrow")[0], {
      "style": "top: 65px;"
    }),
    new Effect.Morph(this.select(".captionText")[0], {
      "style": "top: 65px;"
    })
  ], {
    "duration": .11
  });
}
function promoCalloutComponent_onmouseout () {
  new Effect.Parallel([
    new Effect.Morph(this.select(".captionBackground")[0], {
      "style": "top: 95px; height: 35px;"
    }),
    new Effect.Morph(this.select(".captionArrow")[0], {
      "style": "top: 95px;"
    }),
    new Effect.Morph(this.select(".captionText")[0], {
      "style": "top: 95px;"
    })
  ], {
    duration: 0.11
  });
}
