Make ajax loading gif a directive