var mooZoom = new Class ({
	options: {},
	initialize : function(options) {	
		var productZoom = $('productZoom');
		var productInfo = $('productInfo');
		
		if(!productZoom || !productInfo) return;
		var image = productZoom.getElement('img.moozoom');
		var zoomThumb = productInfo.getElements('a.zoomthumb');
		zoomThumb.each(function(item){
			item.addEvent('click', function(e){
				e = new Event(e);
				e.stop();
				var src = item.getElement('img').getProperty('src').replace('ava_', 'org_');
				image.setProperty('src', src);
				
				var full = src.replace('org_', 'full_');
				$('moofull').setProperty('href', full);
			}.bind(this));
		}.bind(this));
	}
})
window.addEvent('load', function() {
	new mooZoom();
});

