if (document.images) {            // Active Images
	img1on = new Image();      
    img1on.src = "res/services_on.png"; 
	img2on = new Image();      
    img2on.src = "res/hse_on.png"; 
	img3on = new Image();      
    img3on.src = "res/locations_on.png"; 
	img4on = new Image();      
    img4on.src = "res/aboutus_on.png"; 
	img5on = new Image();      
    img5on.src = "res/careers_on.png"; 
	img6on = new Image();      
    img6on.src = "res/investors_on.png"; 
	img7on = new Image();      
    img7on.src = "res/EESLP_TX.jpg"; 
	img8on = new Image();      
    img8on.src = "res/EESLP_PA.jpg"; 
	img9on = new Image();      
    img9on.src = "res/EESLP_OK.jpg"; 
	img10on = new Image();      
    img10on.src = "res/EESLP_AK.jpg"; 
	img11on = new Image();      
    img11on.src = "res/EESLP_LA.jpg"; 
	img12on = new Image();      
    img12on.src = "res/EESLP_CO.jpg"; 
	img13on = new Image();      
    img13on.src = "res/EESLP_WV.jpg";
	img14on = new Image();      
    img14on.src = "res/EESLP_ND.jpg";
	img15on = new Image();      
    img15on.src = "res/EESLP_WY.jpg";
	
  
   	img1off = new Image();      
    img1off.src = "res/services.png"; 
	img2off = new Image();      
    img2off.src = "res/hse.png"; 
	img3off = new Image();      
    img3off.src = "res/locations.png"; 
	img4off = new Image();      
    img4off.src = "res/aboutus.png"; 
	img5off = new Image();      
    img5off.src = "res/careers.png"; 
	img6off = new Image();      
    img6off.src = "res/investors.png"; 
	img7off = new Image();      
    img7off.src = "res/EESLP_FullMap.jpg"; 
	img8off = new Image();      
    img8off.src = "res/EESLP_FullMap.jpg"; 
	img9off = new Image();      
    img9off.src = "res/EESLP_FullMap.jpg"; 
	img10off = new Image();      
    img10off.src = "res/EESLP_FullMap.jpg"; 
	img11off = new Image();      
    img11off.src = "res/EESLP_FullMap.jpg"; 
	img12off = new Image();      
    img12off.src = "res/EESLP_FullMap.jpg"; 
	img13off = new Image();      
    img13off.src = "res/EESLP_FullMap.jpg";
	img14off = new Image();      
    img14off.src = "res/EESLP_FullMap.jpg";
	img15off = new Image();      
    img15off.src = "res/EESLP_FullMap.jpg";
	
	

}

// -->


// Function to 'activate' images.
function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}

// Function to 'deactivate' images.
function imgOff(imgName) {
	if (document.images) {
    		document[imgName].src = eval(imgName + "off.src");
	}
}

function imgMap(objImage,imgName) {
	if (document.images) {
    		document[objImage].src = eval(imgName + "on.src");
	}
}

// -->

/*****************************/
(function($) {
	$(document).ready(function() {
				
				
	// Hide these in JS, so if someone has JS off, content is visible
		$('div[class|="tooltip"] .tooltipContent ul').hide();
	
	
	// Hack to prevent empty drop-down from appearing under Locations and Investors in Topnav
		$('#TransMenu10, #TransMenu14').css({ width: '0px !important' });
	
	
	// Main COG initialize rotation
		var interval;				
		    interval = startAutoPlay();
					
	// On hover of main COG quadrant: show popup tooltip, replace COG center with full image; and then in reverse!
		$('div[class|="tooltip"]').hover(function() {
			clearInterval(interval);
			
			$('div[class|="tooltip"]').not(this).css({ 'z-index': '101' });
			$(this).find('ul').css({ display: 'block' });	
			$(this).children('.tooltipImage').css({ overflow: 'visible', 'z-index': '115' });
			$(this).find('.tooltipImage .quadrant').stop().animate({ opacity: '0' }, 250);
			$(this).find('.tooltipImage .full').stop().animate({ opacity: '1' }, 300);
			$('#monolith').css({ 'z-index': '100' });					
		}, function() { 
			interval = startAutoPlay();	
						
			$(this).find('ul').css({ display: 'none' });
			$(this).children('.tooltipImage').css({ overflow: 'hidden', 'z-index': '106' });		
			$(this).find('.tooltipImage .full').stop().animate({ opacity: '0' }, 250);
			$(this).find('.tooltipImage .quadrant').stop().animate({ opacity: '0.6' }, 300);
			$('#monolith').css({ 'z-index': '107' });
			$('div[class|="tooltip"]').not(this).css({ 'z-index': '102' });
		});
		
	// miniCog initialize rotation
		var miniCogStart;
		    miniCogStart = miniCogRotation();
		    
					
	}); // END onREADY
	
	
	// Define starting angle values
	var angle1 = 1,	
	    angle2 = 1,	
	    angle3 = 1,
	    angle4 = 1;
	
	// Rotation function for main COG			
	function startAutoPlay() {	
		return setInterval(function() {					
			$('#topTeeth').rotateAnimation({ animateAngle: angle1 });
			$('#btmTeeth').rotateAnimation({ animateAngle: angle2 });	
											
			angle1++;
			angle2 = angle2 + 0.25;
			angle2++;
		}, 200);
				
		angle2 = angle2;						
	}	
	
	// Rotation function for miniCog
	function miniCogRotation() {		
		return setInterval(function() {					
			$('#miniCog-topTeeth').rotateAnimation({ animateAngle: angle3 });
			$('#miniCog-btmTeeth').rotateAnimation({ animateAngle: angle4 });	
											
			angle3++;
			angle4 = angle4 + 0.25;
			angle4++;
		}, 200);
			
		angle4 = angle4;			
	} 
	
	
})(jQuery);
/*****************************/
		



