$(document).ready(function(){
// show text resizing links
		$(".FontSize").show();
		var $cookie_name = "synod-FontSize";
		var originalFontSize = $("html").css("font-size");
		// if exists load saved value, otherwise store it
		if($.cookie($cookie_name)) {
			var $getSize = $.cookie($cookie_name);
			$("html").css({fontSize : $getSize + ($getSize.indexOf("px")!=-1 ? "" : "px")}); // IE fix for double "pxpx" error
		} else {
			$.cookie($cookie_name, originalFontSize);
		}


  // Reset Font Size
 // var originalFontSize = $('html').css('font-size');
    $(".resetFont").bind("click", function() {
	//$(".resetFont").click(function(){
    $('html').css('font-size', originalFontSize);
	$.cookie($cookie_name, originalFontSize);


  });
  // Increase Font Size
  $(".increaseFont").bind("click", function() {
    var currentFontSize = $('html').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*1.1;
    $('html').css('font-size', newFontSize);
	$.cookie($cookie_name, newFontSize);

    return false;
  });
  // Decrease Font Size
  $(".decreaseFont").bind("click", function() {
    var currentFontSize = $('html').css('font-size');
    var currentFontSizeNum = parseFloat(currentFontSize, 10);
    var newFontSize = currentFontSizeNum*0.9;
    $('html').css('font-size', newFontSize);
	$.cookie($cookie_name, newFontSize);

    return false;
  });
});
