
var font = {src: SIFR_FONT_FILE};

sIFR.activate(font);

sIFR.replace(
	font,
	{
		selector: '.content h1',
		transparent: true,
		tuneHeight: -8,
		css: '.sIFR-root { color: #' + SIFR_HEADER_COLOR + '; font-size: 21px; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#top-menu .active .title, #top-menu .title-hover, #top-menu-item-4 .title',
		transparent: true,
		tuneHeight: -6,
		tuneWidth: 2,
		offsetTop: 2,
		forceSingleLine: true,
		css: '.sIFR-root { color: #FFFFFF; font-size: 18px; cursor: pointer; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#top-menu .title',
		transparent: true,
		tuneHeight: -6,
		tuneWidth: 2,
		offsetTop: 2,
		forceSingleLine: true,
		css: '.sIFR-root { color: #555555; font-size: 18px; cursor: pointer; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#provincie h2',
		transparent: true,
		tuneHeight: -8,
		css: '.sIFR-root { color: #' + SIFR_HEADER_COLOR + '; font-size: 21px; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#publications h1 span',
		transparent: true,
		tuneHeight: -8,
		css: '.sIFR-root { color: #' + SIFR_HEADER_COLOR + '; font-size: 21px; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '.numbers #center h3',
		transparent: true,
		tuneHeight: -8,
		css: '.sIFR-root { color: #' + SIFR_HEADER_COLOR + '; font-size: 19px; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#timeline-months-container .header h2',
		transparent: true,
		tuneHeight: -8,
		offsetTop: 1,
		css: '.sIFR-root { color: #' + SIFR_HEADER_COLOR + '; font-size: 21px; cursor: default; }'
	}
);

sIFR.replace(
	font,
	{
		selector: '#left h2',
		transparent: true,
		sharpness: -100,
		offsetTop: 2,
		css: '.sIFR-root { color: #000000; font-size: 18px; text-align: right; }'
	}
);

$(document).ready(function(){
	initMenu();
});

$(window).load(function(){
	// Timeout is needed for successful operation in Safari and Opera.
	// Otherwise sIFR won't be applied to the hover style title.
	setTimeout(finishMenuInit, 1);
});

function initMenu()
{
	$('#top-menu-item-1 a:not(.active), #top-menu-item-2 a:not(.active), #top-menu-item-3 a:not(.active)')
	.mouseover(function(){
		$('.title', this).hide();
		$('.title-hover', this).show();
	})
	.mouseout(function(){
		$('.title-hover', this).hide();
		$('.title', this).show();
	});
}

function finishMenuInit()
{
	$('#top-menu .title-hover').hide();
	$('#top-menu .title-hover-init').removeClass('title-hover-init');
}
