// This script is used for including html content from static files in
// /public/interactive/ that are periodically updated from erb templates
// in the 'interactive' rails app.
// Requires prototype.js
// Usage:
//   Event.observe(window, 'load', function() { loadInteractive('newsletters') })


function loadInteractive(action) {
  new Ajax.Request('/interactive/' + action + '.html', {
    method: 'get',
    onSuccess: function(transport) { $(action).update(transport.responseText) },
    onFailure: function() { alert('Could not load interactive action: ' + action) }
  })
}
