The rule is: "Write as you speak and read as it is written."[0]
[0] http://en.wikipedia.org/wiki/Serbian_Cyrillic_alphabet