window.thumbnails = {};
															thumbnails[6051598] = clik.newPhoto({"id":6051598,"src":"010xx_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":104});
															thumbnails[1965934] = clik.newPhoto({"id":1965934,"src":"DSC_2231x copy_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1965934.html","width":130,"caption":"","height":130});
															thumbnails[1965935] = clik.newPhoto({"id":1965935,"src":"DSC_2256 copy_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1965935.html","width":130,"caption":"","height":87});
															thumbnails[1965936] = clik.newPhoto({"id":1965936,"src":"Square design 1_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1965936.html","width":130,"caption":"","height":127});
															thumbnails[1969185] = clik.newPhoto({"id":1969185,"src":"DSC_22661_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1969185.html","width":130,"caption":"","height":108});
															thumbnails[1969425] = clik.newPhoto({"id":1969425,"src":"DSC_2175 xx copy1_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1969425.html","width":130,"caption":"","height":87});
															thumbnails[1969429] = clik.newPhoto({"id":1969429,"src":"DSC_2246 x copy_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_1969429.html","width":130,"caption":"","height":108});
															thumbnails[2437796] = clik.newPhoto({"id":2437796,"src":"DSC_4454_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_2437796.html","width":130,"caption":"","height":104});
															thumbnails[2441080] = clik.newPhoto({"id":2441080,"src":"_DSC0634 B&W x_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_2441080.html","width":130,"caption":"","height":130});
															thumbnails[2441082] = clik.newPhoto({"id":2441082,"src":"_DSC0638 B&W x_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_2441082.html","width":130,"caption":"","height":130});
															thumbnails[2441086] = clik.newPhoto({"id":2441086,"src":"_DSC0644B&W x_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_2441086.html","width":130,"caption":"","height":104});
															thumbnails[4280850] = clik.newPhoto({"id":4280850,"src":"Mel__Joe_-_137_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_4280850.html","width":130,"caption":"","height":93});
															thumbnails[4280893] = clik.newPhoto({"id":4280893,"src":"Mel__Joe_-_202_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_4280893.html","width":130,"caption":"","height":93});
															thumbnails[4287966] = clik.newPhoto({"id":4287966,"src":"Mel__Joe_-_3061_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_4287966.html","width":130,"caption":"","height":81});
															thumbnails[8622633] = clik.newPhoto({"id":8622633,"src":"DSC_4752_thumb.jpg","galleries_id":455625,"server_id":19,"link":"photo_8622633.html","width":130,"caption":"","height":173});
															thumbnails[8627805] = clik.newPhoto({"id":8627805,"src":"DSC_4756_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627805.html","width":130,"caption":"","height":77});
															thumbnails[8627807] = clik.newPhoto({"id":8627807,"src":"DSC_4762_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627807.html","width":130,"caption":"","height":146});
															thumbnails[8627809] = clik.newPhoto({"id":8627809,"src":"DSC_4782_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627809.html","width":130,"caption":"","height":96});
															thumbnails[8627811] = clik.newPhoto({"id":8627811,"src":"DSC_4798_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627811.html","width":130,"caption":"","height":194});
															thumbnails[8627812] = clik.newPhoto({"id":8627812,"src":"DSC_4827_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627812.html","width":130,"caption":"","height":106});
															thumbnails[8627813] = clik.newPhoto({"id":8627813,"src":"DSC_4828_BW_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627813.html","width":130,"caption":"","height":93});
															thumbnails[8627814] = clik.newPhoto({"id":8627814,"src":"DSC_4836_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627814.html","width":130,"caption":"","height":120});
															thumbnails[8627815] = clik.newPhoto({"id":8627815,"src":"DSC_4862_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627815.html","width":130,"caption":"","height":188});
															thumbnails[8627816] = clik.newPhoto({"id":8627816,"src":"DSC_4865_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627816.html","width":130,"caption":"","height":280});
															thumbnails[8627817] = clik.newPhoto({"id":8627817,"src":"DSC_4952_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627817.html","width":130,"caption":"","height":88});
															thumbnails[8627818] = clik.newPhoto({"id":8627818,"src":"DSC_4984_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627818.html","width":130,"caption":"","height":102});
															thumbnails[8627819] = clik.newPhoto({"id":8627819,"src":"DSC_5000_-_Version_2_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627819.html","width":130,"caption":"","height":99});
															thumbnails[8627820] = clik.newPhoto({"id":8627820,"src":"DSC_5004_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627820.html","width":130,"caption":"","height":88});
															thumbnails[8627821] = clik.newPhoto({"id":8627821,"src":"DSC_5005_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627821.html","width":130,"caption":"","height":87});
															thumbnails[8627822] = clik.newPhoto({"id":8627822,"src":"DSC_5056_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627822.html","width":130,"caption":"","height":87});
															thumbnails[8627823] = clik.newPhoto({"id":8627823,"src":"DSC_5076_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627823.html","width":130,"caption":"","height":87});
															thumbnails[8627825] = clik.newPhoto({"id":8627825,"src":"DSC_5141_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627825.html","width":130,"caption":"","height":93});
															thumbnails[8627826] = clik.newPhoto({"id":8627826,"src":"DSC_5143_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627826.html","width":130,"caption":"","height":91});
															thumbnails[8627828] = clik.newPhoto({"id":8627828,"src":"DSC_5150_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627828.html","width":130,"caption":"","height":77});
															thumbnails[8627830] = clik.newPhoto({"id":8627830,"src":"DSC_5157_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627830.html","width":130,"caption":"","height":71});
															thumbnails[8627837] = clik.newPhoto({"id":8627837,"src":"DSC_5164_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627837.html","width":130,"caption":"","height":87});
															thumbnails[8627862] = clik.newPhoto({"id":8627862,"src":"DSC_5165_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627862.html","width":130,"caption":"","height":194});
															thumbnails[8627863] = clik.newPhoto({"id":8627863,"src":"DSC_5168_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627863.html","width":130,"caption":"","height":87});
															thumbnails[8627873] = clik.newPhoto({"id":8627873,"src":"P1010193_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627873.html","width":130,"caption":"","height":98});
															thumbnails[8627874] = clik.newPhoto({"id":8627874,"src":"P1010198_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627874.html","width":130,"caption":"","height":160});
															thumbnails[8627876] = clik.newPhoto({"id":8627876,"src":"P1010168_thumb.jpg","galleries_id":455625,"server_id":37,"link":"photo_8627876.html","width":130,"caption":"","height":98});
															thumbnails[1269704] = clik.newPhoto({"id":1269704,"src":"Banford_157_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1269704.html","width":130,"caption":"St Thomas of Canterbury, Kingswear","height":93});
															thumbnails[2373375] = clik.newPhoto({"id":2373375,"src":"Reilly-031 x_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_2373375.html","width":130,"caption":"","height":201});
															thumbnails[1801772] = clik.newPhoto({"id":1801772,"src":"493x_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1801772.html","width":130,"caption":"","height":163});
															thumbnails[1801773] = clik.newPhoto({"id":1801773,"src":"502 x_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1801773.html","width":130,"caption":"","height":163});
															thumbnails[1801758] = clik.newPhoto({"id":1801758,"src":"140 7x53_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1801758.html","width":130,"caption":"","height":182});
															thumbnails[1802698] = clik.newPhoto({"id":1802698,"src":"Pike-111 B&W2_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1802698.html","width":130,"caption":"","height":93});
															thumbnails[2402616] = clik.newPhoto({"id":2402616,"src":"Reilly-114xx_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_2402616.html","width":130,"caption":"","height":106});
															thumbnails[3371382] = clik.newPhoto({"id":3371382,"src":"Watergate Bay Jan 09-016_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371382.html","width":130,"caption":"Ross","height":87});
															thumbnails[3371406] = clik.newPhoto({"id":3371406,"src":"Watergate Bay Jan 09-040_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_3371406.html","width":130,"caption":"Molly","height":170});
															thumbnails[4383129] = clik.newPhoto({"id":4383129,"src":"Leo_1_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_4383129.html","width":130,"caption":"Leo ","height":92});
															thumbnails[4383131] = clik.newPhoto({"id":4383131,"src":"Monty_1_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_4383131.html","width":130,"caption":"Monty ","height":97});
															thumbnails[1802687] = clik.newPhoto({"id":1802687,"src":"Pike-090 x2_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1802687.html","width":130,"caption":"","height":130});
															thumbnails[2402619] = clik.newPhoto({"id":2402619,"src":"Reilly-128 B&W_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_2402619.html","width":130,"caption":"","height":81});
															thumbnails[1801761] = clik.newPhoto({"id":1801761,"src":"184_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_1801761.html","width":130,"caption":"","height":130});
															thumbnails[4467819] = clik.newPhoto({"id":4467819,"src":"Kirsty__-_015_bw_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_4467819.html","width":130,"caption":"","height":82});
															thumbnails[2373652] = clik.newPhoto({"id":2373652,"src":"Reilly-065 copy_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_2373652.html","width":130,"caption":"","height":173});
															thumbnails[2373658] = clik.newPhoto({"id":2373658,"src":"Reilly-082_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_2373658.html","width":130,"caption":"","height":85});
															thumbnails[3371407] = clik.newPhoto({"id":3371407,"src":"Watergate Bay Jan 09-041_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_3371407.html","width":130,"caption":"Molly","height":154});
															thumbnails[4383130] = clik.newPhoto({"id":4383130,"src":"Leo_copy_for_David_J__web_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_4383130.html","width":130,"caption":"Leo Compliation","height":100});
															thumbnails[4467820] = clik.newPhoto({"id":4467820,"src":"Kirsty__-_021_4x4_BW_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_4467820.html","width":130,"caption":"","height":130});
															thumbnails[4383132] = clik.newPhoto({"id":4383132,"src":"Monty_copy_for_David_J_thumb.jpg","galleries_id":257290,"server_id":18,"link":"photo_4383132.html","width":130,"caption":"Monty Compilation","height":110});
															thumbnails[3371384] = clik.newPhoto({"id":3371384,"src":"Watergate Bay Jan 09-026 B&W_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371384.html","width":130,"caption":"","height":85});
															thumbnails[4467821] = clik.newPhoto({"id":4467821,"src":"Kirsty_1_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_4467821.html","width":130,"caption":"","height":50});
															thumbnails[4484986] = clik.newPhoto({"id":4484986,"src":"Helens_Family_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_4484986.html","width":130,"caption":"","height":116});
															thumbnails[3371385] = clik.newPhoto({"id":3371385,"src":"Watergate Bay Jan 09-027_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371385.html","width":130,"caption":"","height":194});
															thumbnails[3371409] = clik.newPhoto({"id":3371409,"src":"Watergate Bay Jan 09-046_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371409.html","width":130,"caption":"","height":87});
															thumbnails[3371386] = clik.newPhoto({"id":3371386,"src":"Watergate Bay Jan 09-032_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371386.html","width":130,"caption":"","height":87});
															thumbnails[3371410] = clik.newPhoto({"id":3371410,"src":"Watergate Bay Jan 09-067_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371410.html","width":130,"caption":"","height":70});
															thumbnails[4670844] = clik.newPhoto({"id":4670844,"src":"Big_Splash_-_009_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670844.html","width":130,"caption":"Big Splash - 009 ","height":98});
															thumbnails[3371615] = clik.newPhoto({"id":3371615,"src":"Watergate Bay Jan 09-120_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371615.html","width":130,"caption":"","height":87});
															thumbnails[4670845] = clik.newPhoto({"id":4670845,"src":"Big_Splash_-_010_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670845.html","width":130,"caption":"Big Splash - 010","height":98});
															thumbnails[4670846] = clik.newPhoto({"id":4670846,"src":"Big_Splash_-_011_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670846.html","width":130,"caption":"Big Splash - 011","height":98});
															thumbnails[5364822] = clik.newPhoto({"id":5364822,"src":"Lucy__BW_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_5364822.html","width":130,"caption":"","height":112});
															thumbnails[3371617] = clik.newPhoto({"id":3371617,"src":"Watergate Bay Jan 09-134 B&W_thumb.jpg","galleries_id":205946,"server_id":18,"link":"photo_3371617.html","width":130,"caption":"At Fifteen for Breakfast at the end of the weekend","height":74});
															thumbnails[4391444] = clik.newPhoto({"id":4391444,"src":"DSC_8950_BW_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391444.html","width":130,"caption":"","height":87});
															thumbnails[4670851] = clik.newPhoto({"id":4670851,"src":"Big_Splash_-_021_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670851.html","width":130,"caption":"Big Splash - 021 ","height":98});
															thumbnails[4391449] = clik.newPhoto({"id":4391449,"src":"DSC_9001_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391449.html","width":130,"caption":"","height":91});
															thumbnails[4391450] = clik.newPhoto({"id":4391450,"src":"DSC_9003_BW_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391450.html","width":130,"caption":"","height":127});
															thumbnails[4670853] = clik.newPhoto({"id":4670853,"src":"Big_Splash_-_024_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670853.html","width":130,"caption":"Big Splash - 024","height":98});
															thumbnails[5364775] = clik.newPhoto({"id":5364775,"src":"Sarah_Douglas_Composit_1_thumb.jpg","galleries_id":157301,"server_id":18,"link":"photo_5364775.html","width":130,"caption":"","height":126});
															thumbnails[4391451] = clik.newPhoto({"id":4391451,"src":"DSC_9004_BW_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391451.html","width":130,"caption":"","height":102});
															thumbnails[4391452] = clik.newPhoto({"id":4391452,"src":"DSC_9024_BW_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391452.html","width":130,"caption":"","height":101});
															thumbnails[4670855] = clik.newPhoto({"id":4670855,"src":"Big_Splash_-_034_x_thumb.jpg","galleries_id":269180,"server_id":18,"link":"photo_4670855.html","width":130,"caption":"Big Splash - 034 ","height":89});
															thumbnails[4391453] = clik.newPhoto({"id":4391453,"src":"DSC_9063_BW_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391453.html","width":130,"caption":"","height":102});
															thumbnails[4391454] = clik.newPhoto({"id":4391454,"src":"Gerunuk_-_Channel_Regatta_024_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391454.html","width":130,"caption":"Gerunuk - Channel Regatta 024","height":93});
															thumbnails[4391455] = clik.newPhoto({"id":4391455,"src":"Gerunuk_-_Channel_Regatta_030_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391455.html","width":130,"caption":"Gerunuk - Channel Regatta 030","height":93});
															thumbnails[4391456] = clik.newPhoto({"id":4391456,"src":"Gerunuk_-_Channel_Regatta_036_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391456.html","width":130,"caption":"Gerunuk - Channel Regatta 036","height":93});
															thumbnails[4391457] = clik.newPhoto({"id":4391457,"src":"Gerunuk_-_Channel_Regatta_040_x_thumb.jpg","galleries_id":257433,"server_id":18,"link":"photo_4391457.html","width":130,"caption":"Gerunuk - Channel Regatta 040 ","height":93});
															thumbnails[5119371] = clik.newPhoto({"id":5119371,"src":"Jo__Vinnie_-_089_x_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_5119371.html","width":130,"caption":"","height":194});
															thumbnails[5119385] = clik.newPhoto({"id":5119385,"src":"Jo__Vinnie_-_123_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_5119385.html","width":130,"caption":"","height":89});
															thumbnails[5119390] = clik.newPhoto({"id":5119390,"src":"Jo__Vinnie_-_139_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_5119390.html","width":130,"caption":"","height":180});
															thumbnails[6585884] = clik.newPhoto({"id":6585884,"src":"Jodie__Russell__-_226_xx_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_6585884.html","width":130,"caption":"","height":61});
															thumbnails[6585903] = clik.newPhoto({"id":6585903,"src":"Jodie__Russell__-_294_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_6585903.html","width":130,"caption":"","height":99});
															thumbnails[5119450] = clik.newPhoto({"id":5119450,"src":"Jo__Vinnie_-_267_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_5119450.html","width":130,"caption":"","height":173});
															thumbnails[5199565] = clik.newPhoto({"id":5199565,"src":"118_123_thumb.jpg","galleries_id":184334,"server_id":18,"link":"photo_5199565.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[455625] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nikki & Nicks Wedding","link":"gallery_455625.html","maxRecords":0.0,"photoIDs":[8622633.0,8627805.0,8627807.0,8627809.0,8627811.0,8627812.0,8627813.0,8627814.0,8627815.0,8627816.0,8627817.0,8627818.0,8627819.0,8627820.0,8627821.0,8627822.0,8627823.0,8627825.0,8627826.0,8627828.0,8627830.0,8627837.0,8627862.0,8627863.0,8627873.0,8627874.0,8627876.0],"skipIndex":0,"section_code":"gallery","featured_images":8627818.0,"id":455625,"singleSection":false});				  						galleries[184334] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding Images","link":"gallery_184334.html","maxRecords":0.0,"photoIDs":[4280850.0,4280893.0,4287966.0,1269704.0,2373375.0,1801772.0,1801773.0,1801758.0,1802698.0,2402616.0,1802687.0,2402619.0,1801761.0,2373652.0,2373658.0,5119371.0,5119385.0,5119390.0,6585884.0,6585903.0,5119450.0,5199565.0],"skipIndex":0,"section_code":"gallery","featured_images":"4280850,1801772","id":184334,"singleSection":false});				  						galleries[157301] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits & Children","link":"gallery_157301.html","maxRecords":0.0,"photoIDs":[1965934.0,1965935.0,1965936.0,1969185.0,1969425.0,1969429.0,2437796.0,2441080.0,2441082.0,2441086.0,4467819.0,4467820.0,4467821.0,4484986.0,5364822.0,5364775.0],"skipIndex":0,"section_code":"gallery","featured_images":1969425.0,"id":157301,"singleSection":false});				  						galleries[257290] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pets","link":"gallery_257290.html","maxRecords":0.0,"photoIDs":[3371406.0,4383129.0,4383131.0,3371407.0,4383130.0,4383132.0],"skipIndex":0,"section_code":"gallery","featured_images":3371407.0,"id":257290,"singleSection":false});				  						galleries[257433] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Classic Channel Regatta 2009","link":"gallery_257433.html","maxRecords":0.0,"photoIDs":[4391444.0,4391449.0,4391450.0,4391451.0,4391452.0,4391453.0,4391454.0,4391455.0,4391456.0,4391457.0],"skipIndex":0,"section_code":"gallery","featured_images":4391450.0,"id":257433,"singleSection":false});				  						galleries[269180] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Najad Yachts 380 \"Aphrodite\"","link":"gallery_269180.html","maxRecords":0.0,"photoIDs":[4670844.0,4670845.0,4670846.0,4670851.0,4670853.0,4670855.0],"skipIndex":0,"section_code":"gallery","featured_images":4670844.0,"id":269180,"singleSection":false});				  						galleries[205946] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Watergate Bay","link":"gallery_205946.html","maxRecords":0.0,"photoIDs":[3371382.0,3371384.0,3371385.0,3371409.0,3371386.0,3371410.0,3371615.0,3371617.0],"skipIndex":0,"section_code":"gallery","featured_images":3371409.0,"id":205946,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6051598';
imageSets[2] = '8627818,4280850,1969425,1801772,3371407,3371409,4670844,4391450';
imageSets[3] = '4280893';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/nickyb/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/nickyb/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/nickyb/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/nickyb/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/nickyb/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/nickyb/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/nickyb/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:'',$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 = 'nicky bomby photographer: ' + 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>';
	}
				
				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>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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 += '<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;
	}
}

			

