/***
 * This code sets the main content headings of Nokia
 * Search pages to different color and makes the Flash transparent.
 * 
 * --Note-- The code in this file overrides sifr_init_13.js, 
 * because it conflicts with this script. The contents of the sifr_init_13.js
 * is included in this file.
 ***/

 //sifr_init_13.js depends on sIFR being of type "function"
 //so we have to override that
 var sIFR2 = sIFR;
 sIFR = 3;

 $(document).ready(function() {

	//Color the 2nd headings
	var elementId = "sifr2";

	if (document.getElementById(elementId) != null) {	
		var flashFileURL=sifrPath;
		//overriden sifr name
		sIFR2.replaceElement(named({
			sSelector:"#"+elementId,
			sFlashSrc:flashFileURL,
			//Make flash transparent, to allow showing background
			sWmode:"transparent",
			//Set a different text color
			sColor:"#555555",
			//In case the transparent mode doesn't work
			//set the background to a color that matches the page background
			sBgColor:"#F2F2F2",
			sFlashVars:"textalign=left&offsetTop=0&offsetBottom=0"
		}));
	}
  
	//Color the 3rd headings
	elementId = "sifr3";

	if (document.getElementById(elementId) != null) {	
		var flashFileURL=sifrPath;
		//overriden sifr name
		sIFR2.replaceElement(named({
			sSelector:"#"+elementId,
			sFlashSrc:flashFileURL,
			//Make flash transparent, to allow showing background
			sWmode:"transparent",
			//Set a different text color
			sColor:"#44aa33",
			//In case the transparent mode doesn't work
			//set the background to a color that matches the page background
			sBgColor:"#FFFFFF",
			sFlashVars:"textalign=left&offsetTop=0&offsetBottom=0"
		}));
	}

	var sifrElements=document.getElementsByTagName("h1");for(var i=0;i<sifrElements.length;i++){var currentElement=document.getElementById(sifrElements[i].id);if(currentElement!=null){if(currentElement.id.indexOf("sifr")>-1){var elementId="#"+currentElement.id;var flashFileURL=sifrPath;/*note the overriden sIFR name*/sIFR2.replaceElement(named({sSelector:elementId,sFlashSrc:flashFileURL,sWmode:"opaque",sColor:"#444433",sLinkColor:"#1144DD",sBgColor:"#ffffff", sHoverColor:"#1144DD",nPaddingTop:0,nPaddingBottom:0,sFlashVars:"textalign=left&offsetTop=0&offsetBottom=55"}));}}};
});

