/*****************************************************************************
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.
*****************************************************************************/

// Make an object pointing to the location of the Flash movie on your web server.
// Try using the font name as the variable name, makes it easy to remember which
// object you're using. As an example in this file, we'll use Futura.
//var HelveticaNeueLTStd = { src: '/path/to/futura.swf' };

// Now you can set some configuration settings.
// See also <http://wiki.novemberborn.net/sifr3/JavaScript+Configuration>.
// One setting you probably want to use is `sIFR.useStyleCheck`. Before you do that,
// read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad>.

// sIFR.useStyleCheck = true;

// Next, activate sIFR:
//sIFR.activate(HelveticaNeueLTStd);

// If you want, you can use multiple movies, like so:
//
//    var futura = { src: '/path/to/futura.swf' };
//    var garamond = { src '/path/to/garamond.swf' };
//    var rockwell = { src: '/path/to/rockwell.swf' };
//    
//    sIFR.activate(futura, garamond, rockwell);
//
// Remember, there must be *only one* `sIFR.activate()`!

// Now we can do the replacements. You can do as many as you like, but just
// as an example, we'll replace all `<h1>` elements with the Futura movie.
// 
// The first argument to `sIFR.replace` is the `futura` object we created earlier.
// The second argument is another object, on which you can specify a number of
// parameters or "keyword arguemnts". For the full list, see "Keyword arguments"
// under `replace(kwargs, mergeKwargs)` at 
// <http://wiki.novemberborn.net/sifr3/JavaScript+Methods>.
// 
// The first argument you see here is `selector`, which is a normal CSS selector.
// That means you can also do things like '#content h1' or 'h1.title'.
//
// The second argument determines what the Flash text looks like. The main text
// is styled via the `.sIFR-root` class. Here we've specified `background-color`
// of the entire Flash movie to be a light grey, and the `color` of the text to
// be red. Read more about styling at <http://wiki.novemberborn.net/sifr3/Styling>.
//sIFR.replace(HelveticaNeueLTStd, {
//  selector: 'h1',
//  css: '.sIFR-root { background-color: #F9F9F9; color: #FF0000; }'
//});










/*****************************************************************************
The sIFR configuration should typically go in `sifr-config.js`, but in order to
keep the config file clean, and to give a quick overview, it's done here instead.
*****************************************************************************/

//sIFR.debug.ratios({ src: 'fonts/HelveticaNeueLT-Std-Lt.swf', selector: 'h4' }); // calculate ratio

// set up fonts with ratios

var HelveticaNeueLTStd = {
  src: 'fonts/HelveticaNeueLTStd.swf'
  ,ratios: [10, 1.32, 16, 1.27, 23, 1.23, 24, 1.21, 25, 1.22, 31, 1.21, 38, 1.2, 42, 1.19, 43, 1.2, 62, 1.19, 66, 1.18, 67, 1.19, 113, 1.18, 114, 1.17, 119, 1.18, 120, 1.17, 1.18]
};

var PickfordsDispTwo = {
src: 'fonts/PickfordsDispTwo.swf'
	,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 28, 1.23, 34, 1.22, 38, 1.21, 39, 1.22, 46, 1.21, 50, 1.2, 51, 1.21, 80, 1.2, 83, 1.19, 84, 1.2, 88, 1.19, 89, 1.2, 1.19]
};

// activate fonts

sIFR.activate(HelveticaNeueLTStd);

sIFR.activate(PickfordsDispTwo);

/* home page */

sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: false,
	wmode: 'transparent',
	selector: '#home-content-col-l h1',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1;font-size:22px; leading: -8px;} strong {color: #189AD8;leading: -4px;}']
});


sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: false,
	wmode: 'transparent',
	selector: '#home-content-col-l h2',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1;font-size:18px; leading: -8px;} strong {color: #189AD8;leading: -4px;}']
});

sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: false,
	wmode: 'transparent',
	selector: '#home-content-col-r h2',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1;font-size:21px; } strong {color: #189AD8;leading: -4px;}']
});

sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: false,
	wmode: 'transparent',
	selector: '#home-content-col-r h3',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1;font-size:21px; } strong {color: #189AD8;leading: -4px;}']
});

/* top interior header - home moving */

sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	offsetTop: '4px',
	selector: '#interior-page-title-hm p',
	 css: [
	'.sIFR-root {cursor:pointer;text-decoration:none;}'
	,'a {text-decoration:none;color:#ffffff;}'
	,'a strong {text-decoration:none;color:#1A3276;}'
	,'a:hover {color:inherit;text-decoration:underline;}'
	]
});

/* top interior header - everywhere else */

sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	offsetTop: '5px',
	selector: '#interior-page-title p',
	 css: [
	'.sIFR-root {cursor:pointer;text-decoration:none;}'
	,'a {text-decoration:none;color:#ffffff;}'
	,'a strong {text-decoration:none;color:#189ad8;}'
	,'a:hover {color:#ffffff;text-decoration:underline;}'
	]
});

	/* Interior page H2's */
	// fonts are different on landing pages to interior pages...
	
	if(sPage == "home-moving" || sPage == "business-services" || sPage == "storage" || sPage == "about-us" || sPage == "contact-us"  || sPage == "storage-furniture-storage-self-store" || sPage == "about-us-Pickfords-removals-and-storage"){
	
		if(sPage == "home-moving"){
		
		/* header (landing page) - home moving */

			sIFR.replace(PickfordsDispTwo, {
				//forceSingleLine: true,
				wmode: 'transparent',
				selector: '#interior-into-copy h1',
				css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;leading: -4px;} strong {color: #1a3276;}']
			});
		
		}else{
		
			/* header (landing page) - everywhere else */
		
			sIFR.replace(PickfordsDispTwo, {
				//forceSingleLine: true,
				wmode: 'transparent',
				selector: '#interior-into-copy h1',
				css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;leading: -4px;} strong {color: #189ad8;}']
			});
			
		}
 
	}else{
	
		/* level 2 nav header (interior) - home moving */
		
		sIFR.replace(HelveticaNeueLTStd, {
			//forceSingleLine: true,
			wmode: 'transparent',
			offsetTop: '0px',
			selector: '#interior-into-copy-hm h1',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -4px;text-transform:lowercase;}'
			,'a {text-decoration:none;color:#ffffff;}'
			,'a strong {text-decoration:none;color:#1a3276;}'
			,'a:hover {color:#ffffff;text-decoration:underline;}'
			]
		});

		/* level 2 nav header (interior) - everywhere else */

		sIFR.replace(HelveticaNeueLTStd, {
			//forceSingleLine: true,
			wmode: 'transparent',
			offsetTop: '0px',
			selector: '#interior-into-copy h1',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -4px;text-transform:lowercase;}'
			,'a {text-decoration:none;color:#ffffff;}'
			,'a strong {text-decoration:none;color:#189ad8;}'
			,'a:hover {color:#ffffff;text-decoration:underline;}'
			]
		});
		
	}
	
/* level 2 nav header for packaging */

sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '#right-content-packaging h1',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;} strong {color: #1a3276;}']
});

/* page titles for advice moving */

sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '#advice-centre-title h1',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;} strong {color: #1a3276;}']
});

sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '#advice-centre-title-business h1',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;} strong {color: #189ad8;}']
});


sIFR.replace(PickfordsDispTwo, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '.affiliate-form-header h1',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1;} strong {color: #189ad8;}']
});

/* case studies */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#case-studies-business-moving h4',
	css: ['.sIFR-root { color: #a98753;letter-spacing:-1;} strong { color: #1A3276; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#case-studies-business-moving h3',
	css: ['.sIFR-root { color: #a98753;letter-spacing:-1;} strong { color: #1A3276; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#case-studies-employee-moving h4',
	css: ['.sIFR-root { color: #a98753;letter-spacing:-1;} strong { color: #1A3276; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#general-enquiries-alt-2 h4',
	css: ['.sIFR-root { color: #ffffff;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#general-enquiries-alt-4 h4',
	css: ['.sIFR-root { color: #ffffff;letter-spacing:-1;} strong { color: #189ad8; }']
});



sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#ebay-promotion h4',
	css: ['.sIFR-root { color: #ffffff;letter-spacing:-1;} strong { color: #189ad8; }']
});


/* general calls to action */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#calls-to-action-r h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; leading: -6px;}']
});

/* unique calls to action */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#find-special-offers-for-uk-home-movers h4',
	css: ['.sIFR-root { color: #B40023;letter-spacing:-1;} strong { fcolor: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '.content-box h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #moving-advice-centre-homemoving h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #moving-advice-centre-homemoving h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #moving-advice-centre-storage h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #moving-advice-centre-international h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #in-the-news-general h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #in-the-news-business h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

/* level one main links */

	/* OL's */
	
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-1 .content-box div ol li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#189ad8;}'
			,'a:hover {text-decoration:underline;color:#189ad8;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-2 .content-box div ol li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#189ad8;}'
			,'a:hover {text-decoration:underline;color:#189ad8;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-3 .content-box div ol li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#189ad8;}'
			,'a:hover {text-decoration:underline;color:#189ad8;}'
			]
		});
	
