var vipp_mouseover = new Class({
	
	initialize: function (options) {
		this.current_id = 0;
		this.timeout_function = $empty;
		this.timeout = $empty;
		
		$$('.image_over').addEvent('mouseover', this.shift_on_over.bind(this));
		$$('.image_over').addEvent('mouseout', this.shift_on_out.bind(this));
	},
	
	shift_on_over: function (event) {
		var target = $(event.target);
		if (target.hasClass('image_over')) {
			return;			
		} 
		this.timeout = $clear(this.timeout);
		
		target = target.getParent('a');	
		this.current_id = target.idFromClass();
				
		$$('.images_hidden').each(function (item, counter) {
			item.fade('hide');
		});
		
		$('left').getElement('div img').fade('hide');
		$('prodn321' + this.current_id).fade(1);
	},
	
	shift_on_out: function (event) {
		var target = $(event.target);
		if (target.hasClass('image_over')) {
			return;			
		}
		
		this.timeout_function = this.return_to_image.pass('', this);
		this.timeout = this.timeout_function.delay(600, this);
	},
	
	return_to_image: function () {
		$$('.images_hidden').each(function (item, counter) {
			item.fade('hide');
		});
		
		$$('.images_hidden2').each(function (item, counter) {
			item.fade('hide');
		});
		
		$('left').getElement('div img').fade(1);
	}
});


