// Equal height

function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	if (tallest > 0) {
	  group.height(tallest);
	}
}

$(document).ready(function(){
	equalHeight($(".equal1"));
	equalHeight($(".equal2"));
});




$(document).ready(function(){

	// Banners home mothership coursor change

	$(".banners-home-m-box").css("cursor","pointer");
	$(".banners-home-m-box").hover(
		function () {
			$("h2 a", this).css("color","#004f94");
			$("h2 a", this).css("text-decoration","underline");
		}, 
		function () {
			$("h2 a", this).css("color","#4f4f4f");
			$("h2 a", this).css("text-decoration","none");
		}
	);
		

	// Banners home local coursor change

	$(".banners-home-box").css("cursor","pointer");
	$(".banners-home-box").hover(
		function () {
			$("h2 a", this).css("color","#004f94");
			$("h2 a", this).css("text-decoration","underline");
		}, 
		function () {
			$("h2 a", this).css("color","#4f4f4f");
			$("h2 a", this).css("text-decoration","none");
		}
	);


	// Banners internal pages coursor change

	$(".banner-page").css("cursor","pointer");
	$(".banner-page").hover(
		function () {
			$(".title a", this).css("color","#004f94");
			$(".title a", this).css("text-decoration","underline");
		}, 
		function () {
			$(".title a", this).css("color","#4f4f4f");
			$(".title a", this).css("text-decoration","none");
		}
	);
		


	// Search results - filter collapsing
	
	$(".filter ul li ul").hide();
	$(".filter ul li ul.selected").show();
	$(".filter ul li span").addClass("toggle");
	$(".filter ul li span").click(function () {
		$(".filter ul li ul").slideUp(100);
		$('ul', $(this).parent()).toggle(100);
  });
	


});

function popThickBox(href, title, width, height)
{
    $(document).ready(function(){ tb_show(title, href + (/\?/.test(href)?'&':'?') + 'popup=page&TB_iframe=true&height=' + height + '&width=' + width, null); });
    return false;  
}
function popModalThickBox(href, title, width, height)
{
    $(document).ready(function(){ tb_show(title, href + (/\?/.test(href)?'&':'?') + 'popup=modal&TB_iframe=true&height=' + height + '&width=' + width, null); });
    return false;  
}