public static function _getRelationPaths ($endClass, $fork = array (), $paths = array (), $processed = array (), $depth = 0)
	{
		
		// Remove first \ from end class
		
		if ($endClass[0] == '\\')
		{
			$endClass	= substr ($endClass, 1);
		}
		
		// Make sure fork is an array
		
		if ($fork === FALSE)
		{
			$fork	= array ();
		}
		
		// Set variables
		
		$class			= get_called_class ();
		$processed[]	= strtolower ($class);
		$parent			= $paths;
		
		$depth++;
		
		// Find paths to the end class
		// Loop through attributes
		
		foreach (static::$attributes as $name => $attribute)
		{
			
			// No attribute relation or class for the relation
			
			if (!isset ($attribute['relation']) || !class_exists ($attribute['relation']) || 
				(isset ($fork[$class]) && $fork[$class] != $name))
			{
				continue;
			}
			
			// Attribute relation matches the end class so add to paths
			
			else if ($attribute['relation'] == $endClass)
			{
				$paths[$name]	= $depth;
				continue;
			}
			
			// The attribute relation has already been processed
			
			else if (in_array (strtolower ($attribute['relation']), $processed))
			{
				continue;
			}
			
			// Recursively look at relation attributes
			
			else
			{
				$subPaths	= $attribute['relation']::_getRelationPaths ($endClass, $fork, $parent, $processed, $depth);
				
				if ($subPaths)
				{
					$paths[$name]	= $subPaths;
				}
				
			}
			
		}
		
		return $paths;
		
	}