$(function(){

$.fn.extend({
	randomdisplay : function(num) {
		return this.each(function() {
			var chn = $(this).children().hide().length;
			for(var i = 0; i < num && i < chn; i++) {
				var r = parseInt(Math.random() * (chn - i)) + i;
				$(this).children().eq(r).show().prependTo($(this));
			}
		});
	}
});

$(function(){
	$("[randomdisplay]").each(function() {
		$(this).randomdisplay($(this).attr("randomdisplay"));
		$("#sec-case .mlay-03:nth-child(2)").addClass("bg-non").addClass("mb00");
		caseH();

	});
});


function caseH(){
	$("#sec-case .inner, #sec-question .inner").flatHeights();
}

	$("#list01 li").flatHeights();
	$("#list02 li").flatHeights();

	$("#sec-topics .inner, #top-2com .right-box .inner").flatHeights();
	
	$("#top-2com .left-box, #top-2com .right-box").flatHeights();

});
