function initswap()
{
	var imgs = document.getElementsByClassName("swap");
	imgs.each(function(img)
	{
		Event.observe($(img), "mouseover", swap.bindAsEventListener($(img)));
		Event.observe($(img), "mouseout", swap.bindAsEventListener($(img)));
	});
}

function swap(e)
{
	if (e.type == "mouseover") {
		if ($(this).src.indexOf("_over.jpg") != -1) {
			return false;
		} else {
			$(this).src = $(this).src.replace(".jpg", "_over.jpg");
		}
	} else if (e.type == "mouseout") {
		if ($(this).src.indexOf("_over.jpg") != -1) {
			$(this).src = $(this).src.replace("_over.jpg", ".jpg");
		} else {
			return false;
		}
	}
}

Event.observe(window, "load", initswap);