addClass = function addClass(element, classname) {

        // If classList supported, use that
        if (element.classList)
            element.classList.add(classname);

        // Otherwise, simply append the class
        else
            element.className += " " + classname;

    }
Adds a CSS class to an element.

@private
@function
@param {Element} element
    The element to add a class to.

@param {String} classname
    The name of the class to add.