$
(
	function()
	{

		function content_resize()
		{
			var content_height = $(window).height() - 40 - 48;

			if (content_height < 300) content_height = 300;

			var scroll_height = content_height - $("#pages").height() - $("#content h2").height() - 70;

			$("#content").css("height", content_height);

			if ($("#scroll").height() > scroll_height)
			{
				$("#news-and-events #scroll ul li").css("width","543px");
				$("#news-and-events #scroll div.pager").css("width","543px");

				$("#scroll").css("overflow-y","scroll");
				$("#scroll").css("padding","0px 20px 0px 0px");
			}
			else
			{
				//$("#scroll").css("overflow-y","hidden");
				//$("#scroll").css("padding","0px");
			}

			$("#scroll").css("height", scroll_height);
		}

		$(window).adjust(content_resize);
		
		content_resize(); 

		$("#pages ul li:last-child").css("margin","0px");

	}
);