﻿$('.post_with_columns').ready(function(){
	//Reset column size to a 100% once view port has been adjusted
	//$(".post_with_columns").css({ 'width' : "100%"});

	var colWrap = $(".post_with_columns").width(); //Get the width of row
	var colWidth = $(".post_with_columns .column").width(); //Get the width of row
	var colTotal = $(".post_with_columns .column").length; //Get the width of row

	var colNum = Math.floor(colWrap / colWidth); //Find how many columns fit per row / then round it down to a whole number

	var colFixed = Math.floor(colWrap / colTotal); //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

	$(".post_with_columns").css({ 'width' : colWrap}); //Set exact width of row in pixels instead of using % - Prevents cross-browser bugs that appear in certain view port resolutions.
	$(".post_with_columns .column").css({ 'width' : (colFixed-10) });

});

$('.home_features').ready(function(){
	var colWrap = $(".home_features").width(); //Get the width of row
	var colWidth = $(".home_features .column").width(); //Get the width of row
	var colTotal = $(".home_features .column").length; //Get the width of row

	var colNum = Math.floor(colWrap / colWidth); //Find how many columns fit per row / then round it down to a whole number

	var colFixed = Math.floor(colWrap / colTotal); //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

	$(".home_features").css({ 'width' : colWrap}); //Set exact width of row in pixels instead of using % - Prevents cross-browser bugs that appear in certain view port resolutions.
	$(".home_features .column").css({ 'width' : Math.floor(colFixed-10) });
	
	//var colHeight = Math.max( $('.home_features ul').height() ); // Get the height of the rows
	//$('.home_features .column ul').css({ 'height' : colHeight });
});

