window.onload = function()
{
   // Preleviamo tutti i div a cui ci interessa applicare il nostro effetto.
   // Io li ho identificati nel mark-up con la classe 'informazione'
   var divs = document.getElementsByTagName('div')
   var informazioni = new Array()
      for (var i = 0; i < divs.length; i++)
      {
         if ( divs.item(i).className == 'over_box' )
         {
            informazioni.push(divs.item(i))
         }
      }

   // Creiamo una funzione che legga il link
   // e lo attribuisca all'intero div
   function attribuisci_link(elemento)
   {
      var titolo = elemento.getElementsByTagName('h3').item(0)
      var collegamento = titolo.getElementsByTagName('a').item(0)
      var collegamento_link = collegamento.getAttribute('href')

      elemento.onclick = function()
      {
         location.href = collegamento_link
      }

      elemento.onmouseover = function()
      {
         this.className += ' over'
      }
      elemento.onmouseout = function()
      {
         this.className = this.className.replace(' over', ' ')
      }
   }

   // Attribuiamo la funzione a tutti
   // i div interessati
   for (var i = 0; i < informazioni.length; i++)
   {
      attribuisci_link(informazioni[i])
   }
}
