$(document).ready(function(){
	// Adds a class of "lastchild" to the last <li> in a list
	$("li:last-child")
		.addClass("lastchild");
		
	$('#page').hide();
		
	// Places a <label>inside a text input and makes it show/hide on blur/focus
	/*$("#register label").each(function() {
		var label = $(this);
		var input = $('#' + label.attr('for'));
		var initial = label.hide().text().replace(':', '');
		input.focus(function() {
			input.css('color', '#7b8f9d');
			if (input.val() == initial) {
				input.val('');
			}
		}).blur(function() {
			if (input.val() == '') {
				input.val(initial).css('color', '#7b8f9d');
			}
		}).css('color', '#7b8f9d').val(initial);
	});*/

	$('#splash').flash({swf:'/media/splash.12092009.swf', width:950, height:411});
	$('#peopleflash').flash({swf:'/media/people.10202009.swf', width:950, height:570}); 
	$('#peopleflash-new').flash({swf:'/media/people.08242009.swf', width:950, height:570}); 
	
	$("#page").show();
	
	$("#page").wslide({
		width: 950,
		height: 348,
		autolink: false,
		horiz: true,
		fade: true,
		duration: 600
	});
	
	// Initialize Shadowbox
	Shadowbox.init();
	
});


// sIFR config
var tvnord = {src: '/media/tvnord.12232008.swf'};
sIFR.useStyleCheck = true;
sIFR.activate(tvnord);

sIFR.replace(tvnord, {
selector: 'body.homepage #pri h2'
,ratios: [7, 1.32, 8, 1.31, 12, 1.27, 15, 1.21, 16, 1.22, 22, 1.2, 23, 1.17, 25, 1.19, 33, 1.17, 42, 1.16, 47, 1.15, 48, 1.16, 65, 1.15, 71, 1.14, 72, 1.15, 110, 1.14, 111, 1.13, 116, 1.14, 117, 1.13, 118, 1.14, 119, 1.13, 122, 1.14, 123, 1.13, 124, 1.14, 1.13]
,css: [
  '.sIFR-root { color:#64696a; background-color:#ffffff; font-size:23px; font-weight:normal; }'
]
});

sIFR.replace(tvnord, {
selector: 'body.portfolio #pri h1'
,ratios: [7, 1.32, 8, 1.31, 12, 1.27, 15, 1.21, 16, 1.22, 22, 1.2, 23, 1.17, 25, 1.19, 33, 1.17, 42, 1.16, 47, 1.15, 48, 1.16, 65, 1.15, 71, 1.14, 72, 1.15, 110, 1.14, 111, 1.13, 116, 1.14, 117, 1.13, 118, 1.14, 119, 1.13, 122, 1.14, 123, 1.13, 124, 1.14, 1.13]
,css: [
  '.sIFR-root { color:#f78b35; background-color:#ffffff; font-size:21px; font-weight:normal; }'
]
})