(function($){$.fn.fitButton=function(kompressor,options){var compressor=kompressor||1,settings=$.extend({'minFontSize':Number.NEGATIVE_INFINITY,'maxFontSize':Number.POSITIVE_INFINITY,'minHorizontalPadding':Number.NEGATIVE_INFINITY,'maxHorizontalPadding':Number.POSITIVE_INFINITY,'minVerticalPadding':Number.NEGATIVE_INFINITY,'maxVerticalPadding':Number.POSITIVE_INFINITY},options);return this.each(function(){var $this=$(this);var resizer=function(){$this.find('a.button').css('font-size',Math.max(Math.min($this.width()/(compressor*10),parseFloat(settings.maxFontSize)),parseFloat(settings.minFontSize)));$this.find('a.button').css('padding-left',Math.max(Math.min($this.width()/(compressor*10),parseFloat(settings.maxHorizontalPadding)),parseFloat(settings.minHorizontalPadding)));$this.find('a.button').css('padding-right',Math.max(Math.min($this.width()/(compressor*10),parseFloat(settings.maxHorizontalPadding)),parseFloat(settings.minHorizontalPadding)));$this.find('a.button').css('padding-top',Math.max(Math.min($this.width()/(compressor*10),parseFloat(settings.maxVerticalPadding)),parseFloat(settings.minVerticalPadding)));$this.find('a.button').css('padding-bottom',Math.max(Math.min($this.width()/(compressor*10),parseFloat(settings.maxVerticalPadding)),parseFloat(settings.minVerticalPadding)))};resizer();$(window).on('resize.fitbutton orientationchange.fitbutton',resizer)})}})(jQuery)