Hide ajax loader only after last ajax call returns (when searching for images)