jQuery(function($) {

	$("#FooterSitemap ul li:last-child").css("border-bottom","none");
	$(".PageTop a").click(function(){
		$("html,body").animate({ scrollTop: 0 }, "slow");
		return false;
	});
	
	var tHeight = $("h2.PageTitle img").attr("height") / 2;
	var mTitle = "-" + tHeight + "px";
	var mContents = tHeight + "px";
	$("#Contents h2.PageTitle").css("margin-top", mTitle);
	$("#Contents, #Side").css("margin-top", mContents);
	
	$("#Contents .Summary p:last-child").css("margin-bottom","0px");
	
});

function ImageIndex() {
	/*
	var sets = [], temp = [];
	$('#Contents .ImageIndex li').each(function(i) {
		temp.push(this);
		if (i % 2 == 1) {
			$(this).css("float","right");
			sets.push(temp);
			temp = [];
		}
	});
	if (temp.length) sets.push(temp);
	$.each(sets, function() {
		$(this).flatHeights();
	});
	*/
	
	$('#Contents .ImageIndex li').flatHeights();
	$('#Contents .ImageIndex li').each(function(i) {
		if (i % 2 == 1) {
			$(this).css("float","right");
		}
	});
}

function TextIndex() {
	$("#Contents .TextIndex dl:last-child").css("margin-bottom","0px");
}
function BrownBlock() {
	$("#Contents .Brownback .Block:last-child").css("margin-bottom","0px");
}
