Skip to main content
2 of 5
deleted 1 character in body; added 6 characters in body

Crystal, 203 194 187 bytes

o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l==1||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]