;(function (factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], factory)
}else if(typeof exports!=='undefined'){
module.exports=factory(require('jquery'))
}else{
factory(jQuery)
}}(function ($){
$.fn.fitText=function (kompressor, options){
var compressor=kompressor||1
var settings=$.extend({
'minFontSize': Number.NEGATIVE_INFINITY,
'maxFontSize': Number.POSITIVE_INFINITY
}, options)
return this.each(function (){
var $this=$(this)
var resizer=function (){
$this.css('font-size', Math.max(Math.min($this.width() / (compressor * 10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)))
}
resizer()
$(window).on('resize.fittext orientationchange.fittext', resizer)
})
}}));