$(document).ready(function(){
	if(typeof document.body.style.maxHeight === "undefined") {
		
	} else {
		$("#pattern_inner p").FontEffect({
			shadow: 			true, 
			shadowColor: 		"#000000",
			shadowOffsetTop: 	1,
			shadowOffsetLeft: 	1,
			shadowBlur: 		1,
			shadowOpacity: 		.3
		});
	}
	
	var image_height = $("#main_image").height()/2;
	
	// Vertically center the main image
	var image_margin_top = 165-(image_height);
	$("#main_image").delay(100).css("marginTop", image_margin_top);
	
	var div_margin_top = 183-($("#image").height()/2);
	$("#image").delay(100).css("marginTop", div_margin_top);
	
	
	
	
	
	
	
	// Make the jump menus jump
	$(".jumpmenu").change(function() {
	    var val = $(this).selectedValues();
        if (val != '') {
            location.href=val;
        }
    });
	
	// Color the rows
	$("table.table tr:even").css("background-color", "#DDD");
	$("table.table tr:odd").css("background-color", "#EEE");
	
	// Color the rows hover states
	$("table.table tr:even").hover(
		function() {
			$(this).css("background-color", "#D7D7D7");
		},
		function() {
			$(this).css("background-color", "#DDD");
		}
	);
	
	$("table.table tr:odd").hover(
		function() {
			$(this).css("background-color", "#E7E7E7");
		},
		function() {
			$(this).css("background-color", "#EEE");
		}
	);
	
	// Style the headings
	Cufon.replace('h1');
	Cufon.replace('h2');
	
});