var header={src: 'http://www.crsc.philips.com/crsc/images/sifr_gillsanslight.swf'};
//sIFR.prefetch(header);
var header_regular={src: '/imgs/syst/sifr/sifr_gillsans-std.swf'};
//sIFR.prefetch(header_regular);
sIFR.activate();

/* 
Overriding SIFR function which replaces inline document.write statements within sifr replacements
*/
sIFR.util.normalize = function(str){
	var SINGLE_WHITESPACE = ' ';
	str = (str.indexOf("document.write") > -1?'':str);
	if(sIFR.preserveSingleWhitespace) return str.replace(/\s/g, SINGLE_WHITESPACE);
	// Normalize to the first whitespace, and then make sure no nbsp characters are preserved as Flash doesn't seem to support these.
	return str.replace(/(\s)\s+/g, '$1').replace(/\xA0/, SINGLE_WHITESPACE);
}

function executeDefaultSifrReplacements(){

	sIFR.replace(header, { 
		selector: 'h2.far-title',
		css:'.sIFR-root {color:#005AFF;}',
		wmode: 'transparent'
	});
	sIFR.replace(header_regular, { 
		selector: 'h3.far-title',
		css:'.sIFR-root {color:#005AFF;letter-spacing:0.5;}',
		wmode: 'transparent'
	});	
}

function executeAdditionalSifrReplacements(){
	/* philips sector / 10 year overview only */
	sIFR.replace(header, { 
		selector: 'h3.far-sector-title',
		css:'.sIFR-root {color:#666666; display:block;}',
		wmode: 'transparent'
	});
	/* 10 year overview only */
	sIFR.replace(header, { 
		selector: 'h3.far-ten-year-overview-title, h6',
		css:'.sIFR-root {color:#005AFF; display:block;}',
		wmode: 'transparent'
	});	
}

function executeDefaultSifrReplacementsPagination(){
	/*
	Sifr only correctly sizes elements when visible (display: inline)
	So we need to execute this function each time a new 'pagination page' is shown
	*/
	sIFR.replace(header_regular, { 
		selector: 'h3.far-title',
		css:'.sIFR-root {color:#005AFF;letter-spacing:0.5;}',
		wmode: 'transparent'
	});	

}

function executeSifrReplacements(arrSifr){

	/*
	
	sIFR.replace(header, {
		selector: 'h2.far-title',
		css: '.sIFR-root {color:#005AFF;font-size:40px; height:40px;}',
		wmode: 'transparent'
	});
	
	sIFR.replace(header, {
		selector: 'h3.far-title'
		,css: '.sIFR-root {color:#005AFF;font-size:24px;}'
		,wmode: 'transparent'
	});
	sIFR.replace(header, {
		selector: 'h3.far-sector-title'
		,css: '.sIFR-root {color:#666666;font-size:18px;}'
		,wmode: 'transparent'
	});
	*/
}
