window.addEvent('domready', function(){

    $$('.text').addEvent ('mouseover', function() {

		this.removeClass('resultOff');
		this.addClass('resultOn');
		
		var imgId = this.id.replace('resultDiv', 'resultImg');
		var img = $(imgId + 'Off');
		if (img)
			img.setStyle ('display', 'none');
		img = $(imgId + 'On');
		if (img)
			img.setStyle ('display', 'block');
    });

    $$('.text').addEvent ('mouseout', function() {

		this.removeClass('resultOn');
		this.addClass('resultOff');

		var imgId = this.id.replace('resultDiv', 'resultImg');
		var img = $(imgId + 'Off');
		if (img)
			img.setStyle ('display', 'block');
		img = $(imgId + 'On');
		if (img)
			img.setStyle ('display', 'none');

    });

    $$('.image').addEvent ('mouseover', function() {

		var divId = this.id.replace('resultImg', 'resultDiv');
		var div = $(divId);
		div.removeClass('resultOff');
		div.addClass('resultOn');

		var img = $(this.id + 'Off');
		if (img)
			img.setStyle ('display', 'none');
		img = $(this.id + 'On');
		if (img)
			img.setStyle ('display', 'block');

    });

    $$('.image').addEvent ('mouseout', function() {

		var divId = this.id.replace('resultImg', 'resultDiv');
		var div = $(divId);
		div.removeClass('resultOn');
		div.addClass('resultOff');

		var img = $(this.id + 'On');
		if (img)
			img.setStyle ('display', 'none');
		img = $(this.id + 'Off');
		if (img)
			img.setStyle ('display', 'block');

    });

/*
    $('prev').addEvent ('mouseover', function() {
		$('imgPrev').src = $('imgPrev').src.replace('off', 'on');
		$('lnkPrev').addClass ('on');
    });

    $('prev').addEvent ('mouseout', function() {
		$('imgPrev').src = $('imgPrev').src.replace('on', 'off');
		$('lnkPrev').removeClass ('on');
    });

    $('next').addEvent ('mouseover', function() {
		$('imgNext').src = $('imgNext').src.replace('off', 'on');
		$('lnkNext').addClass ('on');
    });

    $('next').addEvent ('mouseout', function() {
		$('imgNext').src = $('imgNext').src.replace('on', 'off');
		$('lnkNext').removeClass ('on');
    });
*/

});