What was mansabdari system

Who wrote akbarnama

Why akbar married bairam khan's wife