+ /*
+ * Handle support for overriding other $() functions. Way too many libraries
+ * provide this function to simply ignore it and overwrite it.
+ */
+
+ // Check to see if this is a possible collision case
+ if ( jQuery._$ && !c && a.constructor == String &&
+
+ // Make sure that the expression is a colliding one
+ !/[^a-zA-Z0-9_-]/.test(a) &&
+
+ // and that there are no elements that match it
+ // (this is the one truly ambiguous case)
+ !document.getElementsByTagName(a).length )
+
+ // Use the default method, in case it works some voodoo
+ return jQuery._$( a );
+
+ // Make sure t hat a selection was provided
+ a = a || jQuery.context || document;
+
+ // Watch for when a jQuery object is passed as the selector
+ if ( a.jquery )
+ return a;
+
+ // Watch for when a jQuery object is passed at the context
+ if ( c && c.jquery )
+ return $(c.get()).find(a);
+
+ // If the context is global, return a new object
+ if ( window == this )
+ return new jQuery(a,c);
+
+ // Watch for when an array is passed in
+ if ( a.constructor == Array )
+ // Assume that it's an array of DOM Elements
+ this.cur = a;
+ else
+ // Find the matching elements and save them for later
+ this.cur = jQuery.Select( a, c );