$(function() {	$('#removeDisabled').click(function() { $('.calculation1').removeClass('disabled'); $('.calculation1 tr.none').removeClass('none'); $('.calculation1 :checkbox:desabled').removeAttr('disabled'); $('.calculation1 tr:has(td):odd').addClass('odd'); $(this).remove(); });	$('.calculation1 tr:has(td):odd').addClass('odd');	var sum =  parseInt($('#amount').text());	var hours = parseInt($('#hours').text());	var sale = parseInt($('#sale').text());	$('.calculation1 :checkbox:checked').each(function() {		$(this).parents('tr').addClass('checked');		sum = sum + parseInt($(this).val().split(',')[0]);		hours = hours + parseInt($(this).val().split(',')[1]);	});	$('#amount').text(sum);	$('#hours, #hours2').text(hours);	var total = sum - sum * sale / 100;	$('#total').text(total);	$('.calculation1 :checkbox').click(function() {		input = $(this);		var money = parseInt($(this).val().split(',')[0]);		var work = parseInt($(this).val().split(',')[1]);		var amount = parseInt($('#amount').text());		hours = parseInt($('#hours').text());		if(input.attr('checked') == true ) {			amount += money;			hours += work;			total = amount - amount * sale / 100;			input.parents('tr').addClass('checked');		} else {			amount -= money;			hours -= work;			total = amount - amount * sale / 100;			input.parents('tr').removeClass('checked');		}		$('#amount').text(amount);		$('#hours , #hours2').text(hours);		$('#total').text(total);	});});
