Díky za to, že jsi v mi věříš....Thanks for believing in me.
Děkuji za to, že ve mě věříš (thanks for believing in me = you believe in my abilities)
Děkuji za to, že mi věříš (thanks for trusting me)
The latter would be more elegantly expressed by:
Děkuji ti za důvěru (Thanks for your trust)
Thanking for being friends seems rather strange to me but it would be probably something like "Díky za to, že můžeme být přátelé" (but still, it feel the relationship is not a balanced one... if I am friend to someone, we are equals, I do not need to thank him nor do I expect his thanks, it is a free choice of both of us to be friends but it is no more a question of linguistics but rather philosophy and personal conviction).
addendum: After a little thought... you could thank someone for being your friend even after some difficulties (for example you being sued for sexual harassment by some random girl which made almost everyone but the said friend to leave you) and that would be for example:
Díky, že jsme zůstali přáteli (thanks for staying friends)
Díky, že jsi byl při mě (thank for being with me)