Avodah Zarah, Chapter Five, Mishnah One
This mishnah discusses a non-Jew who hires a Jew to work with him in the transportation of yen neskekh.
1) If [a non-Jew] hires [a Jewish] workman to assist him in [the transportation of] yen nesekh, his wage is prohibited.
a) If he hired him to assist him in another kind of work, even if he says to him, remove for me a cask of yen nesekh from this place to that, his wage is permitted.
2) If he hired [a Jews] donkey to carry yen nesekh, its wages are prohibited;
a) But if he hired it to sit upon, even though the non-Jew rested his jar [of yen nesekh] upon it, its wages are permitted.
Section one: A Jew is not allowed to assist a non-Jew in the preparation or even the transportation of yen nesekh, wine which may eventually be used in libations. If he does so, and collects a wage for this specific type of work, the wage is prohibited, meaning that he cannot use the money. Since this person performed a forbidden act for profit, the Rabbis penalize him and forbid him to use his wages. However, if he was hired to do another type of work, for instance bring jugs of olive oil, and while working the non-Jew said to him to also bring a cask of yen nesekh, his wages are permitted. Since the Jew was not hired to work with specifically with the forbidden wine and the wages he receives are for his other work, the wages are permitted. [If the Jew was told from the outset that part of his work involved yen nesekh, the wages would be forbidden.]
Section two: This section teaches a similar ruling with regard to a donkey driver. If the non-Jew hires a Jews donkey to bring yen nesekh, the wages which the Jew receives are forbidden. However, if the non-Jew hires the donkey to ride on it the wages are permitted, even if the non-Jew brings his yen nesekh on the donkey. Although in both cases the Jews donkey is helping carry the forbidden wine, since in the second case he is not receiving wages specifically for carrying the wine, the wages are permitted.