/*****************************************************************************
It is adviced to place the sIFR JavaScript calls in this file, keeping it
separate from the `sifr.js` file. That way, you can easily swap the `sifr.js`
file for a new version, while keeping the configuration.

You must load this file *after* loading `sifr.js`.

That said, you're of course free to merge the JavaScript files. Just make sure
the copyright statement in `sifr.js` is kept intact.
*****************************************************************************/

// vars to font swfs
var DIN_regular = { src: '/corporateresponsibilityreport08/flash/DIN_regular.swf',
		ratios: [8, 1.42, 9, 1.33, 12, 1.35, 18, 1.3, 20, 1.26, 27, 1.27, 28, 1.25, 32, 1.26, 33, 1.24, 34, 1.25, 53, 1.24, 56, 1.23, 57, 1.24, 82, 1.23, 85, 1.22, 86, 1.23, 94, 1.22, 95, 1.23, 1.22]
	};
	var DIN_light = { src: '/corporateresponsibilityreport08/flash/DIN_light.swf',
		ratios: [8, 1.41, 9, 1.33, 12, 1.35, 15, 1.3, 19, 1.28, 27, 1.27, 28, 1.25, 32, 1.26, 33, 1.24, 37, 1.25, 53, 1.24, 56, 1.23, 57, 1.24, 82, 1.23, 85, 1.22, 86, 1.23, 94, 1.22, 95, 1.23, 1.22]
	};
	var DIN_bold = { src: '/corporateresponsibilityreport08/flash/DIN_bold.swf',
		ratios: [8, 1.42, 9, 1.33, 12, 1.35, 21, 1.3, 31, 1.27, 44, 1.26, 45, 1.24, 50, 1.25, 58, 1.24, 59, 1.25, 79, 1.24, 81, 1.23, 85, 1.24, 86, 1.23, 87, 1.24, 90, 1.23, 91, 1.24, 1.23]
	};

// configuration settings. eg.
// sIFR.useStyleCheck = true;
sIFR.fixWrap = true;

// activate sIFR:
sIFR.activate(DIN_regular, DIN_light, DIN_bold);


// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.

/* Home header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'h1 span.small',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneHeight: -9
});
sIFR.replace(DIN_light, {
  selector: 'h1.home span.big',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  tuneHeight: -5
});

/* Two color headings NOT USED anymore
sIFR.replace(DIN_regular, {
  selector: 'h1.home strong.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1;}',
  fitExactly: true,
  tuneHeight: 12
});
*/

/* 2 Tone H1 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'h1.grey-org',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -6;}',
  fitExactly: true,
  offsetTop: -10,
  tuneHeight: -10,
  tuneWidth: 7,
  transparent: true
});

/* Two color headings NOT USED anymore
sIFR.replace(DIN_light, {
  selector: 'h1.grey-org span.grey',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});

sIFR.replace(DIN_regular, {
  selector: 'h1.grey-org strong.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});
*/

/* 2 Tone H2 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'h2.grey-org',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});
/* Two color headings NOT USED anymore
sIFR.replace(DIN_light, {
  selector: 'h2.grey-org span.grey',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});

sIFR.replace(DIN_regular, {
  selector: 'h2.grey-org strong.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});
*/
sIFR.replace(DIN_regular, {
  selector: 'h2.table-head',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});
sIFR.replace(DIN_light, {
  selector: 'h2.grey, h2.table-head-grey, h2.grey2',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});

sIFR.replace(DIN_light, {
  selector: 'h2.org, th.tablehead h2',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});

/* Promo H2 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: '.promo-main h2, .promo-home-blue h2',
  css: '.sIFR-root {color: #666666; letter-spacing: -1; leading: -2; }',
  fitExactly: true,
  thickness: 50,
  tuneWidth: 2,
  transparent: true
});

/* Landing page Main area H2 ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: '.main-landing .content h2.land',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2}',
  fitExactly: true,
  transparent: true
});

/* 2 Tone H3 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'h3.grey-org',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});
/* Two color headings NOT USED anymore
sIFR.replace(DIN_light, {
  selector: 'h3.grey-org span.grey',
  css: '.sIFR-root {color: #333333; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 7,
  transparent: true
});

sIFR.replace(DIN_regular, {
  selector: 'h3.grey-org strong.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});
*/

/* Grey H3 / Table Groupheader H3 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'h3.grey',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});
sIFR.replace(DIN_light, {
  selector: 'h3.table-head-grey,th.tablehead-grey h3,th.grouphead-grey h3',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});

/* Orange H3 / Table Groupheader H3 header ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: '#promo-col h3.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 0,
  transparent: true
});
sIFR.replace(DIN_light, {
  selector: 'h3.org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});
sIFR.replace(DIN_light, {
  selector: 'h3.table-head,th.tablehead h3,th.grouphead h3',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  tuneWidth: 5,
  transparent: true
});


/* Lead P Copy ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'p.lead',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});
sIFR.replace(DIN_light, {
  selector: 'p.lead-org',
  css: '.sIFR-root {color: #ff6600; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});

/* List ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: 'ul.arrow-big li',
  css: '.sIFR-root {color: #333333; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});

/* CR Landin Quotes ------------------------------------------- */
sIFR.replace(DIN_light, {
  selector: '.cr-landing .bg-summary blockquote',
  css: '.sIFR-root {color: #535353; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});

sIFR.replace(DIN_light, {
  selector: '.cr-landing blockquote',
  css: '.sIFR-root {color: #ffffff; letter-spacing: -1; leading: -2;}',
  fitExactly: true,
  transparent: true
});

