/* ------------------------------------------------------- */

/* fixcolumnheight.js @ jquery.js

/* ------------------------------------------------------- */

var fixColumnHeight = {
	className : 'list',
	childNode : 'li',
	line : 4,
	
	init : function(name, node, line) {
		if(name != undefined && name != '') this.className = name;
		if(node != undefined && node != '') this.childNode = node;
		if(line != undefined && line != '') this.line = line;
	},
	
	set : function() {
		var element = '.' + this.className + ' ' + this.childNode;
		var column = $(element);
		var length = column.length;
		
		for(var i = 0; i < length; i = i + this.line) {
			var h = 0;
			for(var j = i; j < i + this.line; j++) {
				h = ($(column[j]) && h < $(column[j]).height()) ? $(column[j]).height() : h;
			}
			for(var j = i; j < i + this.line; j++) {
				if($(column[j])) $(column[j]).css("height", h + 'px');
			}
		}
	}
}
