//$(function(){$('#top-date').html(moment().format('dddd, MMM Do'));$('#clock').html(moment().format('LT'));function updateClock(){$('#clock').html(moment().format('LT'));}setInterval(updateClock,3000);});
/* Progress Loading code */
var total_percent_done = 1;
function start_progress() {
   $("html").addClass("wait"); $(".waitCursor").css("cursor", "wait"); /* Works in FireFox, etc. NOT Chrome!! */
   total_percent_done = 1;
   $('#progress-percentage').text(total_percent_done + "%");
}

function stop_progress() {
  $("html").removeClass("wait"); $(".waitCursor").css("cursor", "default");
  $('#progress-percentage').text("99%");
  total_percent_done = 1;
 
  $("input[type=text][readonly]").attr("title", "This field can not be changed.");
  $('input[type=text][readonly]').css('color','#1B272B'); /* Change me here: Chris, thanks */
  $('input[type=text][readonly]').css('background-color','#D3D7CF55'); /* Change me here: Chris, thanks */
}

function progress() {
  if (total_percent_done > 98) total_percent_done = 98;
  $('#progress-percentage').text(total_percent_done + "%");
  total_percent_done += 10;
}
/* End Progress Loading code */

$('#profile-menua').off();
$('#profile-menua').on('click', function(e){
    $(this).parent('.dropdown').dropdown('clear'); /* Don't change Profile Name */
});

var redirect_to_url = '';
function set_redirect(url) {
  redirect_to_url = url;
  $('#leave-site-modal').modal('show');
}
function do_redirect() {
  $('#leave-site-modal').modal('hide');
  window.open(redirect_to_url, '_blank');
}

function rem() {
  if (dummy) {
    $.toast({
              heading: 'Notice ',
              showHideTransition: 'slide',
              text: 'Using Dummy Database on Testing Dev System.',
              icon: 'info',
                position: {
                  right: 35,
                  bottom: 65
              },
              hideAfter: 5000   // in milli seconds  
    });
  }
}

if (dummy) {
 // document.body.style.backgroundColor = "#CCF0C8";
  $(function() {
      rem();
  });     
}