





/***********************
This Script Requires jQuery
***********************/

if(typeof($.fn.hoverIntent) != 'function'){
  /**
  * hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
  * <http://cherne.net/brian/resources/jquery.hoverIntent.html>
  * 
  * @param  f  onMouseOver function || An object with configuration options
  * @param  g  onMouseOut function  || Nothing (use configuration options object)
  * @author    Brian Cherne brian(at)cherne(dot)net
  */
  (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
}

document.write('<header><div id="header-search"><div class="header-links"><a href="http://www.digitalglobe.com/community/login.jsp">Partner Login</a><br /><a href="http://www.digitalglobe.com/contact">Contact</a></div><div class="region region-search"><div class="block block-search " id="block-search-form"><div class="content"><form accept-charset="UTF-8" id="search-block-form" method="post" action="http://www.digitalglobe.com/"><div><div class="container-inline"><div class="form-item form-type-textfield form-item-search-block-form"><input type="text" class="form-text" maxlength="128" size="15" value="" name="search_block_form" id="edit-search-block-form--2" title="Enter the terms you wish to search for."></div><div id="edit-actions" class="form-actions form-wrapper"><input type="image" class="form-submit" src="http://www.digitalglobe.com/sites/all/themes/digitalglobe/images/search-go.png" name="submit" id="edit-submit"></div><input type="hidden" value="form-ctZfT4rYHkpkX3FxS8PvjMuRdvTHW2Fo2gNlU2XFLZI" name="form_build_id"><input type="hidden" value="search_block_form" name="form_id"></div></div></form></div></div><!-- /.block --></div></div><a href="http://www.digitalglobe.com/" id="logo"></a><nav id="primary"><ul style="position:relative;"><div id="tmpl-nav" class="content"></div></ul></nav></header>');

$(document).ready(function(){

  var DG = {};

  DG.menu = [{"title":"Products","depth":"1","attributes":{"title":"Products"},"link":"http:\/\/www.digitalglobe.com\/products","below":[{"title":"Imagery","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery","below":[{"title":"Basic Satellite Imagery","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&basic-satellite-imagery","below":[]},{"title":"Standard Satellite Imagery","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&standard-satellite-imagery","below":[]},{"title":"Stereo Imagery","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&stereo-imagery","below":[]},{"title":"8-Band Multispectral Imagery","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&8-band-multispectral-imagery","below":[]},{"title":"Global Basemap","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&global-basemap","below":[]},{"title":"Precision Aerial","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&precision-aerial","below":[]},{"title":"Advanced Ortho Series","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#imagery&advanced-ortho-series","below":[]}]},{"title":"Monitoring","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#monitoring","below":[{"title":"FirstLook","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#monitoring&firstlook","below":[]},{"title":"Diplomatic Facility Support Package","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#monitoring&diplomatic-facility-support-package","below":[]},{"title":"FirstWatch","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#monitoring&firstwatch","below":[]},{"title":"Analysis Center","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#monitoring&analysis-center","below":[]}]},{"title":"Elevation","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#elevation","below":[{"title":"WorldView Elevation Suite","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#elevation&worldview-elevation-suite","below":[]},{"title":"Advanced Elevation Series","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/products#elevation&advanced-elevation-series","below":[]}]}]},{"title":"Industries","depth":"1","attributes":[],"link":"http:\/\/www.digitalglobe.com\/industries","below":[{"title":"Category","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries","below":[{"title":"AEC","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/aec","below":[]},{"title":"Entertainment","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/entertainment","below":[]},{"title":"Defense & Intelligence","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/defense-and-intelligence","below":[]},{"title":"Government - Federal","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/government-federal","below":[]},{"title":"Government - State\/Local","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/government-state-local","below":[]},{"title":"Humanitarian","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/humanitarian","below":[]},{"title":"Insurance","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/insurance","below":[]},{"title":"LBS \/ Navigation","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/lbs-navigation","below":[]},{"title":"Mining","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/mining","below":[]},{"title":"Natural Resources","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/natural-resources","below":[]},{"title":"Oil & Gas","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/oil-and-gas","below":[]},{"title":"Online Mapping \/ Portals","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/online-mapping-portals","below":[]},{"title":"Real Estate","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/real-estate","below":[]},{"title":"Telecom \/ Utilities","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/industries\/telecom-utilities","below":[]}]}]},{"title":"Gallery","depth":"1","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/gallery","below":[]},{"title":"Purchase","depth":"1","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/purchase","below":[{"title":"Work Directly With DigitalGlobe","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/purchase","below":[{"title":"Commercial Business: 800.496.1225","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/purchase","below":[]},{"title":"Defense and Intelligence Business:  866.810.2297","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/purchase","below":[]}]},{"title":"Find a Partner","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/partners","below":[]}]},{"title":"Partners","depth":"1","attributes":[],"link":"http:\/\/www.digitalglobe.com\/partners","below":[{"title":"Global Resellers","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/partners","below":[]},{"title":"Corporate Strategic Alliances","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/partners\/alliance","below":[]},{"title":"OEM Providers","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/partners\/oem","below":[]},{"title":"Software Partners","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/partners\/software","below":[]}]},{"title":"About Us","depth":"1","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us","below":[{"title":"Company","depth":"2","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us\/overview","below":[{"title":"Overview","depth":"3","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us\/overview","below":[]},{"title":"History","depth":"3","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us\/history","below":[]},{"title":"Management Team","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/management-team","below":[]},{"title":"Locations","depth":"3","attributes":{"title":"Company Locations"},"link":"http:\/\/www.digitalglobe.com\/about-us\/locations","below":[]}]},{"title":"Content Collection","depth":"2","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection","below":[{"title":"Satellites","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#satellites","below":[{"title":"QuickBird","depth":"4","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#satellites&quickbird","below":[]},{"title":"WorldView-1","depth":"4","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#satellites&worldview-1","below":[]},{"title":"WorldView-2","depth":"4","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#satellites&worldview-2","below":[]}]},{"title":"Aerial","depth":"3","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#aerial","below":[{"title":"Aerial","depth":"4","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/about-us\/content-collection#aerial&aerial","below":[]}]}]},{"title":"Events","depth":"2","attributes":[],"link":"http:\/\/www.digitalglobe.com\/about-us\/events","below":[]},{"title":"News Room","depth":"2","attributes":{"title":""},"link":"http:\/\/media.digitalglobe.com\/","below":[]},{"title":"Career Opportunities","depth":"2","attributes":{"title":""},"link":"https:\/\/tbe.taleo.net\/NA2\/ats\/careers\/jobSearch.jsp?org=DIGITALGLOBE&cws=1","below":[]}]},{"title":"Resources","depth":"1","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/resources","below":[{"title":"Documents and Tutorials","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/resources","below":[]},{"title":"DigitalGlobe Coverage","depth":"2","attributes":[],"link":"http:\/\/www.digitalglobe.com\/resources\/coverage-video","below":[]},{"title":"Imagery Product Samples","depth":"2","attributes":{"title":""},"link":"http:\/\/www.digitalglobe.com\/product-samples","below":[]}]},{"title":"Investors","depth":"1","attributes":{"title":""},"link":"http:\/\/investor.digitalglobe.com\/phoenix.zhtml?c=70788&p=irol-IRHome","below":[]}];
  var topMenuMax = DG.menu.length;
  var secondaryMenuMax = 1;
  DG.menuIndex = 1;
  DG.subMenuIndex = 1;
  
  var $menu = $('<ul class="menu"></ul>');
  for(var item in DG.menu)
  {
    $menu.append(renderMenuItem(DG.menu[item], DG.menuIndex));
    DG.menuIndex++;
  }
 
  $('#tmpl-nav').append($menu);
  
  function renderMenuItem(menuItem, index)
  {
    var result = '';
    if(menuItem != null){
      switch(menuItem['depth']){
        case "1":
          if(menuItem['attributes'].hasOwnProperty('class')) {
            menuItem['attributes']['class'] += 'nav-' + index;
          } 
          else{
            menuItem['attributes']['class'] = 'nav-' + index;
          }
          if(index == 1)
          {
            menuItem['attributes']['class'] += ' first';
          }
          
          if(index == topMenuMax)
          {
            menuItem['attributes']['class'] += ' last';
          }
          
          result = $('<li class="' + menuItem['attributes']['class'] + '"><a class="top" href="' + menuItem['link'] + '" title="' + menuItem['title'] + '">' + menuItem['title'] + '</a></li>');
          
          if(menuItem['below'].length > 0) {
            $subResultTable = $('<table cellspacing="10" class="secondary"></table>');
            $subResultRow = $('<tr></tr>');
            
            $subResultRow.appendTo($subResultTable);
            
            secondaryMenuMax = menuItem['below'].length;  
            for(var subItem in menuItem['below']){
              $subResultRow.append(renderMenuItem(menuItem['below'][subItem], DG.subMenuIndex));
              DG.subMenuIndex++;
            }
            secondaryMenuMax= 0;
            
            result.append($subResultTable);
          }

          break;
        case "2":
          var sec_class = 'secnav-' + index;
          if(index == 1)
          {
            sec_class += ' first';
          }
          
          if(index == secondaryMenuMax)
          {
            sec_class += ' last';
          }
          
          result = $('<th class="' + sec_class + '"></th>');
          result.append($('<span class="bullet"></span>'));

          $('<a href="' + menuItem['link'] + '" >' + menuItem['title'] + '</a><hr/>').appendTo(result);
      
          if(menuItem['below'].length > 0) {
            $subResultListsIndex = 0;
            $subResultLists = [];
            $subResultLists.push($('<ul class="tertiary"></ul>'));

            var subMenuIndex = 1;
            for(var subItem in menuItem['below']){
              if(((subMenuIndex - 1) % 7) == 0 && (subMenuIndex - 1) != 0){
                $subResultListsIndex++;
                $subResultLists.push($('<ul class="tertiary"></ul>'));
              }
              $subResultLists[$subResultListsIndex].append(renderMenuItem(menuItem['below'][subItem], subMenuIndex));
              subMenuIndex++;
            }
    
            for(list in $subResultLists){ 
              result.append($subResultLists[list]);
            }
          }
          break;
        case "3":
          
          result = '<li><a href="' + menuItem['link'] + '" >' + menuItem['title'] + '</a></li>';
          break;
      }
    }
    
    return result;
  };
  
  (function() {
    var hovering = false;
    var tid = 0;

    var hideSubMenu = function(sec, speed){
      if(!speed)
        speed = 'fast';
      
      sec.fadeOut(speed);
    };
  
    var queueClose = function(sec) {
      tid = window.setTimeout(function() {
          if(!hovering)
            hideSubMenu(sec);
      }, 600);
    };

    var cancelClose = function() {
      window.clearTimeout(tid);
    };

    $('.secondary').hover(
      function() {
        hovering = true;
        cancelClose();
      },
      function() {
        hovering = false;
        queueClose($(this));
      }
    );

    $('#tmpl-nav a.top').hoverIntent({
      over: function() {
        var sec = $(this).closest('li').find('.secondary');
  
        if(sec.size() > 0) {
          hideSubMenu($('.secondary').not(sec), 0);
          cancelClose();
        }
  
        sec.show(0);
      },
      timeout: 400,
      out: function() {
        var sec = $(this).closest('li').find('.secondary');
        queueClose(sec);
      }
    });
  })();
});

