
var d = new Date();
var n = d.getHours();

let container = document.getElementById("app-background-inner");

if (n >= 19 || n < 6) {
    // If time is after 7PM or before 6AM, apply night theme to ‘body’
    container.classList.add("night");
} else if (n >= 17 && n < 19) {
    // If time is between 5PM – 7PM sunset theme to ‘body’
    container.classList.add("sunset");
} else if (n >= 6 && n < 9) {
    // If time is between 6AM – 9AM dawn theme to ‘body’
    container.classList.add("dawn");
} else if (n >= 9 && n < 12) {
    // If time is between 9AM – 12PM day theme to ‘body’
    container.classList.add("day");
} else if (n >= 12 && n < 15) {
    // If time is between 12PM – 3PM dessert theme to ‘body’
    container.classList.add("desert");
} else if (n >= 15 && n < 16) {
    // If time is between 3PM – 4PM ocean theme to ‘body’
    container.classList.add("ocean");
} else {
    // Else use ‘day’ theme
    container.classList.add("mountain");
}

$('#toggle').click(function() {
  $('.circle-loader').toggleClass('load-complete');
  $('.checkmark').toggle();
});

//$(document).ready(function(){


  	/*if (n >= 19 || n < 23) {
	  	// If time is after 7PM or before 6AM, apply night theme to ‘body’
	  	document.getElementById("alldone").innerText = "Good night! See you again soon!";
  	} else if (n >= 17 && n < 19) {
	  	// If time is between 5PM – 7PM sunset theme to ‘body’
	  	document.getElementById("alldone").innerText = "Thanks for all your hard work!";
  	} else if (n >= 0 && n < 3) {
	  	// If time is between 12AM – 3PM sunset theme to ‘body’
	  	document.getElementById("alldone").innerText = "Wow! It's pretty late... go to bed!";
  	} else if (n >= 5 && n < 12) {
	  	// If time is between 6AM – 9AM dawn theme to ‘body’
	  	document.getElementById("alldone").innerText = "Have a great rest of your day!";
  	} else if (<?php echo $_SESSION['uid']; ?> == 1718) {
	 	document.getElementById("alldone").innerHTML = "<img src='images/2020-02-10.png'>";
  	} else if (<?php echo $_SESSION['uid']; ?> == 1732 || <?php echo $_SESSION['uid']; ?> == 1640 || <?php echo $_SESSION['uid']; ?> == 1591 || <?php echo $_SESSION['uid']; ?> == 1734) {
	 	document.getElementById("alldone").innerText = "H";
  	} else {
	  	// Else use ‘day’ theme
	  	document.getElementById("alldone").innerText = "You've clocked out. Thank you!";
  	}*/
//});