function groupDuplicates () {
	var products = $('body.project-ideas #main > ul:first li');
	var h = {}
	
	products.each(function () {
		product = $(this);
		key = product.html();
		h[key] = !!h[key] ? h[key] + 1 : 1;
	});
	
	products.each(function () {
		product = $(this);
		key = product.html();
		if (h[key] == -1) product.remove();
		else if (h[key] > 1) product.html('(' + h[key] + ') ' + product.html());
		h[key] = -1;
	});
}

$(document).ready(function() {
	groupDuplicates();
});
