function nextDay(date){
    date.setDate(date.getDate()+1);
    return date;
}


function prepareHotelSitePrice(hotel_id){

    var daynext = nextDay(new Date());

    $("#check_places_datestart").datepicker({
        minDate: daynext,
        beforeShow: function(){
            // return {maxDate: $("#check_places_dateend").datepicker('getDate')};
        }
    });

    $("#check_places_dateend").datepicker({
        beforeShow: function(){
            return {minDate: nextDay($("#check_places_datestart").datepicker('getDate'))};
        }
    });

    $("#check_places_submit_button").click(function(){
        Price.listPricesForDate({hotel_id:hotel_id,date:{start:$("#check_places_datestart").val(),end:$("#check_places_dateend").val()}});

        // $("#price_title").show();
        // $("#currency_form_cont").show();
        $("#hotelRoomPricesTbl_" + hotel_id).hide();
        $("#currency_form_cont").hide();


        return false;
    });

};
function cashless(hotel_id,cashless)
{
    Price.listPricesForDate({hotel_id:hotel_id,date:{start:$("#check_places_datestart").val(),end:$("#check_places_dateend").val()},cashless:cashless});
    $("#hotelRoomPricesTbl_" + hotel_id).hide();
    $("#currency_form_cont").hide();

    return false;
}	
