addLoadEvent(function () {
	projectLisAsLinks();
});

function projectLisAsLinks() {
	var projectList = $('portfolio_projectList');
	var projects = projectList.getElementsByTagName('li');

	for (var i = 0; i < projects.length; i++) {

		// When the project <li> is clicked, visit the project page.
		projects[i].onclick = function () {
			window.location = this.getElementsByTagName('a')[0].getAttribute('href');
		};

		// When the project <li> is hovered upon, add 'hover' class.
		projects[i].onmouseover = function () {
			addClass(this, 'hover');
		};

		// When the project <li> is moused off of, remove 'hover' class.
		projects[i].onmouseout = function () {
			removeClass(this, 'hover');
		};
	}
}
