window.thumbnails = {};
															thumbnails[8672574] = clik.newPhoto({"id":8672574,"src":"DSC_6160_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":110,"caption":"","height":73});
															thumbnails[8672590] = clik.newPhoto({"id":8672590,"src":"final_1331cook_1_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":110,"caption":"","height":42});
															thumbnails[8673233] = clik.newPhoto({"id":8673233,"src":"LLP_7182_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":110,"caption":"","height":73});
															thumbnails[8665958] = clik.newPhoto({"id":8665958,"src":"LLL_c7959_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8665958.html","width":110,"caption":"","height":166});
															thumbnails[8672483] = clik.newPhoto({"id":8672483,"src":"LLL_8382_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672483.html","width":110,"caption":"","height":166});
															thumbnails[8672502] = clik.newPhoto({"id":8672502,"src":"LLL_8281_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672502.html","width":110,"caption":"","height":166});
															thumbnails[8672544] = clik.newPhoto({"id":8672544,"src":"adam_poster_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672544.html","width":110,"caption":"","height":156});
															thumbnails[8672572] = clik.newPhoto({"id":8672572,"src":"LLP_9828_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672572.html","width":110,"caption":"","height":165});
															thumbnails[8672576] = clik.newPhoto({"id":8672576,"src":"DSC_7744_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672576.html","width":150,"caption":"","height":100});
															thumbnails[8672628] = clik.newPhoto({"id":8672628,"src":"LLP_1749-workingadjustedmo_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672628.html","width":150,"caption":"","height":100});
															thumbnails[8672650] = clik.newPhoto({"id":8672650,"src":"DSC_5795_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672650.html","width":110,"caption":"","height":165});
															thumbnails[8672652] = clik.newPhoto({"id":8672652,"src":"LLL_4025_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672652.html","width":110,"caption":"","height":166});
															thumbnails[8672658] = clik.newPhoto({"id":8672658,"src":"LLP_4942_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672658.html","width":110,"caption":"","height":73});
															thumbnails[8672702] = clik.newPhoto({"id":8672702,"src":"magnify_35x20_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8672702.html","width":110,"caption":"","height":60});
															thumbnails[8673204] = clik.newPhoto({"id":8673204,"src":"01_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673204.html","width":110,"caption":"","height":165});
															thumbnails[8673217] = clik.newPhoto({"id":8673217,"src":"lady_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673217.html","width":110,"caption":"","height":165});
															thumbnails[8673227] = clik.newPhoto({"id":8673227,"src":"500_5633_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673227.html","width":110,"caption":"","height":165});
															thumbnails[8673229] = clik.newPhoto({"id":8673229,"src":"DSC_Wweb6190_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673229.html","width":110,"caption":"","height":166});
															thumbnails[8673230] = clik.newPhoto({"id":8673230,"src":"100188943_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673230.html","width":110,"caption":"","height":73});
															thumbnails[8673231] = clik.newPhoto({"id":8673231,"src":"llp_c0481_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673231.html","width":110,"caption":"","height":73});
															thumbnails[8673232] = clik.newPhoto({"id":8673232,"src":"LLP_c8213_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673232.html","width":110,"caption":"","height":73});
															thumbnails[8673234] = clik.newPhoto({"id":8673234,"src":"LLP_3308_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673234.html","width":110,"caption":"","height":73});
															thumbnails[8673236] = clik.newPhoto({"id":8673236,"src":"LLP_1127_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673236.html","width":110,"caption":"","height":73});
															thumbnails[8673237] = clik.newPhoto({"id":8673237,"src":"LLP_1172_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673237.html","width":110,"caption":"","height":73});
															thumbnails[8673238] = clik.newPhoto({"id":8673238,"src":"web__molly_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673238.html","width":110,"caption":"","height":46});
															thumbnails[8673239] = clik.newPhoto({"id":8673239,"src":"web_molly___copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673239.html","width":110,"caption":"","height":46});
															thumbnails[8673240] = clik.newPhoto({"id":8673240,"src":"webmolly_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673240.html","width":110,"caption":"","height":46});
															thumbnails[8673241] = clik.newPhoto({"id":8673241,"src":"NZ_2011_llp_9985_copy_thumb.jpg","galleries_id":123878,"server_id":18,"link":"photo_8673241.html","width":110,"caption":"","height":165});
															thumbnails[8665927] = clik.newPhoto({"id":8665927,"src":"LLP_2941_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665927.html","width":110,"caption":"LUPI OIL COOK BOOK","height":105});
															thumbnails[8665937] = clik.newPhoto({"id":8665937,"src":"BBQ_meal_sml_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665937.html","width":110,"caption":"","height":73});
															thumbnails[8665945] = clik.newPhoto({"id":8665945,"src":"DSC_9143_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665945.html","width":110,"caption":"","height":75});
															thumbnails[8665952] = clik.newPhoto({"id":8665952,"src":"LLP_3006_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665952.html","width":110,"caption":"","height":165});
															thumbnails[8665953] = clik.newPhoto({"id":8665953,"src":"LLP_3721_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665953.html","width":110,"caption":"","height":163});
															thumbnails[8665954] = clik.newPhoto({"id":8665954,"src":"LLP_3137_thumb.jpg","galleries_id":457504,"server_id":18,"link":"photo_8665954.html","width":110,"caption":"","height":165});
															thumbnails[8665928] = clik.newPhoto({"id":8665928,"src":"HEALEYW_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8665928.html","width":110,"caption":"AUSTIN HEALEY","height":142});
															thumbnails[8665932] = clik.newPhoto({"id":8665932,"src":"_S_BLUE_flame1_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8665932.html","width":110,"caption":"","height":147});
															thumbnails[8665934] = clik.newPhoto({"id":8665934,"src":"A_HEALEY_6_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8665934.html","width":110,"caption":"","height":125});
															thumbnails[8665935] = clik.newPhoto({"id":8665935,"src":"A_shepard_arms_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8665935.html","width":150,"caption":"","height":109});
															thumbnails[8665938] = clik.newPhoto({"id":8665938,"src":"Awellesley_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8665938.html","width":110,"caption":"","height":112});
															thumbnails[8665959] = clik.newPhoto({"id":8665959,"src":"anz_tower_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8665959.html","width":110,"caption":"","height":110});
															thumbnails[8672608] = clik.newPhoto({"id":8672608,"src":"LLP_E3952_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672608.html","width":110,"caption":"","height":73});
															thumbnails[8672612] = clik.newPhoto({"id":8672612,"src":"LLP_4334_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672612.html","width":110,"caption":"","height":73});
															thumbnails[8672614] = clik.newPhoto({"id":8672614,"src":"LLP_1156BARBIE_ANTS_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672614.html","width":110,"caption":"","height":75});
															thumbnails[8672616] = clik.newPhoto({"id":8672616,"src":"BBQ_meal_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672616.html","width":110,"caption":"","height":73});
															thumbnails[8672618] = clik.newPhoto({"id":8672618,"src":"DSC_asian_family0102_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672618.html","width":110,"caption":"","height":76});
															thumbnails[8672636] = clik.newPhoto({"id":8672636,"src":"LAW_e5138_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672636.html","width":110,"caption":"","height":73});
															thumbnails[8672640] = clik.newPhoto({"id":8672640,"src":"LAW_e5814_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672640.html","width":110,"caption":"","height":73});
															thumbnails[8672643] = clik.newPhoto({"id":8672643,"src":"plastic_cmyk_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672643.html","width":110,"caption":"","height":127});
															thumbnails[8672645] = clik.newPhoto({"id":8672645,"src":"roll_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672645.html","width":110,"caption":"","height":110});
															thumbnails[8672655] = clik.newPhoto({"id":8672655,"src":"knife_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672655.html","width":110,"caption":"","height":113});
															thumbnails[8672677] = clik.newPhoto({"id":8672677,"src":"LAW_0426_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8672677.html","width":110,"caption":"","height":73});
															thumbnails[8672681] = clik.newPhoto({"id":8672681,"src":"LLL_c2163_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8672681.html","width":110,"caption":"","height":70});
															thumbnails[8672711] = clik.newPhoto({"id":8672711,"src":"LAW_8130-2_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672711.html","width":110,"caption":"","height":41});
															thumbnails[8672720] = clik.newPhoto({"id":8672720,"src":"LAW_7690_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672720.html","width":110,"caption":"","height":41});
															thumbnails[8672726] = clik.newPhoto({"id":8672726,"src":"LAW_6149_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672726.html","width":110,"caption":"","height":41});
															thumbnails[8672782] = clik.newPhoto({"id":8672782,"src":"LAW_9948_thumb.jpg","galleries_id":457508,"server_id":18,"link":"photo_8672782.html","width":110,"caption":"","height":41});
															thumbnails[8672789] = clik.newPhoto({"id":8672789,"src":"LLL_2245_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8672789.html","width":110,"caption":"","height":73});
															thumbnails[8673246] = clik.newPhoto({"id":8673246,"src":"LLP_4737_copy_thumb.jpg","galleries_id":457509,"server_id":18,"link":"photo_8673246.html","width":110,"caption":"","height":73});
															thumbnails[8672581] = clik.newPhoto({"id":8672581,"src":"cc_hero_e1159_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672581.html","width":110,"caption":"","height":54});
															thumbnails[8672586] = clik.newPhoto({"id":8672586,"src":"LLP_6321_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672586.html","width":110,"caption":"","height":48});
															thumbnails[8672595] = clik.newPhoto({"id":8672595,"src":"final_1338cook_2_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672595.html","width":110,"caption":"","height":42});
															thumbnails[8672600] = clik.newPhoto({"id":8672600,"src":"final_r1344_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672600.html","width":110,"caption":"","height":38});
															thumbnails[8672604] = clik.newPhoto({"id":8672604,"src":"LLP_4239_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672604.html","width":110,"caption":"","height":29});
															thumbnails[8672696] = clik.newPhoto({"id":8672696,"src":"LLL_9092_thumb.jpg","galleries_id":457505,"server_id":18,"link":"photo_8672696.html","width":110,"caption":"","height":46});
															thumbnails[8665931] = clik.newPhoto({"id":8665931,"src":"LLP_w4846_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665931.html","width":110,"caption":"","height":166});
															thumbnails[8665939] = clik.newPhoto({"id":8665939,"src":"DSC_0219_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665939.html","width":110,"caption":"","height":165});
															thumbnails[8665940] = clik.newPhoto({"id":8665940,"src":"cover_1859_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665940.html","width":110,"caption":"","height":73});
															thumbnails[8665941] = clik.newPhoto({"id":8665941,"src":"DSC_web5292_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665941.html","width":110,"caption":"","height":51});
															thumbnails[8665942] = clik.newPhoto({"id":8665942,"src":"LLP_w4963_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665942.html","width":110,"caption":"","height":73});
															thumbnails[8665943] = clik.newPhoto({"id":8665943,"src":"LLP_w48461_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665943.html","width":110,"caption":"","height":166});
															thumbnails[8665944] = clik.newPhoto({"id":8665944,"src":"LLP_3611_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665944.html","width":110,"caption":"","height":165});
															thumbnails[8665957] = clik.newPhoto({"id":8665957,"src":"LLP_w4990_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8665957.html","width":110,"caption":"","height":165});
															thumbnails[8672686] = clik.newPhoto({"id":8672686,"src":"Wharite_Peak_copyright_Lance_Lawson_Photography_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8672686.html","width":110,"caption":"","height":73});
															thumbnails[8672689] = clik.newPhoto({"id":8672689,"src":"Te_Apiti_11_turbines_LR_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8672689.html","width":110,"caption":"","height":82});
															thumbnails[8673242] = clik.newPhoto({"id":8673242,"src":"LLP_w2074_copy_thumb.jpg","galleries_id":457507,"server_id":18,"link":"photo_8673242.html","width":110,"caption":"","height":184});
															thumbnails[8665924] = clik.newPhoto({"id":8665924,"src":"_Pfarmer1_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665924.html","width":130,"caption":"","height":130});
															thumbnails[8665930] = clik.newPhoto({"id":8665930,"src":"horseW_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665930.html","width":110,"caption":"","height":104});
															thumbnails[8665933] = clik.newPhoto({"id":8665933,"src":"_S_hand_plant_3BEBBE62-1EC9-DFB6-09F30BB7CDE1C587_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665933.html","width":110,"caption":"","height":152});
															thumbnails[8665947] = clik.newPhoto({"id":8665947,"src":"LLL_e4563_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665947.html","width":110,"caption":"","height":73});
															thumbnails[8665948] = clik.newPhoto({"id":8665948,"src":"LLL_c4368_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665948.html","width":110,"caption":"","height":73});
															thumbnails[8665949] = clik.newPhoto({"id":8665949,"src":"LLL_c4602_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665949.html","width":110,"caption":"","height":73});
															thumbnails[8665950] = clik.newPhoto({"id":8665950,"src":"LLL_Cr7607_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665950.html","width":110,"caption":"","height":166});
															thumbnails[8665955] = clik.newPhoto({"id":8665955,"src":"LLP_w7065_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8665955.html","width":110,"caption":"","height":50});
															thumbnails[8672660] = clik.newPhoto({"id":8672660,"src":"LLP_c1127eggs_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8672660.html","width":110,"caption":"","height":73});
															thumbnails[8672665] = clik.newPhoto({"id":8672665,"src":"LLP_6909_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8672665.html","width":110,"caption":"","height":73});
															thumbnails[8672670] = clik.newPhoto({"id":8672670,"src":"LLL_r7185_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8672670.html","width":110,"caption":"","height":73});
															thumbnails[8672674] = clik.newPhoto({"id":8672674,"src":"DSC_3280_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8672674.html","width":110,"caption":"","height":78});
															thumbnails[8673244] = clik.newPhoto({"id":8673244,"src":"LLP_5432_copy_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8673244.html","width":110,"caption":"","height":165});
															thumbnails[8673245] = clik.newPhoto({"id":8673245,"src":"LLP_5591_copy_thumb.jpg","galleries_id":457506,"server_id":18,"link":"photo_8673245.html","width":110,"caption":"","height":165});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[457506] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"AGRICULTURE","link":"section385918.html","maxRecords":0.0,"photoIDs":[8665924.0,8665930.0,8665933.0,8665947.0,8665948.0,8665949.0,8665950.0,8665955.0,8672660.0,8672665.0,8672670.0,8672674.0,8673244.0,8673245.0],"skipIndex":0,"section_code":"section385918","featured_images":"8673245,8673244,8672674,8672670,8672665,8672660,8665955,8665950,8665949,8665948","id":457506,"singleSection":true});				  						galleries[457509] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ARCHITECTURE","link":"gallery_457509.html","maxRecords":0.0,"photoIDs":[8665935.0,8665938.0,8665959.0,8672677.0,8672681.0,8672789.0,8673246.0],"skipIndex":0,"section_code":"gallery","featured_images":"8673246,8672789,8672681,8672677,8665959,8665938,8665935","id":457509,"singleSection":false});				  						galleries[457508] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"commercial photography","link":"gallery_457508.html","maxRecords":0.0,"photoIDs":[8665928.0,8665932.0,8665934.0,8672608.0,8672612.0,8672614.0,8672616.0,8672618.0,8672636.0,8672640.0,8672643.0,8672645.0,8672655.0,8672711.0,8672720.0,8672726.0,8672782.0],"skipIndex":0,"section_code":"gallery","featured_images":"8672782,8672726,8672720,8672711,8672655,8672645,8672643,8672640,8672636,8672618","id":457508,"singleSection":false});				  						galleries[457504] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"FOOD","link":"section385915.html","maxRecords":0.0,"photoIDs":[8665927.0,8665937.0,8665945.0,8665952.0,8665953.0,8665954.0],"skipIndex":0,"section_code":"section385915","featured_images":"8665954,8665953,8665952,8665945,8665937,8665927","id":457504,"singleSection":true});				  						galleries[457505] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LANDSCAPES","link":"section385916.html","maxRecords":0.0,"photoIDs":[8672581.0,8672586.0,8672595.0,8672600.0,8672604.0,8672696.0],"skipIndex":0,"section_code":"section385916","featured_images":"8672696,8672604,8672600,8672595,8672586,8672581","id":457505,"singleSection":true});				  						galleries[457507] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WIND TURBINES","link":"section385917.html","maxRecords":0.0,"photoIDs":[8665931.0,8665939.0,8665940.0,8665941.0,8665942.0,8665943.0,8665944.0,8665957.0,8672686.0,8672689.0,8673242.0],"skipIndex":0,"section_code":"section385917","featured_images":"8673242,8672689,8672686,8665957,8665944,8665943,8665942,8665941,8665940,8665939","id":457507,"singleSection":true});				  						galleries[123878] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"People","link":"section385913.html","maxRecords":0.0,"photoIDs":[8665958.0,8672483.0,8672502.0,8672544.0,8672572.0,8672576.0,8672628.0,8672650.0,8672652.0,8672658.0,8672702.0,8673204.0,8673217.0,8673227.0,8673229.0,8673230.0,8673231.0,8673232.0,8673234.0,8673236.0,8673237.0,8673238.0,8673239.0,8673240.0,8673241.0],"skipIndex":0,"section_code":"section385913","featured_images":"8673241,8673240,8673239,8673238,8673237,8673236,8673234,8673232,8673231,8673230","id":123878,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8673246,8673245,8673244,8673242,8673241,8673240,8673239,8673238,8673237,8673236,8673234,8673233,8673232,8673231,8673230,8673229,8673227,8673217,8673204,8672789,8672782,8672726,8672720,8672711,8672702,8672696,8672689,8672686,8672681,8672677,8672674,8672670,8672665,8672660,8672658,8672655,8672652,8672650,8672645,8672643,8672640,8672636,8672628,8672618,8672616,8672614,8672612,8672608,8672604,8672600';
imageSets[3] = '8673246,8673245,8673244,8673242,8673241,8673240,8673239,8673238,8673237,8673236,8673234,8673233,8673232,8673231,8673230,8673229,8673227,8673217,8673204,8672789,8672782,8672726,8672720,8672711,8672702,8672696,8672689,8672686,8672681,8672677,8672674,8672670,8672665,8672660,8672658,8672655,8672652,8672650,8672645,8672643,8672640,8672636,8672628,8672618,8672616,8672614,8672612,8672608,8672604,8672600';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lancelawson/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lancelawson/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 += 'section385913.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 && 'section385913' != '') {
					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 = 'LANCE LAWSON 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.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;
	}
}

			

