/*****************************************************************************
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 flare; 

function initSifr(pagedepthIN) {
	var flarePrepend = '';
	var i=0;
	
	for ( i=0 ; i<pagedepthIN ;i++ ) {
		flarePrepend = flarePrepend += '../';
	}

	flare = {
		src: flarePrepend + 'swf/flareserif821.swf'
	};  
	replace();
}

function replace() {
  sIFR.activate(flare); 

      sIFR.replace(flare, {
    selector: '.red',
    css: '.sIFR-root { color:#FF0000; }',
    wmode: 'transparent'
  });


    sIFR.replace(flare, {
    selector: 'h1.pageTitle, .generic h1, .home h1.title, .home h1.subtitle, .home h2.title, .home h2.subtitle, .home h3.title, .home h3.subtitle, .main-promo h1, .main-promo h1.title, .main-promo h1.subtitle, .main-promo h2.title, .main-promo h2.subtitle, .main-promo h3.subtitle',
    css: '.sIFR-root { color:#00417b; }',
    wmode: 'transparent'
  });


  sIFR.replace(flare, {
    selector: '.scroll-box h2',
    css: '.sIFR-root { color:#000000; }',
    wmode: 'transparent'
  });
  sIFR.replace(flare, {
    selector: '.board-item-bottom h3',
    css: '.sIFR-root { color:#271e0f; }',
    wmode: 'transparent'
  });
  sIFR.replace(flare, {
    selector: '.box h2',
    css: '.sIFR-root { color:#FFFFFF; }',
    wmode: 'transparent'
  });
}

var homeLoader = function(){
	sIFR.replace(flare, {
	  selector: '.home h1.title, .home h2.subtitle, .home h2.title, .home h3.subtitle, .main-promo h1, .main-promo h1.title, .main-promo h2.subtitle',
	  css: '.sIFR-root { color:#00417b; }',
	  wmode: 'transparent'
	});
}
