/*****************************************************************************
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 aachen = { src: '/fonts/aachen.swf', ratios: [7, 1.04, 9, 1.61, 10, 1.43, 11, 1.37, 12, 1.29, 13, 1.45, 14, 1.38, 16, 1.33, 17, 1.25, 18, 1.37, 20, 1.3, 21, 1.26, 22, 1.22, 24, 1.43, 26, 1.34, 27, 1.31, 29, 1.36, 30, 1.32, 33, 1.29, 34, 1.31, 35, 1.27, 36, 1.26, 37, 1.24, 41, 1.28, 43, 1.25, 44, 1.32, 46, 1.29, 47, 1.28, 50, 1.25, 51, 1.22, 52, 1.19, 55, 1.25, 56, 1.19, 57, 1.18, 59, 1.29, 60, 1.26, 62, 1.24, 63, 1.28, 64, 1.27, 66, 1.25, 67, 1.22, 68, 1.26, 70, 1.25, 71, 1.21, 72, 1.22, 73, 1.3, 74, 1.29, 76, 1.27, 77, 1.25, 79, 1.28, 80, 1.26, 81, 1.24, 83, 1.25, 84, 1.26, 86, 1.25, 87, 1.23, 88, 1.3, 89, 1.29, 91, 1.28, 92, 1.27, 93, 1.3, 94, 1.28, 96, 1.27, 97, 1.25, 98, 1.28, 99, 1.26, 101, 1.25, 102, 1.23, 103, 1.26, 105, 1.25, 106, 1.23, 107, 1.21, 108, 1.3, 109, 1.28, 110, 1.27, 111, 1.26, 113, 1.25, 114, 1.27, 115, 1.26, 117, 1.25, 118, 1.27, 119, 1.26, 121, 1.25, 122, 1.23, 123, 1.3, 124, 1.29, 1.28] };

var caflisch = { src: '/fonts/caflisch.swf', ratios: [7, 1.04, 9, 1.61, 10, 1.43, 11, 1.37, 12, 1.29, 13, 1.45, 14, 1.38, 16, 1.33, 17, 1.25, 18, 1.37, 20, 1.3, 21, 1.26, 22, 1.22, 24, 1.43, 26, 1.34, 27, 1.31, 29, 1.36, 30, 1.32, 33, 1.29, 34, 1.31, 35, 1.27, 36, 1.26, 37, 1.24, 41, 1.28, 43, 1.25, 44, 1.32, 46, 1.29, 47, 1.28, 50, 1.25, 51, 1.22, 52, 1.19, 55, 1.25, 56, 1.19, 57, 1.18, 59, 1.29, 60, 1.26, 62, 1.24, 63, 1.28, 64, 1.27, 66, 1.25, 67, 1.22, 68, 1.26, 70, 1.25, 71, 1.21, 72, 1.22, 73, 1.3, 74, 1.29, 76, 1.27, 77, 1.25, 79, 1.28, 80, 1.26, 81, 1.24, 83, 1.25, 84, 1.26, 86, 1.25, 87, 1.23, 88, 1.3, 89, 1.29, 91, 1.28, 92, 1.27, 93, 1.3, 94, 1.28, 96, 1.27, 97, 1.25, 98, 1.28, 99, 1.26, 101, 1.25, 102, 1.23, 103, 1.26, 105, 1.25, 106, 1.23, 107, 1.21, 108, 1.3, 109, 1.28, 110, 1.27, 111, 1.26, 113, 1.25, 114, 1.27, 115, 1.26, 117, 1.25, 118, 1.27, 119, 1.26, 121, 1.25, 122, 1.23, 123, 1.3, 124, 1.29, 1.28] };

// 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(aachen);
sIFR.activate(caflisch);

// 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>.

/*
sIFR.replace(aachen, {
	selector: 'h1',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});
*/

sIFR.replace(aachen, {
	selector: 'div#banner-text',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: transparent; color: #ffffff; opacity: 75; }'
});

sIFR.replace(aachen, {
	selector: 'h2',
	wmode: 'transparent',
	css: [
		'.sIFR-root { background-color: #ffffff; color: #6ca792; }',
		'a { text-decoration: none; color: #6ca792; text-decoration: none; }',
		'a:link { color: #333333; }',
		'a:hover { color: #6ca792; }'
	]
});

sIFR.replace(caflisch, {
	selector: 'div#main-col h3',
	wmode: 'transparent',
	css: [
		'.sIFR-root { background-color: #ffffff; color: #6ca792; leading: -5; }',
		'a { text-decoration: none; text-decoration: none; }',
		'a:link { color: #333333; }',
		'a:hover { color: #6ca792; }'
	]
});


sIFR.replace(caflisch, {
	selector: 'body#layout-homepage div#main-col h1',
	wmode: 'transparent',
	css: [
		'.sIFR-root { background-color: #ffffff; color: #6ca792; }',
		'a { text-decoration: none; text-decoration: none; }',
		'a:link { color: #333333; }',
		'a:hover { color: #6ca792; }'
	]
});

sIFR.replace(caflisch, {
	selector: 'body#layout-members div#main-col h1',
	wmode: 'transparent',
	css: [
		'.sIFR-root { background-color: #ffffff; color: #6ca792; }',
		'a { text-decoration: none; text-decoration: none; }',
		'a:link { color: #333333; }',
		'a:hover { color: #6ca792; }'
	]
});


sIFR.replace(aachen, {
	selector: 'h1.pink',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #cc0066; }'
});

sIFR.replace(aachen, {
	selector: 'h5',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});

sIFR.replace(aachen, {
	selector: 'div#success-story table td strong',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});

sIFR.replace(caflisch, {
	selector: '.caflisch li',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});

sIFR.replace(caflisch, {
	selector: 'span.caflisch',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});

sIFR.replace(aachen, {
	selector: 'table.weight-loss td strong',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});

sIFR.replace(caflisch, {
	selector: 'table.weight-loss td em',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #ffffff; color: #6ca792; }'
});


sIFR.replace(aachen, {
	selector: 'div.form fieldset legend span',
	wmode: 'transparent',
	css: '.sIFR-root { background-color: #5C977E; color: #ffffff; }'
});

// sIFR.replace(aachen, {
// 	selector: 'div#dates-prices-container div.dates-prices-accordion div.header div.col span',
// 	wmode: 'transparent',
// 	css: '.sIFR-root { background-color: #85b29e; color: #ffffff; }'
// });




//sIFR.debug.ratios({ src: '/fonts/aachen.swf', selector: 'h1' });

