var FONTS = {"Futura Light":"/sifr/futura-light-bt.swf",
             "Futura Bold Italic":"/sifr/futura-bold-italic-bt.swf"};

/**
 * A simplified wrapper reflecting our use of sIFR.
 * 
 * @param {String}  selector     the jQuery compatible selector for the element to sIFRize
 * @param {String}  font         the font to use (path to sIFR font)
 * @param {String}  foreground   foreground color for the font
 * @param {String}  background   background color
 * @param {Object}  namedargs    may include center (boolean), offsetLeft (color), offsetTop (color), emphasis (color)
 * @param {boolean} center       center the text?
 * @param {int}     offsetLeft   pixels to offset left
 * @param {int}     offsetTop    pixels to offset top
 */
function styleHeadline(selector, font, foreground, background, namedargs) {
	if(typeof sIFR == "function") {
	  var args = {sFlashSrc:font, sColor:foreground, sBgColor:background};
	  var sFlashVars = [];
	  if (namedargs.center) {
	    sFlashVars.push("textalign=center");
	  }
	  if (namedargs.offsetLeft) {
	    sFlashVars.push("offsetLeft=" + namedargs.offsetLeft);
	  }
    if (namedargs.offsetTop) {
      sFlashVars.push("offsetTop=" + namedargs.offsetTop);
    }
    if (namedargs.emphasis) {
      sFlashVars.push("sEmColor=" + namedargs.emphasis);
    }
	  if (sFlashVars.length > 0) {
	    args["sFlashVars"] = sFlashVars.join("&");
	  }
	  sIFR.replaceElement(selector, named(args));
	}
}    
