$(document).ready(function(){
  // Toggle High Contrast class (.hc on body)
  $(".setHighContrast").click(function(){
	  if ($('body').hasClass('hc'))
	  {	 
		  $('body').removeClass('hc');
		  $.cookie('highcontrast', 'on');
		  document.getElementById("highContrastLabel").innerHTML = "Regular Contrast";
		  
		  return false;
	  }  else {  
		  $('body').addClass('hc');
		  $.cookie('highcontrast', 'off');
		   document.getElementById("highContrastLabel").innerHTML = "High Contrast";
		  return false;
	  };
  });

  // Cookie Check
  var hcstate = $.cookie('highcontrast');
  if (hcstate == 'on' || hcstate == undefined)
  {
		$('body').removeClass('hc')
		$.cookie('highcontrast', 'on');
		  document.getElementById("highContrastLabel").innerHTML = "Regular Contrast";
  } else {
		$('body').addClass('hc')
		$.cookie('highcontrast', 'off');
		 document.getElementById("highContrastLabel").innerHTML = "High Contrast";
  };
  
 
});