window.thumbnails = {};
															thumbnails[5547475] = clik.newPhoto({"id":5547475,"src":"Rail_0312_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_5547475.html","width":130,"caption":"","height":192});
															thumbnails[7193678] = clik.newPhoto({"id":7193678,"src":"Ali_BHS_Leavers_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_7193678.html","width":130,"caption":"","height":195});
															thumbnails[7991726] = clik.newPhoto({"id":7991726,"src":"CaptureOne_088_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_7991726.html","width":130,"caption":"","height":195});
															thumbnails[5138704] = clik.newPhoto({"id":5138704,"src":"Portraits_captureone_papas_sydney_2_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_5138704.html","width":130,"caption":"","height":195});
															thumbnails[6257766] = clik.newPhoto({"id":6257766,"src":"Flawless_level_12_09_Nov_088_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6257766.html","width":130,"caption":"","height":195});
															thumbnails[6257767] = clik.newPhoto({"id":6257767,"src":"Billabong_Winter_0787_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6257767.html","width":130,"caption":"","height":195});
															thumbnails[6264508] = clik.newPhoto({"id":6264508,"src":"Billabong_Winter_0832_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6264508.html","width":130,"caption":"","height":195});
															thumbnails[6392576] = clik.newPhoto({"id":6392576,"src":"CaptureOne_Steve__Tracey_137_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6392576.html","width":130,"caption":"","height":195});
															thumbnails[6422811] = clik.newPhoto({"id":6422811,"src":"Flawless_level_12_09_Nov_023_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6422811.html","width":130,"caption":"","height":195});
															thumbnails[6765893] = clik.newPhoto({"id":6765893,"src":"Mechanic_107_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6765893.html","width":130,"caption":"","height":192});
															thumbnails[6398394] = clik.newPhoto({"id":6398394,"src":"Sheffield_123_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6398394.html","width":130,"caption":"","height":195});
															thumbnails[7991717] = clik.newPhoto({"id":7991717,"src":"CaptureOne_032_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_7991717.html","width":130,"caption":"","height":195});
															thumbnails[6721698] = clik.newPhoto({"id":6721698,"src":"CaptureOne_Lynnes_50th_215_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6721698.html","width":130,"caption":"","height":87});
															thumbnails[5157104] = clik.newPhoto({"id":5157104,"src":"Wynyard_09_Term_III_130_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_5157104.html","width":130,"caption":"","height":87});
															thumbnails[6244845] = clik.newPhoto({"id":6244845,"src":"Danielle_0144_web_thumb.jpg","galleries_id":231480,"server_id":15,"link":"photo_6244845.html","width":130,"caption":"","height":87});
															thumbnails[6953226] = clik.newPhoto({"id":6953226,"src":"CaptureOne_Hunter_012_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6953226.html","width":130,"caption":"","height":195});
															thumbnails[5829174] = clik.newPhoto({"id":5829174,"src":"Nash_19_April_2010_captureone_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5829174.html","width":130,"caption":"","height":193});
															thumbnails[5829189] = clik.newPhoto({"id":5829189,"src":"Nash_19_April_2010_captureone_347_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5829189.html","width":130,"caption":"","height":193});
															thumbnails[5923119] = clik.newPhoto({"id":5923119,"src":"Chelsea_022_BW_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5923119.html","width":130,"caption":"","height":193});
															thumbnails[5975272] = clik.newPhoto({"id":5975272,"src":"CaptureOne_Jaxon_095_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5975272.html","width":130,"caption":"","height":192});
															thumbnails[6330192] = clik.newPhoto({"id":6330192,"src":"CaptureOne_485_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6330192.html","width":130,"caption":"","height":195});
															thumbnails[6370773] = clik.newPhoto({"id":6370773,"src":"CaptureOne_0190_Melb_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6370773.html","width":130,"caption":"","height":195});
															thumbnails[6370793] = clik.newPhoto({"id":6370793,"src":"Captureone_0465_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6370793.html","width":130,"caption":"","height":195});
															thumbnails[6392588] = clik.newPhoto({"id":6392588,"src":"CaptureOne_673_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6392588.html","width":130,"caption":"","height":195});
															thumbnails[6547810] = clik.newPhoto({"id":6547810,"src":"CaptureOne_Matilda_062_glowy_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6547810.html","width":130,"caption":"","height":173});
															thumbnails[6825751] = clik.newPhoto({"id":6825751,"src":"CaptureOne_094_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6825751.html","width":130,"caption":"","height":195});
															thumbnails[6831505] = clik.newPhoto({"id":6831505,"src":"CaptureOne_Ryder_52_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6831505.html","width":130,"caption":"","height":195});
															thumbnails[7050819] = clik.newPhoto({"id":7050819,"src":"CaptureOne_Brayden_020_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7050819.html","width":130,"caption":"","height":195});
															thumbnails[7050891] = clik.newPhoto({"id":7050891,"src":"CaptureOne_Brayden_048_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7050891.html","width":130,"caption":"","height":195});
															thumbnails[7234556] = clik.newPhoto({"id":7234556,"src":"CaptureOne_Sarah_and_Adam_456_mod_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_7234556.html","width":130,"caption":"","height":195});
															thumbnails[8184680] = clik.newPhoto({"id":8184680,"src":"CaptureOne_Alexis_newborn-launceston-1_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_8184680.html","width":130,"caption":"","height":195});
															thumbnails[5812581] = clik.newPhoto({"id":5812581,"src":"Kendell_2010_18_April_124_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_5812581.html","width":130,"caption":"","height":193});
															thumbnails[7235624] = clik.newPhoto({"id":7235624,"src":"Our_wedding0191mod_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_7235624.html","width":130,"caption":"","height":195});
															thumbnails[8132932] = clik.newPhoto({"id":8132932,"src":"CaptureOne_Photography-newborn-burnie-professional-2_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_8132932.html","width":130,"caption":"","height":87});
															thumbnails[8132934] = clik.newPhoto({"id":8132934,"src":"CaptureOne_Photography-newborn-devonport-professional-1_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_8132934.html","width":130,"caption":"","height":87});
															thumbnails[5919040] = clik.newPhoto({"id":5919040,"src":"Captureone_melbourne_0209_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5919040.html","width":130,"caption":"","height":192});
															thumbnails[5919188] = clik.newPhoto({"id":5919188,"src":"Captureone_melbourne_0173_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5919188.html","width":130,"caption":"","height":192});
															thumbnails[5923116] = clik.newPhoto({"id":5923116,"src":"Chelsea_061_BW_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5923116.html","width":130,"caption":"","height":87});
															thumbnails[6264513] = clik.newPhoto({"id":6264513,"src":"CaptureOne_2010_Melb_0139_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6264513.html","width":130,"caption":"","height":195});
															thumbnails[6477948] = clik.newPhoto({"id":6477948,"src":"Baby_Collage_Hunter_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6477948.html","width":130,"caption":"","height":87});
															thumbnails[6549398] = clik.newPhoto({"id":6549398,"src":"CaptureOne_Matilda_065_BW_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6549398.html","width":130,"caption":"","height":87});
															thumbnails[6825737] = clik.newPhoto({"id":6825737,"src":"CaptureOne_096_8x12_BW_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6825737.html","width":130,"caption":"","height":87});
															thumbnails[6983129] = clik.newPhoto({"id":6983129,"src":"Capturing_newborn_beautyl_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6983129.html","width":130,"caption":"","height":76});
															thumbnails[6983907] = clik.newPhoto({"id":6983907,"src":"Capturing_the_birth_of_a_Dad_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6983907.html","width":130,"caption":"","height":76});
															thumbnails[7235566] = clik.newPhoto({"id":7235566,"src":"CaptureOne_Kath_and_Michael_614_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_7235566.html","width":130,"caption":"","height":195});
															thumbnails[7302806] = clik.newPhoto({"id":7302806,"src":"CaptureOne_Cal_and_Emma_539_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_7302806.html","width":130,"caption":"","height":195});
															thumbnails[8132931] = clik.newPhoto({"id":8132931,"src":"CaptureOne_Photography-newborn-burnie-professional-1_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_8132931.html","width":130,"caption":"","height":87});
															thumbnails[8184681] = clik.newPhoto({"id":8184681,"src":"CaptureOne_Alexis_newborn-launceston-2_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_8184681.html","width":130,"caption":"","height":87});
															thumbnails[6291460] = clik.newPhoto({"id":6291460,"src":"CaptureOne_0839_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6291460.html","width":130,"caption":"","height":195});
															thumbnails[5133951] = clik.newPhoto({"id":5133951,"src":"Wedding_286_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5133951.html","width":130,"caption":"","height":87});
															thumbnails[5812580] = clik.newPhoto({"id":5812580,"src":"Kendell_2010_18_April_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_5812580.html","width":130,"caption":"","height":87});
															thumbnails[5875616] = clik.newPhoto({"id":5875616,"src":"Kiara_JDL_Wedding_594_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5875616.html","width":130,"caption":"","height":87});
															thumbnails[5920036] = clik.newPhoto({"id":5920036,"src":"Kiara_JDL_Wedding_557_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5920036.html","width":130,"caption":"","height":87});
															thumbnails[5920066] = clik.newPhoto({"id":5920066,"src":"Kiara_JDL_Wedding_465_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5920066.html","width":130,"caption":"","height":87});
															thumbnails[6330190] = clik.newPhoto({"id":6330190,"src":"CaptureOne_797_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6330190.html","width":130,"caption":"","height":87});
															thumbnails[6846288] = clik.newPhoto({"id":6846288,"src":"CaptureOne_Jaxon_027_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6846288.html","width":130,"caption":"","height":87});
															thumbnails[5919206] = clik.newPhoto({"id":5919206,"src":"Captureone_melbourne_0086_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5919206.html","width":130,"caption":"","height":88});
															thumbnails[5919993] = clik.newPhoto({"id":5919993,"src":"Captureone_Melb_0400_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5919993.html","width":130,"caption":"","height":87});
															thumbnails[5919996] = clik.newPhoto({"id":5919996,"src":"Captureone_Melb_0361_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5919996.html","width":130,"caption":"","height":88});
															thumbnails[5920047] = clik.newPhoto({"id":5920047,"src":"Kiara_JDL_Wedding_335_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5920047.html","width":130,"caption":"","height":87});
															thumbnails[5939308] = clik.newPhoto({"id":5939308,"src":"28849_1415669720721_1501929462_1021736_3338685_n_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5939308.html","width":130,"caption":"","height":87});
															thumbnails[6554123] = clik.newPhoto({"id":6554123,"src":"CaptureOne_Matilda_110_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6554123.html","width":130,"caption":"","height":87});
															thumbnails[6569867] = clik.newPhoto({"id":6569867,"src":"CaptureOne_Jaxon_118_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6569867.html","width":130,"caption":"","height":87});
															thumbnails[6569868] = clik.newPhoto({"id":6569868,"src":"Nash_19_April_2010_captureone_114_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6569868.html","width":130,"caption":"","height":87});
															thumbnails[7220341] = clik.newPhoto({"id":7220341,"src":"CaptureOne_Kaelem_051_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7220341.html","width":130,"caption":"","height":87});
															thumbnails[7223600] = clik.newPhoto({"id":7223600,"src":"CaptureOne_Kaelem_061_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7223600.html","width":130,"caption":"","height":87});
															thumbnails[8289322] = clik.newPhoto({"id":8289322,"src":"CaptureOne_Photography-Dakota-newborn-burnie-1_thumb.jpg","galleries_id":370713,"server_id":37,"link":"photo_8289322.html","width":130,"caption":"","height":87});
															thumbnails[8289325] = clik.newPhoto({"id":8289325,"src":"CaptureOne_Photography-Dakota-newborn-burnie-2_thumb.jpg","galleries_id":370713,"server_id":37,"link":"photo_8289325.html","width":130,"caption":"","height":87});
															thumbnails[5818648] = clik.newPhoto({"id":5818648,"src":"Nash_19_April_2010_captureone_031_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5818648.html","width":130,"caption":"","height":87});
															thumbnails[5822290] = clik.newPhoto({"id":5822290,"src":"Nash_19_April_2010_captureone_045_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5822290.html","width":130,"caption":"","height":87});
															thumbnails[5833855] = clik.newPhoto({"id":5833855,"src":"Nash_19_April_2010_captureone_277_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_5833855.html","width":130,"caption":"","height":87});
															thumbnails[6386368] = clik.newPhoto({"id":6386368,"src":"Grace_0158_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6386368.html","width":130,"caption":"","height":87});
															thumbnails[7069892] = clik.newPhoto({"id":7069892,"src":"CaptureOne_Lilian_Web_001_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7069892.html","width":130,"caption":"","height":87});
															thumbnails[7219695] = clik.newPhoto({"id":7219695,"src":"CaptureOne_baby_122_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7219695.html","width":130,"caption":"","height":87});
															thumbnails[6825792] = clik.newPhoto({"id":6825792,"src":"CaptureOne_077_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6825792.html","width":130,"caption":"","height":87});
															thumbnails[7219692] = clik.newPhoto({"id":7219692,"src":"CaptureOne_baby_035_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7219692.html","width":130,"caption":"","height":87});
															thumbnails[5330107] = clik.newPhoto({"id":5330107,"src":"Kiara_JDL_Wedding_600_pink_central_light_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5330107.html","width":130,"caption":"","height":195});
															thumbnails[5812579] = clik.newPhoto({"id":5812579,"src":"Kendell_2010_18_April_168_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_5812579.html","width":130,"caption":"","height":87});
															thumbnails[5813097] = clik.newPhoto({"id":5813097,"src":"Kendell_18_April_2010_captureone_172_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_5813097.html","width":130,"caption":"","height":87});
															thumbnails[5875655] = clik.newPhoto({"id":5875655,"src":"Mat__Kellie_WEDDING_472_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_5875655.html","width":130,"caption":"","height":193});
															thumbnails[6283134] = clik.newPhoto({"id":6283134,"src":"CaptureOne_0667_web_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6283134.html","width":130,"caption":"","height":195});
															thumbnails[6422816] = clik.newPhoto({"id":6422816,"src":"Grace_0138_web_thumb.jpg","galleries_id":329063,"server_id":15,"link":"photo_6422816.html","width":130,"caption":"","height":195});
															thumbnails[6852195] = clik.newPhoto({"id":6852195,"src":"CaptureOne_Tate_011_coloured_web1_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6852195.html","width":130,"caption":"","height":87});
															thumbnails[6953292] = clik.newPhoto({"id":6953292,"src":"CaptureOne_028_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_6953292.html","width":130,"caption":"","height":87});
															thumbnails[7069896] = clik.newPhoto({"id":7069896,"src":"CaptureOne_Lilian_Web_000_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_7069896.html","width":130,"caption":"","height":87});
															thumbnails[5812578] = clik.newPhoto({"id":5812578,"src":"Kendell_2010_18_April_056_web_thumb.jpg","galleries_id":370713,"server_id":15,"link":"photo_5812578.html","width":130,"caption":"","height":87});
															thumbnails[6283137] = clik.newPhoto({"id":6283137,"src":"CaptureOne_0693_website_advertising_border_thumb.jpg","galleries_id":231052,"server_id":15,"link":"photo_6283137.html","width":130,"caption":"","height":192});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[370713] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Newborns","link":"gallery_370713.html","maxRecords":0.0,"photoIDs":[6825751.0,6831505.0,7050819.0,7050891.0,8184680.0,5812581.0,8132932.0,8132934.0,6825737.0,6983129.0,6983907.0,8132931.0,8184681.0,5812580.0,7220341.0,7223600.0,8289322.0,8289325.0,7069892.0,7219695.0,6825792.0,7219692.0,5812579.0,5813097.0,6852195.0,6953292.0,7069896.0,5812578.0],"skipIndex":0,"section_code":"gallery","featured_images":"8184680,8132934,7223600,6825792,6825751,6825737,5812580","id":370713,"singleSection":false});				  						galleries[329063] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Babies","link":"gallery_329063.html","maxRecords":0.0,"photoIDs":[6953226.0,5829174.0,5829189.0,5923119.0,5975272.0,6547810.0,5923116.0,6477948.0,6549398.0,6846288.0,5939308.0,6554123.0,6569867.0,6569868.0,5818648.0,5822290.0,5833855.0,6386368.0,6422816.0],"skipIndex":0,"section_code":"gallery","featured_images":"6549398,6547810,5923116,5829189","id":329063,"singleSection":false});				  						galleries[231480] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_231480.html","maxRecords":0.0,"photoIDs":[5547475.0,7193678.0,7991726.0,5138704.0,6257766.0,6257767.0,6264508.0,6392576.0,6422811.0,6765893.0,6398394.0,7991717.0,6721698.0,5157104.0,6244845.0],"skipIndex":0,"section_code":"gallery","featured_images":"7991726,7193678,6422811,6257766","id":231480,"singleSection":false});				  						galleries[231052] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_231052.html","maxRecords":0.0,"photoIDs":[6330192.0,6370773.0,6370793.0,6392588.0,7234556.0,7235624.0,5919040.0,5919188.0,6264513.0,7235566.0,7302806.0,6291460.0,5133951.0,5875616.0,5920036.0,5920066.0,6330190.0,5919206.0,5919993.0,5919996.0,5920047.0,5330107.0,5875655.0,6283134.0,6283137.0],"skipIndex":0,"section_code":"gallery","featured_images":"6392588,6370793,6370773,5919996","id":231052,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8132934,8132932,7991726,7234556,7193678,6825792,6825737,6370773,6330192,5919993';
imageSets[2] = '8184680,8132934,7991726,7223600,7193678,6825792,6825751,6825737,6549398,6547810,6422811,6392588,6370793,6370773,6257766,5923116,5919996,5829189,5812580';
imageSets[3] = '6825792';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/wpapas0/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/wpapas0/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 += '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 = 'CaptureOne - wedding & baby photography launceston: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

