$(document).ready(function() {
	resize(); // do column reflow action on initial page load
	$('#qa_search').focus();
	 $('#openaccept,#tellus h3').click(function() { // attach handler for mailing list panel open
                $('#blackout').show();
                $('#acceptform').show();
                $('#name').focus();
        });
	$('#openpanel,#tellus h3').click(function() { // attach handler for mailing list panel open
                $('#blackout').show();
                $('#listform').show();
                $('#name').focus();
        });
	$('#closepanel').click(function() { // attach handler for mailing list panel close
		$('#qa_search').focus();
		$('#blackout').hide();
		$('#listform').hide();
		$('#acceptform').hide();
	});
});

$(window).resize(resize);

function resize() { // resize columns to equal height onresize
	$('#tier2 .column,#tier3 .column').css('height','auto');
	var max=0;
	$('#tier2 .column').each(function() { if($(this).height()>max) max = $(this).height(); });
	$('#tier2 .column').height(max);
	max=0;
	$('#tier3 .column').each(function() { if($(this).height()>max) max = $(this).height(); });
	$('#tier3 .column').height(max);
}

