
$(document).ready(function() {
	$('.checkbox').each(function() {
		var $this = $(this);
		if ($this.find('input').is(':checked'))
			$this.addClass('checked');
		else
			$this.removeClass('checked');
	}).click(function() {
		var $this = $(this);
		if (!$this.find('input').is(':checked'))
		{
			$this.find('input').attr('checked', true);
			$this.addClass('checked');
		}
		else
		{
			$this.find('input').attr('checked', false);
			$this.removeClass('checked');
		}									
	});
});

