window.thumbnails = {};
															thumbnails[4164654] = clik.newPhoto({"id":4164654,"src":"I_Demand_Booze_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[6004824] = clik.newPhoto({"id":6004824,"src":"best_in_eden_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":89});
															thumbnails[6196523] = clik.newPhoto({"id":6196523,"src":"Portrait_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":94});
															thumbnails[7114285] = clik.newPhoto({"id":7114285,"src":"Minor_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7230670] = clik.newPhoto({"id":7230670,"src":"Castlerigg_lightweb_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":126});
															thumbnails[7230675] = clik.newPhoto({"id":7230675,"src":"Castlerigg_nightweb_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":126});
															thumbnails[8419707] = clik.newPhoto({"id":8419707,"src":"High_Cup_Shoot_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":94});
															thumbnails[568100] = clik.newPhoto({"id":568100,"src":"Great-Mell- Fell12_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_568100.html","width":130,"caption":"Great Mell Fell                 ","height":193});
															thumbnails[568309] = clik.newPhoto({"id":568309,"src":"Lost-Travels8_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_568309.html","width":130,"caption":"Lost Travels, Mardale            ","height":192});
															thumbnails[570310] = clik.newPhoto({"id":570310,"src":"Sleddale-Rise_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_570310.html","width":130,"caption":"Sleddale Rise ","height":193});
															thumbnails[570418] = clik.newPhoto({"id":570418,"src":"Catstye-Cam12_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_570418.html","width":130,"caption":"Catstye Cam","height":128});
															thumbnails[570558] = clik.newPhoto({"id":570558,"src":"Crow-Cragg_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_570558.html","width":130,"caption":"Crow Cragg","height":93});
															thumbnails[570572] = clik.newPhoto({"id":570572,"src":"Ullswater-1_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_570572.html","width":130,"caption":"Ullswater#1","height":84});
															thumbnails[571051] = clik.newPhoto({"id":571051,"src":"Dodd-Fell_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_571051.html","width":130,"caption":"Dodd Fell","height":187});
															thumbnails[571089] = clik.newPhoto({"id":571089,"src":"MardaleGate3_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_571089.html","width":130,"caption":"Mardale Gate","height":132});
															thumbnails[571616] = clik.newPhoto({"id":571616,"src":"Fisherplace-Gill_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_571616.html","width":130,"caption":"Fisherplace Gill","height":141});
															thumbnails[571969] = clik.newPhoto({"id":571969,"src":"Tewet-Tarn_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_571969.html","width":130,"caption":"Tewet Tarn","height":133});
															thumbnails[571983] = clik.newPhoto({"id":571983,"src":"Angle-Tarn_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_571983.html","width":130,"caption":"Angle Tarn","height":136});
															thumbnails[572840] = clik.newPhoto({"id":572840,"src":"Shap-Express_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_572840.html","width":130,"caption":"Shap Express","height":93});
															thumbnails[1252841] = clik.newPhoto({"id":1252841,"src":"Pillar3_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_1252841.html","width":130,"caption":"Pillar, Cathedral Quarry","height":129});
															thumbnails[1795134] = clik.newPhoto({"id":1795134,"src":"Brothers-Water_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_1795134.html","width":130,"caption":"Brothers Water","height":126});
															thumbnails[2550721] = clik.newPhoto({"id":2550721,"src":"Illuminated_Rain_Web_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_2550721.html","width":130,"caption":"Illuminated Rain, Keswick","height":115});
															thumbnails[2823409] = clik.newPhoto({"id":2823409,"src":"SwirralEdge_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_2823409.html","width":130,"caption":"Swirral Edge","height":131});
															thumbnails[3345424] = clik.newPhoto({"id":3345424,"src":"DobgillThirlmere_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_3345424.html","width":130,"caption":"Dobgill, Thirlmere","height":130});
															thumbnails[3684089] = clik.newPhoto({"id":3684089,"src":"Mosedale_Cottage_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_3684089.html","width":130,"caption":"Mosedale Cottage","height":131});
															thumbnails[3805383] = clik.newPhoto({"id":3805383,"src":"star-trail_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_3805383.html","width":130,"caption":"Eden Cut","height":130});
															thumbnails[3988729] = clik.newPhoto({"id":3988729,"src":"Scalehow_Force1_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_3988729.html","width":130,"caption":"Scalehow Force","height":131});
															thumbnails[5591677] = clik.newPhoto({"id":5591677,"src":"Grisedale_Pike_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_5591677.html","width":130,"caption":"Grisedale Pike","height":132});
															thumbnails[5684095] = clik.newPhoto({"id":5684095,"src":"Aira_Point1_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_5684095.html","width":130,"caption":"Aira Point","height":129});
															thumbnails[7220264] = clik.newPhoto({"id":7220264,"src":"Newlands1_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_7220264.html","width":130,"caption":"Newlands Curiosity","height":131});
															thumbnails[7230579] = clik.newPhoto({"id":7230579,"src":"Castlerigg_Master-1web_thumb.jpg","galleries_id":43781,"server_id":1,"link":"photo_7230579.html","width":130,"caption":"Castlerigg Star Trail","height":127});
															thumbnails[4829922] = clik.newPhoto({"id":4829922,"src":"Dufton_Show_Web1_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_4829922.html","width":130,"caption":"Dufton Show#1","height":129});
															thumbnails[572908] = clik.newPhoto({"id":572908,"src":"High-Cup-Nick12_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_572908.html","width":130,"caption":"High Cup Nick","height":98});
															thumbnails[4829926] = clik.newPhoto({"id":4829926,"src":"Dufton_Show_Web2_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_4829926.html","width":130,"caption":"Dufton Show Tractor Race","height":131});
															thumbnails[8844024] = clik.newPhoto({"id":8844024,"src":"Stenkrith_1_F473EA20-24E8-5EC4-4F78010326E5DB6F_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_8844024.html","width":130,"caption":"Cow Carnie","height":91});
															thumbnails[572924] = clik.newPhoto({"id":572924,"src":"WhitleyCastle_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_572924.html","width":130,"caption":"Whitley Castle","height":87});
															thumbnails[573522] = clik.newPhoto({"id":573522,"src":"Nateby-_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573522.html","width":130,"caption":"Nateby, Kirkby Stephen","height":116});
															thumbnails[4829930] = clik.newPhoto({"id":4829930,"src":"Dufton_Show_Web3_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_4829930.html","width":130,"caption":"Abandoned Sit","height":131});
															thumbnails[1252921] = clik.newPhoto({"id":1252921,"src":"Pendragon_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_1252921.html","width":130,"caption":"Pendragon Castle","height":129});
															thumbnails[572928] = clik.newPhoto({"id":572928,"src":"Death-Row_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_572928.html","width":130,"caption":"Death Row","height":130});
															thumbnails[4829935] = clik.newPhoto({"id":4829935,"src":"Scare_Crow_Web1_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_4829935.html","width":130,"caption":"Dancing Scarecrow","height":129});
															thumbnails[573420] = clik.newPhoto({"id":573420,"src":"Stenkrith_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573420.html","width":130,"caption":"Stenkrith","height":182});
															thumbnails[3213108] = clik.newPhoto({"id":3213108,"src":"AshgillForce_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_3213108.html","width":130,"caption":"Ashgill Force","height":129});
															thumbnails[5630095] = clik.newPhoto({"id":5630095,"src":"Glenridding_Beck_Moon_Trail_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_5630095.html","width":130,"caption":"Glenridding Beck Moon Trail","height":131});
															thumbnails[1528364] = clik.newPhoto({"id":1528364,"src":"Water Wheel_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_1528364.html","width":130,"caption":"Water Wheel","height":128});
															thumbnails[6355079] = clik.newPhoto({"id":6355079,"src":"TV_Remote1_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_6355079.html","width":130,"caption":"TV Remote","height":130});
															thumbnails[573003] = clik.newPhoto({"id":573003,"src":"Helm-Spirit_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_573003.html","width":130,"caption":"Helm Spirit","height":89});
															thumbnails[573610] = clik.newPhoto({"id":573610,"src":"Birkdale-Fleece_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573610.html","width":130,"caption":"Birkdale Fleece","height":92});
															thumbnails[6701819] = clik.newPhoto({"id":6701819,"src":"3_Mile_Rhino_web_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_6701819.html","width":130,"caption":"3 Mile Rhino","height":126});
															thumbnails[3416608] = clik.newPhoto({"id":3416608,"src":"Sunbiggin Tarn_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_3416608.html","width":130,"caption":"Sunbiggin Tarn","height":128});
															thumbnails[7114245] = clik.newPhoto({"id":7114245,"src":"Minor_Problem1_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_7114245.html","width":130,"caption":"Minor Problem, Dufton Pike","height":128});
															thumbnails[8433805] = clik.newPhoto({"id":8433805,"src":"Fleece_Barn_Web_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_8433805.html","width":130,"caption":"Fleece Barn","height":128});
															thumbnails[581419] = clik.newPhoto({"id":581419,"src":"Autumn-Reflection_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_581419.html","width":130,"caption":"Autumn Reflection","height":176});
															thumbnails[7217503] = clik.newPhoto({"id":7217503,"src":"DuftonPike_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_7217503.html","width":130,"caption":"Winter Dufton Pike","height":128});
															thumbnails[8433810] = clik.newPhoto({"id":8433810,"src":"Hilton_Tractor_Web_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_8433810.html","width":130,"caption":"Hilton Tractor","height":130});
															thumbnails[572996] = clik.newPhoto({"id":572996,"src":"Fox-Tower_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_572996.html","width":130,"caption":"Fox Tower","height":131});
															thumbnails[8433821] = clik.newPhoto({"id":8433821,"src":"Barn_Web_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_8433821.html","width":130,"caption":"Barn","height":131});
															thumbnails[573009] = clik.newPhoto({"id":573009,"src":"Ashgill_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_573009.html","width":130,"caption":"AshGill","height":185});
															thumbnails[573634] = clik.newPhoto({"id":573634,"src":"Wharton_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573634.html","width":130,"caption":"Wharton, Kirkby Stephen","height":93});
															thumbnails[8433886] = clik.newPhoto({"id":8433886,"src":"Bell_Fell_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_8433886.html","width":130,"caption":"Bell Fell","height":128});
															thumbnails[3720999] = clik.newPhoto({"id":3720999,"src":"Uldale_Mist_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_3720999.html","width":130,"caption":"Uldale Mist","height":128});
															thumbnails[573004] = clik.newPhoto({"id":573004,"src":"Knock-Quarry+Dufton-Pike5_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_573004.html","width":130,"caption":"Knock Quarry & Dufton Pike","height":76});
															thumbnails[8433889] = clik.newPhoto({"id":8433889,"src":"sheep_sale_thumb.jpg","galleries_id":275853,"server_id":1,"link":"photo_8433889.html","width":130,"caption":"Sheep sale","height":132});
															thumbnails[573649] = clik.newPhoto({"id":573649,"src":"Brough-Castle_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573649.html","width":130,"caption":"Brough Castle","height":98});
															thumbnails[8242857] = clik.newPhoto({"id":8242857,"src":"High_Cup_2web_thumb.jpg","galleries_id":44232,"server_id":1,"link":"photo_8242857.html","width":130,"caption":"High Cup Valley","height":87});
															thumbnails[573669] = clik.newPhoto({"id":573669,"src":"Lammerside_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573669.html","width":130,"caption":"Lammerside Castle, Mallerstang","height":128});
															thumbnails[573714] = clik.newPhoto({"id":573714,"src":"Hell-Gill_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573714.html","width":130,"caption":"Hell Gill","height":133});
															thumbnails[573598] = clik.newPhoto({"id":573598,"src":"Stonesdale-Carriage_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_573598.html","width":130,"caption":"Stonesdale Carriage","height":133});
															thumbnails[582156] = clik.newPhoto({"id":582156,"src":"Belah-Viaduct_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_582156.html","width":130,"caption":"Belah Viaduct","height":138});
															thumbnails[582163] = clik.newPhoto({"id":582163,"src":"Wild-Boar_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_582163.html","width":130,"caption":"Wild Boar","height":171});
															thumbnails[582166] = clik.newPhoto({"id":582166,"src":"Elevation3_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_582166.html","width":130,"caption":"Elevation","height":176});
															thumbnails[595843] = clik.newPhoto({"id":595843,"src":"Stonesdale-Pen_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_595843.html","width":130,"caption":"Stonesdale Pen.","height":129});
															thumbnails[728090] = clik.newPhoto({"id":728090,"src":"Rain-Burst-Orton_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_728090.html","width":130,"caption":"Rain Burst,Orton","height":131});
															thumbnails[582169] = clik.newPhoto({"id":582169,"src":"OrtonCross1_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_582169.html","width":130,"caption":"Orton Cross","height":132});
															thumbnails[1664882] = clik.newPhoto({"id":1664882,"src":"tanker_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_1664882.html","width":130,"caption":"Tanker","height":129});
															thumbnails[5592751] = clik.newPhoto({"id":5592751,"src":"Aisgill_Force_thumb.jpg","galleries_id":44273,"server_id":1,"link":"photo_5592751.html","width":130,"caption":"Aisgill Force","height":129});
															thumbnails[800624] = clik.newPhoto({"id":800624,"src":"dev film2_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800624.html","width":130,"caption":"Film Development","height":173});
															thumbnails[800627] = clik.newPhoto({"id":800627,"src":"contact assessment_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800627.html","width":130,"caption":"Evaluate and Proofing","height":98});
															thumbnails[800630] = clik.newPhoto({"id":800630,"src":"test print_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800630.html","width":130,"caption":"Test Print","height":110});
															thumbnails[800646] = clik.newPhoto({"id":800646,"src":"dodging_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800646.html","width":130,"caption":"Dodging","height":84});
															thumbnails[800670] = clik.newPhoto({"id":800670,"src":"burning_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800670.html","width":130,"caption":"Burning","height":98});
															thumbnails[800686] = clik.newPhoto({"id":800686,"src":"print dev 1_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800686.html","width":130,"caption":"Print development","height":98});
															thumbnails[800692] = clik.newPhoto({"id":800692,"src":"local bleach_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800692.html","width":130,"caption":"Bleaching","height":160});
															thumbnails[800695] = clik.newPhoto({"id":800695,"src":"toning_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800695.html","width":130,"caption":"Toning","height":98});
															thumbnails[800700] = clik.newPhoto({"id":800700,"src":"washing_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800700.html","width":130,"caption":"Print washing","height":98});
															thumbnails[800759] = clik.newPhoto({"id":800759,"src":"drying_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800759.html","width":130,"caption":"Drying","height":98});
															thumbnails[800777] = clik.newPhoto({"id":800777,"src":"FB drying_thumb.jpg","galleries_id":62123,"server_id":1,"link":"photo_800777.html","width":130,"caption":"FB Drying","height":98});
															thumbnails[1281655] = clik.newPhoto({"id":1281655,"src":"Touch up_thumb.JPG","galleries_id":62123,"server_id":1,"link":"photo_1281655.html","width":130,"caption":"Finishing","height":98});
															thumbnails[6352883] = clik.newPhoto({"id":6352883,"src":"ashgill_portrait_thumb.jpg","galleries_id":351894,"server_id":1,"link":"photo_6352883.html","width":130,"caption":"","height":185});
															thumbnails[3208706] = clik.newPhoto({"id":3208706,"src":"WEBMAG1_thumb.jpg","galleries_id":196075,"server_id":1,"link":"photo_3208706.html","width":130,"caption":"Photography Monthly Feb2008","height":87});
															thumbnails[3213074] = clik.newPhoto({"id":3213074,"src":"WEBMAG2_thumb.jpg","galleries_id":196075,"server_id":1,"link":"photo_3213074.html","width":130,"caption":"Black&White Photography July 2007","height":86});
															thumbnails[3213077] = clik.newPhoto({"id":3213077,"src":"WEBMAG3_thumb.jpg","galleries_id":196075,"server_id":1,"link":"photo_3213077.html","width":130,"caption":"Black&White Photography Sept 2003","height":94});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[351894] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape Portraiture","link":"section419892.html","maxRecords":0.0,"photoIDs":[6352883.0],"skipIndex":0,"section_code":"section419892","featured_images":6352883.0,"id":351894,"singleSection":true});				  						galleries[196075] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PUBLICATIONS","link":"section241651.html","maxRecords":0.0,"photoIDs":[3208706.0,3213074.0,3213077.0],"skipIndex":0,"section_code":"section241651","featured_images":"3213077,3213074,3208706","id":196075,"singleSection":true});				  						galleries[62123] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Technique","link":"section90249.html","maxRecords":0.0,"photoIDs":[800624.0,800627.0,800630.0,800646.0,800670.0,800686.0,800692.0,800695.0,800700.0,800759.0,800777.0,1281655.0],"skipIndex":0,"section_code":"section90249","featured_images":"1281655,800777,800759,800700,800695,800692,800686,800670,800646,800630","id":62123,"singleSection":true});				  						galleries[44232] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"East","link":"gallery_44232.html","maxRecords":0.0,"photoIDs":[572908.0,572924.0,572928.0,3213108.0,1528364.0,573003.0,7114245.0,7217503.0,572996.0,573009.0,573004.0,8242857.0],"skipIndex":0,"section_code":"gallery","featured_images":572908.0,"id":44232,"singleSection":false});				  						galleries[44273] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"South","link":"gallery_44273.html","maxRecords":0.0,"photoIDs":[3805383.0,8844024.0,573522.0,1252921.0,573420.0,573610.0,3416608.0,581419.0,573634.0,3720999.0,573649.0,573669.0,573714.0,573598.0,582156.0,582163.0,582166.0,595843.0,728090.0,582169.0,1664882.0,5592751.0],"skipIndex":0,"section_code":"gallery","featured_images":573522.0,"id":44273,"singleSection":false});				  						galleries[43781] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"West","link":"gallery_43781.html","maxRecords":0.0,"photoIDs":[568100.0,568309.0,570310.0,570418.0,570558.0,570572.0,571051.0,571089.0,571616.0,571969.0,571983.0,572840.0,1252841.0,1795134.0,2550721.0,2823409.0,3345424.0,3684089.0,3988729.0,5591677.0,5684095.0,7220264.0,7230579.0],"skipIndex":0,"section_code":"gallery","featured_images":568100.0,"id":43781,"singleSection":false});				  						galleries[275853] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cumbria Quirk","link":"gallery_275853.html","maxRecords":0.0,"photoIDs":[4829922.0,4829926.0,4829930.0,4829935.0,5630095.0,6355079.0,6701819.0,8433805.0,8433810.0,8433821.0,8433886.0,8433889.0],"skipIndex":0,"section_code":"gallery","featured_images":4829922.0,"id":275853,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[236522] = '6352883';
imageSets[1] = '7217503';
imageSets[2] = '568100,4829922,572908,573522';
imageSets[3] = '8844024,8433889,8433886,8433821,8433810,8433805,8419707,8242857,7230675,7230670,7230579,7220264,7217503,7114285,7114245,6701819,6355079,6352883,6196523,6004824,5684095,5630095,5592751,5591677,4829935,4829930,4829926,4829922,4164654,3988729,3805383,3720999,3684089,3416608,3345424,3213108,3213077,3213074,3208706,2823409,2550721,1795134,1664882,1528364,1281655,1252921,1252841,800777,800759,800700';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/royflem/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/royflem/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/royflem/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 = 'Roy Fleming Photographic: ' + 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 !== '' || 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;
	}
}

			

