function smartColumns() { //Create a function that calculates the smart columns
  $("ul.products").css({ 'width' : "100%"});//Reset column size to a 100% once view port has been adjusted
	var rowWidth = $("ul.products").width(); //Get the width of row
	var colNum = Math.floor(rowWidth / 160); //Find how many columns of 200px can fit per row / then round it down to a whole number
	var colWidth = Math.floor(rowWidth / colNum); //Get the width of the row and divide it by the number of columns it can fit / then round it down to a whole number. This value will be the exact width of the re-adjusted column
	$("ul.products").css({ 'width' : rowWidth}); //Set exact width of row in pixels instead of using % - Prevents cross-browser bugs that appear in certain view port resolutions.
	$("ul.products li").css({ 'width' : colWidth}); //Set exact width of the re-adjusted column	
	//var test = colNum+' cols ';
	//var test = rowWidth+' width';
	//alert(rowWidth.toString());
  }	

smartColumns();//Execute the function when page loads

$(window).resize(function () { //Each time the viewport is adjusted/resized, execute the function
	smartColumns();
});