last_fm_flash = function(resource_id, title, element_id) {
  var flashvars = {
    lfmMode: 'playlist',
    FOD: true,
    resourceID: resource_id,
    resname: title,
    restype: 'album',
    artist: 'Kenisia'
  };
  swfobject.embedSWF("http://cdn.last.fm/webclient/s12n/s/3/lfmPlayer.swf", element_id, "300", "221", "9.0.0", null, flashvars);  
};

last_fm_flash(3235563, 'Prototype', 'prototype');
last_fm_flash(2236443, 'Nothing to say', 'nts');
last_fm_flash(2236540, 'Crash Helmet Hoopla', 'chh');
last_fm_flash(3244094, 'Ye Olde MP3 EP', 'mp3');

init_youtube_videos = function() {
  $$('a.youtube').each(function(link, index) {
    if ($('youtube')) {
      link.observe('click', function(event) {
        event.stop();
        swfobject.embedSWF(link.href, 'youtube', "500", "390", "9.0.0", null, { showinfo: 0 });
      });
      if (index == 0) {
        swfobject.embedSWF(link.href, 'youtube', "500", "390", "9.0.0", null, { showinfo: 0 });
      }
    } else {
      link.id = 'youtube-' + index;
      swfobject.embedSWF(link.href, link.id, "500", "390", "9.0.0", null, { showinfo: 0 });
    }
  });
};
document.observe('dom:loaded', init_youtube_videos);


