/*****************************************************************************
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 lubalin_graph_demi = { 
	src: '/swfs/LubalinGraphDemi.swf'
	,wmode: 'transparent'
}*/
var Lubalin_Graph_Demi = { 
	src: '/swfs/LubalinGraphDemi.swf'
	,wmode: 'transparent'
	,ratios: [9, 1.48, 10, 1.39, 13, 1.41, 16, 1.39, 17, 1.38, 23, 1.36, 29, 1.35, 30, 1.33, 36, 1.34, 37, 1.32, 41, 1.33, 43, 1.32, 44, 1.33, 68, 1.32, 70, 1.31, 71, 1.32, 1.31]
}
var Lubalin_Graph_Book = { 
	src: '/swfs/LubalinGraphStdBook.swf'
	,wmode: 'transparent'
	,ratios: [8, 1.43, 11, 1.38, 13, 1.33, 17, 1.32, 21, 1.3, 22, 1.29, 25, 1.28, 29, 1.29, 30, 1.28, 39, 1.27, 42, 1.26, 43, 1.27, 56, 1.26, 59, 1.25, 60, 1.26, 93, 1.25, 94, 1.24, 97, 1.25, 98, 1.24, 101, 1.25, 102, 1.24, 105, 1.25, 106, 1.24, 109, 1.25, 111, 1.24, 112, 1.25, 115, 1.24, 116, 1.25, 119, 1.24, 120, 1.25, 123, 1.24, 124, 1.25, 1.24]
}

var MyriadPro_Semibold = { 
	src: '/swfs/MyriadPro_Semibold.swf'
	,wmode: 'transparent'
	,ratios: [6, 1.24, 7, 1.21, 8, 1.18, 10, 1.16, 11, 1.13, 12, 1.12, 13, 1.11, 15, 1.1, 17, 1.09, 19, 1.08, 22, 1.07, 26, 1.06, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01]
}

var MyriadPro_Regular = { 
	src: '/swfs/MyriadPro_Regular.swf'
	,wmode: 'transparent'
	,ratios: [6, 1.24, 7, 1.21, 8, 1.18, 10, 1.16, 11, 1.13, 12, 1.12, 13, 1.11, 15, 1.1, 17, 1.09, 19, 1.08, 22, 1.07, 26, 1.06, 32, 1.05, 41, 1.04, 58, 1.03, 97, 1.02, 1.01]
}

// 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;
sIFR.useDomLoaded = true;

// Debug... DO IT! ADD THE RATIOS! IF YOU DON'T KNOW HOW TO DO THIS ASK CROWIE. 
//sIFR.debug.ratios({ src: '/swfs/LubalinGraphStdBook.swf', selector: '#hospital_title' });

// Next, activate sIFR:
sIFR.activate(Lubalin_Graph_Demi);
sIFR.activate(Lubalin_Graph_Book);
sIFR.activate(MyriadPro_Semibold);
sIFR.activate(MyriadPro_Regular);

// 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(Lubalin_Graph_Demi, {
  selector: '#homepage #home_feature #home_feature_text h2',
  css: '.sIFR-root { color: #006bb7; display: block; }'
});
sIFR.replace(Lubalin_Graph_Demi, {
  selector: '#homepage #home_feature #home_feature_text p.sifr',
  css: '.sIFR-root { color: #00817b; display: block; }'
});
*/
sIFR.replace(Lubalin_Graph_Demi, {
  selector: '#homepage .homepage_column h2',
  css: '.sIFR-root { color: #909090; display: block; }'
});
sIFR.replace(MyriadPro_Semibold, {
  selector: '.side_container h2',
  css: '.sIFR-root { color: #3d8fbe; display: block; }'
});
sIFR.replace(MyriadPro_Semibold, {
  selector: '#emergency_container_inner h2',
  css: ['.sIFR-root { color: #af130d; display: block; }',
	  '.sIFR-root a { color: #af130d; display: block; text-decoration: none; }',
	  '.sIFR-root a:hover { color: #af130d; display: block; text-decoration: underline; }']
});
sIFR.replace(MyriadPro_Semibold, {
  selector: '#interpreter_container_inner h2',
  css: ['.sIFR-root { color: #1589bd; display: block; }',
	  '.sIFR-root a { color: #1589bd; display: block; text-decoration: none; }',
	  '.sIFR-root a:hover { color: #1589bd; display: block; text-decoration: underline; }']
});
sIFR.replace(MyriadPro_Semibold, {
  selector: '#left_column h2',
  css: '.sIFR-root { color: #2f6484; display: block; }'
});
sIFR.replace(MyriadPro_Regular, {
  selector: '#content #document_downloads_container h2',
  css: '.sIFR-root { color: #3a8dbe; display: block; }'
});
sIFR.replace(MyriadPro_Regular, {
  selector: '#content h1',
  css: ['.sIFR-root { color: #474747; display: block; }',
	  '.sIFR-root a { color: #474747; display: block; text-decoration: underline; }',
	  '.sIFR-root a:hover { color: #342f2f; display: block; text-decoration: underline; }']
});
sIFR.replace(MyriadPro_Regular, {
  selector: '#content h2,h2.donate_title',
  css: ['.sIFR-root { color: #3a8dbe; display: block; }',
	  '.sIFR-root a { color: #3a8dbe; display: block; text-decoration: underline; }',
	  '.sIFR-root a:hover { color: #342f2f; display: block; text-decoration: underline; }']
});
/*, #content h3, #content h4, #content h5, #content h6*/

sIFR.replace(MyriadPro_Regular, {
  selector: '#content p.summary',
  css: '.sIFR-root { color: #3a8dbe; display: block; }'
});

sIFR.replace(Lubalin_Graph_Book, {
  selector: '#hospital_title',
  css: '.sIFR-root { color: #006bb7; display: block; }'
});

sIFR.replace(MyriadPro_Regular, {
  selector: '#hospital_blurb',
  css: '.sIFR-root { color: #474747; display: block; }'
});
