$(document).ready(function(){
	var divMaxHeight=0;
	var temp=3;
	var wrapId=0;
	$targetObj = $('.indexColumn');
	
	$targetObj.each(function(){//loop subsection
		$divObj=$('.columnBox', $(this));
		divNum=$divObj.length;
		count=Math.ceil(divNum/3);
		for(j=0;j<count;j++){//loop div
			if((j+1)==count){
				if(divNum%3!=0)
					temp=divNum%3;
			}
			$($divObj[3*j]).before('<div class="columnWrap" id="wrap'+wrapId+'">');
			for(k=0;k<temp;k++){
				divMaxHeight = $('.columnBox', $divObj[3*j+0]).height() > $('.columnBox', $divObj[3*j+1]).height()?
				$('.columnBox', $divObj[3*j+0]).height():
				$('.columnBox', $divObj[3*j+1]).height();
				$($divObj[3*j+k]).appendTo("#wrap"+wrapId);
			}
			wrapId++;
			imgMaxHeight=0;
			divMaxHeight=0;
			temp=3;
		}
	});
});

