/*
 * imageDirectory.js
 *
 * Author: Jon Eriksmo
 * Email: jon@itano-systems.com
 * Date: 2009-05-19
 *
 */

/*
 * Function to update the category holders
 */
function updateImageDirectoryCategories(columns) {
	var currentWidth = $("#resultContent").width();
	var resultWidth  = (currentWidth - 62) / columns;
	$("#resultContent > .innerBoxWide > .content > .imageDirectoryCategory").css("width", resultWidth + "px");
}

// The number of columns we'd like
//var columns = 3;

// Register the update function with the window resize event
$(window).resize(function() {
		updateImageDirectoryCategories(columns);
});

// And finally run it once to set the proper width
updateImageDirectoryCategories(columns);