function initPristips() {
  if(pristips = $$('ul.senastePristips li')) {
    for(i=0; i<pristips.length; i++) {
      pristips[i].onmouseover = function() {
        showPristips(this);
      }
      pristips[i].onmouseout = function() {
        hidePristips(this);
      }
    }
  }
}

function showPristips(element) {
    if(($$('p.pristips')[0])) {
      $$('p.pristips')[0].remove();
    }
    new Ajax.Request(
      '/includes/ajaxGetPristips.php', {
      onSuccess: function(response) {
        var myP = new Element('p', { 'class':'pristips' }).update(response.responseText);
        pointerOffsetX = -20;
        pointerOffsetY = -70;
        Event.observe(element, 'mousemove', function(event){
          myP.setStyle({
            top: (parseInt(Event.pointerY(event))+pointerOffsetY)+'px', 
            left: (parseInt(Event.pointerX(event))+pointerOffsetX)+'px'
          });
        });
        myP.hide();
        $$('body')[0].insert({'top':myP});
        myP.appear({duration: 0.2});      
        },
        parameters: {id: element.identify()}
      }
    );
}

function hidePristips() {
    if(myP = $$('p.pristips')[0]) {
      myP.remove();
    }
}
