window.thumbnails = {};
															thumbnails[3267246] = clik.newPhoto({"id":3267246,"src":"Street11_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Chinese Reflection","height":195});
															thumbnails[3267366] = clik.newPhoto({"id":3267366,"src":"Street2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Old Soldier","height":195});
															thumbnails[3267496] = clik.newPhoto({"id":3267496,"src":"_MG_8405-2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Kenyan Kids","height":187});
															thumbnails[3267542] = clik.newPhoto({"id":3267542,"src":"_MG_8723_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Pied Kingfisher","height":87});
															thumbnails[3271673] = clik.newPhoto({"id":3271673,"src":"_MG_9907_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"zebra mane","height":87});
															thumbnails[3272411] = clik.newPhoto({"id":3272411,"src":"_MG_9730_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Cheetah","height":87});
															thumbnails[3272414] = clik.newPhoto({"id":3272414,"src":"CRW_4078-01_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Speckled Pigeon","height":195});
															thumbnails[6138635] = clik.newPhoto({"id":6138635,"src":"IMG_7082-Edit-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Piece by Jenny Weir","height":195});
															thumbnails[6139570] = clik.newPhoto({"id":6139570,"src":"IMG_7057-Edit-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Jenny Weir","height":195});
															thumbnails[6139583] = clik.newPhoto({"id":6139583,"src":"IMG_7233_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Piece by Emma Campbell","height":195});
															thumbnails[6139596] = clik.newPhoto({"id":6139596,"src":"IMG_8922_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Piece by Emma Campbell","height":87});
															thumbnails[6139845] = clik.newPhoto({"id":6139845,"src":"IMG_7418_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Jamie Fisher","height":87});
															thumbnails[6139906] = clik.newPhoto({"id":6139906,"src":"IMG_7115_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Jemma Logan ","height":195});
															thumbnails[6140108] = clik.newPhoto({"id":6140108,"src":"IMG_6854-Edit-Edit-Edit-2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Jenny Haslett","height":87});
															thumbnails[6140112] = clik.newPhoto({"id":6140112,"src":"IMG_7529_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Kara Wilson","height":195});
															thumbnails[6140113] = clik.newPhoto({"id":6140113,"src":"IMG_6814_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Katriona McCambridge","height":87});
															thumbnails[6140275] = clik.newPhoto({"id":6140275,"src":"IMG_7764-Edit-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Michelle Stephens","height":195});
															thumbnails[6140281] = clik.newPhoto({"id":6140281,"src":"IMG_7491_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Pamela Irwin","height":87});
															thumbnails[6140316] = clik.newPhoto({"id":6140316,"src":"IMG_7011_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Sarah Deering","height":87});
															thumbnails[6140354] = clik.newPhoto({"id":6140354,"src":"IMG_7350_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Sarah Lee","height":195});
															thumbnails[6140367] = clik.newPhoto({"id":6140367,"src":"IMG_7863_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Tinike","height":195});
															thumbnails[6140437] = clik.newPhoto({"id":6140437,"src":"IMG_7174-Edit-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Charlene","height":195});
															thumbnails[6140600] = clik.newPhoto({"id":6140600,"src":"IMG_7606_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Emma Shaw","height":195});
															thumbnails[6810576] = clik.newPhoto({"id":6810576,"src":"IMG_1997-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"What Remains","height":87});
															thumbnails[6810649] = clik.newPhoto({"id":6810649,"src":"IMG_1204-Edit-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"What remains ","height":87});
															thumbnails[6841350] = clik.newPhoto({"id":6841350,"src":"IMG_1681_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":87});
															thumbnails[6841364] = clik.newPhoto({"id":6841364,"src":"IMG_1668-Edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":195});
															thumbnails[6841404] = clik.newPhoto({"id":6841404,"src":"IMG_0941_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":195});
															thumbnails[6841466] = clik.newPhoto({"id":6841466,"src":"IMG_1630_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":195});
															thumbnails[6841470] = clik.newPhoto({"id":6841470,"src":"IMG_1615_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":195});
															thumbnails[6841471] = clik.newPhoto({"id":6841471,"src":"IMG_1628_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":195});
															thumbnails[3266964] = clik.newPhoto({"id":3266964,"src":"Street1_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3266964.html","width":130,"caption":"The Same Old Debate","height":195});
															thumbnails[3267030] = clik.newPhoto({"id":3267030,"src":"Street8_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3267030.html","width":130,"caption":"'The Mighty Gareth'","height":195});
															thumbnails[3282639] = clik.newPhoto({"id":3282639,"src":"Laurie Campbell - Green Crucible_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_3282639.html","width":130,"caption":"","height":189});
															thumbnails[3291746] = clik.newPhoto({"id":3291746,"src":"IMG_5989_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291746.html","width":130,"caption":"Protest","height":195});
															thumbnails[3291796] = clik.newPhoto({"id":3291796,"src":"IMG_6283_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291796.html","width":130,"caption":"Intense","height":195});
															thumbnails[3291798] = clik.newPhoto({"id":3291798,"src":"IMG_6139email_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291798.html","width":130,"caption":"","height":195});
															thumbnails[3291818] = clik.newPhoto({"id":3291818,"src":"IMG_6229_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291818.html","width":130,"caption":"","height":195});
															thumbnails[3291831] = clik.newPhoto({"id":3291831,"src":"Street31_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291831.html","width":130,"caption":"Who is Looking at You","height":87});
															thumbnails[3291836] = clik.newPhoto({"id":3291836,"src":"Street101_thumb.jpg","galleries_id":197893,"server_id":15,"link":"photo_3291836.html","width":130,"caption":"Face Painting","height":87});
															thumbnails[5381533] = clik.newPhoto({"id":5381533,"src":"LCampbellbranching_Ou1t_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_5381533.html","width":130,"caption":"Branching Out","height":87});
															thumbnails[5488236] = clik.newPhoto({"id":5488236,"src":"Butterfly_on_Leaf_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_5488236.html","width":130,"caption":"","height":87});
															thumbnails[6140824] = clik.newPhoto({"id":6140824,"src":"IMG_6200-Edit_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_6140824.html","width":130,"caption":"Abstract Nature","height":195});
															thumbnails[6841866] = clik.newPhoto({"id":6841866,"src":"Butterfly_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_6841866.html","width":130,"caption":"","height":195});
															thumbnails[7268088] = clik.newPhoto({"id":7268088,"src":"IMG_2954_as_Smart_Object-112_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268088.html","width":130,"caption":"","height":87});
															thumbnails[7268124] = clik.newPhoto({"id":7268124,"src":"IMG_2913_as_Smart_Object-1123_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268124.html","width":130,"caption":"","height":87});
															thumbnails[7268137] = clik.newPhoto({"id":7268137,"src":"IMG_2904_as_Smart_Object-1123_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268137.html","width":130,"caption":"","height":87});
															thumbnails[7268642] = clik.newPhoto({"id":7268642,"src":"IMG_3187_as_Smart_Object-112_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268642.html","width":130,"caption":"","height":87});
															thumbnails[7268650] = clik.newPhoto({"id":7268650,"src":"IMG_3190_as_Smart_Object-1123_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268650.html","width":130,"caption":"","height":87});
															thumbnails[7268653] = clik.newPhoto({"id":7268653,"src":"IMG_3704_as_Smart_Object-112_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7268653.html","width":130,"caption":"","height":87});
															thumbnails[7396002] = clik.newPhoto({"id":7396002,"src":"LCampbell_Image_1_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396002.html","width":130,"caption":"","height":87});
															thumbnails[7396007] = clik.newPhoto({"id":7396007,"src":"LCampbell_Image_2_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396007.html","width":130,"caption":"","height":87});
															thumbnails[7396011] = clik.newPhoto({"id":7396011,"src":"LCampbell_Image_3_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396011.html","width":130,"caption":"","height":87});
															thumbnails[7396023] = clik.newPhoto({"id":7396023,"src":"LCampbell_Image_6_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396023.html","width":130,"caption":"","height":87});
															thumbnails[7396033] = clik.newPhoto({"id":7396033,"src":"IMG_3727_as_Smart_Object-1_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396033.html","width":130,"caption":"","height":87});
															thumbnails[7396034] = clik.newPhoto({"id":7396034,"src":"IMG_3742_as_Smart_Object-1_copy_thumb.jpg","galleries_id":393165,"server_id":15,"link":"photo_7396034.html","width":130,"caption":"","height":87});
															thumbnails[7437907] = clik.newPhoto({"id":7437907,"src":"Three_is_Definitely_a_Crowd_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437907.html","width":130,"caption":"","height":87});
															thumbnails[7437939] = clik.newPhoto({"id":7437939,"src":"IMG_8242-Edit-2_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437939.html","width":130,"caption":"","height":87});
															thumbnails[7437943] = clik.newPhoto({"id":7437943,"src":"IMG_8625-Edit_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437943.html","width":130,"caption":"","height":87});
															thumbnails[7437944] = clik.newPhoto({"id":7437944,"src":"IMG_8453-Edit_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437944.html","width":130,"caption":"","height":87});
															thumbnails[7437946] = clik.newPhoto({"id":7437946,"src":"IMG_8461-Edit_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437946.html","width":130,"caption":"","height":87});
															thumbnails[7437957] = clik.newPhoto({"id":7437957,"src":"IMG_8620_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437957.html","width":130,"caption":"","height":87});
															thumbnails[7437961] = clik.newPhoto({"id":7437961,"src":"IMG_8617_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437961.html","width":130,"caption":"","height":195});
															thumbnails[7437964] = clik.newPhoto({"id":7437964,"src":"IMG_86201_thumb.jpg","galleries_id":403256,"server_id":15,"link":"photo_7437964.html","width":130,"caption":"","height":87});
															thumbnails[7607348] = clik.newPhoto({"id":7607348,"src":"IMG_4911-Edit_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_7607348.html","width":130,"caption":"","height":87});
															thumbnails[7607361] = clik.newPhoto({"id":7607361,"src":"IMG_4878-Edit-21_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_7607361.html","width":130,"caption":"","height":195});
															thumbnails[7626604] = clik.newPhoto({"id":7626604,"src":"IMG_4920-Edit_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_7626604.html","width":130,"caption":"","height":87});
															thumbnails[7693712] = clik.newPhoto({"id":7693712,"src":"Paving_the_Way_to_Glory_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_7693712.html","width":130,"caption":"","height":87});
															thumbnails[8253648] = clik.newPhoto({"id":8253648,"src":"IMG_8802_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253648.html","width":130,"caption":"","height":87});
															thumbnails[8253649] = clik.newPhoto({"id":8253649,"src":"IMG_8801_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253649.html","width":130,"caption":"","height":87});
															thumbnails[8253653] = clik.newPhoto({"id":8253653,"src":"IMG_8799_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253653.html","width":130,"caption":"","height":195});
															thumbnails[8253654] = clik.newPhoto({"id":8253654,"src":"IMG_8800-Edit_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253654.html","width":130,"caption":"","height":195});
															thumbnails[8253663] = clik.newPhoto({"id":8253663,"src":"IMG_88031_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253663.html","width":130,"caption":"","height":195});
															thumbnails[8253664] = clik.newPhoto({"id":8253664,"src":"IMG_88051_thumb.jpg","galleries_id":439589,"server_id":15,"link":"photo_8253664.html","width":130,"caption":"","height":195});
															thumbnails[8418191] = clik.newPhoto({"id":8418191,"src":"IMG_6036_HDRbutterfly-Edit-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8418191.html","width":130,"caption":"Distilled Life","height":195});
															thumbnails[8420232] = clik.newPhoto({"id":8420232,"src":"IMG_4940-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8420232.html","width":130,"caption":"","height":195});
															thumbnails[8420233] = clik.newPhoto({"id":8420233,"src":"IMG_4871-Edit-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8420233.html","width":130,"caption":"","height":195});
															thumbnails[8420235] = clik.newPhoto({"id":8420235,"src":"IMG_4920-Edit-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8420235.html","width":130,"caption":"","height":87});
															thumbnails[8420239] = clik.newPhoto({"id":8420239,"src":"IMG_2070-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8420239.html","width":130,"caption":"","height":87});
															thumbnails[8420241] = clik.newPhoto({"id":8420241,"src":"IMG_1788-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8420241.html","width":130,"caption":"","height":87});
															thumbnails[8428107] = clik.newPhoto({"id":8428107,"src":"IMG_1997-Edit-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8428107.html","width":130,"caption":"","height":87});
															thumbnails[8428116] = clik.newPhoto({"id":8428116,"src":"IMG_1969-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8428116.html","width":130,"caption":"","height":87});
															thumbnails[8428117] = clik.newPhoto({"id":8428117,"src":"IMG_1930-Edit-Edit_thumb.jpg","galleries_id":446025,"server_id":15,"link":"photo_8428117.html","width":130,"caption":"","height":87});
															thumbnails[8692256] = clik.newPhoto({"id":8692256,"src":"IMG_7459-Edit-Edit-Edit-2-Edit-2_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_8692256.html","width":130,"caption":"","height":87});
															thumbnails[8780446] = clik.newPhoto({"id":8780446,"src":"IMG_9299-Edit-2-Edit-2-Edit_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_8780446.html","width":130,"caption":"","height":182});
															thumbnails[8796946] = clik.newPhoto({"id":8796946,"src":"IMG_2702-Edit-Edit-Edit-2-Edit-4_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_8796946.html","width":130,"caption":"","height":87});
															thumbnails[8945401] = clik.newPhoto({"id":8945401,"src":"IMG_5559-Edit_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_8945401.html","width":130,"caption":"","height":195});
															thumbnails[8962410] = clik.newPhoto({"id":8962410,"src":"IMG_5258_7_6-Edit-Edit-Edit-Edit_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_8962410.html","width":130,"caption":"","height":130});
															thumbnails[8962451] = clik.newPhoto({"id":8962451,"src":"IMG_5777_8_9-Edit1_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_8962451.html","width":130,"caption":"","height":168});
															thumbnails[8962455] = clik.newPhoto({"id":8962455,"src":"CRW_0533-2_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_8962455.html","width":130,"caption":"","height":195});
															thumbnails[8980806] = clik.newPhoto({"id":8980806,"src":"B_MIDU_Round3_ReflectedPyramid_LaurieCampbell_thumb.jpg","galleries_id":412577,"server_id":15,"link":"photo_8980806.html","width":130,"caption":"","height":58});
															thumbnails[9065269] = clik.newPhoto({"id":9065269,"src":"IMG_0399_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_9065269.html","width":130,"caption":"","height":130});
															thumbnails[9065272] = clik.newPhoto({"id":9065272,"src":"IMG_1199_HDR-Edit-Edit-Edit-2_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_9065272.html","width":130,"caption":"","height":76});
															thumbnails[9065279] = clik.newPhoto({"id":9065279,"src":"IMG_1394-Edit_thumb.jpg","galleries_id":239426,"server_id":15,"link":"photo_9065279.html","width":130,"caption":"","height":108});
															thumbnails[9065295] = clik.newPhoto({"id":9065295,"src":"PA280094-Edit1_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_9065295.html","width":130,"caption":"","height":151});
															thumbnails[9090954] = clik.newPhoto({"id":9090954,"src":"IMG_9284-Edit-2-Edit-Edit-Edit_1_thumb.jpg","galleries_id":200179,"server_id":15,"link":"photo_9090954.html","width":130,"caption":"","height":78});
															thumbnails[9091023] = clik.newPhoto({"id":9091023,"src":"IMG_9299-Edit-2-Edit-3-Edit-Edit_1_thumb.jpg","galleries_id":303575,"server_id":15,"link":"photo_9091023.html","width":130,"caption":"","height":182});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[239426] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Anomie","link":"gallery_239426.html","maxRecords":0.0,"photoIDs":[8962410.0,8962451.0,8962455.0,9065269.0,9065272.0,9065279.0],"skipIndex":0,"section_code":"gallery","featured_images":"9065279,9065272,9065269,8962455,8962451,8962410","id":239426,"singleSection":false});				  						galleries[403256] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Great Crested Grebes","link":"gallery_403256.html","maxRecords":0.0,"photoIDs":[7437907.0,7437939.0,7437943.0,7437944.0,7437946.0,7437957.0,7437961.0,7437964.0],"skipIndex":0,"section_code":"gallery","featured_images":"7437964,7437961,7437957,7437946,7437944,7437943,7437939,7437907","id":403256,"singleSection":false});				  						galleries[412577] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_412577.html","maxRecords":0.0,"photoIDs":[7607348.0,7607361.0,7626604.0,7693712.0,8692256.0,8980806.0],"skipIndex":0,"section_code":"gallery","featured_images":"8980806,8692256,7693712,7626604,7607361,7607348","id":412577,"singleSection":false});				  						galleries[303575] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellany","link":"gallery_303575.html","maxRecords":0.0,"photoIDs":[5381533.0,6140824.0,6841866.0,8780446.0,8796946.0,8945401.0,9065295.0,9091023.0],"skipIndex":0,"section_code":"gallery","featured_images":"9091023,9065295,8945401,8796946,8780446,6841866,6140824,5381533","id":303575,"singleSection":false});				  						galleries[200179] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Work","link":"gallery_200179.html","maxRecords":0.0,"photoIDs":[9090954.0],"skipIndex":0,"section_code":"gallery","featured_images":9090954.0,"id":200179,"singleSection":false});				  						galleries[446025] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nostalgica","link":"gallery_446025.html","maxRecords":0.0,"photoIDs":[8418191.0,8420232.0,8420233.0,8420235.0,8420239.0,8420241.0,8428107.0,8428116.0,8428117.0],"skipIndex":0,"section_code":"gallery","featured_images":"8428117,8428116,8428107,8420241,8420239,8420235,8420233,8420232,8418191","id":446025,"singleSection":false});				  						galleries[393165] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Overshadowed","link":"gallery_393165.html","maxRecords":0.0,"photoIDs":[7268088.0,7268124.0,7268137.0,7268642.0,7268650.0,7268653.0,7396002.0,7396007.0,7396011.0,7396023.0,7396033.0,7396034.0],"skipIndex":0,"section_code":"gallery","featured_images":"7396034,7396033,7396023,7396011,7396007,7396002,7268653,7268650,7268642,7268137","id":393165,"singleSection":false});				  						galleries[439589] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spirillium","link":"gallery_439589.html","maxRecords":0.0,"photoIDs":[3282639.0,5488236.0,8253648.0,8253649.0,8253653.0,8253654.0,8253663.0,8253664.0],"skipIndex":0,"section_code":"gallery","featured_images":3282639.0,"id":439589,"singleSection":false});				  						galleries[197893] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Street Photography","link":"gallery_197893.html","maxRecords":0.0,"photoIDs":[3266964.0,3267030.0,3291746.0,3291796.0,3291798.0,3291818.0,3291831.0,3291836.0],"skipIndex":0,"section_code":"gallery","featured_images":3267030.0,"id":197893,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3271673,3267542,3267030,3266964';
imageSets[2] = '3282639,3271673,3267030';
imageSets[3] = '9091023,9090954,9065295,9065279,9065272,9065269,8980806,8962455,8962451,8962410,8945401,8796946,8780446,8692256,8428117,8428116,8428107,8420241,8420239,8420235,8420233,8420232,8418191,8253664,8253663,8253654,8253653,8253649,8253648,7693712,7626604,7607361,7607348,7437964,7437961,7437957,7437946,7437944,7437943,7437939,7437907,7396034,7396033,7396023,7396011,7396007,7396002,7268653,7268650,7268642';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/laurie/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/laurie/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/laurie/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 = 'Laurie Campbell 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>';
	}
				
				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.item_price !== '') {
			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;
	}
}

			

