/**
 * jQuery.fancysubmit - Create hyperlinks of submit items for better vertical-alignment
 * Date: 2010/08/08
 *
 * @author Michaël van Oosten
 * @version 1.0
 *
 **/

(function($) {
	$.fn.fancysubmit = function(settings) {

		var config = {};
		if (settings) $.extend(config, settings);
		
		this.each(function() {
			var thisId = $(this).attr('id');
			var form = $(this).parents('form:first');
			var html = '<a href="#" id="' + thisId + '" class="' + $(this).attr('class') + '">' + $(this).val() +'</a>';
			$(this).after(html).remove();
			$('#' + thisId).click(function() {
				form.submit();
			});
		});
		
		return this;
 
	};
 })(jQuery);
