(function(a){a.extend({debounce:function(c,d,e,b){if(arguments.length==3&&typeof e!="boolean"){b=e;e=false}var f;return function(){var g=arguments;b=b||this;e&&!f&&c.apply(b,g);clearTimeout(f);f=setTimeout(function(){!e&&c.apply(b,g);f=null},d)}},throttle:function(e,f,b){var g,d,c;return function(){d=arguments;c=true;b=b||this;if(!g){(function(){if(c){e.apply(b,d);c=false;g=setTimeout(arguments.callee,f)}else{g=null}})()}}}})})(jQuery);