code: function attr(elem, prop, value) {
  	var key,
  		setAttribute = 'setAttribute',
  		ret;
  
  	// if the prop is a string
  	if (isString(prop)) {
  		// set the value
  		if (defined(value)) {
  
  			elem[setAttribute](prop, value);
  
  		// get the value
  		} else if (elem && elem.getAttribute) { // elem not defined when printing pie demo...
  			ret = elem.getAttribute(prop);
  		}
  
  	// else if prop is defined, it is a hash of key/value pairs
  	} else if (defined(prop) && isObject(prop)) {
  		for (key in prop) {
  			elem[setAttribute](key, prop[key]);
  		}
  	}
  	return ret;
  }
docs: Set or get an attribute or an object of attributes. Can't use jQuery attr because
  it attempts to set expando properties on the SVG element, which is not allowed.
  
  @param {Object} elem The DOM element to receive the attribute(s)
  @param {String|Object} prop The property or an abject of key-value pairs
  @param {String} value The value if a single property is set