Determine link class at runtime