function DailyCtrl($scope, $http) {
  
  $scope.openPopUp = function() {
    if(  !$('.pop_up_de').hasClass('open') ){
      $('.modal_layer').css('display', 'block');
      $('.modal_layer').addClass('open');
      $('.pop_up_de').addClass('open');
    }else{
      $('.modal_layer').removeClass('open');
      $('.pop_up_de').removeClass('open');
      $('.modal_layer').css('display', 'none');
    }
  
  }

  if( howMany() <= 0 ){
      $scope.daily = new Array();
      $scope.daily.en_expresion = "You have all dailies."
      $scope.daily.explanation = "You have all dailies."
  }else{
      $scope.daily = getRandomDaily();
  }
  
  removeAlarmByTypeAndDate('daily', new Date() );  

  $scope.speak = function(){
    
    if( !$('.btn_voice').hasClass('loading') ){
      var textToRead = $scope.daily.en_expresion;
      $('.btn_voice').addClass('loading');
      $('.wp_bulb').addClass('open');
      dailySpeaker(textToRead);
    }
  }
}