$(function() {
	var tagcloud = $('#tagcloud');
	var tagli = $('li', tagcloud);
	
	// Assign value attributes to the list items for the tagcloud
	tagli.each(function(pos) {
		$(this).attr('value', tagli.length - pos);
	});
	
	// Randomize the order of the items in the tagcloud
	tagli.tsort({ order: 'rand' });
	
	// Create the actual tagcloud
	tagcloud.tagcloud({
		type: 'list',
		colormin: '91d5e5', colormax: 'fff',
		sizemin: 15, sizemax: 25
	});
	
	// Haal het value-attribuut weg uit de list items, die hebben we nu niet meer nodig
	// En zorg ervoor dat de padding uit de stylesheet wordt gepakt (de tagcloud pluging voegt inline-style voor padding toe, en dat willen we niet)
	tagli.css('padding', '');
});
