1/**
2 * Adjust the top margin and make buttons visible
3 */
4jQuery(function () {
5    'use strict';
6    var $editbutton = jQuery('.dokuwiki div.editbutton_table');
7    if (!$editbutton.length) {
8        return;
9    }
10
11    // unhide the buttons - we have JavaScript
12    $editbutton.show();
13
14    // determine the bottom margin of the table above and remove it from our button
15    var margin = 0;
16    var $tablediv = $editbutton.prev('div.table');
17    if (!$tablediv.length) {
18        return;
19    }
20    margin += parseFloat($tablediv.css('margin-bottom'));
21    margin += parseFloat($tablediv.find('table').css('margin-bottom'));
22    margin += 1; // for the border
23
24    $editbutton.css('margin-top', margin * -1);
25});
26