var Buttons = {
	init: function() {
		// Buttons erstellen
		Buttons.parseButtons();
	},
	parseButtons: function() {
		var buttons = $$('a.button');
		buttons.each(function(button, i) {
			var linkText = button.get('text');
			var newLink = '<span class="button_left"></span><span class="button_center">' + linkText + '</span><span class="button_right"></span>';
			button.set('html', newLink);
		});
		if (buttons.length > 0) {
			var buttonImages = ['fileadmin/images/button/left.png', 'fileadmin/images/button/right.png', 'fileadmin/images/button/left_active.png', 'fileadmin/images/button/right_active.png'];
			new Asset.images(buttonImages);
		}
	}
};
window.addEvent('domready', Buttons.init);

