// jQUERY
// --------------------------------------------------
$(document).ready(function() {
	
	// Remove underline on last item in both sidebars
	$('div#content-sub-info ul li:last, div#content-sub-news ul li:last').css({
		border: 'none'
	});
	
	// Make both content-main-module the same height
	$('div#content-main div.content-main-module').equalHeights();
	
	$('a.popupWin').popupwindow(profiles);
	
});

var profiles =
{
	windowCenter:
	{
		height: 460,
		width: 500,
		center: 1
	}
};

// Equal Heights Plugin
// --------------------------------------------------
(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) {
				tallest = $(this).height();
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			$(this).height(tallest).css("overflow","auto");
		});
	}
})(jQuery);