Why does Onkelus usually translate the name Elokim as Hashem?
For example in the following pasuk (Bereshit 5:1):
זֶה סֵפֶר תּוֹלְדֹת אָדָם בְּיוֹם בְּרֹא אֱלֹהִים אָדָם בִּדְמוּת אֱלֹהִים עָשָׂה אֹתוֹ
is translated like this:
דין ספר, תולדת אדם: ביומא, דברא ה' אדם, בדמות אלוהים, עבד יתיה
The first Elokim is translated as Hashem, and the second is left as it is.
What is the reason for translating Elokim as Hashem? What is the reason for inconsistency in the same posuk?