text: loading = true;
  
  Adianti.onClearDOM = function(){
  	/* $(".select2-hidden-accessible").remove(); */
  	$(".colorpicker-hidden").remove();
  	$(".select2-display-none").remove();
  	$(".tooltip.fade.top.in").remove();
  	$(".select2-drop-mask").remove();
  	/* $(".autocomplete-suggestions").remove(); */
  	$(".datetimepicker").remove();
  	$(".note-popover").remove();
  	$(".dtp").remove();
  	$("#window-resizer-tooltip").remove();
  };
  
  function showLoading() 
  { 
      if(loading)
      {
          __adianti_block_ui('Carregando');
      }
  }
  
  Adianti.onBeforeLoad = function(url) 
  { 
      loading = true; 
      setTimeout(function(){showLoading()}, 400);
      if (url.indexOf('&static=1') == -1) {
          $("html, body").animate({ scrollTop: 0 }, "fast");
      }
  };
  
  Adianti.onAfterLoad = function(url, data)
  { 
      loading = false; 
      __adianti_unblock_ui();
  };
  
  // set select2 language
  $.fn.select2.defaults.set('language', $.fn.select2.amd.require("select2/i18n/pt"));
  