/**
 * 
 */

globalHelperMethods = {
		random: function(min, max)
		{
			if( min > max ) {
				throw new Error("Min smaller then max.");
			}
			if( min == max ) {
				return( min );
			}
	        return( min + Math.random()*(max-min+1) );
		}
};

$(function()
{
	$('.extend-text-shadow')
		.css('text-shadow', '#333 0 0 5px, #000 1px 1px 5px');

	$('.extend-tagcloud').each(function() {
		$(this).children().each(function()
		{
			$(this).html($(this).html().replace(/,/, ''));
			$(this)
				.wrapInner('<span style="font-size:'+globalHelperMethods.random(1,2)+'em;white-space:nowrap;" />');
			$('a', this)
				.css({'text-decoration':'none'})
				.hover(function()
				{
					$(this).css('color','#aa0000');
				},
				function()
				{
					$(this).css('color','#fff');
				});
		});
	})
	.css({'text-align': 'center', 'line-height': '2em', 'margin': '2em 0'})
	.addClass('extend-tagcloud-clouded');
});

