Changing ajax loader functionality