if ($pricesPerMonth[$m]) {
$price += $pricesPerMonth[$m];
}
// Вывод стоимость
var startDate = start,
endDate = normend,
dates = [new Date(startDate), new Date(endDate)],
pricesPerMonth = {"1": 1500,"2": 2000,"3": 1500,"4": 2000,"5": 1500,"6": 2000,"7": 1500,"8": 2000,"9": 1500,"10": 2000,"11": 1500,"12": 2000};
// Расчет цены
var price = 0;
for (var i = dates[0].getTime(); i <= dates[1].getTime(); i += 86400 * 1000) {
var d = new Date(i);
var m = d.getMonth() + 1;
if (pricesPerMonth[m]) {
price += pricesPerMonth[m];
}
$('.price').val(price + " рублей");
}