// For IE hover flicker bug
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}



$(document).ready(function() {
	
	
	$('.dropdown, .dropdown_last').hide(); // Hide dropdown menus
	
	// Local Nav
		$("#localNav li").hover(
			function () {			
				$(this).not('#localNav ul li').addClass('active');
				$(this).children('.dropdown').show();
				},
			function () {			
				$(this).not('#localNav ul li').removeClass('active');
				$(this).children('.dropdown').hide();
				}
		    );
	
	
	//shows/hides sibebar internal services modules based on current status clicking .btn classes h4's
	
		$('.section_trigger').next('.hider').hide(); // Hide/close sidebar modules

		$('.section_trigger').click(function() {
			$(this).toggleClass('current');  
			$(this).next('.hider').toggle();    
		    return false;
		  });		
		


	//subnav open/close
		$('.subnav_trigger').next('.subnav').hide(); // Hide/close sidebar modules
		
		$('.subnav_trigger').click(function() {   // Toggles subnav
			$(this).toggleClass('current');  
			$(this).next('.subnav').toggle();  
			return false;
		  });
		
		$('.subnav_trigger').click(function() {  // Closes 'current' subnav
			$('.subnav_trigger.current').not(this).removeClass('current');
			$('.subnav_trigger').not(this).next('.subnav').hide();
		});
		
		
		
	// ALL GLOBAL LINKS
	$('.copyright') .load('../../gm_inc/globalNav.html .global_copyright');
	$('#sb_careers').load('../../gm_inc/globalNav.html #sb_careers-inc');
	$('#sb_pr')     .load('../../gm_inc/globalNav.html #sb_pr-inc');
		
	
	// jQ innerHTML equivalent {JLee}		
 		//$('#div').html('<p>html</p>');
		
});

// window.onload = includeCommonElement;	

function goBack() {
  window.history.go(-1)
};



