$(document).ready(function() {

    var options = document.cookie.split(";");
    var newCookie = "";
    var fontSize = 0;

    for (var key in options) {
        var option = options[key].split("=");

        var command = option[0].replace(/^\s+/, "").replace(/$\s+/, "");
        
        if (command == "fontSize") {
            fontSize = parseInt(option[1]);
 
            $("body").css({"fontSize": (10 + fontSize) + "px", "lineHeight": (17 + fontSize) + "px"});
        }
    }

    $("#fontSmaller").click(function(event) {
        event.preventDefault();

        fontSize -= 2;
        
        $("body").css({"fontSize": (10 + fontSize) + "px", "lineHeight": (17 + fontSize) + "px"});
        
        document.cookie = "fontSize=" + fontSize + "; path=/";
    });
    
    $("#fontLarger").click(function(event) {
        event.preventDefault();

        fontSize += 2;
        
        $("body").css({"fontSize": (10 + fontSize) + "px", "lineHeight": (17 + fontSize) + "px"});
        
        document.cookie = "fontSize=" + fontSize + "; path=/";
    });
    
    $("#printPage").click(function(event) {
        event.preventDefault();
        
        window.print();
    });
    
//    $("#content_accordion .content_area").css("display", "none");
    
//    $("#content_accordion").tabs("#content_accordion .content_area", {tabs: 'h2', effect: 'slide', initialIndex: null});
});
