window.thumbnails = {};
															thumbnails[887461] = clik.newPhoto({"id":887461,"src":"GS Album 51 sfjpg copy crop.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[887472] = clik.newPhoto({"id":887472,"src":"GS Album 55 xpjpg copy.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[887497] = clik.newPhoto({"id":887497,"src":"GS Album 52jpg copy.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[1783479] = clik.newPhoto({"id":1783479,"src":"Kev self portrait 058 copy low res_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":79,"caption":"","height":110});
															thumbnails[2264610] = clik.newPhoto({"id":2264610,"src":"packshots manual lens 002 copy 72dpi 8x6_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[7642591] = clik.newPhoto({"id":7642591,"src":"30DCshot51_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[2120400] = clik.newPhoto({"id":2120400,"src":"Charlie 004 copy 72 dpi_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[882246] = clik.newPhoto({"id":882246,"src":"GS Album 4jpg thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[2873528] = clik.newPhoto({"id":2873528,"src":"page013 copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[2873536] = clik.newPhoto({"id":2873536,"src":"page015 copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[2873509] = clik.newPhoto({"id":2873509,"src":"page011 copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":110,"caption":"","height":110});
															thumbnails[4282610] = clik.newPhoto({"id":4282610,"src":"Skill_Force_2_152_copy_72dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4282610.html","width":110,"caption":"","height":110});
															thumbnails[3997542] = clik.newPhoto({"id":3997542,"src":"Asia_House_005_copy_72dpi_low_res_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_3997542.html","width":110,"caption":"","height":110});
															thumbnails[4283038] = clik.newPhoto({"id":4283038,"src":"Book-Power070_copy_72dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4283038.html","width":110,"caption":"","height":110});
															thumbnails[2120475] = clik.newPhoto({"id":2120475,"src":"Seve Ballesteros_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120475.html","width":110,"caption":"","height":110});
															thumbnails[4282968] = clik.newPhoto({"id":4282968,"src":"Book-Power079_copy_72_dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4282968.html","width":110,"caption":"","height":110});
															thumbnails[3467582] = clik.newPhoto({"id":3467582,"src":"Epic_Trust_097_copy_72_dpi_copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_3467582.html","width":110,"caption":"","height":110});
															thumbnails[2425229] = clik.newPhoto({"id":2425229,"src":"SEA Renue 447 copy low res_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2425229.html","width":110,"caption":"","height":110});
															thumbnails[2120391] = clik.newPhoto({"id":2120391,"src":"Almunia 1_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120391.html","width":110,"caption":"","height":110});
															thumbnails[2123045] = clik.newPhoto({"id":2123045,"src":"Accenture 1 set Savoy 086_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2123045.html","width":110,"caption":"","height":110});
															thumbnails[2120467] = clik.newPhoto({"id":2120467,"src":"Royal Duja Group_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120467.html","width":110,"caption":"","height":110});
															thumbnails[2123066] = clik.newPhoto({"id":2123066,"src":"FISHERMEN_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2123066.html","width":110,"caption":"","height":110});
															thumbnails[2538106] = clik.newPhoto({"id":2538106,"src":"Buildaschool Kent County Show 08 186 copy 72 dpi copy website_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2538106.html","width":110,"caption":"","height":110});
															thumbnails[4282632] = clik.newPhoto({"id":4282632,"src":"Skill_Force_1_098_copy_72dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4282632.html","width":110,"caption":"","height":110});
															thumbnails[4228239] = clik.newPhoto({"id":4228239,"src":"Train_Crash001_copy__thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4228239.html","width":110,"caption":"","height":110});
															thumbnails[2268717] = clik.newPhoto({"id":2268717,"src":"EPV0196 copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2268717.html","width":110,"caption":"","height":110});
															thumbnails[2122885] = clik.newPhoto({"id":2122885,"src":"National Wedding Show Olympia Feb 06 023_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2122885.html","width":110,"caption":"","height":110});
															thumbnails[2122714] = clik.newPhoto({"id":2122714,"src":"Viva Espana 037 copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2122714.html","width":110,"caption":"","height":110});
															thumbnails[4304752] = clik.newPhoto({"id":4304752,"src":"Skill_Force_1_345_copy_72dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4304752.html","width":110,"caption":"","height":110});
															thumbnails[4283204] = clik.newPhoto({"id":4283204,"src":"Skill_Force_1_079_copy_72dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_4283204.html","width":110,"caption":"","height":110});
															thumbnails[2120445] = clik.newPhoto({"id":2120445,"src":"Mela 2006 101_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120445.html","width":110,"caption":"","height":110});
															thumbnails[2476632] = clik.newPhoto({"id":2476632,"src":"Buildaschool Kent County Show 08 221 72dpi low res 540_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2476632.html","width":110,"caption":"","height":110});
															thumbnails[2120367] = clik.newPhoto({"id":2120367,"src":"3025A_211_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120367.html","width":110,"caption":"","height":110});
															thumbnails[2425118] = clik.newPhoto({"id":2425118,"src":"SEA Renue 059 copy low res_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2425118.html","width":110,"caption":"","height":110});
															thumbnails[2120460] = clik.newPhoto({"id":2120460,"src":"MUSIC_SHOP_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120460.html","width":110,"caption":"","height":110});
															thumbnails[3467569] = clik.newPhoto({"id":3467569,"src":"Epic_Trust_176_copy_72_dpi_copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_3467569.html","width":110,"caption":"","height":110});
															thumbnails[2120403] = clik.newPhoto({"id":2120403,"src":"COSTA_DE_LA_LUZ_GIRL_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120403.html","width":110,"caption":"","height":110});
															thumbnails[2122736] = clik.newPhoto({"id":2122736,"src":"Spring Live 109 copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2122736.html","width":110,"caption":"","height":110});
															thumbnails[2123129] = clik.newPhoto({"id":2123129,"src":"AMERICAN_CAR_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2123129.html","width":110,"caption":"","height":110});
															thumbnails[2123152] = clik.newPhoto({"id":2123152,"src":"Cowes 2 yachts_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2123152.html","width":110,"caption":"","height":110});
															thumbnails[2120407] = clik.newPhoto({"id":2120407,"src":"Dirtbike 1_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120407.html","width":110,"caption":"","height":110});
															thumbnails[2120480] = clik.newPhoto({"id":2120480,"src":"Sven & Beardsley 1_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120480.html","width":110,"caption":"","height":110});
															thumbnails[2120396] = clik.newPhoto({"id":2120396,"src":"Canoist close up copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120396.html","width":110,"caption":"","height":110});
															thumbnails[2122713] = clik.newPhoto({"id":2122713,"src":"Viva Espana 315_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2122713.html","width":110,"caption":"","height":110});
															thumbnails[2120395] = clik.newPhoto({"id":2120395,"src":"BAJAN_TRACTOR_COPY_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120395.html","width":110,"caption":"","height":110});
															thumbnails[2120350] = clik.newPhoto({"id":2120350,"src":"3025A_06_COPY 600x450_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120350.html","width":110,"caption":"","height":110});
															thumbnails[3978223] = clik.newPhoto({"id":3978223,"src":"Asia_House_026_copy_72_dpi_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_3978223.html","width":110,"caption":"","height":110});
															thumbnails[2122834] = clik.newPhoto({"id":2122834,"src":"Spring Live 015_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2122834.html","width":110,"caption":"","height":110});
															thumbnails[2120471] = clik.newPhoto({"id":2120471,"src":"Sansom massage 1_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120471.html","width":110,"caption":"","height":110});
															thumbnails[2120420] = clik.newPhoto({"id":2120420,"src":"Dirtbike 3 copy_thumb.jpg","galleries_id":139853,"server_id":1,"link":"photo_2120420.html","width":110,"caption":"","height":110});
															thumbnails[2865377] = clik.newPhoto({"id":2865377,"src":"CPT Feb 07 306 copy 600 x 475 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2865377.html","width":110,"caption":"","height":110});
															thumbnails[2867172] = clik.newPhoto({"id":2867172,"src":"IMG_0313 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2867172.html","width":109,"caption":"","height":109});
															thumbnails[4228078] = clik.newPhoto({"id":4228078,"src":"Book_Power_1_034_mono_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_4228078.html","width":110,"caption":"","height":110});
															thumbnails[2122622] = clik.newPhoto({"id":2122622,"src":"Suzy copy1_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2122622.html","width":110,"caption":"","height":110});
															thumbnails[2425648] = clik.newPhoto({"id":2425648,"src":"SEA Renue 094 copy low res_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2425648.html","width":110,"caption":"","height":110});
															thumbnails[882207] = clik.newPhoto({"id":882207,"src":"CPT Feb 07 208 copy 600x475 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_882207.html","width":110,"caption":"","height":110});
															thumbnails[2036668] = clik.newPhoto({"id":2036668,"src":"Edwards 343 8x10 copy 72 dpi low res copy_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2036668.html","width":110,"caption":"","height":110});
															thumbnails[8892021] = clik.newPhoto({"id":8892021,"src":"Claire_High_Key_72dpi_crop_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_8892021.html","width":110,"caption":"","height":110});
															thumbnails[887402] = clik.newPhoto({"id":887402,"src":"Luca and Finty 17 Dec 06 537 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887402.html","width":110,"caption":"","height":110});
															thumbnails[887429] = clik.newPhoto({"id":887429,"src":"Joe Max Jack 416 copy 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887429.html","width":110,"caption":"","height":110});
															thumbnails[887387] = clik.newPhoto({"id":887387,"src":"Luca and Finty 17 Dec 06 429 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887387.html","width":110,"caption":"","height":110});
															thumbnails[887466] = clik.newPhoto({"id":887466,"src":"CPT Feb 07 632 copy 600x480 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887466.html","width":110,"caption":"","height":110});
															thumbnails[887432] = clik.newPhoto({"id":887432,"src":"Joe Max Jack 348 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887432.html","width":110,"caption":"","height":110});
															thumbnails[887515] = clik.newPhoto({"id":887515,"src":"Martin & Doug Shoot 072 copy 600x480 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887515.html","width":110,"caption":"","height":110});
															thumbnails[2036672] = clik.newPhoto({"id":2036672,"src":"Edwards 381 8x10 72 dpi copy 6x8_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2036672.html","width":110,"caption":"","height":110});
															thumbnails[888813] = clik.newPhoto({"id":888813,"src":"L copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_888813.html","width":110,"caption":"","height":110});
															thumbnails[888710] = clik.newPhoto({"id":888710,"src":"Martin & Doug Shoot 292 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_888710.html","width":110,"caption":"","height":110});
															thumbnails[2867577] = clik.newPhoto({"id":2867577,"src":"IMG_0199 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2867577.html","width":109,"caption":"","height":109});
															thumbnails[2037635] = clik.newPhoto({"id":2037635,"src":"CPT Feb 07 016 copy 72dpi low res_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2037635.html","width":110,"caption":"","height":110});
															thumbnails[2870110] = clik.newPhoto({"id":2870110,"src":"Charlie 013 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2870110.html","width":110,"caption":"","height":110});
															thumbnails[3467781] = clik.newPhoto({"id":3467781,"src":"Mel and Chris 3 186 copy 300 dpi 12x17cm curves and sharpen copy 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_3467781.html","width":110,"caption":"","height":110});
															thumbnails[2870981] = clik.newPhoto({"id":2870981,"src":"CPT Feb 07 474 copy_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2870981.html","width":110,"caption":"","height":110});
															thumbnails[2868288] = clik.newPhoto({"id":2868288,"src":"Mel-and-Chris-3-229 copy 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2868288.html","width":110,"caption":"","height":110});
															thumbnails[888755] = clik.newPhoto({"id":888755,"src":"Clair black copy crop.jpg","galleries_id":67723,"server_id":1,"link":"photo_888755.html","width":110,"caption":"","height":110});
															thumbnails[2870896] = clik.newPhoto({"id":2870896,"src":"Joe Max Jack 400 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2870896.html","width":110,"caption":"","height":110});
															thumbnails[882344] = clik.newPhoto({"id":882344,"src":"CPT Feb 07 232 copy_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_882344.html","width":110,"caption":"","height":110});
															thumbnails[888768] = clik.newPhoto({"id":888768,"src":"CPT Feb 07 606 copy enhance crop.jpg","galleries_id":67723,"server_id":1,"link":"photo_888768.html","width":110,"caption":"","height":110});
															thumbnails[887408] = clik.newPhoto({"id":887408,"src":"Luca and Finty 17 Dec 06 501 copy 72 dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887408.html","width":110,"caption":"","height":110});
															thumbnails[887503] = clik.newPhoto({"id":887503,"src":"Martin & Doug Shoot 018 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887503.html","width":110,"caption":"","height":110});
															thumbnails[2036520] = clik.newPhoto({"id":2036520,"src":"Edwards 267 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2036520.html","width":110,"caption":"","height":110});
															thumbnails[2867388] = clik.newPhoto({"id":2867388,"src":"IMG_0111 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2867388.html","width":110,"caption":"","height":110});
															thumbnails[887413] = clik.newPhoto({"id":887413,"src":"Luca and Finty 17 Dec 06 693 copy 72dpi_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_887413.html","width":110,"caption":"","height":110});
															thumbnails[2122641] = clik.newPhoto({"id":2122641,"src":"Barman copy_thumb.jpg","galleries_id":67723,"server_id":1,"link":"photo_2122641.html","width":110,"caption":"","height":110});
															thumbnails[7811325] = clik.newPhoto({"id":7811325,"src":"kitchen_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7811325.html","width":110,"caption":"","height":110});
															thumbnails[7811323] = clik.newPhoto({"id":7811323,"src":"Bedroom_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7811323.html","width":110,"caption":"","height":110});
															thumbnails[7688706] = clik.newPhoto({"id":7688706,"src":"ellie-108-Edit_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688706.html","width":110,"caption":"","height":110});
															thumbnails[7642649] = clik.newPhoto({"id":7642649,"src":"30DCshot41_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7642649.html","width":110,"caption":"","height":110});
															thumbnails[7688704] = clik.newPhoto({"id":7688704,"src":"ellie-86-Edit_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688704.html","width":110,"caption":"","height":110});
															thumbnails[7688670] = clik.newPhoto({"id":7688670,"src":"ellie-50-Edit_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688670.html","width":110,"caption":"","height":110});
															thumbnails[7688898] = clik.newPhoto({"id":7688898,"src":"test_shoot_bedroom-93_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688898.html","width":110,"caption":"","height":110});
															thumbnails[7865652] = clik.newPhoto({"id":7865652,"src":"Bev-42-Edit_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7865652.html","width":110,"caption":"","height":110});
															thumbnails[7688892] = clik.newPhoto({"id":7688892,"src":"ellie-132-Edit-3_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688892.html","width":110,"caption":"","height":110});
															thumbnails[7890563] = clik.newPhoto({"id":7890563,"src":"Ellie_House-9_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7890563.html","width":110,"caption":"","height":110});
															thumbnails[7642674] = clik.newPhoto({"id":7642674,"src":"30DC_shot_2123_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7642674.html","width":110,"caption":"","height":110});
															thumbnails[7890495] = clik.newPhoto({"id":7890495,"src":"Ellie_House-19_5x9_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7890495.html","width":110,"caption":"","height":110});
															thumbnails[7688721] = clik.newPhoto({"id":7688721,"src":"test_shoot_bedroom-179_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7688721.html","width":110,"caption":"","height":110});
															thumbnails[7865649] = clik.newPhoto({"id":7865649,"src":"Bev-72-Edit_72dpi_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7865649.html","width":110,"caption":"","height":110});
															thumbnails[7642665] = clik.newPhoto({"id":7642665,"src":"30DCshot_3_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_7642665.html","width":110,"caption":"","height":110});
															thumbnails[2120386] = clik.newPhoto({"id":2120386,"src":"Accenture 1 set Savoy 011 res 9_thumb.jpg","galleries_id":413626,"server_id":1,"link":"photo_2120386.html","width":110,"caption":"","height":110});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[67723] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery.html","maxRecords":0.0,"photoIDs":[2865377.0,2867172.0,4228078.0,2122622.0,2425648.0,882207.0,2036668.0,8892021.0,887402.0,887429.0,887387.0,887466.0,887432.0,887515.0,2036672.0,888813.0,888710.0,2867577.0,2037635.0,2870110.0,3467781.0,2870981.0,2868288.0,888755.0,2870896.0,882344.0,888768.0,887408.0,887503.0,2036520.0,2867388.0,887413.0,2122641.0],"skipIndex":0,"section_code":"gallery","featured_images":"8892021,4228078,3467781,2870981,2870896,2870110,2868288,2867577,2867388,2867172","id":67723,"singleSection":true});				  						galleries[139853] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PR & Corporate ","link":"section180392.html","maxRecords":0.0,"photoIDs":[4282610.0,3997542.0,4283038.0,2120475.0,4282968.0,3467582.0,2425229.0,2120391.0,2123045.0,2120467.0,2123066.0,2538106.0,4282632.0,4228239.0,2268717.0,2122885.0,2122714.0,4304752.0,4283204.0,2120445.0,2476632.0,2120367.0,2425118.0,2120460.0,3467569.0,2120403.0,2122736.0,2123129.0,2123152.0,2120407.0,2120480.0,2120396.0,2122713.0,2120395.0,2120350.0,3978223.0,2122834.0,2120471.0,2120420.0],"skipIndex":0,"section_code":"section180392","featured_images":"4282632,4282610","id":139853,"singleSection":true});				  						galleries[413626] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Interiors","link":"section495065.html","maxRecords":0.0,"photoIDs":[7811325.0,7811323.0,7688706.0,7642649.0,7688704.0,7688670.0,7688898.0,7865652.0,7688892.0,7890563.0,7642674.0,7890495.0,7688721.0,7865649.0,7642665.0,2120386.0],"skipIndex":0,"section_code":"section495065","featured_images":7642674.0,"id":413626,"singleSection":true});				  						galleries[134033] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Calamity Jane","link":"section173644.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section173644","featured_images":"","id":134033,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7811323,4282610,4228078,7642649,7688704,3997542,2122622,4283038,2120475,7642674,4282968,2425229,2120391,2123045,2120467,4282632,2120445,888755,2122736,2123129,2123152,2120407,2122641';
imageSets[2] = '4282610,7642674,4282632';
imageSets[3] = '8892021,7890563,7890495,7865652,7865649,7811325,7811323,7688898,7688892,7688721,7688706,7688704,7688670,7642674,7642665,7642649,7642591,4304752,4283204,4283038,4282968,4282632,4282610,4228239,4228078,3997542,3978223,3467781,3467582,3467569,2873536,2873528,2873509,2870981,2870896,2870110,2868288,2867577,2867388,2867172,2865377,2538106,2476632,2425648,2425229,2425118,2268717,2264610,2123152,2123129';
imageSets[232066] = '887472';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/swagman/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/swagman/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/swagman/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 || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section180392.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 && 'section180392' != '') {
					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:'',$detailContainer:'',
                    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 (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Kevin Alderman Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		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));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			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', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="kevalderman@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="kevalderman@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* 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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

