$ = jQuery.noConflict();

$(document).ready(function() {
	// generic overlay
	$( ".toggle_overlay" ).click(function() {
		$( "#categories_overlay" ).toggleClass('active');
	});
	// category overlay
	$( "#category_select" ).change(function() {
		if($(this).val() == "multiple") $( "#categories_overlay" ).toggleClass('active');
	})
	
	// add bot cap to sidebar
	$( "#mag_main dl div" ).append('<div class="mask"></div>');	
	
	fixToutHeights();
});

function fixToutHeights() {
	var maxHeight = 0;
	$( "#touts .tout_content" ).each(function() {
		maxHeight = Math.max($(this).height(), maxHeight);
	});
	$( "#touts .tout_content" ).each(function() {
		$(this).height(maxHeight);
	});
}

