
Event.observe(window, 'load', function(event) {
	if (!$) return false;

	$$("table#list tbody > tr:nth-child(even)").each(function(row) {
		row.style.backgroundColor = "#fdf7f2";
	});
	$$("table#list tbody tr").each (function(row) {
		if (row.up('table').readAttribute('class') != "update_history") {
			Event.observe(row, 'click', function(event) {
				document.location.href = row.down('a');
			});
			Event.observe(row, 'mouseover', function(event) {
				row.setStyle({
					cursor: 'pointer',
					background: '#ffffea'
				});
			});
		} else {
			Event.observe(row, 'mouseover', function(event) {
				row.setStyle({
					background: '#ffffea'
				});
			});
		}
		Event.observe(row, 'mouseout', function(event) {
			if ($$("table#list tbody > tr:nth-child(even)").include(row)) {
				row.style.backgroundColor = "#fdf7f2";
			} else {
				row.style.backgroundColor = "#fff";
			}
		});
	});
});
