/**
 * Dynamically create graphical buttons
 *
*/
function button(){
	this.BUTTON_WRAP = '<div class="button"></div>';
	this.BUTTON_LINK_AFTER = '<span>&nbsp;</span>';
	
	this.init();
}

button.prototype = {
	/**
	 * Create buttons for all links with the proper class names
	 *
	*/
	init: function(){
		var instance = this;
		$('a.button').each(function(){
			instance.createStandardButton(this);
		});
	},
	
	/**
	 * Create a normal sized button
	 *
	 * @param el the button link
	*/
	createStandardButton: function(el){
		$(el).wrap(this.BUTTON_WRAP);
		$(this.BUTTON_LINK_AFTER).insertAfter($(el));
	}
}

$(function(){				 
	var buttonObj = new button();
});
