(function(d){function f(a){var b=d.data(a,"numberspinner").options;d(a).spinner(b).numberbox(b)}function e(a,b){var c=d.data(a,"numberspinner").options;var h=parseFloat(d(a).numberbox("getValue")||c.value)||0;if(b==true){h-=c.increment}else{h+=c.increment}d(a).numberbox("setValue",h)}d.fn.numberspinner=function(b,c){if(typeof b=="string"){var a=d.fn.numberspinner.methods[b];if(a){return a(this,c)}else{return this.spinner(b,c)}}b=b||{};return this.each(function(){var h=d.data(this,"numberspinner");if(h){d.extend(h.options,b)}else{d.data(this,"numberspinner",{options:d.extend({},d.fn.numberspinner.defaults,d.fn.numberspinner.parseOptions(this),b)})}f(this)})};d.fn.numberspinner.methods={options:function(a){var b=d.data(a[0],"numberspinner").options;return d.extend(b,{value:a.numberbox("getValue")})},setValue:function(a,b){return a.each(function(){d(this).numberbox("setValue",b)})},getValue:function(a){return a.numberbox("getValue")},clear:function(a){return a.each(function(){d(this).spinner("clear");d(this).numberbox("clear")})}};d.fn.numberspinner.parseOptions=function(a){return d.extend({},d.fn.spinner.parseOptions(a),d.fn.numberbox.parseOptions(a),{})};d.fn.numberspinner.defaults=d.extend({},d.fn.spinner.defaults,d.fn.numberbox.defaults,{spin:function(a){e(this,a)}})})(jQuery);