/* UL's */

	// UL's in homemoving are a correct colour...
	// so check the page name and apply correct colour

	if(sPage == "home-moving"){
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-1 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#d79f11;}'
			,'a:hover {text-decoration:underline;color:#D79F11;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-2 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#d79f11;}'
			,'a:hover {text-decoration:underline;color:#d79f11;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-3 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#d79f11;}'
			,'a:hover {text-decoration:underline;color:#d79f11;}'
			]
		});
		
	}else{
				
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-1 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#1A3276;}'
			,'a:hover {text-decoration:underline;color:#1A3276;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-2 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#1A3276;}'
			,'a:hover {text-decoration:underline;color:#1A3276;}'
			]
		});
		
		sIFR.replace(HelveticaNeueLTStd, {
			wmode: 'transparent',
			offsetTop: '-4px',
			selector: '.landing-col-bottom-3 .content-box div ul li h2',
			 css: [
			'.sIFR-root {cursor:pointer;text-decoration:none;letter-spacing:-1;leading: -8px;}'
			,'a {text-decoration:none;color:#1A3276;}'
			,'a:hover {text-decoration:underline;color:#1A3276;}'
			]
		});
		
	}

/* If not links, using H4's */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '.landing-col-bottom-1 .content-box h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;cursor:pointer;}']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '.landing-col-bottom-2 .content-box h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;cursor:pointer;}']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '.landing-col-bottom-3 .content-box h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;cursor:pointer;}']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#form_outer h4 strong',
	css: ['.sIFR-root { color: #189ad8;letter-spacing:-1;cursor:pointer;}']
});

/* Interior page H2's */
// H2's ion two pages are in a correct font...
// so check the page names and apply correct font

if(sPage == "employee-relocation"){
	sIFR.replace(PickfordsDispTwo, {
		wmode: 'transparent',
		selector: '.levelx-col-bottom-1 .content-box h2',
		css: ['.sIFR-root { color: #1a3276;font-size:22px;letter-spacing:-1;} strong { color: #189ad8; }']
	});
}else{
	sIFR.replace(HelveticaNeueLTStd, {
		wmode: 'transparent',
		selector: '.levelx-col-bottom-1 .content-box h2',
		css: ['.sIFR-root { color: #1a3276;font-size:22px;letter-spacing:-1; strong { color: #1a3276; }}']
	});


}

/* Interior page H1 / H2 - Bus Moving */

if(sPage == "Moving-your-business-corporate-relocation"){
        
        /* H1's need to look like H2's now */

	sIFR.replace(HelveticaNeueLTStd, {
		wmode: 'transparent',
		selector: '.levelx-col-bottom-1.hn-tag-work .content-box h1',
		css: ['.sIFR-root { color: #1a3276;font-size:22px;letter-spacing:-1; strong { color: #1a3276; }}']
	});
}



/* interior content box h2 within business services, i.e. related services */

sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '.levelx-col-bottom-2-business .content-box h2',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1; } strong {color: #1A3276;}']
}); 

/* interior content box h4, i.e. optional callout */

sIFR.replace(HelveticaNeueLTStd, {
	forceSingleLine: true,
	wmode: 'transparent',
	selector: '.levelx-col-bottom-2-business .content-box h4',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1; } strong {color: #1A3276;}']
}); 

/* advice center page header  */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#advice-centre-content-2-col h2',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1; } strong {color: #1a3276;}']
}); 
		
/* form headers - quick forms */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#right-content-form h2',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1; }']
}); 


sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#right-content-form h3',
	css: ['.sIFR-root { color: #ffffff; letter-spacing:-1; }']
}); 


/* form headers - main forms */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#form_outer h2',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1; }']
}); 

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#form_outer h3',
	css: ['.sIFR-root { color: #1A3276; letter-spacing:-1; }']
}); 

/* Sitemap */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '.sitemap',
	css: ['.sIFR-root { color: #1a3276;font-size:22px;letter-spacing:-1; strong { color: #1a3276; }}']
});


/* forms */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#form_left_outer h3',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; leading: -6px;}']
});

/* eBay promotion */



sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#form_right_outer h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; leading: -6px;}']
});


/* Affiliate pages */

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#left-content #affiliate_detail-content-2-col h4',
	css: ['.sIFR-root { color: #1a3276;letter-spacing:-1;} strong { color: #189ad8; }']
});

sIFR.replace(HelveticaNeueLTStd, {
	wmode: 'transparent',
	selector: '#affiliate_detail-content-2-col h2',
	css: ['.sIFR-root { color: #1a3276;font-size:22px;letter-spacing:-1; strong { color: #1a3276; }}']
});
