var ImageFull = new Class({
		
	Extends: Picture,

	initialize: function(options) {
		this.parent(options);
		this.dir = 'fulls/';
//		this.init();
		
		window.addEvent('resize', this.resize.bind(this));
		this.resize();
	},
	
	initElements:function() {
		this.target = this.options.container.getFirst('img');
		this.fx_target = new Element('div').wraps(this.target);
		this.cont = this.options.container;
		
		this.target.setStyles({
			'border': 'none',
			'width': '100%',
			'height': '100%'
		});
		this.options.container.setStyles({
			'border': '#000 solid 1px'
		});
		
		this.prev = this.options.container.getFirst('.previous');
		this.next = this.options.container.getFirst('.next');
		
		this.prev.removeClass('visible');
		this.next.removeClass('visible');
		
		[this.next, this.prev].each(function (el) {
			el.addEvent('click', function(e) {
				e.stop();
				this.loadImage(e.target.get('id'));
			}.bind(this));
		}, this);
		
		this.initLinks();
	},
		
	initLinks:function() {
		if(this.current < this.total - 1) {
			this.next.addClass('visible');
			this.next.set('id', this.current + 1);
		}
		else {
			this.next.removeClass('visible');
		}
		if(this.current > 0) {
			this.prev.addClass('visible');
			this.prev.set('id', this.current - 1);
		}
		else {
			this.prev.removeClass('visible');
		}
	},
	
	updateImage:function() {
		this.target.set('src', this.asset.get('src'));
		this.resize(true);
		this.cont_fx.start({'width': this.width, 'height': this.height});
	},
	
	contComplete:function() {
		this.fx.open();
	},
	
	resize:function(cont) {
		ratio = parseInt(this.options.infos[this.current].width) / parseInt(this.options.infos[this.current].height);
		w = $$('div.zoom')[0].getSize().x - 240 - 30;
		h = (parseInt(window.getSize().y) - parseInt(this.options.container.getCoordinates().top)) - 30;
		r = w / h;
		
		if(ratio < r) {
			height = h > this.options.infos[this.current].height ? this.options.infos[this.current].height : h;
			width = height * ratio;
		}
		else {
			width = w > this.options.infos[this.current].width ? this.options.infos[this.current].width : w;
			height = width / ratio;
		}
		this.width = parseInt(width);
		this.height = parseInt(height);
		
		if(height > 0) {
//			this.target.setStyles({
//				'width': this.width,
//				'height': height
//			});
			if(!cont) {
			this.options.container.setStyles({
				'width': this.width,
				'height': this.height
			});
			}
		}
	}
		
});
