@ngdoc directive
@module ng
@name ngJq

@element ANY
@param {string=} ngJq the name of the library available under `window`
to be used for angular.element
@description
Use this directive to force the angular.element library.  This should be
used to force either jqLite by leaving ng-jq blank or setting the name of
the jquery variable under window (eg. jQuery).

Since AngularJS looks for this directive when it is loaded (doesn't wait for the
DOMContentLoaded event), it must be placed on an element that comes before the script
which loads angular. Also, only the first instance of `ng-jq` will be used and all
others ignored.

@example
This example shows how to force jqLite using the `ngJq` directive to the `html` tag.
```html
<!doctype html>
<html ng-app ng-jq>
...
...
</html>
```
@example
This example shows how to use a jQuery based library of a different name.
The library name must be available at the top most 'window'.
```html
<!doctype html>
<html ng-app ng-jq="jQueryLib">
...
...
</html>
```
function() {
  if (isDefined(jq.name_)) return jq.name_;
  var el;
  var i, ii = ngAttrPrefixes.length, prefix, name;
  for (i = 0; i < ii; ++i) {
    prefix = ngAttrPrefixes[i];
    el = window.document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]');
    if (el) {
      name = el.getAttribute(prefix + 'jq');
      break;
    }
  }

  return (jq.name_ = name);
}