﻿/**
 * Imitates :hover in IE6 and lower by implementing suckerfish on a set of nodes.
 * @param {array} el A set of nodes/ids to hoverize. 
 * @param {string} className A custom classname to use instead of the default 'hover'
 * @return {array} The given set of nodes.
 * @static
 */
window.Valtech = window.Valtech || {};
Valtech.util = Valtech.util || {};

Valtech.util.suckerfish = function(el, className) {
    if (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie <= 6) {
        var className = className || "hover";
        $E.on(el, "mouseover", function() {
            $D.addClass(this, className);
        });
        $E.on(el, "mouseout", function() {
            $D.removeClass(this, className);
        });
    }
};
