I *believe* this function can be refactored to:

    return this.filter(function() {
        return !!Expanding.getExpandingInstance(this);
    }).length > 0;

And we won't need to instances variable or the $.inArray call