
// Global variable for the Solution's object
var solution;

// Create an object for the Solution
new solution();

window.onload = solution.fix_height;

/* === Class: Solution === */
function solution() {
	// Store this object in its global
	solution = this;
	
	/* === Method: Fix Height === */
	// Reads the container's height and sets each div's height
	this.fix_height = function() {
		var height_solution_max = document.getElementById('solution').offsetHeight;
		
		var div_array = document.getElementById('solution').getElementsByTagName('div');
		
		for(n = 0; n < div_array.length; n++) {
			div_array[n].style.height = height_solution_max + 'px';
		}
	}
	
	this.hover = function(obj) {
		obj.style.backgroundColor = '#dfe7f0';
	}
	
	this.leave = function(obj) {
		obj.style.backgroundColor = '#fff';
	}
}

