/* Catalogue */

var resizeTimer = null;
$(window).bind('resize', function() {
   if (resizeTimer) clearTimeout(resizeTimer);
   resizeTimer = setTimeout(scale, 100);
});
function scale() {
	var dims = clientCoords();
	if(dims.width > 1020)
		w = (dims.width - 500) / 2 - 32;
	else
		w = (dims.width - 500) - 32;
	$(".item").css("width", w);

	var item_height = 0;
	$(".item").each(function(i) {
		item_height = item_height <= $(this).innerHeight() ? $(this).innerHeight() : item_height;
	});
	$(".item").css("height", item_height - 10);
};

$(document).ready(function(){
	$(window).scroll(function () {
		if (resizeTimer) clearTimeout(resizeTimer);
		resizeTimer = setTimeout(scale, 100);
	});
});
/* /Catalogue */

