$(document).ready(function() {

	$("#pageContent .contentBottomLeft .top .textContent").mouseenter(function() {
		$(this).find("h1").addClass("active");
	});
	$("#pageContent .contentBottomLeft .top .textContent").mouseleave(function() {
		$(this).find("h1").removeClass("active");
	});


	if ($("#pageContent .contentBottomLeft .top img.border").size() == 0)
		$("#pageContent .contentBottomLeft .top .textContent").css("width", "auto");


	$(".subpage #pageContent .col2 .content table").attr("cellspacing", "0");
	$(".subpage #pageContent .col2 .content table").attr("cellpadding", "0");
	$(".subpage #pageContent .col2 .content table tr").each(function() {
		if ($(this).index() % 2 == 1)
			$(this).addClass("altrow");
	});

	
	$(".newsFrontpage #pageContent .col2 .content .col").each(function() {
	 	while ($(this).height() > 540) {
			var index = $(".newsItem", $(this)).size() - 1;
			$(".newsItem:eq(" + index + ")", $(this)).remove();
		}	
	});


	$("a[rel=fancybox]").fancybox({titleShow:false});


	$("img.print").click(function() {
	  window.print();
	});


	$("#directUrlLink").click(function() {
	  $("#directUrl").toggle();
	  $("#directUrl").select();
	});
	$("#directUrl").focus(function() {
	  $(this).select();
	});
	$("#directUrl").click(function() {
	  $(this).select();
	});

});

