window.thumbnails = {};
thumbnails[8429767] = clik.newPhoto({"link":"photo_8429767.html","caption":"","height":87,"id":8429767,"server_id":21,"src":"EszterRoli_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8429772] = clik.newPhoto({"link":"photo_8429772.html","caption":"","height":87,"id":8429772,"server_id":21,"src":"EszterRoli1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8429777] = clik.newPhoto({"link":"photo_8429777.html","caption":"","height":87,"id":8429777,"server_id":21,"src":"IMG_2418__thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8429782] = clik.newPhoto({"link":"photo_8429782.html","caption":"","height":87,"id":8429782,"server_id":21,"src":"EszterRoli2_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9148092] = clik.newPhoto({"link":"photo_9148092.html","caption":"","height":87,"id":9148092,"server_id":21,"src":"EszterRoli5_1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9148249] = clik.newPhoto({"link":"photo_9148249.html","caption":"","height":87,"id":9148249,"server_id":21,"src":"productcommercial_1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[9155296] = clik.newPhoto({"link":"photo_9155296.html","caption":"","height":87,"id":9155296,"server_id":21,"src":"productcommercial6_1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8804555] = clik.newPhoto({"link":"photo_8804555.html","caption":"","height":87,"id":8804555,"server_id":21,"src":"sandwich-jpg_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8309749] = clik.newPhoto({"link":"photo_8309749.html","caption":"","height":87,"id":8309749,"server_id":21,"src":"website-photos1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8309748] = clik.newPhoto({"link":"photo_8309748.html","caption":"","height":87,"id":8309748,"server_id":21,"src":"n_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8804549] = clik.newPhoto({"link":"photo_8804549.html","caption":"","height":87,"id":8804549,"server_id":21,"src":"orange-mocha-jpg_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8045829] = clik.newPhoto({"link":"photo_8045829.html","caption":"","height":87,"id":8045829,"server_id":21,"src":"NA8_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8793369] = clik.newPhoto({"link":"photo_8793369.html","caption":"","height":87,"id":8793369,"server_id":21,"src":"2011_10_09coffee_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8045854] = clik.newPhoto({"link":"photo_8045854.html","caption":"","height":87,"id":8045854,"server_id":21,"src":"NA11_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8793372] = clik.newPhoto({"link":"photo_8793372.html","caption":"","height":87,"id":8793372,"server_id":21,"src":"2011_10_09coffee1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8045859] = clik.newPhoto({"link":"photo_8045859.html","caption":"","height":87,"id":8045859,"server_id":21,"src":"NA31_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8793393] = clik.newPhoto({"link":"photo_8793393.html","caption":"","height":87,"id":8793393,"server_id":21,"src":"2011_10_09coffee2_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8049046] = clik.newPhoto({"link":"photo_8049046.html","caption":"","height":88,"id":8049046,"server_id":21,"src":"NA_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8804859] = clik.newPhoto({"link":"photo_8804859.html","caption":"","height":87,"id":8804859,"server_id":21,"src":"2011_07-str--bottle_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8049083] = clik.newPhoto({"link":"photo_8049083.html","caption":"","height":87,"id":8049083,"server_id":21,"src":"NA4_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8804779] = clik.newPhoto({"link":"photo_8804779.html","caption":"","height":87,"id":8804779,"server_id":21,"src":"2011_07-str--bottle1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8168879] = clik.newPhoto({"link":"photo_8168879.html","caption":"","height":87,"id":8168879,"server_id":21,"src":"IMG_0200_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8129916] = clik.newPhoto({"link":"photo_8129916.html","caption":"","height":87,"id":8129916,"server_id":21,"src":"IMG_0367_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8129920] = clik.newPhoto({"link":"photo_8129920.html","caption":"","height":87,"id":8129920,"server_id":21,"src":"IMG_0005k_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8135056] = clik.newPhoto({"link":"photo_8135056.html","caption":"","height":87,"id":8135056,"server_id":21,"src":"IMG_9586_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8141662] = clik.newPhoto({"link":"photo_8141662.html","caption":"","height":87,"id":8141662,"server_id":21,"src":"IMG_8527_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8129919] = clik.newPhoto({"link":"photo_8129919.html","caption":"","height":87,"id":8129919,"server_id":21,"src":"na12_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8141664] = clik.newPhoto({"link":"photo_8141664.html","caption":"","height":87,"id":8141664,"server_id":21,"src":"IMG_0019-copy_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[9148259] = clik.newPhoto({"link":"photo_9148259.html","caption":"","height":87,"id":9148259,"server_id":21,"src":"productcommercial1_1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[9148261] = clik.newPhoto({"link":"photo_9148261.html","caption":"","height":87,"id":9148261,"server_id":21,"src":"productcommercial2_1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[9155350] = clik.newPhoto({"link":"photo_9155350.html","caption":"","height":87,"id":9155350,"server_id":21,"src":"wedding_1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9148263] = clik.newPhoto({"link":"photo_9148263.html","caption":"","height":87,"id":9148263,"server_id":21,"src":"productcommercial3_1_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[8308880] = clik.newPhoto({"link":"photo_8308880.html","caption":"","height":87,"id":8308880,"server_id":21,"src":"website-photos_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9147824] = clik.newPhoto({"link":"photo_9147824.html","caption":"","height":87,"id":9147824,"server_id":21,"src":"Collages18_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8141667] = clik.newPhoto({"link":"photo_8141667.html","caption":"","height":87,"id":8141667,"server_id":21,"src":"IMG_8070_thumb.jpg","galleries_id":431462,"width":130});
thumbnails[9147819] = clik.newPhoto({"link":"photo_9147819.html","caption":"","height":87,"id":9147819,"server_id":21,"src":"Collages17_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8269890] = clik.newPhoto({"link":"photo_8269890.html","caption":"","height":87,"id":8269890,"server_id":21,"src":"NA01_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9147817] = clik.newPhoto({"link":"photo_9147817.html","caption":"","height":87,"id":9147817,"server_id":21,"src":"Collages16_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[9147770] = clik.newPhoto({"link":"photo_9147770.html","caption":"","height":87,"id":9147770,"server_id":21,"src":"IMG_1814_pp1_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8129927] = clik.newPhoto({"link":"photo_8129927.html","caption":"","height":87,"id":8129927,"server_id":21,"src":"IMG_1662j_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9147758] = clik.newPhoto({"link":"photo_9147758.html","caption":"","height":87,"id":9147758,"server_id":21,"src":"Collages15_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[9147689] = clik.newPhoto({"link":"photo_9147689.html","caption":"","height":87,"id":9147689,"server_id":21,"src":"IMG_1681f_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8984831] = clik.newPhoto({"link":"photo_8984831.html","caption":"","height":87,"id":8984831,"server_id":21,"src":"daphne3_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8129929] = clik.newPhoto({"link":"photo_8129929.html","caption":"","height":87,"id":8129929,"server_id":21,"src":"IMG_1392j1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9147672] = clik.newPhoto({"link":"photo_9147672.html","caption":"","height":87,"id":9147672,"server_id":21,"src":"3_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[9147398] = clik.newPhoto({"link":"photo_9147398.html","caption":"","height":87,"id":9147398,"server_id":21,"src":"maeve-Doyle_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147675] = clik.newPhoto({"link":"photo_9147675.html","caption":"","height":87,"id":9147675,"server_id":21,"src":"Collages13_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8285738] = clik.newPhoto({"link":"photo_8285738.html","caption":"","height":87,"id":8285738,"server_id":21,"src":"gd_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9147403] = clik.newPhoto({"link":"photo_9147403.html","caption":"","height":87,"id":9147403,"server_id":21,"src":"maeve4_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147408] = clik.newPhoto({"link":"photo_9147408.html","caption":"","height":87,"id":9147408,"server_id":21,"src":"maeve5_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147560] = clik.newPhoto({"link":"photo_9147560.html","caption":"","height":87,"id":9147560,"server_id":21,"src":"daphne2_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[9147585] = clik.newPhoto({"link":"photo_9147585.html","caption":"","height":87,"id":9147585,"server_id":21,"src":"Collages12_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8129953] = clik.newPhoto({"link":"photo_8129953.html","caption":"","height":87,"id":8129953,"server_id":21,"src":"IMG_7230l_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8984712] = clik.newPhoto({"link":"photo_8984712.html","caption":"","height":87,"id":8984712,"server_id":21,"src":"maeveIMG_0682_f_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147740] = clik.newPhoto({"link":"photo_9147740.html","caption":"","height":87,"id":9147740,"server_id":21,"src":"Collages14_1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8144790] = clik.newPhoto({"link":"photo_8144790.html","caption":"","height":87,"id":8144790,"server_id":21,"src":"IMG_6099_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8721191] = clik.newPhoto({"link":"photo_8721191.html","caption":"","height":87,"id":8721191,"server_id":21,"src":"2011_09_24fashion-shoot6_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8308888] = clik.newPhoto({"link":"photo_8308888.html","caption":"","height":87,"id":8308888,"server_id":21,"src":"IMG_1163_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8132246] = clik.newPhoto({"link":"photo_8132246.html","caption":"","height":87,"id":8132246,"server_id":21,"src":"IMG_1169_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8721194] = clik.newPhoto({"link":"photo_8721194.html","caption":"","height":87,"id":8721194,"server_id":21,"src":"2011_09_24fashion-shoot4_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8144865] = clik.newPhoto({"link":"photo_8144865.html","caption":"","height":87,"id":8144865,"server_id":21,"src":"IMG_6255j_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8721192] = clik.newPhoto({"link":"photo_8721192.html","caption":"","height":87,"id":8721192,"server_id":21,"src":"2011_09_24fashion-shoot5_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8721196] = clik.newPhoto({"link":"photo_8721196.html","caption":"","height":87,"id":8721196,"server_id":21,"src":"2011_09_24fashion-shoot1_thumb.jpg","galleries_id":431718,"width":130});
thumbnails[8380060] = clik.newPhoto({"link":"photo_8380060.html","caption":"","height":87,"id":8380060,"server_id":21,"src":"Hannika_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8257228] = clik.newPhoto({"link":"photo_8257228.html","caption":"","height":87,"id":8257228,"server_id":21,"src":"Reni--Ranjeet_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8380002] = clik.newPhoto({"link":"photo_8380002.html","caption":"","height":87,"id":8380002,"server_id":21,"src":"website_photos4_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8309773] = clik.newPhoto({"link":"photo_8309773.html","caption":"","height":87,"id":8309773,"server_id":21,"src":"website-photos3_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8257674] = clik.newPhoto({"link":"photo_8257674.html","caption":"","height":87,"id":8257674,"server_id":21,"src":"RR6_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8110099] = clik.newPhoto({"link":"photo_8110099.html","caption":"","height":87,"id":8110099,"server_id":21,"src":"hanna_bw_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8257250] = clik.newPhoto({"link":"photo_8257250.html","caption":"","height":87,"id":8257250,"server_id":21,"src":"RR2_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[9155318] = clik.newPhoto({"link":"photo_9155318.html","caption":"","height":89,"id":9155318,"server_id":21,"src":"IMG_4368_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8062449] = clik.newPhoto({"link":"photo_8062449.html","caption":"","height":87,"id":8062449,"server_id":21,"src":"IMG_4380j_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8257253] = clik.newPhoto({"link":"photo_8257253.html","caption":"","height":87,"id":8257253,"server_id":21,"src":"Reni--Ranjeet1_thumb.jpg","galleries_id":429110,"width":130});
thumbnails[8309777] = clik.newPhoto({"link":"photo_8309777.html","caption":"","height":87,"id":8309777,"server_id":21,"src":"website-photos2_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8045864] = clik.newPhoto({"link":"photo_8045864.html","caption":"","height":87,"id":8045864,"server_id":21,"src":"hanna1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8062448] = clik.newPhoto({"link":"photo_8062448.html","caption":"","height":87,"id":8062448,"server_id":21,"src":"IMG_2496_copy_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147985] = clik.newPhoto({"link":"photo_9147985.html","caption":"","height":87,"id":9147985,"server_id":21,"src":"portraitpeople1_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8110259] = clik.newPhoto({"link":"photo_8110259.html","caption":"","height":87,"id":8110259,"server_id":21,"src":"IMG_9525_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9147908] = clik.newPhoto({"link":"photo_9147908.html","caption":"","height":87,"id":9147908,"server_id":21,"src":"portraitpeople_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8109992] = clik.newPhoto({"link":"photo_8109992.html","caption":"","height":87,"id":8109992,"server_id":21,"src":"anisanko2_HDR2_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8256612] = clik.newPhoto({"link":"photo_8256612.html","caption":"","height":87,"id":8256612,"server_id":21,"src":"csilla_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8268799] = clik.newPhoto({"link":"photo_8268799.html","caption":"","height":87,"id":8268799,"server_id":21,"src":"csilla1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[9148007] = clik.newPhoto({"link":"photo_9148007.html","caption":"","height":87,"id":9148007,"server_id":21,"src":"IMG_0513g_1_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8268810] = clik.newPhoto({"link":"photo_8268810.html","caption":"","height":87,"id":8268810,"server_id":21,"src":"Csilla3_thumb.jpg","galleries_id":429111,"width":130});
thumbnails[8269592] = clik.newPhoto({"link":"photo_8269592.html","caption":"","height":87,"id":8269592,"server_id":21,"src":"Csilla5_thumb.jpg","galleries_id":429111,"width":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[429110] = clik.newGallery({"photoIDs":[8429767,8429772,8429777,8429782,9148092,8309749,8309748,8045829,8045854,8045859,8049046,8049083,8129916,8129920,8129919,9155350,8308880,8269890,8129927,8129929,8285738,8129953,8144790,8308888,8132246,8144865,8257228,8257674,8257250,8257253],"link":"gallery_429110.html","skipIndex":0,"section_code":"gallery","id":429110,"parentGallery":"","featured_images":8045859,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Wedding"});galleries[429111] = clik.newGallery({"photoIDs":[9147398,9147403,9147408,8984712,8380060,8380002,8309773,8110099,9155318,8062449,8309777,8045864,8062448,9147985,8110259,9147908,8109992,8256612,8268799,9148007,8268810,8269592],"link":"gallery_429111.html","skipIndex":0,"section_code":"gallery","id":429111,"parentGallery":"","featured_images":8045864,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Portraits\/People"});galleries[431462] = clik.newGallery({"photoIDs":[9148249,9155296,8804555,8804549,8793369,8793372,8793393,8804859,8804779,8168879,8135056,8141662,8141664,9148259,9148261,9148263,8141667],"link":"gallery_431462.html","skipIndex":0,"section_code":"gallery","id":431462,"parentGallery":"","featured_images":8168879,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Commercial\/Product shots"});galleries[431718] = clik.newGallery({"photoIDs":[9147824,9147819,9147817,9147770,9147758,9147689,8984831,9147672,9147675,9147560,9147585,9147740,8721191,8721194,8721192,8721196],"link":"gallery_431718.html","skipIndex":0,"section_code":"gallery","id":431718,"parentGallery":"","featured_images":"9147824,9147819,9147817,9147770,9147758,9147740,9147689,9147675,9147672,9147585","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Fashion"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '9155350,9155318,9155296,9148263,9148261,9148259,9148249,9148092,9148007,9147985,9147908,9147824,9147819,9147817,9147770,9147758,9147740,9147689,9147675,9147672,9147585,9147560,9147408,9147403,9147398,8984831,8984712,8804859,8804779,8804555,8804549,8793393,8793372,8793369,8721196,8721194,8721192,8721191,8429782,8429777,8429772,8429767,8380060,8380002,8309777,8309773,8309749,8309748,8308888,8308880';
imageSets[2] = '8045859,8168879,8045864';
imageSets[1] = '9148092,8045854,8045859,9147770,8129927,8984831,9147560,9147585,8984712,8380060,8110099,8309777,8045864,8268799';
imageSets[243587] = '8045829,8045854,8045859,8049046,8049083,8129916,8129920,8129919,8129927,8129929,8129953,8132246';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/gabornagy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/gabornagy/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
				  document.title = 'Gabor Nagy Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
			
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

