
Site.Controllers.ListTooltips = Class.create
(
    Site.Base,
    {
        initialize: function($super, element)
        {
            $super();
            
            this.element = element;      
            this.tooltips = [];
            
            this.tooltips = this.element.select("img.list-image").collect
            (
                function(img)
                {
                    var tooltip = $(img.id.replace("list-image", "list-item-tooltip"));
                
                    if (tooltip)
                    {
                        // CHANGED: 08 Feb 2008
                        return new Site.Widgets.Tooltip(tooltip, img, {durationShow: 0, tooltipClassName: "tooltip-list", offsetY: -8, offsetX: 20 });
                    }
                    
                    tooltip = null;
                },
                this
            );        
            
        },
    
        destroy: function($super)
        {
            this.tooltips.invoke("destroy");
            this.element = null;
        }    
    }
);