var debug, rules;
var potato = window.potato || {};

window.addEvent('domready',function(){
  window.defaultStatus = "skee bop bat dee bot doo wop";
  
  rules = document.styleSheets[0].cssRules;

  var list = document.getElement('ul');
  var items = list.getChildren('li');
  
  list.addEvent('mouseleave', function(){
    rules[0].style.setProperty('border-color', '#333', '');
    rules[1].style.setProperty('color', '#777','');
  });

  items.addEvent('mouseenter', function(evt){
    var color = this.getProperty('class');
    rules[0].style.setProperty('border-color', color, '');
    rules[1].style.setProperty('color', color, '');
  }); 
  
  $$('a.external').addEvent('click', function(event){
    if (event.meta) return;
    var msg = 'Click "Ok" to leave my site and go to ' + this.title + '. \n\nClicking on cancel will open it in a new window behind this one (for later).';
    if (!window.confirm(msg)) {
      event.stop();
      var child = window.open(this.href, 'spawn');
      child.moveBy(25, 0);
      //child.blur();
      // console.log(child, window['spawn']);
      // window.focus();
    }
  });
});


var timer;
var screenY = window.innerHeight - 51;


var scrollDebugger = function(event){
  window.clearTimeout(timer);
  var debug = document.getElementById('debug');
  debug.style.setProperty('display', 'none', '');
  timer = window.setTimeout(function(){
    debug.innerHTML = 'y = ' + window.pageYOffset + 'px';
    debug.style.setProperty('top', (window.pageYOffset + screenY) + 'px', '');
    debug.style.setProperty('display', 'block', '');
  }, 500);
}


var x="function f(x){var i,o=\"\",l=x.length;for(i=l-1;i>=0;i--) {try{o+=x.c" +
"harAt(i);}catch(e){}}return o;}f(\")\\\"function f(x,y){var i,o=\\\"\\\\\\\""+
"\\\\,l=x.length;for(i=0;i<l;i++){if(i<11)y++;y%=127;o+=String.fromCharCode(" +
"x.charCodeAt(i)^(y++));}return o;}f(\\\"\\\\hasgysvn2iRHVFHK\\\\\\\\016\\\\" +
"\\\\005\\\\\\\\024H\\\\\\\\nC^HH\\\\\\\\022l\\\\\\\\023_R]YBX\\\\\\\\002[H^" +
"RY_Qn,'7>\\\\\\\\\\\"\\\\#5\\\\\\\\010.'*%!`,?<\\\\\\\\016qt!?#4<g\\\\\\\\0" +
"07~>11\\\\\\\\024\\\\\\\\000\\\\\\\\001\\\\\\\\027D\\\\\\\\010\\\\\\\\003;J" +
"W(\\\\\\\\031\\\\\\\\t\\\\\\\\003\\\\\\\\n\\\\\\\\016\\\\\\\\036Q?\\\\\\\\0" +
"26\\\\\\\\000\\\\\\\\017\\\\\\\\021\\\\\\\\022\\\\\\\\nEU\\\\\\\\032B_W;19\\"+
"\"\\\\,11)\\\"(f};)lo,0(rtsbus.o nruter};)i(tArahc.x=+o{)--i;0=>i;1-l=i(rof" +
"}}{)e(hctac};l=+l;x=+x{yrt{)84=!)31/l(tAedoCrahc.x(elihw;lo=l,htgnel.x=lo,\\"+
"\"\\\"=o,i rav{)x(f noitcnuf\")";

//while(x=eval(x));

