window.thumbnails = {};
															thumbnails[5368814] = clik.newPhoto({"id":5368814,"src":"CMC_copy4_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":20});
															thumbnails[5915691] = clik.newPhoto({"id":5915691,"src":"Blank4_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":9});
															thumbnails[5921569] = clik.newPhoto({"id":5921569,"src":"Blank2_thumb1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":9});
															thumbnails[7398478] = clik.newPhoto({"id":7398478,"src":"Blank2_thumb_1518EF7F-24E8-5EC4-4F0F5A688CD67382_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":9});
															thumbnails[4013596] = clik.newPhoto({"id":4013596,"src":"Back_to_my_roots_1_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_4013596.html","width":130,"caption":"","height":121});
															thumbnails[3954349] = clik.newPhoto({"id":3954349,"src":"3636569694_062634c5bb_b_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_3954349.html","width":130,"caption":"","height":112});
															thumbnails[3756801] = clik.newPhoto({"id":3756801,"src":"3635589765_947f8152f2_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3756801.html","width":130,"caption":"","height":112});
															thumbnails[3744832] = clik.newPhoto({"id":3744832,"src":"3636492790_586b76a8b8_b_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_3744832.html","width":130,"caption":"","height":165});
															thumbnails[3745242] = clik.newPhoto({"id":3745242,"src":"3635589765_f2e92e025b_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3745242.html","width":130,"caption":"","height":112});
															thumbnails[3334390] = clik.newPhoto({"id":3334390,"src":"3639788296_e74fcb18a6_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3334390.html","width":130,"caption":"","height":104});
															thumbnails[3310232] = clik.newPhoto({"id":3310232,"src":"3197202078_59ddee13f2_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_3310232.html","width":130,"caption":"","height":190});
															thumbnails[3328294] = clik.newPhoto({"id":3328294,"src":"3209632964_bbe9bb698e_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_3328294.html","width":130,"caption":"","height":130});
															thumbnails[3310322] = clik.newPhoto({"id":3310322,"src":"3636569694_c7128a4d8b_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3310322.html","width":130,"caption":"","height":112});
															thumbnails[3266572] = clik.newPhoto({"id":3266572,"src":"Rutland Water By CMC Photography1_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3266572.html","width":130,"caption":"","height":130});
															thumbnails[2745150] = clik.newPhoto({"id":2745150,"src":"2839078303_b5fd99cc0a_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2745150.html","width":130,"caption":"","height":82});
															thumbnails[2901032] = clik.newPhoto({"id":2901032,"src":"2922204210_c5fd56d7c8_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2901032.html","width":129,"caption":"","height":86});
															thumbnails[2257328] = clik.newPhoto({"id":2257328,"src":"2710435972_43a51ac506_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2257328.html","width":130,"caption":"","height":76});
															thumbnails[2417781] = clik.newPhoto({"id":2417781,"src":"2689770663_20429234b8_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2417781.html","width":130,"caption":"","height":87});
															thumbnails[2257553] = clik.newPhoto({"id":2257553,"src":"2637462406_f2f4f405cc1_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2257553.html","width":130,"caption":"","height":87});
															thumbnails[2279894] = clik.newPhoto({"id":2279894,"src":"2637446122_354e1ac5961_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2279894.html","width":130,"caption":"","height":87});
															thumbnails[2257105] = clik.newPhoto({"id":2257105,"src":"Skye on Skye_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2257105.html","width":130,"caption":"","height":87});
															thumbnails[2257472] = clik.newPhoto({"id":2257472,"src":"2641634289_c4c32d3da51_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2257472.html","width":130,"caption":"","height":87});
															thumbnails[2422049] = clik.newPhoto({"id":2422049,"src":"Snow Capped_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2422049.html","width":130,"caption":"","height":133});
															thumbnails[2260786] = clik.newPhoto({"id":2260786,"src":"By the side of the road 3_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2260786.html","width":130,"caption":"","height":87});
															thumbnails[2258909] = clik.newPhoto({"id":2258909,"src":"Foxton Canal_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2258909.html","width":130,"caption":"","height":87});
															thumbnails[2256994] = clik.newPhoto({"id":2256994,"src":"Blowing a Gale_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2256994.html","width":130,"caption":"","height":87});
															thumbnails[2260038] = clik.newPhoto({"id":2260038,"src":"3635576605_ff1980f477_b-1_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2260038.html","width":130,"caption":"","height":112});
															thumbnails[2425549] = clik.newPhoto({"id":2425549,"src":"Bradgate Park_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2425549.html","width":130,"caption":"","height":135});
															thumbnails[2414696] = clik.newPhoto({"id":2414696,"src":"279421553_39d956ebb7_o_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2414696.html","width":130,"caption":"","height":87});
															thumbnails[2404733] = clik.newPhoto({"id":2404733,"src":"Sunday_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2404733.html","width":130,"caption":"","height":87});
															thumbnails[3456115] = clik.newPhoto({"id":3456115,"src":"3638738471_85197f7d42_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_3456115.html","width":130,"caption":"","height":112});
															thumbnails[3456167] = clik.newPhoto({"id":3456167,"src":"3635589765_78dc5dc57a_b_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_3456167.html","width":130,"caption":"","height":112});
															thumbnails[4013598] = clik.newPhoto({"id":4013598,"src":"3635576605_353624082a_b_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_4013598.html","width":130,"caption":"","height":103});
															thumbnails[4066579] = clik.newPhoto({"id":4066579,"src":"3635576605_1c1fe3f1ca_b_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_4066579.html","width":130,"caption":"","height":112});
															thumbnails[4066587] = clik.newPhoto({"id":4066587,"src":"3617226785_7bb10e4ccd_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_4066587.html","width":130,"caption":"","height":188});
															thumbnails[4066595] = clik.newPhoto({"id":4066595,"src":"3618009718_d1ab434982_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_4066595.html","width":130,"caption":"","height":87});
															thumbnails[4113952] = clik.newPhoto({"id":4113952,"src":"3639626758_0b26184f3e_o_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_4113952.html","width":130,"caption":"","height":71});
															thumbnails[4114555] = clik.newPhoto({"id":4114555,"src":"3639706778_3a4e8153ef_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_4114555.html","width":130,"caption":"","height":112});
															thumbnails[4162440] = clik.newPhoto({"id":4162440,"src":"3657525193_86dba73a05_b_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_4162440.html","width":130,"caption":"","height":110});
															thumbnails[4162467] = clik.newPhoto({"id":4162467,"src":"3657525193_d3c384c3ec_b_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_4162467.html","width":130,"caption":"","height":110});
															thumbnails[5315212] = clik.newPhoto({"id":5315212,"src":"Lochcarron_Sunrise1_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_5315212.html","width":130,"caption":"","height":109});
															thumbnails[5315303] = clik.newPhoto({"id":5315303,"src":"Torringdon_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_5315303.html","width":130,"caption":"","height":109});
															thumbnails[5315419] = clik.newPhoto({"id":5315419,"src":"portlock1_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_5315419.html","width":130,"caption":"","height":109});
															thumbnails[5315499] = clik.newPhoto({"id":5315499,"src":"Whitterings_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_5315499.html","width":130,"caption":"","height":109});
															thumbnails[5917072] = clik.newPhoto({"id":5917072,"src":"Blank7_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_5917072.html","width":130,"caption":"","height":9});
															thumbnails[5917077] = clik.newPhoto({"id":5917077,"src":"Blank8_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_5917077.html","width":130,"caption":"","height":9});
															thumbnails[5934456] = clik.newPhoto({"id":5934456,"src":"4594989232_d74b71e6ca_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934456.html","width":130,"caption":"","height":87});
															thumbnails[5934457] = clik.newPhoto({"id":5934457,"src":"4594989018_2e3af5fc1d_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934457.html","width":130,"caption":"","height":87});
															thumbnails[5934458] = clik.newPhoto({"id":5934458,"src":"4594373265_d57b1471be_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934458.html","width":130,"caption":"","height":87});
															thumbnails[5934459] = clik.newPhoto({"id":5934459,"src":"4594373129_505db9c046_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934459.html","width":130,"caption":"","height":87});
															thumbnails[5934460] = clik.newPhoto({"id":5934460,"src":"4594989498_d90c3b11d1_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934460.html","width":130,"caption":"","height":87});
															thumbnails[5936819] = clik.newPhoto({"id":5936819,"src":"28824_395719220237_300338750237_3958104_3114881_n_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5936819.html","width":130,"caption":"","height":87});
															thumbnails[5934455] = clik.newPhoto({"id":5934455,"src":"Blank_817359B2-24E8-5EC4-4F0157D7C562B1B2_thumb.jpg","galleries_id":334811,"server_id":32,"link":"photo_5934455.html","width":130,"caption":"","height":9});
															thumbnails[2258778] = clik.newPhoto({"id":2258778,"src":"Castle 4_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2258778.html","width":130,"caption":"","height":97});
															thumbnails[2258110] = clik.newPhoto({"id":2258110,"src":"Glencoe_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2258110.html","width":130,"caption":"","height":111});
															thumbnails[2260823] = clik.newPhoto({"id":2260823,"src":"bradgate Crop_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2260823.html","width":130,"caption":"","height":140});
															thumbnails[2256789] = clik.newPhoto({"id":2256789,"src":"Waterfall7_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2256789.html","width":130,"caption":"","height":195});
															thumbnails[2423624] = clik.newPhoto({"id":2423624,"src":"Swithland_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2423624.html","width":130,"caption":"","height":195});
															thumbnails[2258772] = clik.newPhoto({"id":2258772,"src":"lighthouse_thumb.jpg","galleries_id":148250,"server_id":32,"link":"photo_2258772.html","width":130,"caption":"","height":195});
															thumbnails[2258001] = clik.newPhoto({"id":2258001,"src":"Up a high_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2258001.html","width":130,"caption":"","height":88});
															thumbnails[2258949] = clik.newPhoto({"id":2258949,"src":"Canal_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2258949.html","width":130,"caption":"","height":195});
															thumbnails[2258783] = clik.newPhoto({"id":2258783,"src":"3638684845_0716a5a923_b_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2258783.html","width":130,"caption":"","height":114});
															thumbnails[2258880] = clik.newPhoto({"id":2258880,"src":"sunrise3_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2258880.html","width":130,"caption":"","height":147});
															thumbnails[2259207] = clik.newPhoto({"id":2259207,"src":"Backwash on groins_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2259207.html","width":130,"caption":"","height":135});
															thumbnails[2416616] = clik.newPhoto({"id":2416616,"src":"Sun Drenched Kilve Beach_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2416616.html","width":130,"caption":"","height":120});
															thumbnails[2257304] = clik.newPhoto({"id":2257304,"src":"Washed Up_thumb.jpg","galleries_id":211939,"server_id":32,"link":"photo_2257304.html","width":130,"caption":"","height":189});
															thumbnails[2404509] = clik.newPhoto({"id":2404509,"src":"Tree Reflection Mono Tone_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2404509.html","width":130,"caption":"","height":184});
															thumbnails[2415122] = clik.newPhoto({"id":2415122,"src":"Warmth on a cold day b-w_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2415122.html","width":130,"caption":"","height":187});
															thumbnails[2427332] = clik.newPhoto({"id":2427332,"src":"2645915713_38063539121_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2427332.html","width":130,"caption":"","height":195});
															thumbnails[2423849] = clik.newPhoto({"id":2423849,"src":"Rutland_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2423849.html","width":130,"caption":"","height":195});
															thumbnails[2258980] = clik.newPhoto({"id":2258980,"src":"Falls_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_2258980.html","width":130,"caption":"","height":202});
															thumbnails[5917084] = clik.newPhoto({"id":5917084,"src":"Blank9_thumb.jpg","galleries_id":148251,"server_id":32,"link":"photo_5917084.html","width":130,"caption":"","height":9});
															thumbnails[3689212] = clik.newPhoto({"id":3689212,"src":"Blank1_thumb.jpg","galleries_id":220601,"server_id":32,"link":"photo_3689212.html","width":130,"caption":"","height":9});
															thumbnails[5368887] = clik.newPhoto({"id":5368887,"src":"Blank2_thumb.jpg","galleries_id":332205,"server_id":32,"link":"photo_5368887.html","width":130,"caption":"","height":9});
															thumbnails[5915685] = clik.newPhoto({"id":5915685,"src":"Blank3_thumb.jpg","galleries_id":283787,"server_id":32,"link":"photo_5915685.html","width":130,"caption":"","height":9});
															thumbnails[5915694] = clik.newPhoto({"id":5915694,"src":"Blank5_thumb.jpg","galleries_id":232266,"server_id":32,"link":"photo_5915694.html","width":130,"caption":"","height":9});
															thumbnails[7938336] = clik.newPhoto({"id":7938336,"src":"Blank_thumb_thumb.jpg","galleries_id":423365,"server_id":32,"link":"photo_7938336.html","width":130,"caption":"","height":9});
															thumbnails[5915430] = clik.newPhoto({"id":5915430,"src":"Blank_thumb.jpg","galleries_id":334181,"server_id":32,"link":"photo_5915430.html","width":130,"caption":"","height":9});
															thumbnails[5915697] = clik.newPhoto({"id":5915697,"src":"Blank6_thumb.jpg","galleries_id":221667,"server_id":32,"link":"photo_5915697.html","width":130,"caption":"","height":9});
															thumbnails[5921565] = clik.newPhoto({"id":5921565,"src":"Blank2_thumb_thumb.jpg","galleries_id":334184,"server_id":32,"link":"photo_5921565.html","width":130,"caption":"","height":9});
															thumbnails[7059361] = clik.newPhoto({"id":7059361,"src":"Blank2_thumb_50FE6F9C-1D09-001F-99C240D38E427783_thumb.jpg","galleries_id":382130,"server_id":32,"link":"photo_7059361.html","width":130,"caption":"","height":9});
															thumbnails[7059365] = clik.newPhoto({"id":7059365,"src":"Blank2_thumb_50FED972-1D09-001F-995064F491CF370F_thumb.jpg","galleries_id":382131,"server_id":32,"link":"photo_7059365.html","width":130,"caption":"","height":9});
															thumbnails[9019131] = clik.newPhoto({"id":9019131,"src":"Blank2_thumb_1518EF7F-24E8-5EC4-4F0F5A688CD67382_thumb_17527D17-24E8-5EC4-4F1EF5E489A38E27_thumb.jpg","galleries_id":475352,"server_id":32,"link":"photo_9019131.html","width":130,"caption":"","height":9});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[332205] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" Bump 2 Birth","link":"section270532_332205.html","maxRecords":0.0,"photoIDs":[5368887.0],"skipIndex":0,"section_code":"section270532","featured_images":5368887.0,"id":332205,"singleSection":false});				  						galleries[220601] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Family Portraits","link":"section270532_220601.html","maxRecords":0.0,"photoIDs":[3689212.0],"skipIndex":0,"section_code":"section270532","featured_images":3689212.0,"id":220601,"singleSection":false});				  						galleries[475352] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Modelling ","link":"section400289_475352.html","maxRecords":0.0,"photoIDs":[9019131.0],"skipIndex":0,"section_code":"section400289","featured_images":9019131.0,"id":475352,"singleSection":false});				  						galleries[423365] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Underwater ","link":"section270532_423365.html","maxRecords":0.0,"photoIDs":[7938336.0],"skipIndex":0,"section_code":"section270532","featured_images":7938336.0,"id":423365,"singleSection":false});				  						galleries[383637] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Warp Speed","link":"section357668_383637.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section357668","featured_images":"","id":383637,"singleSection":false});				  						galleries[299176] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"City Life, Leicester","link":"section357668_299176.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section357668","featured_images":"","id":299176,"singleSection":false});				  						galleries[283787] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"School Photography","link":"section270532_283787.html","maxRecords":0.0,"photoIDs":[5915685.0],"skipIndex":0,"section_code":"section270532","featured_images":5915685.0,"id":283787,"singleSection":false});				  						galleries[334184] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Products","link":"section400289_334184.html","maxRecords":0.0,"photoIDs":[5921565.0],"skipIndex":0,"section_code":"section400289","featured_images":5921565.0,"id":334184,"singleSection":false});				  						galleries[211939] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Waterscapes","link":"gallery_211939.html","maxRecords":0.0,"photoIDs":[3756801.0,3745242.0,3334390.0,3310322.0,3266572.0,2745150.0,2901032.0,2257328.0,2417781.0,2257553.0,2279894.0,2257472.0,2258909.0,3456115.0,4066595.0,4114555.0,5315212.0,5315499.0,5917077.0,2256789.0,2423624.0,2258949.0,2258783.0,2258880.0,2259207.0,2416616.0,2257304.0],"skipIndex":0,"section_code":"gallery","featured_images":5917077.0,"id":211939,"singleSection":false});				  						galleries[148250] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_148250.html","maxRecords":0.0,"photoIDs":[4013596.0,3954349.0,2257105.0,2422049.0,2260786.0,2256994.0,2260038.0,2425549.0,2404733.0,3456167.0,4066579.0,4162440.0,4162467.0,5315303.0,5917072.0,2258778.0,2258110.0,2260823.0,2258772.0],"skipIndex":0,"section_code":"gallery","featured_images":5917072.0,"id":148250,"singleSection":false});				  						galleries[382130] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Corporate ","link":"section400289_382130.html","maxRecords":0.0,"photoIDs":[7059361.0],"skipIndex":0,"section_code":"section400289","featured_images":7059361.0,"id":382130,"singleSection":false});				  						galleries[148251] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black & White","link":"gallery_148251.html","maxRecords":0.0,"photoIDs":[3744832.0,3310232.0,3328294.0,2414696.0,4013598.0,4066587.0,4113952.0,5315419.0,2258001.0,2404509.0,2415122.0,2427332.0,2423849.0,2258980.0,5917084.0],"skipIndex":0,"section_code":"gallery","featured_images":5917084.0,"id":148251,"singleSection":false});				  						galleries[382131] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial","link":"section400289_382131.html","maxRecords":0.0,"photoIDs":[7059365.0],"skipIndex":0,"section_code":"section400289","featured_images":7059365.0,"id":382131,"singleSection":false});				  						galleries[334811] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Floral ","link":"gallery_334811.html","maxRecords":0.0,"photoIDs":[5934456.0,5934457.0,5934458.0,5934459.0,5934460.0,5936819.0,5934455.0],"skipIndex":0,"section_code":"gallery","featured_images":5934455.0,"id":334811,"singleSection":false});				  						galleries[232266] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pets Corner","link":"section270532_232266.html","maxRecords":0.0,"photoIDs":[5915694.0],"skipIndex":0,"section_code":"section270532","featured_images":5915694.0,"id":232266,"singleSection":false});				  						galleries[334181] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Website Build","link":"section400289_334181.html","maxRecords":0.0,"photoIDs":[5915430.0],"skipIndex":0,"section_code":"section400289","featured_images":5915430.0,"id":334181,"singleSection":false});				  						galleries[230473] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People at work","link":"section357668_230473.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section357668","featured_images":"","id":230473,"singleSection":false});				  						galleries[221667] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Restoration ","link":"section400289_221667.html","maxRecords":0.0,"photoIDs":[5915697.0],"skipIndex":0,"section_code":"section400289","featured_images":5915697.0,"id":221667,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5915430';
imageSets[2] = '5921569,5921565,5917077,5917072,5915697,5915694,5915691,5915685,5368887,3689212,5934455,5917084';
imageSets[3] = '9019131,7938336,7398478,7059365,7059361,5936819,5934460,5934459,5934458,5934457,5934456,5934455,5921569,5921565,5917084,5917077,5917072,5915697,5915694,5915691,5915685,5915430,5368887,5368814,5315499,5315419,5315303,5315212,4162467,4162440,4114555,4113952,4066595,4066587,4066579,4013598,4013596,3954349,3756801,3745242,3744832,3689212,3456167,3456115,3334390,3328294,3310322,3310232,3266572,2901032';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/craigcamp/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/craigcamp/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 += '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:'',$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 = 'Craig Michael Camp Photography, CMC 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="kraigsta@mac.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="kraigsta@mac.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;
	}
}

			

