jQuery.fn.reduce = (function() { "use strict"; if (Array.prototype.reduce) { return Array.prototype.reduce; } else { return function(a, cb, r) { a = [].concat(a); for (var i = 0, l = a.length; i < l; i++) r = cb(r, a[i]); return r; }; } })(); jQuery(function($) { "use strict"; window.send = function(fn, args) { return $.ajax({ url: "/guff/api/" + fn, method: 'POST', dataType: 'json', data: args, }); }; LuigiTemplate.FILTERS.json = function(val) { return JSON.stringify(val); }; });