Praise be to Allaah.
It is not permissible to accept such invitation whens these evils will be practiced openly. The same applies if alcohol will be drunk openly or cigarettes will be smoked, or promiscuous movies will be shown, or there will be free mixing between men and women, or there will be wantons displays of beauty (tabarruj) and no hijaab. But if you are able to remove or reduce the evil, or if you attend they will respect you and will not do these evil things, then you should attend for that purpose. Otherwise, do not go there, even if they are your relatives, except on the condition that you can remove the evil.