$(function () {
	var plot_colours = ['#AB8115','#369312','#11198D','#9F1426','#AB9F15','#118D6A','#4B118D','#AB3915','#90A214','#11558D','#8E127C','#AB6315','#646942','#24405C','#8C0000','#B05B00','#426069','#696969','#994F00','#4A653F','#284469','#8C2500'];

	// Graph results ul 
	$('div.poll ul.results').each(function (l) {
		$(this).css({
			listStyleType: 'none',
			marginLeft: 0,
			marginTop: '0.5em',
			paddingLeft: 0,
			fontSize: '0.8em'
		});
		$('li', this).each(function (i) {
			var bar = $('<div></div>');
			bar.css({
				height: '3em',
				float: 'left',
				paddingRight: 10,
				borderRightWidth: (parseInt($('span.percent', this).text()) * 5) + 1,
				borderRightStyle: 'solid',
				borderRightColor: plot_colours[i]
			}).children('strong').css('fontSize', '1.3em');
			var wrap = $('<div></div>');
			wrap.css({
				width: 100,
				float: 'left',
				textAlign: 'right'
			});
			$(this).wrapInner(wrap).append(bar).css({
				float: 'left',
				width: '100%'
			});
		});
	});
});