[jQuery] how to avoid load jquery several times?

[jQuery] how to avoid load jquery several times?


Hi,
Is there a way to avoid loading jquery multiple times? I have some
javascript code which needs to use jquery and at the same time. This
script is embeded in others' web site.
One way I could do is to check and then decide whether to load jquery:
if (typeof jQuery != 'undefined') {
// do something
}
If jQuery is defined then I know for sure that it is loaded. But the
loaded version might be the same one my javascript needs. Is there a
good way to solve this problem?
Does jQuery allows the use of namespace? For example, even though
jquery is loaded by other scripts but could I load a new jQuery again
into a separate namespace without breaking the loaded jQuery version?
If this is allowed, I could just always load the right jquery into my
own namespace and use all the functions my javascript needs.
Any ideas?
Thanks.