").appendTo(sub_container);
for(var j in data[i].blocks){
switch(data[i].blocks[j].type){
case "text":
var text_block = $("
").insertBefore(imgs_container.find(".clear"));
$("
" + data[i].blocks[j].text + "
").appendTo(text_block);
$("
").appendTo(text_block);
$("
").attr("checked",(data[i].blocks[j].state == "display")?((data[i].blocks[j].checked == "checked")?true:false):false).appendTo(text_block);
break;
case "img":
var img_block = $("
").insertBefore(imgs_container.find(".clear"));
$("
").appendTo(img_block);
$("
").attr("checked",(data[i].blocks[j].state == "display")?((data[i].blocks[j].checked == "checked")?true:false):false).appendTo(img_block)
var img = $("
").appendTo(img_block);
img.height(data[i].blocks[j].h);
if((120 - data[i].blocks[j].h) > 0)
img.css("margin",(120 - data[i].blocks[j].h)/2 + "px 0");
break;
case "audio":
var img_tmp = $("
").insertBefore(imgs_container.find(".clear"));
var audio_block = $("
").appendTo(img_tmp);
$("
").appendTo(audio_block);
$("
").appendTo(audio_block);
var source = $("
").attr("src", data[i].blocks[j].src);
var audio = $("