Index: /extensions/modus/admin/admin.inc.php
===================================================================
--- /extensions/modus/admin/admin.inc.php	(revision 26835)
+++ /extensions/modus/admin/admin.inc.php	(revision 26836)
@@ -16,5 +16,5 @@
 }
 
-$text_values = array('skin', 'album_thumb_size', 'index_photo_deriv','index_photo_deriv_hdpi', 'resize_threshold', 'resize_factor');
+$text_values = array('skin', 'album_thumb_size', 'index_photo_deriv','index_photo_deriv_hdpi');
 $bool_values = array();
 
@@ -28,6 +28,4 @@
 	// int/double
 	$my_conf['album_thumb_size'] = max(0, $my_conf['album_thumb_size']);
-  $my_conf['resize_threshold'] = max(1, $my_conf['resize_threshold']);
-  $my_conf['resize_factor'] = max(0, min(1, $my_conf['resize_factor']) );
   $my_conf = array_intersect_key($my_conf, $default_conf);
   conf_update_param('modus_theme', addslashes(serialize($my_conf)) );
Index: /extensions/modus/admin/modus_admin.tpl
===================================================================
--- /extensions/modus/admin/modus_admin.tpl	(revision 26835)
+++ /extensions/modus/admin/modus_admin.tpl	(revision 26836)
@@ -31,10 +31,5 @@
 <fieldset><legend>Full row thumbnail layout</legend>
 Automatically applied for selected derivatives if max_width > max_height*1.5
-<br>
 
-<fieldset><legend>Horizontal crop or resize ?</legend>
-If row overflow is > <input name="resize_threshold" value="{$RESIZE_THRESHOLD}" type=number min=1 step=any size=2> (range [1;Inf]) then 
-use a factor of the overflow <input name="resize_factor" value="{$RESIZE_FACTOR}"type=number min=0 max=1 step=any size=2> (range [0;1]) for resizing.
-</fieldset>
 </fieldset>
 
Index: /extensions/modus/css/picture.css.tpl
===================================================================
--- /extensions/modus/css/picture.css.tpl	(revision 26835)
+++ /extensions/modus/css/picture.css.tpl	(revision 26836)
@@ -169,5 +169,5 @@
 	display: block;
 	padding: 0 5px 0 10px;
-	margin: 0;
+	margin: 0; /*need this for ie7 override in fix-ie7*/
 }
 
Index: /extensions/modus/functions.inc.php
===================================================================
--- /extensions/modus/functions.inc.php	(revision 26835)
+++ /extensions/modus/functions.inc.php	(revision 26836)
@@ -21,6 +21,4 @@
   'index_photo_deriv'=>'',
   'index_photo_deriv_hdpi'=>'',
-  'resize_threshold' => 1,
-  'resize_factor' => 0,
 );
 }
Index: /extensions/modus/js/thumb.arrange.js
===================================================================
--- /extensions/modus/js/thumb.arrange.js	(revision 26835)
+++ /extensions/modus/js/thumb.arrange.js	(revision 26836)
@@ -64,4 +64,8 @@
 		this.opts.rowHeight = Math.round(this.opts.rowHeight / dpr ) + this.opts.extraRowHeight;
 	}
+	else {
+		this.opts.resizeThreshold = 1.1; /*if row is less than 10% larger than available width, distribute extra width through cropping*/
+		this.opts.resizeFactor = 0.8;/* when row is more than 10% larger than available width, distribute extra width 80% through resizing and 20% through cropping*/
+	}
 	this.process();
 
@@ -74,4 +78,11 @@
 			that.process( down && that.$thumbs.width() == that.prevContainerWidth ? that.prevLastLineFirstThumbIndex : 0);
 		} );
+
+	if (!$.isReady) {
+		$(document).ready( function() {
+			if ( that.$thumbs.width() < that.prevContainerWidth )
+				that.process();
+			} );
+	}
 }
 
Index: /extensions/modus/js/thumb.arrange.min.js
===================================================================
--- /extensions/modus/js/thumb.arrange.min.js	(revision 26835)
+++ /extensions/modus/js/thumb.arrange.min.js	(revision 26836)
@@ -2,6 +2,6 @@
 RVGTLine.prototype={width:0,elementsWidth:0,firstThumbIndex:0,add:function(a,c){0===this.elements.length&&(this.firstThumbIndex=c);if(!a.data("w")){var d=a.width(),b=a.height();b>this.rowHeight&&(d=Math.round(d*this.rowHeight/b),b=this.rowHeight);a.data("w",d).data("h",b)}d={$elt:a,w:a.data("w"),h:a.data("h")};this.elements.push(d);d.h>this.maxHeight&&(this.maxHeight=d.h);this.width+=this.margin+d.w;this.elementsWidth+=d.w},clear:function(){this.elements.length&&(this.maxHeight=this.width=this.elementsWidth=
 0,this.elements.length=0)}};
