window.thumbnails = {};
															thumbnails[1639828] = clik.newPhoto({"id":1639828,"src":"MANOPORT_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Hand","height":174});
															thumbnails[1639782] = clik.newPhoto({"id":1639782,"src":"six sixteen2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Six Sixteen","height":190});
															thumbnails[1639774] = clik.newPhoto({"id":1639774,"src":"Millennium Bridge 2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Millennium Bridge","height":194});
															thumbnails[1639833] = clik.newPhoto({"id":1639833,"src":"stair_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Stair","height":87});
															thumbnails[1639768] = clik.newPhoto({"id":1639768,"src":"Parliament Square2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Parliament Square","height":86});
															thumbnails[1639742] = clik.newPhoto({"id":1639742,"src":"Panorama1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Stonehenge Dawn","height":37});
															thumbnails[5170866] = clik.newPhoto({"id":5170866,"src":"Compleanno-Alisa_15_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_5170866.html","width":130,"caption":"18th Birthday","height":105});
															thumbnails[5170867] = clik.newPhoto({"id":5170867,"src":"Fashion-Show_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_5170867.html","width":130,"caption":"Fashion Show","height":195});
															thumbnails[5172599] = clik.newPhoto({"id":5172599,"src":"Backstage-4_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_5172599.html","width":130,"caption":"Red ","height":157});
															thumbnails[5172605] = clik.newPhoto({"id":5172605,"src":"Two-Ladies-Musical_143-copy_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_5172605.html","width":130,"caption":"Two Ladies Musical","height":86});
															thumbnails[5172614] = clik.newPhoto({"id":5172614,"src":"Backstage-9_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_5172614.html","width":130,"caption":"Backstage","height":87});
															thumbnails[8724090] = clik.newPhoto({"id":8724090,"src":"C__G_1_-_40x30_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724090.html","width":130,"caption":"Claudia & Giovanni - Triptic","height":98});
															thumbnails[8724092] = clik.newPhoto({"id":8724092,"src":"C__G_2_-_30x20_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724092.html","width":130,"caption":"Claudia & Giovanni","height":87});
															thumbnails[8724093] = clik.newPhoto({"id":8724093,"src":"C__G_3_-_40x30_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724093.html","width":130,"caption":"Claudia & Giovanni - The Ring","height":98});
															thumbnails[8724095] = clik.newPhoto({"id":8724095,"src":"C__G_10_-_20x30_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724095.html","width":130,"caption":"Claudia - Party Bride","height":195});
															thumbnails[8724096] = clik.newPhoto({"id":8724096,"src":"Limmud_Conference_2010_-_Nathan_Servi_Photography_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724096.html","width":130,"caption":"Limmud Conference - Official Photo","height":67});
															thumbnails[8724098] = clik.newPhoto({"id":8724098,"src":"Limmud_Conference_2010_-_Nathan_Servi_Photography_31_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_8724098.html","width":130,"caption":"Zofim ","height":105});
															thumbnails[8724100] = clik.newPhoto({"id":8724100,"src":"_IGP0111_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724100.html","width":130,"caption":"Edward","height":86});
															thumbnails[8724103] = clik.newPhoto({"id":8724103,"src":"Aprile_2011_1_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724103.html","width":130,"caption":"Ben","height":86});
															thumbnails[8724105] = clik.newPhoto({"id":8724105,"src":"Aprile_2011_7_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724105.html","width":130,"caption":"Ezra & Ben","height":87});
															thumbnails[8724108] = clik.newPhoto({"id":8724108,"src":"Beauty_Shot_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724108.html","width":130,"caption":"Beauty Shoot","height":71});
															thumbnails[8724110] = clik.newPhoto({"id":8724110,"src":"Corrine_May_2010_-_Ringlight_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724110.html","width":130,"caption":"Corrine ","height":171});
															thumbnails[8724111] = clik.newPhoto({"id":8724111,"src":"Jacobs_4_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724111.html","width":130,"caption":"Zoe Naomi & Lucie","height":86});
															thumbnails[8724114] = clik.newPhoto({"id":8724114,"src":"Jamie_6_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724114.html","width":130,"caption":"Jamie","height":195});
															thumbnails[8724124] = clik.newPhoto({"id":8724124,"src":"Poster_1_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724124.html","width":130,"caption":"Jarka","height":99});
															thumbnails[8724126] = clik.newPhoto({"id":8724126,"src":"Red_Glamour_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724126.html","width":130,"caption":"Studio Shoot","height":201});
															thumbnails[8724127] = clik.newPhoto({"id":8724127,"src":"Webbers_10_thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_8724127.html","width":130,"caption":"Naomi","height":87});
															thumbnails[8724689] = clik.newPhoto({"id":8724689,"src":"271287_1809556040654_1292567179_31483650_3846537_o_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724689.html","width":130,"caption":"Leadership","height":73});
															thumbnails[8724690] = clik.newPhoto({"id":8724690,"src":"22_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724690.html","width":130,"caption":"Emma & Hadley","height":87});
															thumbnails[8724692] = clik.newPhoto({"id":8724692,"src":"167669_1524367591121_1292567179_31137666_2932100_n_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_8724692.html","width":130,"caption":"Leadership ","height":87});
															thumbnails[8725276] = clik.newPhoto({"id":8725276,"src":"_IGP3457_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725276.html","width":130,"caption":"Man & Bird","height":86});
															thumbnails[8725286] = clik.newPhoto({"id":8725286,"src":"Brighton__71_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725286.html","width":130,"caption":"Super Love","height":96});
															thumbnails[8725290] = clik.newPhoto({"id":8725290,"src":"Brighton-_6_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725290.html","width":130,"caption":"Brighton Pier","height":157});
															thumbnails[8725291] = clik.newPhoto({"id":8725291,"src":"Cagliari_2011_21_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725291.html","width":130,"caption":"Coin Watcher","height":200});
															thumbnails[8725293] = clik.newPhoto({"id":8725293,"src":"Cagliari_2011_31_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725293.html","width":130,"caption":"BBQ","height":195});
															thumbnails[8725296] = clik.newPhoto({"id":8725296,"src":"Camel_owner_in_Kalya1_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725296.html","width":130,"caption":"Camel Owner in Kalya","height":86});
															thumbnails[8725297] = clik.newPhoto({"id":8725297,"src":"Carpet_Maker_B93AA143-1EC9-DFB6-0971A1A8189B0D73_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725297.html","width":130,"caption":"Carpet Maker in Istanbul","height":89});
															thumbnails[8725298] = clik.newPhoto({"id":8725298,"src":"ENVYREMA_thumb.JPG","galleries_id":459878,"server_id":18,"link":"photo_8725298.html","width":130,"caption":"Envy","height":172});
															thumbnails[8725301] = clik.newPhoto({"id":8725301,"src":"Gente_di_Firenze_12_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725301.html","width":130,"caption":"Bus Stop Irony","height":195});
															thumbnails[8725302] = clik.newPhoto({"id":8725302,"src":"Gente_di_Firenze_13_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725302.html","width":130,"caption":"Old Love","height":195});
															thumbnails[8725321] = clik.newPhoto({"id":8725321,"src":"Gente_di_Firenze_21_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725321.html","width":130,"caption":"Shapes","height":195});
															thumbnails[8725322] = clik.newPhoto({"id":8725322,"src":"Gente_di_Firenze_22_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725322.html","width":130,"caption":"I Love Italia","height":195});
															thumbnails[8725324] = clik.newPhoto({"id":8725324,"src":"Gente_di_Firenze_27_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725324.html","width":130,"caption":"Guarding the Square","height":195});
															thumbnails[8725325] = clik.newPhoto({"id":8725325,"src":"Gente_di_Firenze_29_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725325.html","width":130,"caption":"Sexting","height":195});
															thumbnails[8725327] = clik.newPhoto({"id":8725327,"src":"Gente_di_Firenze_31_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725327.html","width":130,"caption":"Peekaboo ","height":195});
															thumbnails[8725337] = clik.newPhoto({"id":8725337,"src":"Gente_di_Firenze_32_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725337.html","width":130,"caption":"Ice cream","height":93});
															thumbnails[8725406] = clik.newPhoto({"id":8725406,"src":"Gente_di_Firenze_361_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725406.html","width":130,"caption":"Caught","height":195});
															thumbnails[8725485] = clik.newPhoto({"id":8725485,"src":"Israel_Good_2_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725485.html","width":130,"caption":"Curious","height":195});
															thumbnails[8725521] = clik.newPhoto({"id":8725521,"src":"Israel_Good_6_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725521.html","width":130,"caption":"from above","height":195});
															thumbnails[8725572] = clik.newPhoto({"id":8725572,"src":"Looks_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725572.html","width":130,"caption":"Looks","height":91});
															thumbnails[8725595] = clik.newPhoto({"id":8725595,"src":"Venezia_2011_21_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725595.html","width":130,"caption":"Gondoliere","height":194});
															thumbnails[8725612] = clik.newPhoto({"id":8725612,"src":"Venezia_2011_71_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725612.html","width":130,"caption":"Intensity","height":86});
															thumbnails[8725727] = clik.newPhoto({"id":8725727,"src":"Venezia_2011_81_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725727.html","width":130,"caption":"class","height":90});
															thumbnails[8725826] = clik.newPhoto({"id":8725826,"src":"Venezia_2011_101_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725826.html","width":130,"caption":"San Marco","height":95});
															thumbnails[8725871] = clik.newPhoto({"id":8725871,"src":"Venezia_2011_181_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725871.html","width":130,"caption":"alley","height":191});
															thumbnails[8725873] = clik.newPhoto({"id":8725873,"src":"Venezia_2011_201_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725873.html","width":130,"caption":"rio dei frari","height":178});
															thumbnails[8725884] = clik.newPhoto({"id":8725884,"src":"Venezia_2011_241_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725884.html","width":130,"caption":"Masks","height":209});
															thumbnails[8725885] = clik.newPhoto({"id":8725885,"src":"Venezia_2011_25_thumb.jpg","galleries_id":459878,"server_id":18,"link":"photo_8725885.html","width":130,"caption":"guarding the statue","height":190});
															thumbnails[4146533] = clik.newPhoto({"id":4146533,"src":"2_White__thumb.jpg","galleries_id":163308,"server_id":18,"link":"photo_4146533.html","width":130,"caption":"Amanda Promo Shoot","height":194});
															thumbnails[4146569] = clik.newPhoto({"id":4146569,"src":"Emi__Alper_Wedding_SHoot_59_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_4146569.html","width":130,"caption":"Emi & Alper","height":92});
															thumbnails[4147650] = clik.newPhoto({"id":4147650,"src":"David_2_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147650.html","width":130,"caption":"David","height":186});
															thumbnails[3555084] = clik.newPhoto({"id":3555084,"src":"8_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_3555084.html","width":130,"caption":"Tia & Roy","height":98});
															thumbnails[4147665] = clik.newPhoto({"id":4147665,"src":"ffff_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147665.html","width":130,"caption":"Corrine - Shepherds Bush Empire","height":87});
															thumbnails[4147738] = clik.newPhoto({"id":4147738,"src":"bb_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147738.html","width":130,"caption":"Blue","height":195});
															thumbnails[4147740] = clik.newPhoto({"id":4147740,"src":"b_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147740.html","width":130,"caption":"Acoustic","height":87});
															thumbnails[4146593] = clik.newPhoto({"id":4146593,"src":"Emi__Alper_Wedding_SHoot_109_thumb.jpg","galleries_id":163309,"server_id":18,"link":"photo_4146593.html","width":130,"caption":"Emi & Alper","height":163});
															thumbnails[4147731] = clik.newPhoto({"id":4147731,"src":"iii_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147731.html","width":130,"caption":"Vicky - Sheperds Bush Empire","height":195});
															thumbnails[4148414] = clik.newPhoto({"id":4148414,"src":"_IGP1967_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4148414.html","width":130,"caption":"Battle of the Bands","height":87});
															thumbnails[4147742] = clik.newPhoto({"id":4147742,"src":"David_6_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147742.html","width":130,"caption":"Rockin'","height":87});
															thumbnails[2046119] = clik.newPhoto({"id":2046119,"src":"Rime2_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_2046119.html","width":130,"caption":"Rime Live","height":96});
															thumbnails[2560764] = clik.newPhoto({"id":2560764,"src":"18_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_2560764.html","width":130,"caption":"Joe","height":94});
															thumbnails[3555042] = clik.newPhoto({"id":3555042,"src":"GOLD_6_S_thumb.JPG","galleries_id":163308,"server_id":18,"link":"photo_3555042.html","width":130,"caption":"Moochii","height":76});
															thumbnails[4147734] = clik.newPhoto({"id":4147734,"src":"eeee_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147734.html","width":130,"caption":"Paul","height":194});
															thumbnails[4147745] = clik.newPhoto({"id":4147745,"src":"ff_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147745.html","width":130,"caption":"Corrine","height":87});
															thumbnails[4148418] = clik.newPhoto({"id":4148418,"src":"l_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4148418.html","width":130,"caption":"Dreds","height":87});
															thumbnails[4147747] = clik.newPhoto({"id":4147747,"src":"Guitarist_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_4147747.html","width":130,"caption":"Guitar","height":87});
															thumbnails[2560766] = clik.newPhoto({"id":2560766,"src":"Jazz2_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_2560766.html","width":130,"caption":"Jazz","height":180});
															thumbnails[3554997] = clik.newPhoto({"id":3554997,"src":"Sitar_thumb.jpg","galleries_id":163304,"server_id":18,"link":"photo_3554997.html","width":130,"caption":"Sitar","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[459878] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Street Portraits","link":"section205670_459878.html","maxRecords":0.0,"photoIDs":[8725276.0,8725286.0,8725290.0,8725291.0,8725293.0,8725296.0,8725297.0,8725298.0,8725301.0,8725302.0,8725321.0,8725322.0,8725324.0,8725325.0,8725327.0,8725337.0,8725406.0,8725485.0,8725521.0,8725572.0,8725595.0,8725612.0,8725727.0,8725826.0,8725871.0,8725873.0,8725884.0,8725885.0],"skipIndex":0,"section_code":"section205670","featured_images":"8725885,8725884,8725873,8725871,8725826,8725727,8725612,8725595,8725572,8725521","id":459878,"singleSection":false});				  						galleries[163309] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events","link":"section205670_163309.html","maxRecords":0.0,"photoIDs":[5170866.0,8724090.0,8724092.0,8724093.0,8724095.0,8724096.0,8724689.0,8724690.0,8724692.0,4146569.0,3555084.0,4146593.0],"skipIndex":0,"section_code":"section205670","featured_images":"4146593,4146569,3555084","id":163309,"singleSection":false});				  						galleries[163308] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photoshoots","link":"section205670_163308.html","maxRecords":0.0,"photoIDs":[5170867.0,5172599.0,5172605.0,5172614.0,8724100.0,8724103.0,8724105.0,8724108.0,8724110.0,8724111.0,8724114.0,8724124.0,8724126.0,8724127.0,4146533.0,3555042.0],"skipIndex":0,"section_code":"section205670","featured_images":4146533.0,"id":163308,"singleSection":false});				  						galleries[163304] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Live Music","link":"section205670_163304.html","maxRecords":0.0,"photoIDs":[8724098.0,4147650.0,4147665.0,4147738.0,4147740.0,4147731.0,4148414.0,4147742.0,2046119.0,2560764.0,4147734.0,4147745.0,4148418.0,4147747.0,2560766.0,3554997.0],"skipIndex":0,"section_code":"section205670","featured_images":"4148418,4147747,4147745,4147665,4147650,2046119","id":163304,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8725885,8725727,8725595,8725572,8725325,8725322,8725298,8725297,8725296,8725286,8724111,8724108,4147650,4146569,4146533,1639828,3555084,1639782,1639774,1639833,2046119,1639768,4147745,1639742,4148418,4147747';
imageSets[2] = '4147650,4146569,4146533,1639828,4147665,3555084,1639782,4146593,1639833,2046119,1639768,4147745,1639742,4148418,4147747';
imageSets[3] = '8725885,8725884,8725873,8725871,8725826,8725727,8725612,8725595,8725572,8725521,8725485,8725406,8725337,8725327,8725325,8725324,8725322,8725321,8725302,8725301,8725298,8725297,8725296,8725293,8725291,8725290,8725286,8725276,8724692,8724690,8724689,8724127,8724126,8724124,8724114,8724111,8724110,8724108,8724105,8724103,8724100,8724098,8724096,8724095,8724093,8724092,8724090,5172614,5172605,5172599';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/nathanever82/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/nathanever82/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 += 'section205670.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 && 'section205670' != '') {
					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 = 'Nathan Servi   Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="nathanever82@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="nathanever82@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

