var slider = Class.create();
slider.prototype = {
	
	initialize : function (element,status,miniHeight,trigger)
	{
		this.myElement = element;
		this.myTrigger = trigger;
		
		this.normalHeight = this.myElement.getHeight();
		this.miniHeight = miniHeight;
		
		if(status == true)
		{
			this.myElement.setStyle({
			  overflow: 'hidden',
			  height: this.normalHeight + 'px'
			}); 
			this.opened = true;
		}
		else
		{
			this.myElement.setStyle({
			  overflow: 'hidden',
			  height: this.miniHeight + 'px'
			});
			this.opened = false;
		}
		
		this.active = false;
	},
	
	openBox : function ()
	{
		this.active = true;
		var ex9;
		ex9 = new Animator(this.myTrigger, {transition: Animator.makeEaseOut(3),duration: 1000 });
		ex9.addSubject(new NumericalStyleSubject(this.myElement, 'height', this.miniHeight, this.normalHeight));
		ex9.play();

	},
	
	closeBox : function ()
	{
		this.active = true;
		var ex9;
		ex9 = new Animator(this.myTrigger, {transition: Animator.makeEaseOut(3),duration: 1000 });
		ex9.addSubject(new NumericalStyleSubject(this.myElement, 'height',this.normalHeight ,this.miniHeight));
		ex9.play();
	}, 
	
	toogle : function ()
	{
		if(this.opened == true)
		{
			this.myTrigger.setStyle({
				background: 'url(/static/webedition/others/webvisitenkarten/images/layout/slider_arrow_down.gif) transparent no-repeat'
			});
			this.closeBox();
			this.opened = false;
		}
		else
		{
			this.myTrigger.setStyle({
				background: 'url(/static/webedition/others/webvisitenkarten/images/layout/slider_arrow_up.gif) transparent no-repeat'
			});
			this.openBox();
			this.opened = true;
		}
	}
}
	
	