GoldmanSachs.CheckBox = new Class({
	presets: {
		CONTAINER_CLASSNAME: 'gs_checkBox',
		CONTAINER_ON_CLASSNAME: 'gs_checkBox_on'
	},
	value : null,
	onChange : Class.empty,
	selectElement: null,
	initialize: function(checkBox){
		if ($defined(checkBox) == true){ if (checkBox.getTag() == 'input') {
			this.inputElement = checkBox;
			this.inputElement.setStyle('display', 'none');
			this.mainNode = new Element('span', {'class': (this.inputElement.checked == false)? this.presets.CONTAINER_CLASSNAME : this.presets.CONTAINER_ON_CLASSNAME});
			this.mainNode.setHTML('&nbsp;')
			this.mainNode.addEvent('click', this.doToggleValue.bind(this));
			this.mainNode.injectBefore(this.inputElement);
		}}
	},
	doToggleValue : function (){
		if (this.inputElement.checked == true) {
			this.inputElement.checked = false;
			this.mainNode.removeClass(this.presets.CONTAINER_ON_CLASSNAME);
			this.mainNode.addClass(this.presets.CONTAINER_CLASSNAME);
		} else {
			this.inputElement.checked = true;
			this.mainNode.removeClass(this.presets.CONTAINER_CLASSNAME);
			this.mainNode.addClass(this.presets.CONTAINER_ON_CLASSNAME);
		}
	}
});
GoldmanSachs.CheckBox.implement(new Events);