window.thumbnails = new Object();
												thumbnails[1180336] = new thumbnail(1180336,'','','0 copy_thumb.jpg',130, 130,1,'#');
												thumbnails[8048825] = new thumbnail(8048825,'','','Iberia_portrait_square02_thumb.jpg',130, 130,1,'#');
												thumbnails[8060383] = new thumbnail(8060383,'','','19_thumb.jpg',130, 87,1,'#');
												thumbnails[8092449] = new thumbnail(8092449,'','','IMG_0006_copy_72_thumb.jpg',130, 89,1,'#');
												thumbnails[1260138] = new thumbnail(1260138,'431744','','53_thumb.JPG',130, 194,1,'photo_1260138.html');
												thumbnails[1260148] = new thumbnail(1260148,'431744','','72_thumb.JPG',130, 194,1,'photo_1260148.html');
												thumbnails[1260151] = new thumbnail(1260151,'431744','','62_thumb.JPG',130, 194,1,'photo_1260151.html');
												thumbnails[1260154] = new thumbnail(1260154,'431744','','114_thumb.JPG',130, 87,1,'photo_1260154.html');
												thumbnails[1260155] = new thumbnail(1260155,'431744','','82_thumb.JPG',130, 87,1,'photo_1260155.html');
												thumbnails[1260165] = new thumbnail(1260165,'431744','','91_thumb.JPG',130, 87,1,'photo_1260165.html');
												thumbnails[8049756] = new thumbnail(8049756,'85058','','1_boda_copy_thumb.jpg',130, 199,1,'photo_8049756.html');
												thumbnails[8053617] = new thumbnail(8053617,'85058','','2_boda_copy_thumb.jpg',130, 195,1,'photo_8053617.html');
												thumbnails[8053700] = new thumbnail(8053700,'85058','','3__boda_copy_thumb.jpg',130, 87,1,'photo_8053700.html');
												thumbnails[8053702] = new thumbnail(8053702,'85058','','4_boda_copy_thumb.jpg',130, 195,1,'photo_8053702.html');
												thumbnails[8053703] = new thumbnail(8053703,'85058','','5_boda_copy_thumb.jpg',130, 186,1,'photo_8053703.html');
												thumbnails[8053704] = new thumbnail(8053704,'85058','','6_boda_copy_thumb.jpg',130, 195,1,'photo_8053704.html');
												thumbnails[8053707] = new thumbnail(8053707,'85058','','7_boda_copy_thumb.jpg',130, 195,1,'photo_8053707.html');
												thumbnails[8053710] = new thumbnail(8053710,'85058','','8_boda_copy_thumb.jpg',130, 88,1,'photo_8053710.html');
												thumbnails[8053711] = new thumbnail(8053711,'85058','','9_boda_copy_thumb.jpg',130, 87,1,'photo_8053711.html');
												thumbnails[8053717] = new thumbnail(8053717,'85058','','10_boda_copy_thumb.jpg',130, 87,1,'photo_8053717.html');
												thumbnails[8053720] = new thumbnail(8053720,'85058','','11_boda_copy_thumb.jpg',130, 195,1,'photo_8053720.html');
												thumbnails[8053721] = new thumbnail(8053721,'85058','','12_boda_copy_thumb.jpg',130, 195,1,'photo_8053721.html');
												thumbnails[8054833] = new thumbnail(8054833,'85059','','0_thumb.jpg',130, 87,1,'photo_8054833.html');
												thumbnails[8054842] = new thumbnail(8054842,'85059','','2_copy_thumb.jpg',130, 87,1,'photo_8054842.html');
												thumbnails[8054845] = new thumbnail(8054845,'85059','','3_copy_thumb.jpg',130, 87,1,'photo_8054845.html');
												thumbnails[8054846] = new thumbnail(8054846,'85059','','4_copy_thumb.jpg',130, 87,1,'photo_8054846.html');
												thumbnails[8054850] = new thumbnail(8054850,'85059','','5_copy_thumb.jpg',130, 87,1,'photo_8054850.html');
												thumbnails[8054852] = new thumbnail(8054852,'85059','','6_copy_thumb.jpg',130, 87,1,'photo_8054852.html');
												thumbnails[8054854] = new thumbnail(8054854,'85059','','7_copy_thumb.jpg',130, 87,1,'photo_8054854.html');
												thumbnails[8054855] = new thumbnail(8054855,'85059','','7a_thumb.jpg',130, 87,1,'photo_8054855.html');
												thumbnails[8054857] = new thumbnail(8054857,'85059','','8_copy_thumb.jpg',130, 195,1,'photo_8054857.html');
												thumbnails[8054861] = new thumbnail(8054861,'85059','','9_copy_thumb.jpg',130, 87,1,'photo_8054861.html');
												thumbnails[8054865] = new thumbnail(8054865,'85059','','9b_thumb.jpg',130, 87,1,'photo_8054865.html');
												thumbnails[8054867] = new thumbnail(8054867,'85059','','10_copy_thumb.jpg',130, 195,1,'photo_8054867.html');
												thumbnails[8054869] = new thumbnail(8054869,'85059','','11_copy_thumb.jpg',130, 195,1,'photo_8054869.html');
												thumbnails[8054911] = new thumbnail(8054911,'85059','','12_copy_thumb.jpg',130, 87,1,'photo_8054911.html');
												thumbnails[8054950] = new thumbnail(8054950,'85059','','13_copy_thumb.jpg',130, 85,1,'photo_8054950.html');
												thumbnails[8055144] = new thumbnail(8055144,'431737','','1_copy1_thumb.jpg',130, 87,1,'photo_8055144.html');
												thumbnails[8055145] = new thumbnail(8055145,'431737','','2_copy1_thumb.jpg',130, 87,1,'photo_8055145.html');
												thumbnails[8055152] = new thumbnail(8055152,'431737','','3_copy1_thumb.jpg',130, 87,1,'photo_8055152.html');
												thumbnails[8055154] = new thumbnail(8055154,'431737','','4_copy1_thumb.jpg',130, 87,1,'photo_8055154.html');
												thumbnails[8055155] = new thumbnail(8055155,'431737','','5_copy1_thumb.jpg',130, 87,1,'photo_8055155.html');
												thumbnails[8055156] = new thumbnail(8055156,'431737','','6_copy1_thumb.jpg',130, 195,1,'photo_8055156.html');
												thumbnails[8055157] = new thumbnail(8055157,'431737','','7_copy1_thumb.jpg',130, 195,1,'photo_8055157.html');
												thumbnails[8055226] = new thumbnail(8055226,'431737','','8_copy1_thumb.jpg',130, 195,1,'photo_8055226.html');
												thumbnails[8055227] = new thumbnail(8055227,'431737','','9_copy1_thumb.jpg',130, 195,1,'photo_8055227.html');
												thumbnails[8055228] = new thumbnail(8055228,'431737','','10_copy1_thumb.jpg',130, 87,1,'photo_8055228.html');
												thumbnails[8055229] = new thumbnail(8055229,'431737','','11_copy1_thumb.jpg',130, 87,1,'photo_8055229.html');
												thumbnails[8055239] = new thumbnail(8055239,'431737','','12_copy1_thumb.jpg',130, 87,1,'photo_8055239.html');
												thumbnails[8055947] = new thumbnail(8055947,'160512','','2_thumb.jpg',130, 87,1,'photo_8055947.html');
												thumbnails[8055948] = new thumbnail(8055948,'160512','','3_thumb.jpg',130, 87,1,'photo_8055948.html');
												thumbnails[8055949] = new thumbnail(8055949,'160512','','4_a_thumb.jpg',130, 87,1,'photo_8055949.html');
												thumbnails[8055950] = new thumbnail(8055950,'160512','','5_a_thumb.jpg',130, 87,1,'photo_8055950.html');
												thumbnails[8055955] = new thumbnail(8055955,'160512','','6_a_thumb.jpg',130, 87,1,'photo_8055955.html');
												thumbnails[8055956] = new thumbnail(8055956,'160512','','7_a_thumb.jpg',130, 87,1,'photo_8055956.html');
												thumbnails[8055958] = new thumbnail(8055958,'160512','','8_a_thumb.jpg',130, 87,1,'photo_8055958.html');
												thumbnails[8055961] = new thumbnail(8055961,'160512','','9_a_thumb.jpg',130, 87,1,'photo_8055961.html');
												thumbnails[8055962] = new thumbnail(8055962,'160512','','10a_thumb.jpg',130, 87,1,'photo_8055962.html');
												thumbnails[8055964] = new thumbnail(8055964,'160512','','11a_thumb.jpg',130, 87,1,'photo_8055964.html');
												thumbnails[8055966] = new thumbnail(8055966,'160512','','11b_thumb.jpg',130, 87,1,'photo_8055966.html');
												thumbnails[8055967] = new thumbnail(8055967,'160512','','12a_thumb.jpg',130, 87,1,'photo_8055967.html');
												thumbnails[8055968] = new thumbnail(8055968,'160512','','13a_thumb.jpg',130, 87,1,'photo_8055968.html');
												thumbnails[8055970] = new thumbnail(8055970,'160512','','13b_thumb.jpg',130, 87,1,'photo_8055970.html');
												thumbnails[8055974] = new thumbnail(8055974,'160512','','17a_thumb.jpg',130, 87,1,'photo_8055974.html');
												thumbnails[8055975] = new thumbnail(8055975,'160512','','18a_thumb.jpg',130, 87,1,'photo_8055975.html');
												thumbnails[8055976] = new thumbnail(8055976,'160512','','19a_thumb.jpg',130, 87,1,'photo_8055976.html');
												thumbnails[8056008] = new thumbnail(8056008,'160514','','1_copy12_thumb.jpg',130, 87,1,'photo_8056008.html');
												thumbnails[8056010] = new thumbnail(8056010,'160514','','2_copy12_thumb.jpg',130, 87,1,'photo_8056010.html');
												thumbnails[8056011] = new thumbnail(8056011,'160514','','3_copy12_thumb.jpg',130, 87,1,'photo_8056011.html');
												thumbnails[8056012] = new thumbnail(8056012,'160514','','4_copy12_thumb.jpg',130, 87,1,'photo_8056012.html');
												thumbnails[8056015] = new thumbnail(8056015,'160514','','5_copy12_thumb.jpg',130, 87,1,'photo_8056015.html');
												thumbnails[8056018] = new thumbnail(8056018,'160514','','6_copy12_thumb.jpg',130, 87,1,'photo_8056018.html');
												thumbnails[8056021] = new thumbnail(8056021,'160514','','7_copy12_thumb.jpg',130, 87,1,'photo_8056021.html');
												thumbnails[8056022] = new thumbnail(8056022,'160514','','8_copy12_thumb.jpg',130, 163,1,'photo_8056022.html');
												thumbnails[8056023] = new thumbnail(8056023,'160514','','9_copy12_thumb.jpg',130, 195,1,'photo_8056023.html');
												thumbnails[8056025] = new thumbnail(8056025,'160514','','10_copy12_thumb.jpg',130, 195,1,'photo_8056025.html');
												thumbnails[8056026] = new thumbnail(8056026,'160514','','11_copy12_thumb.jpg',130, 195,1,'photo_8056026.html');
												thumbnails[8056027] = new thumbnail(8056027,'160514','','12_copy12_thumb.jpg',130, 195,1,'photo_8056027.html');
												thumbnails[8056029] = new thumbnail(8056029,'160514','','13_copy1_thumb.jpg',130, 195,1,'photo_8056029.html');
												thumbnails[8059020] = new thumbnail(8059020,'160512','','1_Magallanes_thumb.jpg',130, 87,1,'photo_8059020.html');
												thumbnails[8059021] = new thumbnail(8059021,'160512','','2_copy123_thumb.jpg',130, 82,1,'photo_8059021.html');
												thumbnails[8059022] = new thumbnail(8059022,'160512','','3_Magallanes_thumb.jpg',130, 87,1,'photo_8059022.html');
												thumbnails[8059023] = new thumbnail(8059023,'160512','','4_Magallanes_thumb.jpg',130, 85,1,'photo_8059023.html');
												thumbnails[8059028] = new thumbnail(8059028,'160512','','5_Magallanes_thumb.jpg',130, 87,1,'photo_8059028.html');
												thumbnails[8059030] = new thumbnail(8059030,'160512','','6_Magallanes_thumb.jpg',130, 87,1,'photo_8059030.html');
												thumbnails[8059033] = new thumbnail(8059033,'160512','','7_Magallanes_thumb.jpg',130, 87,1,'photo_8059033.html');
												thumbnails[8059035] = new thumbnail(8059035,'160512','','8_Magallanes_thumb.jpg',130, 87,1,'photo_8059035.html');
												thumbnails[8059036] = new thumbnail(8059036,'160512','','9_Magallanes_thumb.jpg',130, 87,1,'photo_8059036.html');
												thumbnails[8059037] = new thumbnail(8059037,'160512','','10_Magallanes_thumb.jpg',130, 87,1,'photo_8059037.html');
												thumbnails[8059039] = new thumbnail(8059039,'160512','','11_Magallanes_thumb.jpg',130, 87,1,'photo_8059039.html');
												thumbnails[8059041] = new thumbnail(8059041,'160512','','12_Magallanes_thumb.jpg',130, 87,1,'photo_8059041.html');
												thumbnails[8059042] = new thumbnail(8059042,'160512','','13_Magalllanes_thumb.jpg',130, 87,1,'photo_8059042.html');
												thumbnails[8059044] = new thumbnail(8059044,'160512','','14_Magallanes_thumb.jpg',130, 87,1,'photo_8059044.html');
												thumbnails[8059046] = new thumbnail(8059046,'160512','','15_Magallanes_thumb.jpg',130, 87,1,'photo_8059046.html');
												thumbnails[8059048] = new thumbnail(8059048,'160512','','16_Magallanes_thumb.jpg',130, 87,1,'photo_8059048.html');
												thumbnails[8059051] = new thumbnail(8059051,'160512','','17_copy_thumb.jpg',130, 87,1,'photo_8059051.html');
												thumbnails[8059052] = new thumbnail(8059052,'160512','','18_copy_thumb.jpg',130, 87,1,'photo_8059052.html');
												thumbnails[8060413] = new thumbnail(8060413,'89661','','1_copy123_thumb.jpg',130, 87,1,'photo_8060413.html');
												thumbnails[8060420] = new thumbnail(8060420,'89661','','2_copy1234_thumb.jpg',130, 87,1,'photo_8060420.html');
												thumbnails[8060424] = new thumbnail(8060424,'89661','','3_copy123_thumb.jpg',130, 79,1,'photo_8060424.html');
												thumbnails[8060427] = new thumbnail(8060427,'89661','','4_copy1234_thumb.jpg',130, 87,1,'photo_8060427.html');
												thumbnails[8060433] = new thumbnail(8060433,'89661','','5_copy123_thumb.jpg',130, 87,1,'photo_8060433.html');
												thumbnails[8060434] = new thumbnail(8060434,'89661','','6_copy123_thumb.jpg',130, 87,1,'photo_8060434.html');
												thumbnails[8060436] = new thumbnail(8060436,'89661','','7_copy123_thumb.jpg',130, 87,1,'photo_8060436.html');
												thumbnails[8060437] = new thumbnail(8060437,'89661','','8_copy123_thumb.jpg',130, 87,1,'photo_8060437.html');
												thumbnails[8060438] = new thumbnail(8060438,'89661','','9_copy123_thumb.jpg',130, 87,1,'photo_8060438.html');
												thumbnails[8060440] = new thumbnail(8060440,'89661','','10_copy123_thumb.jpg',130, 87,1,'photo_8060440.html');
												thumbnails[8060441] = new thumbnail(8060441,'89661','','10a_copy_thumb.jpg',130, 85,1,'photo_8060441.html');
												thumbnails[8060456] = new thumbnail(8060456,'89661','','11_thumb.jpg',130, 195,1,'photo_8060456.html');
												thumbnails[8060485] = new thumbnail(8060485,'431743','','1_copy1234_thumb.jpg',130, 87,1,'photo_8060485.html');
												thumbnails[8060487] = new thumbnail(8060487,'431743','','2_copy12345_thumb.jpg',130, 195,1,'photo_8060487.html');
												thumbnails[8060488] = new thumbnail(8060488,'431743','','3_copy1234_thumb.jpg',130, 87,1,'photo_8060488.html');
												thumbnails[8060490] = new thumbnail(8060490,'431743','','4_copy12345_thumb.jpg',130, 87,1,'photo_8060490.html');
												thumbnails[8060491] = new thumbnail(8060491,'431743','','5_copy1234_thumb.jpg',130, 88,1,'photo_8060491.html');
												thumbnails[8060493] = new thumbnail(8060493,'431743','','6_copy1234_thumb.jpg',130, 105,1,'photo_8060493.html');
												thumbnails[8060496] = new thumbnail(8060496,'431743','','7_copy1234_thumb.jpg',130, 87,1,'photo_8060496.html');
												thumbnails[8060497] = new thumbnail(8060497,'431743','','8_copy1234_thumb.jpg',130, 87,1,'photo_8060497.html');
												thumbnails[8060498] = new thumbnail(8060498,'431743','','9_copy1234_thumb.jpg',130, 87,1,'photo_8060498.html');
												thumbnails[8060501] = new thumbnail(8060501,'431743','','10_copy1234_thumb.jpg',130, 171,1,'photo_8060501.html');
												thumbnails[8060784] = new thumbnail(8060784,'431746','','12_thumb.jpg',130, 134,1,'photo_8060784.html');
												thumbnails[8060785] = new thumbnail(8060785,'431746','','2a_copy_thumb.jpg',130, 153,1,'photo_8060785.html');
												thumbnails[8060789] = new thumbnail(8060789,'431746','','2b_copy_thumb.jpg',130, 195,1,'photo_8060789.html');
												thumbnails[8060792] = new thumbnail(8060792,'431746','','2f_copy_thumb.jpg',130, 195,1,'photo_8060792.html');
												thumbnails[8060793] = new thumbnail(8060793,'431746','','2g_copy_thumb.jpg',130, 195,1,'photo_8060793.html');
												thumbnails[8060794] = new thumbnail(8060794,'431746','','2h_copy_thumb.jpg',130, 195,1,'photo_8060794.html');
												thumbnails[8060795] = new thumbnail(8060795,'431746','','2i_copy_thumb.jpg',130, 195,1,'photo_8060795.html');
												thumbnails[8060796] = new thumbnail(8060796,'431746','','2j_copy_thumb.jpg',130, 195,1,'photo_8060796.html');
												thumbnails[8060797] = new thumbnail(8060797,'431746','','2k_copy_thumb.jpg',130, 172,1,'photo_8060797.html');
												thumbnails[8060802] = new thumbnail(8060802,'431746','','2n_copy_thumb.jpg',130, 195,1,'photo_8060802.html');
												thumbnails[8060804] = new thumbnail(8060804,'431746','','2o_copy_thumb.jpg',130, 195,1,'photo_8060804.html');
												thumbnails[8060806] = new thumbnail(8060806,'431746','','2p_copy_thumb.jpg',130, 195,1,'photo_8060806.html');
												thumbnails[8060895] = new thumbnail(8060895,'431746','','2m_copy1_thumb.jpg',130, 195,1,'photo_8060895.html');
												thumbnails[8060897] = new thumbnail(8060897,'431746','','2r_copy1_thumb.jpg',130, 195,1,'photo_8060897.html');
												thumbnails[8060900] = new thumbnail(8060900,'431746','','2l_copy1_thumb.jpg',130, 195,1,'photo_8060900.html');
												thumbnails[8061320] = new thumbnail(8061320,'431742','','1_copy12345_thumb.jpg',130, 195,1,'photo_8061320.html');
												thumbnails[8061322] = new thumbnail(8061322,'431742','','2_copy123456_thumb.jpg',130, 195,1,'photo_8061322.html');
												thumbnails[8061323] = new thumbnail(8061323,'431742','','3_copy12345_thumb.jpg',130, 195,1,'photo_8061323.html');
												thumbnails[8061325] = new thumbnail(8061325,'431742','','4_copy123456_thumb.jpg',130, 195,1,'photo_8061325.html');
												thumbnails[8061326] = new thumbnail(8061326,'431742','','5_copy12345_thumb.jpg',130, 195,1,'photo_8061326.html');
												thumbnails[8061328] = new thumbnail(8061328,'431742','','6_copy12345_thumb.jpg',130, 195,1,'photo_8061328.html');
												thumbnails[8061329] = new thumbnail(8061329,'431742','','9_copy12345_thumb.jpg',130, 87,1,'photo_8061329.html');
												thumbnails[8061332] = new thumbnail(8061332,'431742','','10_copy12345_thumb.jpg',130, 87,1,'photo_8061332.html');
												thumbnails[8061335] = new thumbnail(8061335,'431742','','11_copy123_thumb.jpg',130, 87,1,'photo_8061335.html');
												thumbnails[8061338] = new thumbnail(8061338,'431742','','13_copy12_thumb.jpg',130, 87,1,'photo_8061338.html');
												thumbnails[8061340] = new thumbnail(8061340,'431742','','15_copy_thumb.jpg',130, 87,1,'photo_8061340.html');
												thumbnails[8061342] = new thumbnail(8061342,'431742','','16_copy_thumb.jpg',130, 87,1,'photo_8061342.html');
												thumbnails[8063002] = new thumbnail(8063002,'160512','','191_thumb.jpg',130, 87,1,'photo_8063002.html');
												thumbnails[8063124] = new thumbnail(8063124,'85031','','2_copy1234567_thumb.jpg',130, 87,1,'photo_8063124.html');
												thumbnails[8063126] = new thumbnail(8063126,'85031','','3_copy123456_thumb.jpg',130, 87,1,'photo_8063126.html');
												thumbnails[8063128] = new thumbnail(8063128,'85031','','4_copy1234567_thumb.jpg',130, 184,1,'photo_8063128.html');
												thumbnails[8063130] = new thumbnail(8063130,'85031','','5_copy123456_thumb.jpg',130, 87,1,'photo_8063130.html');
												thumbnails[8063132] = new thumbnail(8063132,'85031','','8_copy12345_thumb.jpg',130, 87,1,'photo_8063132.html');
												thumbnails[8063134] = new thumbnail(8063134,'85031','','10_copy123456_thumb.jpg',130, 87,1,'photo_8063134.html');
												thumbnails[8063135] = new thumbnail(8063135,'85031','','11_copy1234_thumb.jpg',130, 87,1,'photo_8063135.html');
												thumbnails[8063138] = new thumbnail(8063138,'85031','','12_copy123_thumb.jpg',130, 87,1,'photo_8063138.html');
												thumbnails[8063140] = new thumbnail(8063140,'85031','','13_copy123_thumb.jpg',130, 87,1,'photo_8063140.html');
												thumbnails[8063142] = new thumbnail(8063142,'85031','','14_copy_thumb.jpg',130, 87,1,'photo_8063142.html');
												thumbnails[8063177] = new thumbnail(8063177,'431746','','1_jesus_thumb.jpg',130, 87,1,'photo_8063177.html');
												thumbnails[8063205] = new thumbnail(8063205,'431746','','2_jesus_thumb.jpg',130, 87,1,'photo_8063205.html');
												thumbnails[8063244] = new thumbnail(8063244,'431746','','3_jesus_thumb.jpg',130, 87,1,'photo_8063244.html');
												thumbnails[8063672] = new thumbnail(8063672,'431748','','1_Embajada_thumb.jpg',130, 87,1,'photo_8063672.html');
												thumbnails[8063678] = new thumbnail(8063678,'431748','','5_Embajada_thumb.jpg',130, 87,1,'photo_8063678.html');
												thumbnails[8063681] = new thumbnail(8063681,'431748','','2_Embajada_thumb.jpg',130, 87,1,'photo_8063681.html');
												thumbnails[8063691] = new thumbnail(8063691,'431748','','1_P_thumb.jpg',130, 87,1,'photo_8063691.html');
												thumbnails[8063693] = new thumbnail(8063693,'431748','','1_Pucon_thumb.jpg',130, 87,1,'photo_8063693.html');
												thumbnails[8063695] = new thumbnail(8063695,'431748','','1_Osorno_thumb.jpg',130, 78,1,'photo_8063695.html');
												thumbnails[8063696] = new thumbnail(8063696,'431748','','2_Osorrno_thumb.jpg',130, 101,1,'photo_8063696.html');
												thumbnails[8063699] = new thumbnail(8063699,'431748','','1_Temuco_thumb.jpg',130, 75,1,'photo_8063699.html');
												thumbnails[8063701] = new thumbnail(8063701,'431748','','2_Temuco_thumb.jpg',130, 105,1,'photo_8063701.html');
												thumbnails[8063702] = new thumbnail(8063702,'431748','','3_Temuco_thumb.jpg',130, 127,1,'photo_8063702.html');
												thumbnails[8063706] = new thumbnail(8063706,'431748','','5_Temuco_thumb.jpg',130, 87,1,'photo_8063706.html');
												thumbnails[8063708] = new thumbnail(8063708,'431748','','2_Villa_thumb.jpg',130, 87,1,'photo_8063708.html');
												thumbnails[8063709] = new thumbnail(8063709,'431748','','1_Villa_thumb.jpg',130, 87,1,'photo_8063709.html');
												thumbnails[8063711] = new thumbnail(8063711,'431748','','3_Villa_thumb.jpg',130, 87,1,'photo_8063711.html');
												thumbnails[8063712] = new thumbnail(8063712,'431748','','1_curarrehue_thumb.jpg',130, 64,1,'photo_8063712.html');
												thumbnails[8063714] = new thumbnail(8063714,'431748','','2_curarrehue_thumb.jpg',130, 87,1,'photo_8063714.html');
												thumbnails[8063717] = new thumbnail(8063717,'431748','','3_Villarrica_thumb.jpg',130, 89,1,'photo_8063717.html');
												thumbnails[8063718] = new thumbnail(8063718,'431748','','0_villarrica_thumb.jpg',130, 87,1,'photo_8063718.html');
												thumbnails[8063728] = new thumbnail(8063728,'431746','','2d_copy123_thumb.jpg',130, 195,1,'photo_8063728.html');
												thumbnails[8063729] = new thumbnail(8063729,'431746','','4_Galicia_thumb.jpg',130, 195,1,'photo_8063729.html');
												thumbnails[8063730] = new thumbnail(8063730,'431746','','2e_copy12_thumb.jpg',130, 195,1,'photo_8063730.html');
												thumbnails[8075405] = new thumbnail(8075405,'160512','','crop_72_dpi1_thumb.jpg',130, 171,1,'photo_8075405.html');
												thumbnails[8092429] = new thumbnail(8092429,'89661','','1_thumb.jpg',130, 87,1,'photo_8092429.html');
												thumbnails[8092430] = new thumbnail(8092430,'89661','','2_DD29211E-1EC9-DFB6-09772EBE9E140F25_thumb.JPG',130, 87,1,'photo_8092430.html');
												thumbnails[8092434] = new thumbnail(8092434,'432650','','Almagro_36X300_copy_721_thumb.jpg',130, 175,1,'photo_8092434.html');
												thumbnails[8092435] = new thumbnail(8092435,'432650','','Cruz_Hueyezca_36X300dpi_copy_72_thumb.jpg',130, 170,1,'photo_8092435.html');
												thumbnails[8092436] = new thumbnail(8092436,'432650','','DIPTICO_PRENSA_copy_72_thumb.jpg',130, 119,1,'photo_8092436.html');
												thumbnails[8092440] = new thumbnail(8092440,'432650','','Father_Francisco_Valdes_copy_72_thumb.jpg',130, 206,1,'photo_8092440.html');
												thumbnails[8092441] = new thumbnail(8092441,'432650','','Yo_ph_copy_thumb.jpg',130, 200,1,'photo_8092441.html');
												thumbnails[8092442] = new thumbnail(8092442,'432650','','inter_igle_viejas_ph_copy_thumb.jpg',130, 181,1,'photo_8092442.html');
												thumbnails[8092443] = new thumbnail(8092443,'432650','','IMG_0024_copy_thumb.jpg',130, 158,1,'photo_8092443.html');
												thumbnails[8092444] = new thumbnail(8092444,'432650','','copy_thumb.jpg',130, 158,1,'photo_8092444.html');
												thumbnails[8092445] = new thumbnail(8092445,'432650','','playa_vieja_ph_copy_thumb.jpg',130, 130,1,'photo_8092445.html');
												thumbnails[8092447] = new thumbnail(8092447,'432650','','Hotel_Pucon_Rony_copy_thumb.jpg',130, 89,1,'photo_8092447.html');
												thumbnails[8092448] = new thumbnail(8092448,'432650','','IMG_0002_copy_72_thumb.jpg',130, 86,1,'photo_8092448.html');
												thumbnails[8092451] = new thumbnail(8092451,'432650','','Vapor_Lago_Villarrica_1_copy_72_thumb.jpg',130, 83,1,'photo_8092451.html');
												thumbnails[8092452] = new thumbnail(8092452,'432650','','Pucon_0001_copy_thumb.jpg',130, 85,1,'photo_8092452.html');
												thumbnails[8092453] = new thumbnail(8092453,'432650','','parroquia_vieja_ph_copy_thumb.jpg',130, 71,1,'photo_8092453.html');
												thumbnails[8092456] = new thumbnail(8092456,'432650','','Nani_calle_Palguin_ph_copy_thumb.jpg',130, 88,1,'photo_8092456.html');
												thumbnails[8092457] = new thumbnail(8092457,'432650','','Nancy_Franz_Novia_ph_copy_thumb.jpg',130, 88,1,'photo_8092457.html');
												thumbnails[8092458] = new thumbnail(8092458,'432650','','mi_casa_ph_copy_thumb.jpg',130, 92,1,'photo_8092458.html');
												thumbnails[8092460] = new thumbnail(8092460,'432650','','IMG_0012_copy_72_thumb.jpg',130, 88,1,'photo_8092460.html');
												thumbnails[8092461] = new thumbnail(8092461,'432650','','IMG_0006_copy_721_thumb.jpg',130, 89,1,'photo_8092461.html');
												thumbnails[8092462] = new thumbnail(8092462,'432650','','IMG_0005_copy_72_thumb.jpg',130, 88,1,'photo_8092462.html');
												thumbnails[8092463] = new thumbnail(8092463,'432650','','IMG_0004_copy_72_thumb.jpg',130, 89,1,'photo_8092463.html');
												thumbnails[8092464] = new thumbnail(8092464,'432650','','cumpleaņos_ph_copy_thumb.jpg',130, 80,1,'photo_8092464.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[431746] = new gallery(431746,'8060789','B&N/B&W','gallery',[8060784,8060785,8060789,8060792,8060793,8060794,8060795,8060796,8060797,8060802,8060804,8060806,8060895,8060897,8060900,8063177,8063205,8063244,8063728,8063729,8063730],0, 0, '', 'gallery_431746.html',0,0);
				  					galleries[431744] = new gallery(431744,'1260151,1260148','Detalle/Close-up','gallery',[1260138,1260148,1260151,1260154,1260155,1260165],0, 0, '', 'gallery_431744.html',0,0);
				  					galleries[85059] = new gallery(85059,'8054857','Edificios/Buildings','gallery',[8054833,8054842,8054845,8054846,8054850,8054852,8054854,8054855,8054857,8054861,8054865,8054867,8054869,8054911,8054950],0, 0, '', 'gallery_85059.html',0,0);
				  					galleries[85058] = new gallery(85058,'8053702','El Novio/ The Groom','gallery',[8049756,8053617,8053700,8053702,8053703,8053704,8053707,8053710,8053711,8053717,8053720,8053721],0, 0, '', 'gallery_85058.html',0,0);
				  					galleries[85031] = new gallery(85031,'8063128','Gente/People','gallery',[8063124,8063126,8063128,8063130,8063132,8063134,8063135,8063138,8063140,8063142],0, 0, '', 'gallery_85031.html',0,0);
				  					galleries[89661] = new gallery(89661,'8060456','Interiores/Interiors','gallery',[8060413,8060420,8060424,8060427,8060433,8060434,8060436,8060437,8060438,8060440,8060441,8060456,8092429,8092430],0, 0, '', 'gallery_89661.html',0,0);
				  					galleries[431737] = new gallery(431737,'8055228,8055227','Los Grafitis/Graffiti','gallery',[8055144,8055145,8055152,8055154,8055155,8055156,8055157,8055226,8055227,8055228,8055229,8055239],0, 0, '', 'gallery_431737.html',0,0);
				  					galleries[431742] = new gallery(431742,'8061320','Los retratos/Portraits','gallery',[8061320,8061322,8061323,8061325,8061326,8061328,8061329,8061332,8061335,8061338,8061340,8061342],0, 0, '', 'gallery_431742.html',0,0);
				  					galleries[160514] = new gallery(160514,'8056029','Niņos/Children','gallery',[8056008,8056010,8056011,8056012,8056015,8056018,8056021,8056022,8056023,8056025,8056026,8056027,8056029],0, 0, '', 'gallery_160514.html',0,0);
				  					galleries[160512] = new gallery(160512,'8075405','Paisajes/Landscapes','gallery',[8055947,8055948,8055949,8055950,8055955,8055956,8055958,8055961,8055962,8055964,8055966,8055967,8055968,8055970,8055974,8055975,8055976,8059020,8059021,8059022,8059023,8059028,8059030,8059033,8059035,8059036,8059037,8059039,8059041,8059042,8059044,8059046,8059048,8059051,8059052,8063002,8075405],0, 0, '', 'gallery_160512.html',0,0);
				  					galleries[432650] = new gallery(432650,'8092434','Proyectos/Projects','gallery',[8092434,8092435,8092436,8092440,8092441,8092442,8092443,8092444,8092445,8092447,8092448,8092451,8092452,8092453,8092456,8092457,8092458,8092460,8092461,8092462,8092463,8092464],0, 0, '', 'gallery_432650.html',0,0);
				  					galleries[431743] = new gallery(431743,'8060487','Santiago Chile','gallery',[8060485,8060487,8060488,8060490,8060491,8060493,8060496,8060497,8060498,8060501],0, 0, '', 'gallery_431743.html',0,0);
				  					galleries[431748] = new gallery(431748,'8063702','Ultimas exposiciones/Latest exhibitions','gallery',[8063672,8063678,8063681,8063691,8063693,8063695,8063696,8063699,8063701,8063702,8063706,8063708,8063709,8063711,8063712,8063714,8063717,8063718],0, 0, '', 'gallery_431748.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '8048825';
imageSets[2] = '8092434,8075405,8063702,8063128,8061320,8060789,8060487,8060456,8056029,8055228,8055227,8054857,8053702,1260151,1260148';
imageSets[3] = '8092464,8092463,8092462,8092461,8092460,8092458,8092457,8092456,8092453,8092452,8092451,8092449,8092448,8092447,8092445,8092444,8092443,8092442,8092441,8092440,8092436,8092435,8092434,8092430,8092429,8075405,8063730,8063729,8063728,8063718,8063717,8063714,8063712,8063711,8063709,8063708,8063706,8063702,8063701,8063699,8063696,8063695,8063693,8063691,8063681,8063678,8063672,8063244,8063205,8063177';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/iberiatorreswest/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/iberiatorreswest/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'iberia torres abelaira photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

