text: $(function(){function f(d,e){var h,i,j,f=864e5,g=Math.round((e.getTime()-d.getTime())/f)+1;g>0?(g===a&&c?h=c:g>a&&c?(i=Math.floor(g/a),j=g-i*a,h=j*parseInt(b,10)+i*parseInt(c,10)):h=g*parseInt(b,10),$("#total-sum").text(h+" лв")):$("#total-sum").text("0 лв")}var a=7,b=$("#price-per-day").html(),c=$("#price-per-week").html(),d=new Date($("#start-date").val()),e=new Date($("#end-date").val());f(d,e),$("#start-date").on("change",function(){d=new Date($("#start-date").val()),f(d,e)}),$("#end-date").on("change",function(){e=new Date($("#end-date").val()),f(d,e)}),$("#send-message").on("click",function(){console.log("clicked")}),$("#add-comment").click(function(){$("#comments-modal").modal()})});