/*****************************************************************************
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.
*****************************************************************************/

// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
var theSans = { src: '/flash/thesans.swf' };
var theSansBold = { src: '/flash/thesans.swf' }

// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

sIFR.useStyleCheck = true;

// Next, activate sIFR:
sIFR.activate(theSans, theSansBold);

// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// 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>.
function replaceH3() {
	sIFR.replace(theSans, {
		selector: '.header h3',
		transparent: true,
		forceSingleLine: true,
		css: '.sIFR-root { color: #6b4527; text-transform: lowercase; font-size: 23px; line-height: 45px }'
	});
}
function replaceExample() {
	sIFR.replace(theSans, {
		selector: '#directions span#example',
		thickness: -100,
		sharpness: 200,
		transparent: true,
		css: '.sIFR-root { font-style: italic; background-color: #20A2C0; color: #ffffff; font-size: 10px; kerning: true; letter-spacing: 0.4 }'
	});
}

sIFR.replace(theSans, {
	selector: '.header h2',
	transparent: true,
	forceSingleLine: true,
	css: [
		'.sIFR-root { color: #6b4527; text-transform: lowercase; font-size: 35px; line-height: 37px }',
		'a { color: #6b4527; text-decoration: none;}',
		'a:hover {color: #EF9907;}'
	],
	ratios: [9, 1.27, 14, 1.19, 21, 1.16, 28, 1.13, 38, 1.12, 53, 1.11, 60, 1.1, 61, 1.11, 94, 1.1, 96, 1.09, 101, 1.1, 102, 1.09, 103, 1.1, 108, 1.09, 110, 1.1, 1.09]
});
sIFR.replace(theSans, {
	selector: '.header h3',
	transparent: true,
	forceSingleLine: true,
	css: [
		'.sIFR-root { color: #6b4527; text-transform: lowercase; font-size: 23px; line-height: 45px }',
		'a { color: #6b4527; text-decoration: none;}',
		'a:hover {color: #EF9907;}'
	],
	ratios: [9, 1.27, 14, 1.19, 21, 1.16, 28, 1.13, 38, 1.12, 53, 1.11, 60, 1.1, 61, 1.11, 94, 1.1, 96, 1.09, 101, 1.1, 102, 1.09, 103, 1.1, 108, 1.09, 110, 1.1, 1.09]
});
sIFR.replace(theSansBold, {
	selector: '#contentNav h4',
	tuneHeight: -5,
	thickness: 150,
	css: '.sIFR-root { font-style: italic; background-color: #6b4527; color: #20acc0; text-transform: uppercase; letter-spacing: 0.9; }'
});
sIFR.replace(theSans, {
	selector: '#directions span#example',
	thickness: -150,
	transparent: true,
	css: '.sIFR-root { font-style: italic; background-color: #20A2C0; color: #ffffff; letter-spacing: 0.6; }'
});
sIFR.replace(theSansBold, {
	selector: '#register dt label',
	thickness: 100,
	sharpness: 100,
	tuneHeight: -5,
	css: [
		'.sIFR-root { font-style: italic; background-color: #FFFFFF; color: #20acc0; text-transform: uppercase; font-size: 10px; kerning: true; letter-spacing: 0.2 }',
		'em { text-transform: lowercase !important}'
	]
});
sIFR.replace(theSansBold, {
	selector: '.short h4',
	thickness: 100,
	tuneHeight: -5,
	css: '.sIFR-root { font-style: italic; background-color: #FCFBF8; color: #20acc0; text-transform: uppercase; ont-size: 10px; letter-spacing: 0.9; font-weight: 900; }'
});
sIFR.replace(theSansBold, {
	selector: '.topic h3, .topic h3 a',
	transparent: true,
	forceSingleLine: true,
	css: [
		'.sIFR-root { color: #ffffff; text-transform: lowercase; font-size: 26px; }',
		'a { color: #ffffff; text-decoration: none;}',
		'a:hover {color: #EF9907;}'
	]
});
sIFR.replace(theSans, {
	selector: '#cols h2',
	transparent: true,
	css: '.sIFR-root { color: #6b4527; text-transform: lowercase; font-size: 23px; line-height: 45px }'
});
sIFR.replace(theSans, {
	selector: '.section h2',
	transparent: true,
	forceSingleLine: true,
	css: '.sIFR-root { color: #6b4527; text-transform: lowercase; font-size: 28px; line-height: 45px }'
});
sIFR.replace(theSans, {
	selector: '#videoNav h3.replace',
	transparent: true,
	css: '.sIFR-root { color: #20acc0; font-size: 23px; line-height: 45px }'
});
sIFR.replace(theSans, {
	selector: '#practices h4',
	transparent: true,
	css: '.sIFR-root { color: #20acc0; font-size: 28px; line-height: 1em; text-transform: lowercase }'
});
sIFR.replace(theSans, {
	selector: '#practices h5',
	transparent: true,
	css: '.sIFR-root { color: #6b4527; font-size: 23px; line-height: 1.2em; text-transform: lowercase; letter-spacing: 0.02 }'
});
sIFR.replace(theSans, {
	selector: '.story #head h4',
	forceSingleLine: false,
	css: '.sIFR-root { color: #20acc0; kerning: true; font-size: 23px; font-weight: 900; background-color: #ffffff; }'
});
sIFR.replace(theSans, {
	selector: '.story #head .date, .text .date, span.date',
	thickness: 150,
	css: '.sIFR-root { font-style: italic; background-color: #ffffff; font-weight: 900; color: #20acc0; font-size: 11px; text-transform: uppercase; line-height: 1em; kerning: true; letter-spacing: 0.6 }'
});