$(document).ready(function(){	
	
	/* calculates the heights of all program feature content areas and match all 
	 * of them to the "tallest" one.
	*/
	if ($("div.contentarea")) {
		var heights = new Array();
		var programBoxes = $("div.contentarea");
		for (var i=0; i<programBoxes.length; i++) {
			heights[i] = programBoxes[i].offsetHeight;
		}
	
		var Tallest = Math.max(heights[0], heights[1], heights[2], heights[3], heights[4], heights[5]);
		for (var p=0; p<programBoxes.length; p++) {
			if (programBoxes[p].offsetHeight < Tallest) {
				programBoxes[p].style.height = Tallest + 'px';
			}
		}
	}
	
	var browser = navigator.userAgent;
	var IE6 = false;
	// if we find MSIE 6 in the user agent string (-1 if not found at all), adjust dropdowns
	if (browser.indexOf('MSIE 6') > -1) {
		IE6 = true;
	}
	
	$('#top-navigation ul li').hover(
		// over
		function() {
			// show sub menu
			$('ul', this).show();
			$(this).addClass('over');			
		},
		// out
		function() {
			// hide sub menu
			$('ul', this).hide();
			$(this).removeClass('over');
		}
	);
 
     // homepage tabs
     $("#irecnews").click(function() {
     	$(this).parent().addClass('selected');
     	$("#irecconference").parent().removeClass('selected');
     });
     
     $("#irecconference").click(function() {
     	$(this).parent().addClass('selected');
     	$("#irecnews").parent().removeClass('selected');
     });
     
     $("#forgotPWdrop").click(function() {
		$("#forgotpwblock").slideToggle("slow");
	});
});


function openWindLink(link) {
	location.href = link;
}

	 
function createNewsContent(content) {
	$("#dynamic-content").html(content);
}


