
/**
 * Diginout JS
 */
(function($) {


    $.dig.showChildren = function(el) {
        var jRow = $(el).parents('tr').first();
        if (jRow.hasClass('showing-children')) {
            jRow.next().remove();
            jRow.removeClass('showing-children');
        }
        else {
            $.get(
                $('a',el).attr('href'),
                function(data) {
                    jRow.after('<tr class="children" style="display:none;"><td colspan="'+jRow.children('td').length+'">'+data+'</td></tr>');
                    jRow.next().show();
                    jRow.addClass('showing-children');
                },
                'HTML'
            );
        }
    };

})(jQuery);
