window.thumbnails = {};
															thumbnails[4233504] = clik.newPhoto({"id":4233504,"src":"web3_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":95});
															thumbnails[5666055] = clik.newPhoto({"id":5666055,"src":"webmarch1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":139});
															thumbnails[5666081] = clik.newPhoto({"id":5666081,"src":"webmarch13_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":153});
															thumbnails[5666096] = clik.newPhoto({"id":5666096,"src":"webmarch16_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":135});
															thumbnails[6432603] = clik.newPhoto({"id":6432603,"src":"sketchbook_1_web12_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":97});
															thumbnails[6432981] = clik.newPhoto({"id":6432981,"src":"hospital_bed_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":161});
															thumbnails[6470417] = clik.newPhoto({"id":6470417,"src":"red_cat_blue_cat_etching_thumb.jpeg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":90});
															thumbnails[6470419] = clik.newPhoto({"id":6470419,"src":"seagull_etching_1_thumb.jpeg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":130});
															thumbnails[6707447] = clik.newPhoto({"id":6707447,"src":"sketchbook_september_2010_8_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":150});
															thumbnails[6707449] = clik.newPhoto({"id":6707449,"src":"sketchbook_september_2010_9_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":162});
															thumbnails[6722372] = clik.newPhoto({"id":6722372,"src":"seagull_bang_bang_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":152});
															thumbnails[7087176] = clik.newPhoto({"id":7087176,"src":"images_nov10_12_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":123});
															thumbnails[7087177] = clik.newPhoto({"id":7087177,"src":"images_nov10_2_web_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":150});
															thumbnails[7087204] = clik.newPhoto({"id":7087204,"src":"images_nov10_8web12_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":199});
															thumbnails[7087207] = clik.newPhoto({"id":7087207,"src":"brighton_pier_giclee_print_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":163});
															thumbnails[7126875] = clik.newPhoto({"id":7126875,"src":"red_cat_in_tree_final_bigger_web12_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":72});
															thumbnails[7139269] = clik.newPhoto({"id":7139269,"src":"rcbc_pencil_final_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":134});
															thumbnails[7140428] = clik.newPhoto({"id":7140428,"src":"live_bait_final_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":191});
															thumbnails[7277349] = clik.newPhoto({"id":7277349,"src":"red_cat_blue_cat_10_web_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[7277376] = clik.newPhoto({"id":7277376,"src":"end_pages_red_cat_blue_cat_this_one_j_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":93});
															thumbnails[7277410] = clik.newPhoto({"id":7277410,"src":"blue_cat_mirror_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":138});
															thumbnails[7318530] = clik.newPhoto({"id":7318530,"src":"red_cat_blue_cat_11_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[7318534] = clik.newPhoto({"id":7318534,"src":"red_cat_blue_cat_8_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[7318537] = clik.newPhoto({"id":7318537,"src":"red_cat_blue_cat_cover_holes_web1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":215});
															thumbnails[7318560] = clik.newPhoto({"id":7318560,"src":"blue_cat_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":132});
															thumbnails[7318562] = clik.newPhoto({"id":7318562,"src":"blue_cat_detail2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":111});
															thumbnails[7318563] = clik.newPhoto({"id":7318563,"src":"blue_cat1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":121});
															thumbnails[7318565] = clik.newPhoto({"id":7318565,"src":"blue_cat_detail3_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":129});
															thumbnails[7318569] = clik.newPhoto({"id":7318569,"src":"japan_6_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":174});
															thumbnails[7320043] = clik.newPhoto({"id":7320043,"src":"blue_cat_2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":93});
															thumbnails[7320046] = clik.newPhoto({"id":7320046,"src":"blue_cat_4_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":83});
															thumbnails[7320047] = clik.newPhoto({"id":7320047,"src":"blue_cat_5_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":81});
															thumbnails[7320049] = clik.newPhoto({"id":7320049,"src":"blue_cat_6_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":131});
															thumbnails[7320050] = clik.newPhoto({"id":7320050,"src":"blue_cat_7_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":68});
															thumbnails[7320052] = clik.newPhoto({"id":7320052,"src":"blue_cat_8_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":71});
															thumbnails[7320057] = clik.newPhoto({"id":7320057,"src":"folens-1_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":230});
															thumbnails[7387680] = clik.newPhoto({"id":7387680,"src":"babies3_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":81});
															thumbnails[7387683] = clik.newPhoto({"id":7387683,"src":"boy_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":103});
															thumbnails[7387686] = clik.newPhoto({"id":7387686,"src":"girl_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":149});
															thumbnails[7387688] = clik.newPhoto({"id":7387688,"src":"girls_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":99});
															thumbnails[7490651] = clik.newPhoto({"id":7490651,"src":"frances_lincoln_boat_16-17_low_res1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":203});
															thumbnails[7490653] = clik.newPhoto({"id":7490653,"src":"frances_lincoln_people_lines_6-7_low_res1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":109});
															thumbnails[7490657] = clik.newPhoto({"id":7490657,"src":"frances_lincoln_picture_frames_web1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":122});
															thumbnails[7490660] = clik.newPhoto({"id":7490660,"src":"kangaroo_frances_lincoln_food_16-17_low_res1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":113});
															thumbnails[7490664] = clik.newPhoto({"id":7490664,"src":"rich_the_cat_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":158});
															thumbnails[7490872] = clik.newPhoto({"id":7490872,"src":"168167_501975003532_504423532_6355734_328257_n_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":194});
															thumbnails[7675279] = clik.newPhoto({"id":7675279,"src":"april_116_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":94});
															thumbnails[7862610] = clik.newPhoto({"id":7862610,"src":"vodka_granny_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":216});
															thumbnails[8022093] = clik.newPhoto({"id":8022093,"src":"drawing_photo_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[8288897] = clik.newPhoto({"id":8288897,"src":"card_aug_11_2_square_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":179});
															thumbnails[8289317] = clik.newPhoto({"id":8289317,"src":"pillow4_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":86});
															thumbnails[8518370] = clik.newPhoto({"id":8518370,"src":"painting_day_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":44});
															thumbnails[8518372] = clik.newPhoto({"id":8518372,"src":"folens_bef2-_4-2.20web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":103});
															thumbnails[8518375] = clik.newPhoto({"id":8518375,"src":"september_2011_1-2web1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":138});
															thumbnails[8518392] = clik.newPhoto({"id":8518392,"src":"dancing_cats_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":94});
															thumbnails[6707479] = clik.newPhoto({"id":6707479,"src":"dom4_copy_copyweb_sept1234_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":179});
															thumbnails[6832846] = clik.newPhoto({"id":6832846,"src":"sept_2010_web_green_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":157});
															thumbnails[7087199] = clik.newPhoto({"id":7087199,"src":"fish_in_net_final_va_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":180});
															thumbnails[7318464] = clik.newPhoto({"id":7318464,"src":"red_cat_mouse11_112345_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":82});
															thumbnails[7415935] = clik.newPhoto({"id":7415935,"src":"mouse_mouth_smaller_eyes_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":89});
															thumbnails[3954685] = clik.newPhoto({"id":3954685,"src":"hansel_and_gretel_london_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7318536] = clik.newPhoto({"id":7318536,"src":"red_cat_blue_cat_7_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[5395393] = clik.newPhoto({"id":5395393,"src":"chimpweb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":167});
															thumbnails[4832440] = clik.newPhoto({"id":4832440,"src":"kinga_thumb.jpeg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":106});
															thumbnails[7310069] = clik.newPhoto({"id":7310069,"src":"dancing_cats_section_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":106});
															thumbnails[6470443] = clik.newPhoto({"id":6470443,"src":"2_folens_donna_garvin_july10_1_web_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":94});
															thumbnails[3329730] = clik.newPhoto({"id":3329730,"src":"2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":81});
															thumbnails[3954634] = clik.newPhoto({"id":3954634,"src":"website_00511_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4233501] = clik.newPhoto({"id":4233501,"src":"web2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":184});
															thumbnails[6087328] = clik.newPhoto({"id":6087328,"src":"folens_text_book21_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[5672417] = clik.newPhoto({"id":5672417,"src":"web_caro_emily_jen_builder_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":92});
															thumbnails[3375170] = clik.newPhoto({"id":3375170,"src":"website 006_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4833247] = clik.newPhoto({"id":4833247,"src":"Photo_on_2009-09-18_at_1454_4_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[5078636] = clik.newPhoto({"id":5078636,"src":"web15_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_5078636.html","width":130,"caption":"","height":100});
															thumbnails[7179894] = clik.newPhoto({"id":7179894,"src":"flying_fish_final_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7179894.html","width":130,"caption":"","height":196});
															thumbnails[7320045] = clik.newPhoto({"id":7320045,"src":"blue_cat_3_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7320045.html","width":130,"caption":"","height":118});
															thumbnails[7320059] = clik.newPhoto({"id":7320059,"src":"sept_2010_web_green_AD565679-24E8-5EC4-4F399CF6EFEB98C6_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7320059.html","width":130,"caption":"","height":157});
															thumbnails[7359493] = clik.newPhoto({"id":7359493,"src":"fish_discard_final_web123_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7359493.html","width":130,"caption":"","height":169});
															thumbnails[7388038] = clik.newPhoto({"id":7388038,"src":"hansel_and_gretel_a3_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7388038.html","width":130,"caption":"","height":94});
															thumbnails[7490617] = clik.newPhoto({"id":7490617,"src":"japan_5_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7490617.html","width":130,"caption":"","height":144});
															thumbnails[7490652] = clik.newPhoto({"id":7490652,"src":"frances_lincoln_hello_web1_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7490652.html","width":130,"caption":"","height":95});
															thumbnails[7490655] = clik.newPhoto({"id":7490655,"src":"frances_lincoln_picnic_16-17_low_res1_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7490655.html","width":130,"caption":"","height":127});
															thumbnails[7675284] = clik.newPhoto({"id":7675284,"src":"april_web31_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7675284.html","width":130,"caption":"","height":179});
															thumbnails[8288892] = clik.newPhoto({"id":8288892,"src":"dont_worry_eat_cake_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8288892.html","width":130,"caption":"","height":163});
															thumbnails[8288895] = clik.newPhoto({"id":8288895,"src":"card_aug_11_1_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8288895.html","width":130,"caption":"","height":93});
															thumbnails[8289316] = clik.newPhoto({"id":8289316,"src":"wedding_invite_caro_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8289316.html","width":130,"caption":"","height":87});
															thumbnails[8476720] = clik.newPhoto({"id":8476720,"src":"sketchbook_MA_work_13_web1_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8476720.html","width":130,"caption":"","height":93});
															thumbnails[8518190] = clik.newPhoto({"id":8518190,"src":"menu_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8518190.html","width":130,"caption":"","height":185});
															thumbnails[8518349] = clik.newPhoto({"id":8518349,"src":"folens_text_book_2011_12_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8518349.html","width":130,"caption":"","height":94});
															thumbnails[8518353] = clik.newPhoto({"id":8518353,"src":"eating_day1web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8518353.html","width":130,"caption":"","height":179});
															thumbnails[8856932] = clik.newPhoto({"id":8856932,"src":"brighton_pier_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856932.html","width":130,"caption":"","height":163});
															thumbnails[8856951] = clik.newPhoto({"id":8856951,"src":"fish_net_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856951.html","width":130,"caption":"","height":172});
															thumbnails[8856961] = clik.newPhoto({"id":8856961,"src":"emily_jonzen_kitchen_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856961.html","width":130,"caption":"","height":140});
															thumbnails[8856962] = clik.newPhoto({"id":8856962,"src":"emily_jonzenspoon_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856962.html","width":130,"caption":"","height":88});
															thumbnails[8856978] = clik.newPhoto({"id":8856978,"src":"london_bus_card_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856978.html","width":130,"caption":"","height":131});
															thumbnails[8856980] = clik.newPhoto({"id":8856980,"src":"june_2011_3_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_8856980.html","width":130,"caption":"","height":84});
															thumbnails[5078632] = clik.newPhoto({"id":5078632,"src":"web12_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_5078632.html","width":130,"caption":"","height":176});
															thumbnails[7139033] = clik.newPhoto({"id":7139033,"src":"red_cat_tree_web_thumb.jpg","galleries_id":465715,"server_id":15,"link":"photo_7139033.html","width":130,"caption":"","height":143});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[465715] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"artwork","link":"section563815.html","maxRecords":0.0,"photoIDs":[5078636.0,7179894.0,7320045.0,7320059.0,7359493.0,7388038.0,7490617.0,7490652.0,7490655.0,7675284.0,8288892.0,8288895.0,8289316.0,8476720.0,8518190.0,8518349.0,8518353.0,8856932.0,8856951.0,8856961.0,8856962.0,8856978.0,8856980.0,5078632.0,7139033.0],"skipIndex":0,"section_code":"section563815","featured_images":"7490617,5078632","id":465715,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8856980,8856961,8856951,8856932,8518353,8288892,7490657,7388038,7359493,5078636,5078632,7139033';
imageSets[2] = '7490617,7318565,7087207,5666055,5078632';
imageSets[3] = '5666055';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jennidesmond/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jennidesmond/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 += 'section563815.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 && 'section563815' != '') {
					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 = 'Jenni Desmond Illustration: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

