$(document).ready(function(){
  // Reset Font Size
  var originalFontSize = $('#body_content').css('font-size');
    $(".resetFont").click(function(){
    $('#body_content').css('font-size', originalFontSize);
  });
	
	
  // Increase Font Size
  $(".increaseFont").click(function(){
    var currentFontSize = $('#body_content').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*1.2;
	if(newFontSize> 21){ newFontSize = 21; }
    $('#body_content').css('font-size', newFontSize);
    return false;
  });
  
  
  // Decrease Font Size
  $(".decreaseFont").click(function(){
    var currentFontSize = $('#body_content').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*0.8;
	if(newFontSize < 6.5){ newFontSize = 6.5; }
    $('#body_content').css('font-size', newFontSize);
    return false;
  });
  
  $(".increaseFont img").hover(
	 function()
	 {
	  this.src = this.src.replace("_off","_on");
	 },
	 function()
	 {
	  this.src = this.src.replace("_on","_off");
	 }
   );
  
  $(".decreaseFont img").hover(
	 function()
	 {
	  this.src = this.src.replace("_off","_on");
	 },
	 function()
	 {
	  this.src = this.src.replace("_on","_off");
	 }
   );
  
  $(".resetFont img").hover(
	 function()
	 {
	  this.src = this.src.replace("_off","_on");
	 },
	 function()
	 {
	  this.src = this.src.replace("_on","_off");
	 }
   );
  
});
