code: function () {
              var head        = _doc.getElementsByTagName('head')[0],
                  style       = _doc.createElement('style'),
                  info        = null,
                  typeList    = ['screen', 'print', 'speech', 'projection', 'handheld', 'tv', 'braille', 'embossed', 'tty'],
                  typeIndex   = 0,
                  typeLength  = typeList.length,
                  cssText     = '#mediamatchjs { position: relative; z-index: 0; }',
                  eventPrefix = '',
                  addEvent    = win.addEventListener || (eventPrefix = 'on') && win.attachEvent;
  
              style.type  = 'text/css';
              style.id    = 'mediamatchjs';
  
              head.appendChild(style);
  
              // Must be placed after style is inserted into the DOM for IE
              info = (win.getComputedStyle && win.getComputedStyle(style)) || style.currentStyle;
  
              // Create media blocks to test for media type
              for ( ; typeIndex < typeLength; typeIndex++) {
                  cssText += '@media ' + typeList[typeIndex] + ' { #mediamatchjs { position: relative; z-index: ' + typeIndex + ' } }';
              }
  
              // Add rules to style element
              if (style.styleSheet) {
                  style.styleSheet.cssText = cssText;
              } else {
                  style.textContent = cssText;
              }
  
              // Get media type
              _type = typeList[(info.zIndex * 1) || 0];
  
              head.removeChild(style);
  
              _setFeature();
  
              // Set up listeners
              addEvent(eventPrefix + 'resize', _watch, false);
              addEvent(eventPrefix + 'orientationchange', _watch, false);
          }
docs: Internal globals