/**
 * confirm.js
 */

$(document).ready(function(){ 
	var btn_no = document.querySelector("#no");
	var btn_yes = document.querySelector("#yes");

	if (btn_no){
		btn_no.onclick = function(){
			localStorage.setItem("influencia_luna","no");
			window.location.href = "content.html";
			return false;
		}
	}

	if (btn_yes){
		btn_yes.onclick = function(){
			var switch_moon = document.querySelector("#switch-moon");
			if (switch_moon.checked == true)
				localStorage.setItem("influencia_luna", "yes-always");
			else
				localStorage.setItem("influencia_luna", "yes"); 

			window.location.href = "content.html";
			return false;
		}
	}

});