$(document).ready(function(){
var increaseclicks = 0;
var decreaseclicks = 0;
var originalFontSize = $('html').css('font-size');
// Reset Font-Size.
$(".resetFont").click(function(){
$('html').css('font-size', originalFontSize);
increaseclicks = 0;
decreaseclicks = 0;
});
// Increase Font Size
$(".increaseFont").click(function(){
var currentFontSize = $('html').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
// use styles for tags. {IE6 fix} (because tag font size do not change on IE6)
var newFontSize = currentFontSizeNum + 1;
if (increaseclicks < 3) {
$('html').css({'font-size': newFontSize});
increaseclicks++;
}
return true;
});
// Decrease Font Size
$(".decreaseFont").click(function(){
var currentFontSize = $('html').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum - 1;
if (decreaseclicks <3) {
// $('html').css('font-size', newFontSize); braces is an IE6 fix.
$('html').css({'font-size': newFontSize});
decreaseclicks++;
}
return false;
});
});

