function updateCurrentFontSize()
{
    $('#styleSheet').attr('href', font.getCurrentStyleSheetPath());
    var status = font.getCurrentFontSize().toString();
    if (parseInt(status) > 0) {
        status = '+' + status;
    }
    $('#currentFontSize').html(font.getCurrentFontSize().toString());
}

function incrementFontSize()
{
    font.incrementCurrentFontSize();
    $.cookie('fontSize', font.getCurrentFontSize(), cookieOptions);
    updateCurrentFontSize();
}

function decrementFontSize()
{
    font.decrementCurrentFontSize();
    $.cookie('fontSize', font.getCurrentFontSize(), cookieOptions);
    updateCurrentFontSize();
}

var currentFontSize = $.cookie('fontSize');
if (currentFontSize == undefined) {
    currentFontSize = 0;
}

var cookieOptions = {
    'domain'  : 'club.kobe-np.co.jp',
    'expires' : 7,
    'path'    : '/'
}

font = new FontSize(currentFontSize, 4, -2, '/shared/css/');
font.addList(-2, 'small2.css');
font.addList(-1, 'small1.css');
font.addList(0,  'default.css');
font.addList(1,  'large1.css');
font.addList(2,  'large2.css');
font.addList(3,  'large3.css');
font.addList(4,  'large4.css');

$(document).ready(updateCurrentFontSize);


