/* --------------------------------------------------
Author: Anastasios Pallas / tcpallas@gmail.com
Version 1.0
Last Update: 2024-07-30
-------------------------------------------------- */


// Show Elements
water[0].visible = true;
bottle100[0].visible = true;
bottle_area.visible = true;
beaker1.visible = true;
beaker2.visible = true;
beaker1_area.visible = true;
beaker2_area.visible = true;
pipette[0].visible = true;	// empty
dropper[1].visible = true;	// full

// Hidden Elements
water[1].visible = false;
water[2].visible = false;
water[3].visible = false;
pipette[1].visible = false;
dropper[0].visible = false;
bottle100[1].visible = false;
bottle100[2].visible = false;
bottle100[3].visible = false;
bottle150[0].visible = false;
bottle150[1].visible = false;
bottle150[2].visible = false;
bottle150[3].visible = false;
bottle200[0].visible = false;
bottle200[1].visible = false;
bottle200[2].visible = false;
bottle200[3].visible = false;
bottle300[0].visible = false;
bottle300[1].visible = false;
bottle300[2].visible = false;
bottle300[3].visible = false;

labels.visible = false;

// Update Stage
stage.update();

$(document).ready(function() {
	
	/*
	// display a random lab scene
	var rnd = Math.floor(Math.random() * 6);	// 0 to 5
	$('.theme-blue-sea #oer_canvas').css("background", "url('images/chemistry-lab-bg" + rnd + ".png') no-repeat");
	$('.theme-blue-sea #oer_canvas').css("background-size", "contain");
	*/

	$('#oer_canvas').css("background", "url('images/chemistry-lab-bg.png') no-repeat");
	$('#oer_canvas').css("background-size", "contain");
	
	// Hide next steps
	$("#help_step2").hide();
	$("#help_step3").hide();
	$("#help_step4").hide();
	$("#help_step5").hide();
	$("#help_step6").hide();

	if (exercise <= 2) {
		// dilution
		$("#lab_question1").show();
		$("#lab_question2").show();
		$("#lab_question3").show();
		$("#lab_question4").hide();
		$("#lab_question5").hide();
	} else {
		// mixure
		$("#lab_question1").hide();
		$("#lab_question2").hide();
		$("#lab_question3").hide();
		$("#lab_question4").show();
		$("#lab_question5").show();
	}

	// choose bottle
	$("#lab_question6").hide();

	update_steps();

	// show_step(3);
});