function show(id) {
  document.getElementById(id).style.display = "block";
}
function hide(id) {
  document.getElementById(id).style.display = "none";
}

function myRoundCorners(){
	$(document).ready( function(){
			$('.rounded').corners("15px");
		});
}


function loader(){
 $(document).ready(function(){
	 collapse();//Hide all of the divs to be hidden when the DOM is ready.
	 $('div.careerLocation:eq(0) > span').click(function() {
		 $(this).next().slideToggle('fast');
		});
	});
 
}

function collapse(){
 $('div.careerLocation:eq(0) > div').hide();
}

function expand(){
 $('div.careerLocation:eq(0) > div').show();
}


function showMenu(){
	
  //show the menu, because it is initially hidden.
  document.getElementById('javascriptEnabled').style.display = "block";
  var fullpath = window.location.pathname;
  var page = fullpath.substring(fullpath.lastIndexOf('/') + 1);
	
  //'page' is the page that the user is on. ie) 'index.aspx'.
  //Below is the section that shows and hides submenus according
  //to the current page.
  switch(page){
    //The 'About Us' section
  case 'about-us.aspx':
  case 'locations.aspx':
    show('about-us');
    break;
		
    //The 'Services' section
  case 'services.aspx':
  case 'enterprise-solutions.aspx':
  case 'device-control.aspx':
  case 'federal-government-hubzone.aspx':
  case 'project-management.aspx':
  case 'staff-augmentation.aspx':
    show('services');
    break;
		
    //The 'Rural Outsourcing' section
  case 'rural-outsourcing.aspx':
  case 'rural-outsourcing-faq.aspx':
    show('rural-outsourcing');
    break;
		
    //The "Case Studies" section
  case 'case-studies.aspx':
  case 'enterprise-case-studies.aspx':
  case 'device-control-case-studies.aspx':
  case 'case-studies-by-industry.aspx':
    show('case-studies');
    break;
		
  }
	
  //finally, round the corners on the contentWrapper div
  myRoundCorners();
}

