if(!console || !console.log){	
	console.log = function (str){
		return str;
	}

}

//auto fits the column by percentage
function autofit_column (){
	var frame  = $('body').children('.site_frame');
	frame.children('.row').each(function(i,n){
		var p=$(this).children('.column');//check again//
		var len  = p.length;
		var w =  Math.floor((p.parent().width()/len));
		p.width(w);
		// $(this).find('.portlet').height($(this).children('.column').height());
		var height=[];
		p.find('.portlet-content').each(function (i,n){
			// width[i] 	= $(n).width();
			height[i] 	= $(n).height();
			var h = height.max();
			// p.find('.portlet-content').height(h)
			// .width(w);
		});
		
	});
}


Array.prototype.max = function() {
	var max = this[0];
	var len = this.length;
	for (var i = 1; i < len; i++) if (this[i] > max) max = this[i];
	return max;
}
Array.prototype.min = function() {
	var min = this[0];
	var len = this.length;
	for (var i = 1; i < len; i++) if (this[i] < min) min = this[i];
	return min;
}
