/**
 * This file contains the SIFR configuration
 *
 * @author Frances Lewis
*/

if ($defined(sifrSwf)) {

  /**
   * Specfic JS vars and activate
   */
   
  sIFR.delayCSS  = false;
  sIFR.fitExactly = true;
  sIFR.forceTextTransform = true;
  sIFR.activate(sifrSwf);

  /**
   * Specfic elements to replace
   */
  // offers headings
	sIFR.replace(sifrSwf, {
			selector: 'h4.main',
			ratios: [8,1.41,11,1.31,15,1.29,21,1.25,22,1.22,27,1.24,28,1.23,34,1.22,46,1.21,50,1.2,51,1.21,70,1.2,72,1.19,74,1.2,78,1.19,79,1.2,83,1.19,84,1.2,1.19], 
			css: {
				'.sIFR-root': { 'color': sifrSwf.mainColour }
			}, 
		transparent : true
	});

  // don't render subs if:
  // - we have firefox (gecko)
  // - we have ie7 and flash build number is less than 115
	if (!Browser.Engine.gecko && !(Browser.Engine.trident5 && Browser.Plugins.Flash.build < 115)) {
		sIFR.replace(sifrSwf, {
				selector: 'h4.sub',
				ratios: [8,1.41,11,1.31,15,1.29,21,1.25,22,1.22,27,1.24,28,1.23,34,1.22,46,1.21,50,1.2,51,1.21,70,1.2,72,1.19,74,1.2,78,1.19,79,1.2,83,1.19,84,1.2,1.19], 
				css: {
					'.sIFR-root': { 'color': sifrSwf.subColour, 'text-align': 'center', 'text-transform': 'uppercase' }
				}, 
			transparent : true
		});
	}
	if (Browser.Engine.gecko) {
		console.log('replacing');
		var els = $$('h4.sub');
		els.each(function(el,ix){
			console.log(el.getStyle('visibility'));
		});
	}
}

