$(document).ready(function(){
	// Set the height before sifr replaces (and adds 3px)
	$("#primary-content h1, #primary-content h2").each(function() {
		$(this).css("height", $(this).height());
	});
});

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

function sifr_replace(){
	sIFR.replace(vallingby_sans_medium, {
	  selector: '#primary-content h2.red',
	  wmode: 'transparent'
	  ,css: [
		'.sIFR-root { text-align: left; color: #B71234;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #B71234; }'
		,'a:hover { color: #000000; }'
	  ]
	});
	
	sIFR.replace(vallingby_sans_medium, {
	  selector: '#primary-content h2',
	  wmode: 'transparent'
	  ,css: [
		'.sIFR-root { text-align: left; color: #000000;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #000000; }'
		,'a:hover { color: #B71234; }'
	  ]
	});
	
	sIFR.replace(vallingby_sans_medium, {
	  selector: '#primary-content h1',
	  wmode: 'transparent'
	  ,css: [
		'.sIFR-root { text-align: left; color: #000000;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #000000; }'
		,'a:hover { color: #B71234; }'
	  ]
	});
	
	sIFR.replace(vallingby_sans_medium, {
	  selector: '#secondary-content .blogg h2',
	  wmode: 'transparent'
	  ,css: [
		'.sIFR-root { text-align: left; color: #ffffff;}'
		,'a { text-decoration: none; }'
		,'a:link { color: #000000; }'
		,'a:hover { color: #B71234; }'
	  ]
	});
}
sifr_replace();
