This is used in restaurants to call attention to a waitress, right? If so, what is the function of 저 in that context? From what I understand, 저 refers to something far from the listener, so wouldn't 그기 make more sense? Or am I mistaken in that this is used to get attention?
If people use this in a restaurant it would be 저기요, not just 저기.
As for the difference between 그기 and 저기, in my experience, 저기 is something in view while 그기 is something you're discussing. So when you are shopping you would use "이 신발 is ok, but 저 신잘 I will buy" (This shoe is ok, but I'll buy that shoe). Later on, you might say 그 노란색 신발이 너무 비쌌지 (That purple shoe was so expensive, eh?).
저기 is also used as an interjection and this usage has nothing to do with that place or the determiner 저. Some people also use it as a pronoun to refer to something or someone whose name they don't remember but are trying to remember, maybe because it's something both of them can't see, or it is far from both of them.
- 저기가 그 사과 먹었어요. 저기, 그, 누구더라? 아, 철수요. (What's-his-name ate the apple. Umm, well, who was it? Oh, Cheolsu did.)
one of the lessons at "Talk to me in korean" talked about it from my understanding Sheo gi =use it when you are pointing at somthing far from you and the person you're talking to Keu gi = use it when you're pointing at somthing far from you but close to the person you're talking to
(Sorry I don't have the korean keyboard now)