(function() {
function mouse_over_closure(i) {
  return function() {
    console.info(i, descriptions[i])
    mouse_out()
    description_el = doc.createElement("DIV")
    description_el.className = "popup_label"
    description_el.innerHTML = descriptions[i]
    description_el.style.top = this.offsetTop - 6
    menu_el.appendChild(description_el)
  }
}

function mouse_out() {
  if(description_el) {
    description_el.parentNode.removeChild(description_el)
    description_el = 0
  }
}

var descriptions = [
  "General information and overview",
  "Typematrix EZR-2030 • Ergonomic keyboard • Pictures • Modified Dvorak keyboard layout",
  "Tables and numbers of my progress practicing Czech words in the program Anki for spaced repetition",
  "Calendar of places I have been to on my trip through Central Europe 2011",
  "Android application that measures, tells and logs progress of pushup workouts, using proximity sensor",
  "Android application for keeping a personal log of body weight and displaying as a chart",
  "Python extension to generate captcha images",
  "Python extension to get preview images from Theora videos in Ogg files",
  "Python extension to capture video with video4linux2",
  "Karaoke game",
  "Swedish forum website",
  "Swedish web based game"]

var description_el
var doc = document
var el
var menu_el = doc.getElementById("z2")
var link_els = menu_el.getElementsByTagName("A")

for(var i = 0; el = link_els[i]; i++) {
  el.onmouseover = mouse_over_closure(i)
  el.onmouseout = mouse_out
}
})()

