// JavaScript Document

$(function(){
	

	$(".thickbox").each(function(){
		var img = $("img", this);
		var popUpID = $(this).attr("href"); // the href is an anchor which is in the format #myDivID
		var strPopUp = popUpID.substr(1); // we lop off the #
		var $popUpDiv = $(popUpID).hide(); // hide all the popup divs
		if(img.length){// clone the image into content div
			$popUpDiv.prepend(img.clone().css("marginBottom", "10px"));
		}
		// set the href for the link
		$(this).attr("href", "#TB_inline?height=450&width=400&inlineId=" + strPopUp);
	});
	
	// sets equal height
	/*var arryCols = $("div[id$=sponsors]");
	var thisHeight = 0;
	for(var i = 0; i < arryCols.length; i++){
		var tmpHeight = $(arryCols[i]).outerHeight();
		if(tmpHeight > thisHeight){
			thisHeight = tmpHeight;
		}
		
	}	
	arryCols.each(function(){
		$(this).height(thisHeight);						   
	});*/   
	
});