!function(window){var jq_throttle,$=window.jQuery||window.Cowboy||(window.Cowboy={});$.throttle=jq_throttle=function(delay,no_trailing,callback,debounce_mode){var timeout_id,last_exec=0;function wrapper(){var that=this,elapsed=+new Date-last_exec,args=arguments;function exec(){last_exec=+new Date,callback.apply(that,args)}debounce_mode&&!timeout_id&&exec(),timeout_id&&clearTimeout(timeout_id),void 0===debounce_mode&&delay<elapsed?exec():!0!==no_trailing&&(timeout_id=setTimeout(debounce_mode?function(){timeout_id=void 0}:exec,void 0===debounce_mode?delay-elapsed:delay))}return"boolean"!=typeof no_trailing&&(debounce_mode=callback,callback=no_trailing,no_trailing=void 0),$.guid&&(wrapper.guid=callback.guid=callback.guid||$.guid++),wrapper},$.debounce=function(delay,at_begin,callback){return void 0===callback?jq_throttle(delay,at_begin,!1):jq_throttle(delay,callback,!1!==at_begin)}}(this);