function adjustProductWidth(){
	var itemNormalWidth = 190;
	var cssSelector = 'ul.product-list';
	jQuery(cssSelector).each(function(i){
		var ul = jQuery(this);
		var productCollection   = jQuery('li',ul);
		var parentWidth 				= ul.width();	
		var itemMargin 					= productCollection.eq(0).outerWidth(true) - productCollection.eq(0).width();
		var number_of_items_in_row = Math.floor(parentWidth / (itemNormalWidth + itemMargin));
		if(productCollection.length < number_of_items_in_row) return;
		var totalItemWidth = (itemNormalWidth + itemMargin) * number_of_items_in_row;
		var spaceLeft = Math.floor(parentWidth - totalItemWidth);
		var spaceLeftPerItem = Math.floor(spaceLeft / number_of_items_in_row);
		var newItemWidth = itemNormalWidth + spaceLeftPerItem;						
		productCollection.each(function(i){jQuery(this).width(newItemWidth)})
	})
};
	
	
jQuery(window).bind('resize',adjustProductWidth);
jQuery(document).ready(adjustProductWidth);
	

