yes, it searches for redirect and sets eventCat but only in the case when redirect is not found.
Just say >=0
if you need to set eventCat = "Outbound Link Clicked";
when the redirect is found.
That's because indexOf returns the numeric position of the first occurence of the searched string. If the returned value is smaller than zero the string is not contained in the examined string.