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": ".r4 h3",
    "offsetTop" : 0,
    "css": {
      ".sIFR-root": {
        "font-size": "18px",
        "color": "#666666"
      }
    },
    "wmode": "transparent"
  });
}

function rollon(evt) {
  var b = this.up().up().select('.background')[0];
  b.src = this.readAttribute('rolloverimage');
  b.alt = "";
}
function rolloff(evt) {
  var b = this.up().up().select('.background')[0];
  b.src = b.readAttribute('originalImage');
}

var popups = new Array();
function initInfoPopups() {
  $$(".rolloverdiv").each( function(objThis) {
    objThis.onmouseover=rollon
    objThis.onmouseout=rolloff
  });
  $$(".popup").each( function(objThis) {
    objThis.hide();
    popups.push(objThis);
    var leftOffset;
    var layered = objThis.up('.layered');
    if(layered && layered.hasClassName('residential')) {
      leftOffset = 103;
    } else {
      leftOffset = 134;
    }
    var id = objThis.id;
    var offsets = $(id + 'icon').up().positionedOffset();
    objThis.setStyle({top: offsets.top - 135 + 'px', left: offsets.left + leftOffset + 'px'});
  });
}

function showInfo(infoId) {
  popups.each(function(p) {
    p.hide();
  })
  var info = $(infoId);
  info.show();
}

function initPromoCalloutComponents() {
  $$(".grayLayer").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
  });
}
