var webCreator = new Class({
	options:{
		handlerClass: 'div.accToggler',
		stepButton: 'span.creatorNextStep',
		contentClass:'div.content',
		boxClass: 'div.accContainer',
		fullSize: true
	},
	initialize:function(id,form)
	{
		this.mainObj = $(id);
		this.mainForm = $(form);
		this.getAccElements();
		this.createFunctionality();
	},
	getAccElements:function()
	{
		this.togglers = this.mainObj.getElements(this.options.handlerClass);
		this.contents = this.mainObj.getElements(this.options.boxClass);
		this.formElements = this.mainForm.elements;
		this.swichElements = this.mainForm.getElements('input.swichCreator');
		this.swichContents = this.mainObj.getElements('div.switchContainer');
	},
	createFunctionality:function()
	{
		var $this = this;
		this.accordion = new Accordion(this.mainObj, this.options.handlerClass, this.options.boxClass, {opacity:true,display:55,alwaysHide:true});
		this.swichElements.each(function(element,i){
			element.addEvent('change',function(){
				if(element.checked==true)
					$this.setProperStep2(i);
			})
		})
	},
	setProperStep2:function(i){
		var elCount = 1;
		if(this.options.fullSize==false)
			elCount = 0;
		this.contents[elCount].getElement(this.options.contentClass).innerHTML = this.swichContents[i].innerHTML;
	}
})
webCreator.implement(new Options);
