The function takes a string input and shifts the alphabetical characters forward by 5 positions in the alphabet, wrapping around from 'z' to 'a'. The function keeps the case of the original character (i.e., upper or lower). Non-alphabetical characters remain unchanged.

[CODE]: 
```python
def f(x):
    result = ""
    for char in x:
        if char.isalpha():
            shift = 5
            if char.islower():
                result += chr(((ord(char) - ord('a') + shift) % 26) + ord('a'))
            else:
                result += chr(((ord(char) - ord('A') + shift) % 26) + ord('A'))
        else:
            result += char
    return result
```
Please let me know if you have any further requirements or if you want me to test more inputs.