$(document).ready(function(){
	// Adds a class of "lastchild" to the last <li> in a list
	$("li:last-child")
		.addClass("last-child");

	// Adds a class to odd rows in every <table> in #pri
	$("#pri table tr:nth-child(odd)")
		.addClass("oddrow");
		
	$('a[rel="external"]').attr('target', '_blank');
		
});

// sIFR config
var eurostile = {src: '/assets/js/eurostile.swf'};

sIFR.useStyleCheck = true;
sIFR.activate(eurostile);

sIFR.replace(eurostile, {
selector: '#homepage #intro .firstword'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#ffffff; background-color:#74b6e3; font-size:45px; font-weight:bold; text-transform:uppercase; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '#homepage #intro .hometitle em'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#5c5e60; background-color:#74b6e3; font-size:35px; font-weight:normal; text-align:center; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: 'body#homepage div.first h2'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:38px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '.testimonial h2'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#ffffff; background-color:#0D6BB4; font-size:22px; font-weight:bold; text-align:center; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '#affiliations h2'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:38px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '#connect h2'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:38px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '#newslist h2'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:38px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
,wmode: 'transparent'
});

sIFR.replace(eurostile, {
selector: '#pri h1'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:40px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
});

sIFR.replace(eurostile, {
selector: '#pri .newsroom h3'
,ratios: [9, 1.16, 16, 1.09, 24, 1.06, 37, 1.04, 74, 1.02, 1.01]
,css: [
  '.sIFR-root { color:#454545; background-color:#ffffff; font-size:40px; font-weight:normal; text-transform:uppercase; }'
  ,'.firstword { color:#096ab4; font-weight:bold; }'
]
});
