var Gui={
	RoundedEdges:{
		init: function(selectors){
			$A(selectors).each(function(selector) {
				$$(selector).each(function(element) {
					Gui.RoundedEdges.addCorners(element);
				})
			});
		},
		addCorners: function(element){
			$A(['top_left','top_right','bottom_left','bottom_right']).each(function(className) {
				element.addClassName('rounded');
				element.appendChild(Gui.RoundedEdges.newCorner(className));
			});
		},
		newCorner: function(className){
			corner = document.createElement('div');
			corner.className += className+' corner';
			return corner;
		}
	}
}

document.observe("dom:loaded", function() {
	Gui.RoundedEdges.init(['.tekstvak']);
});
