$(document).ready(function() {
	if ($.browser.msie && $.browser.version < '7') {
		$('html').css('overflow', 'hidden');
		$('body').css('overflow', 'hidden');
		$('.page').css('overflow', 'auto').css('position', 'relative')
			.css('z-index', '1').css('height', $(window).height());
	}
	
	$(window).bind('resize', function() {
		if ($.browser.msie && $.browser.version < '7') {
			$('.page').css('height', $(window).height());
		}
	});
	
	$('.img-vis .caption').each(function() {
	// $(this).css('width',$(this).parents('.img-vis').find('img').width()-25);
	});
	
	$('.cols-3 .box').each(function()
	{
		$(this).children('.img-vis').children('.activiteit').children().each(function()
		{
			$("<img/>").attr("src", $(this).attr("src")).load(function()
			{
				var a = $(".cols-3 .box").css('height');
				var b = $(".cols-3 .box").children('.img-vis').children('.activiteit').css('margin-bottom');
				var c = this.width / 230;
				var d = this.height / c;
				var e = a.substr(0, (a.length - 2));
				var f = b.substr(0, (b.length - 2));
				
				if (parseFloat(d + parseInt(f)) > e)
				{
					$('.cols-3 .box').css('height', parseFloat(d + parseInt(f)) + 'px');
				} else
				{
					$('.cols-3 .box').css('height', e + 'px');
				}
			});
		});
	});
});