-function RVGThumbs(a){this.opts=a;this.$thumbs=$("#thumbnails");if(0!=this.$thumbs.length){this.$thumbs.css("text-align","left");this.opts.extraRowHeight=0;1<window.devicePixelRatio&&(a=window.devicePixelRatio,this.opts.resizeThreshold=1.01,this.opts.resizeFactor=0.95,this.opts.extraRowHeight=6,this.opts.rowHeight=Math.round(this.opts.rowHeight/a)+this.opts.extraRowHeight);this.process();var c=this;$(window).on("resize",function(){1<Math.abs(c.$thumbs.width()-c.prevContainerWidth)&&c.process()}).on("RVTS_loaded",
-function(a,b){c.process(b&&c.$thumbs.width()==c.prevContainerWidth?c.prevLastLineFirstThumbIndex:0)})}}
+function RVGThumbs(a){this.opts=a;this.$thumbs=$("#thumbnails");if(0!=this.$thumbs.length){this.$thumbs.css("text-align","left");this.opts.extraRowHeight=0;1<window.devicePixelRatio?(a=window.devicePixelRatio,this.opts.resizeThreshold=1.01,this.opts.resizeFactor=0.95,this.opts.extraRowHeight=6,this.opts.rowHeight=Math.round(this.opts.rowHeight/a)+this.opts.extraRowHeight):(this.opts.resizeThreshold=1.1,this.opts.resizeFactor=0.8);this.process();var c=this;$(window).on("resize",function(){1<Math.abs(c.$thumbs.width()-
+c.prevContainerWidth)&&c.process()}).on("RVTS_loaded",function(a,b){c.process(b&&c.$thumbs.width()==c.prevContainerWidth?c.prevLastLineFirstThumbIndex:0)});$.isReady||$(document).ready(function(){c.$thumbs.width()<c.prevContainerWidth&&c.process()})}}
 RVGThumbs.prototype={prevContainerWidth:0,prevLastLineFirstThumbIndex:0,process:function(a){a=a?a:0;var c=this.$thumbs.width();this.prevContainerWidth=c;for(var d=$("li>a>img",this.$thumbs),b=new RVGTLine(this.opts.hMargin,this.opts.rowHeight);a<d.length;a++){var e=$(d[a]);b.add(e,a);b.width>=c-1*b.elements.length&&(this.processLine(b,c),b.clear())}b.elements.length&&this.processLine(b,c,!0);this.prevLastLineFirstThumbIndex=b.firstThumbIndex},processLine:function(a,c,d){var b,e,f=a.maxHeight?a.maxHeight:
 a.elements[0].h;a.width/c>this.opts.resizeThreshold?(e=a.elementsWidth/(a.elementsWidth+c-a.width),b=f/(1+(e-1)*this.opts.resizeFactor),b=6*Math.round(b/6),b<f/e&&(b=Math.ceil(f/e),e=this.opts.rowHeight-this.opts.extraRowHeight-b,0<e&&6>e&&(b+=e)),b<f&&(f=b)):d&&(f=Math.min(f,this.opts.rowHeight-this.opts.extraRowHeight));c=a.width-c;d&&(c=0);for(var k=0;k<a.elements.length;k++){var h=a.elements[k];b=h.w;e=h.h;var g;g=k==a.elements.length-1?c:Math.round(c*b/a.elementsWidth);c-=g;a.elementsWidth-=
Index: /extensions/modus/themeconf.inc.php
===================================================================
--- /extensions/modus/themeconf.inc.php	(revision 26835)
+++ /extensions/modus/themeconf.inc.php	(revision 26836)
@@ -256,5 +256,5 @@
 '#thumbnails{text-align:justify;overflow:hidden;margin-left:'.($container_margin-$horizontal_margin).'px;margin-right:'.$container_margin.'px}
 #thumbnails>li{float:left;overflow:hidden;position:relative;margin-bottom:'.$vertical_margin.'px;margin-left:'.$horizontal_margin.'px}#thumbnails>li>a{position:absolute;border:0}');
-	$template->block_footer_script(null, 'rvgtProcessor=new RVGThumbs({hMargin:'.$horizontal_margin.',rowHeight:'.$row_height.',resizeThreshold:'.$conf['modus_theme']['resize_threshold'].',resizeFactor:'.$conf['modus_theme']['resize_factor'].'});');
+	$template->block_footer_script(null, 'rvgtProcessor=new RVGThumbs({hMargin:'.$horizontal_margin.',rowHeight:'.$row_height.'});');
 
 	$my_base_name = basename(dirname(__FILE__));
