I have received a postdoc offer from a world famous university (ranking ~ 60 worldwide) early June and accepted the offer via email. The university helped me applied for the visa an I have obtained the visa. The hardcopy of the contract, however, has not been signed. in early Aug. I received another interview from a top university (top 3 by some ranking) and got another offer. I have emailed the supervisor in the latter university and explained my situation and his idea is that it is OK to change to his offer since the work has not started. Is it OK to tell the first supervisor about my condition and ask whether he could permit my turning down on his offer?
While it may be legally OK, if your field is a small one, there may be damage to reputation as word of you withdrawing from an informal acceptance propagates.
It is legally fine to turn down your offer as you didn't sign anything (as @Heinrich pointed out) but it may seem different from an ethical point of view. Then again this view does differ from one person to another.
Technically, there is no right or wrong answer for your particular question. In the end, the decision is to made with respect to your values and your future.
If we are talking about moral aspects, was it ethical to apply for another position on the first place? If the OP has no problem of applying for a second position after receiving the offer, there should be no problem of turning it down. But why not base the decision not on the university ranking, money, country, etc., but on the topic of research, expertise each group has and prospects of further growing up scientifically.
Life goes on. Think ahead 10 years and ask yourself who's going to care. If someone is going to hold a grudge that long then you wouldn't want to work for them anyway. Take the new job. Unless its in my old lab. Don't do that to yourself ;-)