var DropShadow = new Class({

	Implements: [Options],

	options: {
		container: null,
		offset_top: 0,
		offset_right: 0,
		offset_bottom: 0,
		offset_left: 0,
		shadow_top: 0,
		shadow_right: 0,
		shadow_bottom: 0,
		shadow_left: 0,
		shadow_color: '#000'
	},
	topdiv: null,
	rightdiv: null,
	bottomdiv: null,
	leftdiv: null,

	initialize: function(options) {
		this.setOptions(options);
		this.createShadow();
	},

	createShadow: function() {
		var container = $(this.options.container);
		if (this.options.shadow_right > 0) {
			if (this.rightdiv == null) this.rightdiv = new Element('div');
			this.rightdiv.setStyles({
				border: '0px',
				display: 'block',
				height: container.getSize().y-this.options.offset_right,
				position: 'absolute',
				left: container.getCoordinates().right,
				top: container.getCoordinates().top+this.options.offset_right,
				opacity: '0.3',
				width: this.options.shadow_right,
				background: this.options.shadow_color
			});
			this.rightdiv.injectAfter(container);

		}
		if (this.options.shadow_bottom > 0) {
			if (this.bottomdiv == null) this.bottomdiv = new Element('div');
			this.bottomdiv.setStyles({
				border: '0px',
				display: 'block',
				width: container.getSize().x,
				position: 'absolute',
				left: container.getCoordinates().left+this.options.offset_bottom,
				top: container.getCoordinates().bottom,
				opacity: '0.3',
				height: this.options.shadow_right,
				background: this.options.shadow_color
			});
			this.bottomdiv.injectAfter(container);
			
		}
	}
});

