// pre:
// - requires prototype.js

// initButtons()
// Sets up button links (i.e. <a class="button">) by inserting a <span> into
// them so they will display properly
// pre:
// - requires prototype.js
// post:
// - button links will be loaded and display properly
function initButtons()
{
  // get all the button links
  var buttons = $$('a.button');
  
  // loop over each button
  buttons.each(function (button, i)
  {
    // create span with button text to replace the button's content
    button.update(new Element('span').update(buttons[i].innerHTML));
  });
}

// initialize buttons on page load
document.observe('dom:loaded', initButtons);
