jQuery(function($) {

  // Iterate through all submit buttons on page
  var buttons = $(":submit").each(function() {

    // Retrieve content, classes and id of button
    var fstext = $(this).val();
    var fsclass = $(this).attr("class");
    var fsid = $(this).attr("id");

	// In case of submit button being surrounded by DIV with class "actions":
    $(this).parent('.actions')

		// Add button-like image as FIRST element of surrounding DIV
    	.prepend('<a id="'+fsid+'" class="'+fsclass+'" title="'+fstext+'" href="#"><span><b>'+fstext+'</b></span></a>')

		// Apply onclick-submit event handler to this new FIRST element
    	.children(':first').click(function() {
      		$(this).parents('form').submit();
      		return false;
    	});

    // Hide original submit button
    $(this).hide();
  });

});