var tooltipClass = {

    onload : function(zoomclass) {

        $j('a.lexiconitem')
            .each(function(){
                $j(this).after($j('<div/>')
                    .attr('class', 'tooltip ' + zoomclass)
                    .html($j(this).attr('title')))
                    .attr('title', '');
                })
            .hover(this.show, this.hide);

    },

    show : function(e) {

        var text = $j(this).next('.tooltip');

        if (text.attr('class').indexOf('tooltip') != 0)
            return false;

        text.fadeIn()
            .css('top', e.pageY)
            .css('left', e.pageX+10);

        return false;

    },

    hide : function(e) {

        var text = $j(this).next('.tooltip');

        if (text.attr('class').indexOf('tooltip') != 0)
                return false;

        text.fadeOut();

        return false;

    }

}
