$(function(){
	// adds padding to the last paragraph in div#contentPrimary
	$('#contentPrimary').find('p').last().addClass('pSpacer');
	$('#contentPrimaryLeft').find('p').last().addClass('pSpacer');
	
	// adds class to the current nav item that's hovered
	// top navigation
	$('.nav ul li').hover(function(){
		$(this).addClass('currentLI');
	},
		function(){
		$(this).removeClass('currentLI');
	});

	//side nav
	$('ul.sideNavList li').hover(function(){
		$(this).addClass('currentLI');
	},
		function(){
		$(this).removeClass('currentLI');
	});

	// set transparency to 2nd level items for top and side navigation
	$('.nav ul li ul').css('opacity',.92);
	//$('.sideNavList li ul').css('opacity',.92);
		
	//Cufon.replace('.nav a');
	Cufon.replace('.pod h5');
	//Cufon.replace('#contentPrimary h2.pageTitle'); 
	Cufon.replace('div.sideNav h3 a.currentHead'); 
});

var min=8;
var max=18;
function increaseFontSize() {
var p = document.getElementsByTagName('p');
for(i=0;i<p.length;i++) {
  if(p[i].style.fontSize) {
	 var s = parseInt(p[i].style.fontSize.replace("px",""));
  } else {
	 var s = 12;
  }
  if(s!=max) {
	 s += 1;
  }
  p[i].style.fontSize = s+"px"
}
}
function decreaseFontSize() {
var p = document.getElementsByTagName('p');
for(i=0;i<p.length;i++) {
  if(p[i].style.fontSize) {
	 var s = parseInt(p[i].style.fontSize.replace("px",""));
  } else {
	 var s = 12;
  }
  if(s!=min) {
	 s -= 1;
  }
  p[i].style.fontSize = s+"px"
}   
}


