Event.observe(window, "load", function() {
// インスタンス
  var clip = new ZeroClipboard.Client();
  clip.setHandCursor(true);
// タグを取得
  var elements = document.getElementsByTagName('span');
  for(i=0; i<elements.length; i++) {
    if(elements[i].getAttribute('rel') == 'clipButton') {
      var btn = elements[i];
      Event.observe(btn, "mouseover", function() {
        this[1].setText(this[0].innerHTML);
        if (this[1].div) {
          this[1].receiveEvent('mouseout', null);
          this[1].reposition(this[0]);
        } else {
          this[1].glue(this[0]);
        }
      }.bind([btn, clip]));
    }
  }
});
