     var enabledDates = {};

    $(function() {
        var firstPostDate = (new Date).zeroTime().asString();
        var lastPostDate  = (new Date).zeroTime().asString();
        var enabledDates   = {};

        $.ajax({
            type   : 'get',
            url    : '/ajax-offline/calendar-days-archive?id=' + blogUser,
            success: function(response){
                enabledDates = response['days'];
            },
            complete: function(){
                $('#calendar .rounded-content').datePicker({
                    inline   : true,
                    startDate: '01/01/2008',
                    endDate  : lastPostDate,
                    renderCallback: function(cell, thisDate, month, year)
                    {
                        if ( !(!cell.is('.other-month') && typeof(enabledDates[year]) != 'undefined' && typeof(enabledDates[year][month + 1]) != 'undefined' && enabledDates[year][month + 1][cell.text()] == true) )
                        {
                            cell.addClass('disabled');
                        }
                    }
                }).bind('dateSelected', function(event, thisDate, cell, status){

                    window.location = window.location.toString().replace(/\/blog.*/, '/blog/')
                                    + [thisDate.getFullYear(), thisDate.getMonth() + 1, thisDate.getDate()].join('/');
				});
            }
        });
    });