text:  $(document).ready(function () {
  
  $calendar = $('#fullCalendar');
  var user = $('#id_user').val();
  
  today = new Date();
  y = today.getFullYear();
  m = today.getMonth();
  d = today.getDate();
  
  $calendar.fullCalendar({
      monthNames:['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Novienbre','Diciembre'],
      monthNamesShort:['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
      dayNames:['Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado'],
      dayNamesShort:['Dom','Lun','Mar','Mie','Jue','Vie','Sab'],
      
      viewRender: function(view, element) {
          // We make sure that we activate the perfect scrollbar when the view isn't on Month
          if (view.name != 'month'){
              $(element).find('.fc-scroller').perfectScrollbar();
          }
      },
      header: {
       left: 'title',
       center: 'agendaWeek,agendaDay',
       right: 'prev,next,today'
  },
  defaultView: 'agendaWeek',
  slotDuration: '00:30',
  allDaySlot: false,
  selectable: false,
  selectHelper: false,
      views: {
          month: { // name of view
              titleFormat: 'MMMM YYYY'
              // other view-specific options here
          },
          week: {
              titleFormat: " MMMM D YYYY"
          },
          day: {
              titleFormat: 'D MMM, YYYY'
          }
      },
  
  editable: false,
  eventLimit: true,
  events: function(start, end, timezone, callback) {
  
          $.ajax({
                 type: "GET",
                 dataType: "json",
                 url: "../public/selectprocesoconsultadoctorescaja/"+""+user+"",               
                 success: function(doc) {
                  callback(doc);
                  console.log(doc);
              }
          });
      }
  
  });
  
  
  });