
$(document).ready(
  function ()
  {
    var prefixname = 'images/framework/layerbutton-ig-214';
    var leftBorderHover = 4;
    var rightBorderHover = 4;
    var topBorderHover = 4;
    var bottomBorderHover = 4;

    $('#panel3 .pillarlinks a').LayerButton(
      {
        'groupID':        'panel3',
        'amountTiles':    1,
        'normal':
        {
          'imageSource':  { 'prefix': prefixname + '_', 'suffix': '.png' },
          'imageBorders': { 'right': rightBorderHover, 'left': leftBorderHover, 'top': topBorderHover, 'bottom': bottomBorderHover }
        },
        'hover':
        {
          'imageSource':  { 'prefix': prefixname +'-hover_', 'suffix': '.png' },
          'imageBorders': { 'right': rightBorderHover, 'left': leftBorderHover, 'top': topBorderHover, 'bottom': bottomBorderHover }
        }
      }
    );
    
    activateTooltip($('#panel3 .pillarlinks a'));
    
    if (debug)
    {
      updateFreespace('unneededfiles', 5, '1 GB belegt');
      updateFreespace('oldbackups', 5, '1 GB belegt');
      updateFreespace('windowsfunctions', 5, '1 GB belegt');
    }
  }
);

function updateFreespace(type, amountFiles, filesize)
{
  $('#' + type + ' td:eq(1)').html(
    '<span class="title">' + 
      $('#' + type + ' td span.title').html() + 
    '</span>' +
    ' (' + amountFiles + ')'
  );
  $('#' + type).parent().find('.filesize').html(filesize);
}
