/**
 * znResize jQuery plugin
 *
 * @author  Zion Ng <zion@intzone.com>
 * @link    https://github.com/zionsg/zn-jquery/tree/master/znResize
 * @version 1.0.0, 2013-06-25
 */
(function($){$.fn.znResize=function(options){var config=$.extend({strategy:'crop'},options);this.each(function(){var naturalWidth=this.naturalWidth||$(this).css('width','auto').width(),naturalHeight=this.naturalHeight||$(this).css('height','auto').height();$(this).parent().css('overflow','hidden');if(naturalWidth>=naturalHeight){$(this).css('height','100%').css('width',null)}else{$(this).css('width','100%').css('height',null)}});return this}}(jQuery));

/**
 * znResize jQuery plugin
 *
 * @author  Zion Ng <zion@intzone.com>
 * @link    https://github.com/zionsg/zn-jquery/tree/master/znResize
 * @version 1.1.0, 2013-06-26
 */
(function($){$.fn.znResize=function(a){var b=$.extend({},$.fn.znResize.defaults,a),strategies=$.fn.znResize.strategies,strategy=b.strategy;if('string'===$.type(strategy)&&strategy in $.fn.znResize.strategies){strategy=$.fn.znResize.strategies[strategy]}if(!strategy||$.type(strategy)!=='function'){return this}this.each(function(){$(this).parent().css('overflow','hidden');strategy(this,b)});return this};$.fn.znResize.defaults={strategy:'crop',center:true,middle:true};$.fn.znResize.strategies={'crop':function(a,b){if(getNaturalWidth(a)>=getNaturalHeight(a)){$(a).css('height','100%').css('width',null)}else{$(a).css('width','100%').css('height',null)}},'fit':function(a,b){var c=$(a),$parent=c.parent();if(getNaturalWidth(a)>=getNaturalHeight(a)){c.css('width','100%').css('height',null)}else{c.css('height','100%').css('width',null)}if(b.center){$parent.css('text-align','center');c.css('margin-left','auto')}if(b.middle){$parent.css('vertical-align','middle');c.css('margin-top',($parent.height()-c.height())/2)}}};function getNaturalWidth(a){return a.naturalWidth||$(a).css('width','auto').width()}function getNaturalHeight(a){return a.naturalHeight||$(a).css('height','auto').height()}}(jQuery));

Add 'defaults' & 'strategies' properties; Add 'fit' strategy.
Add 'defaults' & 'strategies' properties; Add 'fit' strategy.