function setMinHeight(elem,height) {
	if($(elem).height()<height)
		$(elem).height(height);
}
function setMaxHeight(elem,height) {
	if($(elem).height()>height)
		$(elem).height(height);
}
function fixPng(png) {
	var src = png.src;
	if (!png.style.width) 
		png.style.width = $(png).width();
	if (!png.style.height) 
		png.style.height = $(png).height();
	png.onload = function() { };
	png.src = blank.src;
	png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
}
var blank = new Image();
blank.src = '/global/images/blank.gif';

$(document).ready(function() { 
	setMinHeight('#content', 620);

	$('.post').each(function(){
		h = $('.postprofile',$(this)).height();
		if($(this).height()<h) {
			$(this).height(h);
		}
	});
	
	$('.post:first').toggleClass('mtop');
	
	//IE<7	
	if (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32") { 
	    $('img[src$=.png]').each(function() {
	    	if (!this.complete)
	    		this.onload = function() { fixPng(this) };
	    	else 
	    		fixPng(this);
	    });
	} else {
		//rounded corners
		$('.rounded').prepend('<div class="c t"><div class="l" /><div class="r" /></div>');
		$('.rounded').append('<div class="c b"><div class="l" /><div class="r" /></div>');	
	}
});