var photo=[['b',1,2,6,8,9],['b',5,2,4,6,8,11],['w',1,2,4,6,8,9],['w',6,1,4,6,8,10],['r',1,2,3,7,10],['r',5,3,7,9,10],['bu',1,4,6,7,9,10],['bu',6,1,3,7,8,11],['g',1,2,3,5,7,11],['g',6,2,3,6,8,9,11]];var prImg=[];for(var a=0;a<10;a++){var c=photo[a][1];for(var b=2;b<photo[a].length;b++){prImg[b]=new Image();prImg[b].src='img/photo_'+photo[a][0]+c+'.jpg';c++}}$(function(){for(var i=1;i<6;i++){$('#box').append('<div id="case'+i+'" class="block"><div class="photo"></div><div class="photo"></div></div>')}var bObj=[];var y=0;for(var j=0;j<10;j++){var pObj='';var color=photo[j][0];var n=photo[j][1];for(var k=2;k<photo[j].length;k++){m=photo[j][k];var h=104;if(m==3||m==8||m==10)h=209;pObj+='<div class="pos'+m+'"><img src="img/photo_'+color+n+'.jpg" width="155" height="'+h+'"></div>';n++}bObj[y]=pObj;y++}$('div.photo').each(function(i){$(this).html(bObj[i])});$('div.block').each(function(i){$('#case'+(i+1)).cycle({fx:'fade',speed:2000,timeout:6500,delay:-2500})});$('#box').before('<div id="color">').cycle({fx:'slideX',speed:500,timeout:12000,pager:'#color'});$('#color a:nth(0)').attr('id','color1').attr('title','Black');$('#color a:nth(1)').attr('id','color2').attr('title','White');$('#color a:nth(2)').attr('id','color3').attr('title','Red');$('#color a:nth(3)').attr('id','color4').attr('title','Blue');$('#color a:nth(4)').attr('id','color5').attr('title','Green')});