adding lang and dir to html head, and ie8 loading gif fix