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

var trade18 = { src: '/_js/trade-cond18.swf' };
var trade18it = { src: '/_js/trade-cond18-it.swf' };
var trade20 = { src: '/_js/trade-cond20.swf' };
var trade20it = { src: '/_js/trade-cond20-it.swf' };

// 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.fromLocal = true;
// Next, activate sIFR:
sIFR.activate(trade18,trade18it,trade20,trade20it);


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

/*
///// HOMEPAGE
*/
sIFR.replace(trade18, {
  selector: 'div#home-feature-textbox div.text div.all h2',
  css: '.sIFR-root {color:#ffffff; text-align:center; }',
  wmode: 'transparent'
});

/*
///// GENERAL STYLING
*/
sIFR.replace(trade18, {
  selector: 'div#volunteer div.title h3',
  css: '.sIFR-root {color: #afd4ff; text-align:center; }',
  wmode: 'transparent'
});
sIFR.replace(trade18, {
  selector: 'div#sponsor-search h2',
  css: '.sIFR-root {color:#ffffff; text-align:center; }',
  wmode: 'transparent'
});

/*
///// GENERAL THEME
*/
sIFR.replace(trade18, {
  selector: 'body.general div#content h1, body.general div#content h2, body.general div#content h3',
  css: '.sIFR-root {color: #424898;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.general div#content h4, body.general div#content h5',
  css: '.sIFR-root {color: #424898; }',
  wmode: 'transparent'
});

/*
///// KIDS ALIVE IS THEME
*/
sIFR.replace(trade18, {
  selector: 'body.kidsaliveis div#content h1, body.kidsaliveis div#content h2, body.kidsaliveis div#content h3',
  css: '.sIFR-root {color: #512973;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.kidsaliveis div#content h4, body.kidsaliveis div#content h5',
  css: '.sIFR-root {color: #512973; }',
  wmode: 'transparent'
});

/*
///// RESCUING KIDS THEME
*/
sIFR.replace(trade18, {
  selector: 'body.rescuingkids div#content h1, body.rescuingkids div#content h2, body.rescuingkids div#content h3',
  css: '.sIFR-root {color: #21665b;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.rescuingkids div#content h4, body.rescuingkids div#content h5',
  css: '.sIFR-root {color: #21665b; }',
  wmode: 'transparent'
});

/*
///// AROUND THE WORLD THEME
*/
sIFR.replace(trade18, {
  selector: 'body.aroundtheworld div#content h1, body.aroundtheworld div#content h2, body.aroundtheworld div#content h3',
  css: '.sIFR-root {color: #996c2e;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.aroundtheworld div#content h4, body.aroundtheworld div#content h5',
  css: '.sIFR-root {color: #996c2e; }',
  wmode: 'transparent'
});

/*
///// INVOLVEMENT THEME
*/
sIFR.replace(trade18, {
  selector: 'body.involvement div#content h1, body.involvement div#content h2, body.involvement div#content h3',
  css: '.sIFR-root {color: #305f97;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.involvement div#content h4, body.involvement div#content h5',
  css: '.sIFR-root {color: #305f97; }',
  wmode: 'transparent'
});

/*
///// SPONSOR THEME
*/
sIFR.replace(trade18, {
  selector: 'body.sponsor div#content h1, body.sponsor div#content h2, body.sponsor div#content h3',
  css: '.sIFR-root {color: #739832;font-style:bold; }',
  wmode: 'transparent'
});
sIFR.replace(trade20, {
  selector: 'body.sponsor div#content h4, body.sponsor div#content h5',
  css: '.sIFR-root {color: #739832; }',
  wmode: 'transparent'
});
