$(document).ready(function(){
function calculate() {
var total = 0, sum = 0;
$('.baskprd').each(function(){
var price = $( this ).parent().prev().find("input").val().replace(/[,]+/g, '.'),
count = $( this ).val();
sum += parseInt( count );
total += parseFloat( price ) * parseInt( count );
});
$('.makord span.ddt').html(sum);
$('.total .tlprct').html(total.toFixed(2));
}
$('.baskprd').change(function(){
calculate();
});
calculate();
});