function Switch(parentElement)
{
	this.ParentElement = parentElement;
	this.ParentElement.addEventListener("click", function()
	{
		System.ClassList.Toggle(this, "uwt-selected");
		
		System.RaiseEvent(this, "change", null);
	});
}

window.addEventListener("load", function()
{
	var items = document.getElementsByClassName("uwt-switch");
	for (var i = 0; i < items.length; i++)
	{
		items[i].NativeObject = new Switch(items[i]);
	}
});