

function replaceFonts(){
			if(typeof sIFR == "function"){
		// This is the preferred "named argument" syntax
		/*	sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"js/slayer.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:20, nPaddingBottom:20, sFlashVars:"textalign=center&offsetTop=6"}));*/
		isDefault = 1;
			if($('#purple_template').length)
			{
				isDefault = 0
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#663366", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
				$('#purple_template H2').css({color:"#663366"});
			}
			if($('#navy_blue_template').length )
			{
				isDefault = 0
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#000066", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
				$('#grey_template H2').css({color:"#000066"});
			}
			if($('#teal_template').length )
			{
				isDefault = 0
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#669966", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
				$('#yellow_template H2').css({color:"#669966"});		
			}
			if($('#red_template').length)
			{
				isDefault = 0
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#990000", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
				$('#red_template H2').css({color:"#990000"});
			}
			if($('#blue_template').length )
			{
				isDefault = 0
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#0099CC", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
				$('#blue_template H2').css({color:"#0099CC"});	
			}
			if($('#green_template').length || isDefault == 1)
			{
				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"styles/default/slayer.swf", sColor:"#233F27", sLinkColor:"#244029", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));
			  $('#green_template H2').css({color:"#233F27"});

		  	sIFR.replaceElement(named({sSelector:"h4", sFlashSrc:"styles/default/slayer.swf", sColor:"#ffffff", sLinkColor:"#ffffff", sBgColor:"#233F27", sHoverColor:"#dddddd", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=right&offsetTop=0",sCase:null,sWmode:"transparent"}));	
			}
			sIFR.replaceElement(named({sSelector:"h3", sFlashSrc:"styles/default/slayer.swf", sColor:"#ffffff", sLinkColor:"#ffffff", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0",sCase:null,sWmode:"transparent"}));


		
		};	
	}

/*	#purple{#663366}
#grey{#000066}
#yellow{#669966}
#red{#990000}
#blue{#0099CC}
#green{#233F27}*/
	
	function colour_sections(){
		
		if($('.coloured_section').length > 0 )
		{

			if($('#purple').length){

				$('#purple LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-purple.png')"});
				$('#purple LI:eq(1)').css({height:"130px"});				
				$('#purple LI:eq(2)').css({height:"140px",backgroundColor:"#663366",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}
			if($('#navy_blue').length ){

				$('#navy_blue LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-navy_blue.png')"});
				$('#navy_blue LI:eq(1)').css({height:"130px"});
				$('#navy_blue LI:eq(2)').css({height:"140px",backgroundColor:"#000066",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}
			if($('#teal').length ){
	
				$('#teal LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-teal.png')"});
				$('#teal LI:eq(1)').css({height:"130px"});
				$('#teal LI:eq(2)').css({height:"140px",backgroundColor:"#669966",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}

			if($('#red').length){

				$('#red LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-red.png')"});
				$('#red LI:eq(1)').css({height:"130px"});
				$('#red LI:eq(2)').css({height:"140px",backgroundColor:"#990000",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}
			if($('#blue').length ){

				$('#blue LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-blue.png')"});
				$('#blue LI:eq(1)').css({height:"130px"});
				$('#blue LI:eq(2)').css({height:"140px",backgroundColor:"#0099CC",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}
			if($('#green').length ){

				$('#green LI:eq(0)').css({height:"42px",paddingTop:"3px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h2-green.png')"});
				$('#green LI:eq(1)').css({height:"130px"});
				$('#green LI:eq(2)').css({height:"140px",backgroundColor:"#233F27",backgroundImage:"url('media/headings/mask.png')",backgroundRepeat:"no-repeat",backgroundPosition:"bottom"});
			}
		}

		if($('#purple_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-purple.png')"});
			}
		} else {
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-purple.png')"});
			}
		}
		
		if($('#navy_blue_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-navy_blue.png')"});
			}
		}
		
		if($('#teal_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-teal.png')"});
			}
		}
		
		if($('#red_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-red.png')"});
			}
		}
		
		if($('#blue_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-blue.png')"});
			}
		}
		
		if($('#green_template').length){
			if($('.right_image_box_with_hat').length){
				$('.right_image_box_with_hat H3').css({height:"35px",paddingTop:"5px",position:"relative",top:"20px",backgroundImage:"url('media/headings/h3-green.png')"});
			}
		}

/*	#purple{#663366}
#navy_blue was grey{#000066}
#teal was yellow{#669966}
#red{#990000}
#blue{#0099CC}
#green{#233F27}*/
	}
	
	function showWalkDetails(id) {
  	var elements = document.getElementsByTagName("div");
		for( i = 0; i < elements.length; i++ ) {
			if( elements[i].id.indexOf("walk_detail_") != "-1" ) {
				elements[i].style.display = "none";
			}
		}
		return ( document.getElementById("walk_detail_"+id).style.display != "block" ) ? document.getElementById("walk_detail_"+id).style.display = "block" : document.getElementById("walk_detail_"+id).style.display = "none" ;
	}
	
$(document).ready(function(){  
		replaceFonts();
		colour_sections()
			$('a[rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
													 });



	
