(function($) {
  NotificaSuccesso = function(titolo, descrizione) {
    'use strict';
    resetToastPosition();
    $.toast({
      heading: titolo,
      text: descrizione,
      showHideTransition: 'slide',
      icon: 'success',
      loaderBg: '#f96868',
      position: 'top-right'
    })
  };
  NotificaErrore =  function(titolo, descrizione) {
    'use strict';
    resetToastPosition();
    $.toast({
      heading: titolo,
      text: descrizione,
      showHideTransition: 'slide',
      icon: 'warning',
      loaderBg: '#57c7d4',
      position: 'top-right'
    })
  };
  NotificaScriptNonDisponibile = function() {
    'use strict';
    resetToastPosition();
    $.toast({
      heading: 'Attenzione',
      text: 'Script non disponibile',
      showHideTransition: 'slide',
      icon: 'error',
      loaderBg: '#f2a654',
      position: 'top-right'
    })
  };
  resetToastPosition = function() {
    $('.jq-toast-wrap').removeClass('bottom-left bottom-right top-left top-right mid-center'); // to remove previous position class
    $(".jq-toast-wrap").css({
      "top": "",
      "left": "",
      "bottom": "",
      "right": ""
    }); //to remove previous position style
  }
})(jQuery);