
function offDays(date) {
    for (i = 0; i < natDays.length; i++) {
        if (date.getMonth() == natDays[i][0] - 1 && date.getDate() == natDays[i][1] && date.getFullYear() == natDays[i][2] ) {
            return [false, natDays[i][3] + '_day'];
        }
    }
    return [true, ''];
}

function noDates(date) {
    return offDays(date);
}

$(function() {
    $(".datepicker").datepicker({
        dateFormat: 'dd-mm-yy',
        changeMonth: true,
        changeYear: true,
        inline: true,
        hideIfNoPrevNext: true,
        beforeShowDay: noDates
    });
});
