/*
take a ul and wrap every nth li in another ul
*/
jQuery.fn.makerows = function(settings){
	settings = jQuery.extend({
		rows: 3
	}, settings);

nr = $(this).find('li').length;

str = '';

for(i = 1; i <= nr; i+=3) {
str += '<ul>';
$(this).find('li:nth-child('+i+'),li:nth-child('+(i+1)+'),li:nth-child('+(i+2)+')').each(function(){
str += '<li>'+$(this).html()+'</li>';
});
str += '</ul>';
}

$(this).html(str);
}

