Replace setAttribute id/class by direct affectation and do not use variables named "item" for IE compatibility