The ruin problem for a Wiener process with state-dependent jumps