var visualize = (function() {
    return (function(widget, name, reduce) {
        $.ajax({
            url: "/couchdb/" + name,
            type: 'get',
            data: { arguments: { group_level: (0+reduce) } },
            dataType: 'json',
            success: function(data) {
                adapter(data['rows']);
                var d = new Date();
                $("#last_update").html(d.toTimeString());
            }
        });
    });
})();

@@ -64,24 +64,212 @@
 , reduce) %7B%0A
+        var params = %7B%7D;%0A        if (reduce) %7B%0A            params%5B'group_level'%5D = 1;%0A        %7D%0A        else %7B%0A            params%5B'reduce'%5D = false;%0A        %7D%0A        console.log(params);%0A
         $.aj
@@ -273,16 +273,16 @@
 .ajax(%7B%0A
-
         
@@ -370,36 +370,14 @@
 ts: 
-%7B group_level: (0+reduce) %7D 
+params
 %7D,%0A 

Fix query without reduce