text: Template.loading.rendered = function () {
    if ( ! Session.get('loadingSplash') ) {
      this.loading = window.pleaseWait({
        logo: '',
        backgroundColor: '#ffffff',
        loadingHtml: message + spinner
      });
      Session.set('loadingSplash', true); // just show loading splash once
    }
  };
  
  Template.loading.destroyed = function () {
    if ( this.loading ) {
      this.loading.finish();
    }
  };
  
  var message = '<p class="loading-message">Please Wait ...</p>';
  var spinner = '<div class="sk-spinner sk-spinner-cube-grid"><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div><div class="sk-cube"></div></div>';