window.thumbnails = {};
															thumbnails[7392198] = clik.newPhoto({"id":7392198,"src":"047_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7399160] = clik.newPhoto({"id":7399160,"src":"246_copy_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7409867] = clik.newPhoto({"id":7409867,"src":"194_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7409872] = clik.newPhoto({"id":7409872,"src":"276_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7409874] = clik.newPhoto({"id":7409874,"src":"310_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7409876] = clik.newPhoto({"id":7409876,"src":"424_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7409918] = clik.newPhoto({"id":7409918,"src":"009_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":193});
															thumbnails[7419111] = clik.newPhoto({"id":7419111,"src":"New_Backgroundz_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":75});
															thumbnails[7497029] = clik.newPhoto({"id":7497029,"src":"Strip1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":20});
															thumbnails[7503021] = clik.newPhoto({"id":7503021,"src":"Garriques_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":39});
															thumbnails[7525889] = clik.newPhoto({"id":7525889,"src":"Stevie_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":78});
															thumbnails[7535666] = clik.newPhoto({"id":7535666,"src":"Blog_Link_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":86});
															thumbnails[7640675] = clik.newPhoto({"id":7640675,"src":"372_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":195});
															thumbnails[7405153] = clik.newPhoto({"id":7405153,"src":"Payments_Image_thumb.jpg","galleries_id":402128,"server_id":32,"link":"photo_7405153.html","width":130,"caption":"","height":86});
															thumbnails[7397416] = clik.newPhoto({"id":7397416,"src":"074_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397416.html","width":130,"caption":"","height":195});
															thumbnails[7397438] = clik.newPhoto({"id":7397438,"src":"079_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397438.html","width":130,"caption":"","height":195});
															thumbnails[7397435] = clik.newPhoto({"id":7397435,"src":"077_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397435.html","width":130,"caption":"","height":195});
															thumbnails[7397448] = clik.newPhoto({"id":7397448,"src":"096_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397448.html","width":130,"caption":"","height":195});
															thumbnails[7397452] = clik.newPhoto({"id":7397452,"src":"099_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397452.html","width":130,"caption":"","height":195});
															thumbnails[7397441] = clik.newPhoto({"id":7397441,"src":"082_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397441.html","width":130,"caption":"","height":195});
															thumbnails[7397434] = clik.newPhoto({"id":7397434,"src":"076_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397434.html","width":130,"caption":"","height":195});
															thumbnails[7397439] = clik.newPhoto({"id":7397439,"src":"080_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397439.html","width":130,"caption":"","height":195});
															thumbnails[7397453] = clik.newPhoto({"id":7397453,"src":"108_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397453.html","width":130,"caption":"","height":87});
															thumbnails[7397443] = clik.newPhoto({"id":7397443,"src":"088_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397443.html","width":130,"caption":"","height":87});
															thumbnails[7593686] = clik.newPhoto({"id":7593686,"src":"074_4C6BAF7C-1EC9-DFB6-090212E11F59EDA0_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7593686.html","width":130,"caption":"","height":197});
															thumbnails[7397454] = clik.newPhoto({"id":7397454,"src":"109_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397454.html","width":130,"caption":"","height":87});
															thumbnails[7531454] = clik.newPhoto({"id":7531454,"src":"0118-08032011-112_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7531454.html","width":130,"caption":"","height":195});
															thumbnails[7413922] = clik.newPhoto({"id":7413922,"src":"110_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7413922.html","width":130,"caption":"","height":185});
															thumbnails[7397442] = clik.newPhoto({"id":7397442,"src":"083_thumb.jpg","galleries_id":402126,"server_id":32,"link":"photo_7397442.html","width":130,"caption":"","height":195});
															thumbnails[7397467] = clik.newPhoto({"id":7397467,"src":"115_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397467.html","width":130,"caption":"","height":195});
															thumbnails[7397465] = clik.newPhoto({"id":7397465,"src":"114_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397465.html","width":130,"caption":"","height":195});
															thumbnails[7397470] = clik.newPhoto({"id":7397470,"src":"118_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397470.html","width":130,"caption":"","height":195});
															thumbnails[7397497] = clik.newPhoto({"id":7397497,"src":"138_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397497.html","width":130,"caption":"","height":195});
															thumbnails[7397480] = clik.newPhoto({"id":7397480,"src":"124_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397480.html","width":130,"caption":"","height":195});
															thumbnails[7531452] = clik.newPhoto({"id":7531452,"src":"0118-08032011-065_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7531452.html","width":130,"caption":"","height":195});
															thumbnails[7531453] = clik.newPhoto({"id":7531453,"src":"0117-07032011-046a_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7531453.html","width":130,"caption":"","height":195});
															thumbnails[7397472] = clik.newPhoto({"id":7397472,"src":"119_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397472.html","width":130,"caption":"","height":195});
															thumbnails[7531451] = clik.newPhoto({"id":7531451,"src":"0117-07032011-008a_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7531451.html","width":130,"caption":"","height":195});
															thumbnails[7397500] = clik.newPhoto({"id":7397500,"src":"142_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397500.html","width":130,"caption":"","height":195});
															thumbnails[7397475] = clik.newPhoto({"id":7397475,"src":"120_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397475.html","width":130,"caption":"","height":195});
															thumbnails[7397501] = clik.newPhoto({"id":7397501,"src":"143_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397501.html","width":130,"caption":"","height":195});
															thumbnails[7397487] = clik.newPhoto({"id":7397487,"src":"130_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397487.html","width":130,"caption":"","height":195});
															thumbnails[7397461] = clik.newPhoto({"id":7397461,"src":"113_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397461.html","width":130,"caption":"","height":195});
															thumbnails[7397491] = clik.newPhoto({"id":7397491,"src":"133_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397491.html","width":130,"caption":"","height":195});
															thumbnails[7397489] = clik.newPhoto({"id":7397489,"src":"131_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397489.html","width":130,"caption":"","height":195});
															thumbnails[7397485] = clik.newPhoto({"id":7397485,"src":"127_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397485.html","width":130,"caption":"","height":195});
															thumbnails[7397476] = clik.newPhoto({"id":7397476,"src":"121_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397476.html","width":130,"caption":"","height":87});
															thumbnails[7397479] = clik.newPhoto({"id":7397479,"src":"123_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397479.html","width":130,"caption":"","height":87});
															thumbnails[7397506] = clik.newPhoto({"id":7397506,"src":"147_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397506.html","width":130,"caption":"","height":87});
															thumbnails[7397566] = clik.newPhoto({"id":7397566,"src":"134_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397566.html","width":130,"caption":"","height":87});
															thumbnails[7397494] = clik.newPhoto({"id":7397494,"src":"136_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397494.html","width":130,"caption":"","height":87});
															thumbnails[7397495] = clik.newPhoto({"id":7397495,"src":"137_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397495.html","width":130,"caption":"","height":87});
															thumbnails[7397499] = clik.newPhoto({"id":7397499,"src":"140_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397499.html","width":130,"caption":"","height":87});
															thumbnails[7397483] = clik.newPhoto({"id":7397483,"src":"126_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397483.html","width":130,"caption":"","height":195});
															thumbnails[7397504] = clik.newPhoto({"id":7397504,"src":"146_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397504.html","width":130,"caption":"","height":195});
															thumbnails[7397469] = clik.newPhoto({"id":7397469,"src":"117_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397469.html","width":130,"caption":"","height":195});
															thumbnails[7397567] = clik.newPhoto({"id":7397567,"src":"122_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397567.html","width":130,"caption":"","height":195});
															thumbnails[7397572] = clik.newPhoto({"id":7397572,"src":"135_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397572.html","width":130,"caption":"","height":195});
															thumbnails[7397568] = clik.newPhoto({"id":7397568,"src":"129_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397568.html","width":130,"caption":"","height":195});
															thumbnails[7397569] = clik.newPhoto({"id":7397569,"src":"128_thumb.jpg","galleries_id":402127,"server_id":32,"link":"photo_7397569.html","width":130,"caption":"","height":195});
															thumbnails[7391959] = clik.newPhoto({"id":7391959,"src":"0691_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7391959.html","width":130,"caption":"","height":195});
															thumbnails[7692036] = clik.newPhoto({"id":7692036,"src":"John_Devlin-Reportage-019_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692036.html","width":130,"caption":"","height":197});
															thumbnails[7692038] = clik.newPhoto({"id":7692038,"src":"John_Devlin-Reportage-020_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692038.html","width":130,"caption":"","height":197});
															thumbnails[7692042] = clik.newPhoto({"id":7692042,"src":"John_Devlin-Reportage-023_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692042.html","width":130,"caption":"","height":197});
															thumbnails[7692033] = clik.newPhoto({"id":7692033,"src":"John_Devlin-Reportage-016_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692033.html","width":130,"caption":"","height":197});
															thumbnails[7692034] = clik.newPhoto({"id":7692034,"src":"John_Devlin-Reportage-017_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692034.html","width":130,"caption":"","height":197});
															thumbnails[7692039] = clik.newPhoto({"id":7692039,"src":"John_Devlin-Reportage-021_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692039.html","width":130,"caption":"","height":197});
															thumbnails[7692040] = clik.newPhoto({"id":7692040,"src":"John_Devlin-Reportage-022_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692040.html","width":130,"caption":"","height":197});
															thumbnails[7692035] = clik.newPhoto({"id":7692035,"src":"John_Devlin-Reportage-018_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692035.html","width":130,"caption":"","height":197});
															thumbnails[7692043] = clik.newPhoto({"id":7692043,"src":"John_Devlin-Reportage-024_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692043.html","width":130,"caption":"","height":197});
															thumbnails[7692031] = clik.newPhoto({"id":7692031,"src":"John_Devlin-Reportage-015_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692031.html","width":130,"caption":"","height":197});
															thumbnails[7692030] = clik.newPhoto({"id":7692030,"src":"John_Devlin-Reportage-014_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692030.html","width":130,"caption":"","height":197});
															thumbnails[7692028] = clik.newPhoto({"id":7692028,"src":"John_Devlin-Reportage-011_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692028.html","width":130,"caption":"","height":197});
															thumbnails[7692029] = clik.newPhoto({"id":7692029,"src":"John_Devlin-Reportage-013_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692029.html","width":130,"caption":"","height":197});
															thumbnails[7692026] = clik.newPhoto({"id":7692026,"src":"John_Devlin-Reportage-010_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692026.html","width":130,"caption":"","height":197});
															thumbnails[7706125] = clik.newPhoto({"id":7706125,"src":"John_Devlin-Reportage-026_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7706125.html","width":130,"caption":"","height":86});
															thumbnails[7692023] = clik.newPhoto({"id":7692023,"src":"John_Devlin-Reportage-009_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692023.html","width":130,"caption":"","height":86});
															thumbnails[7692014] = clik.newPhoto({"id":7692014,"src":"John_Devlin-Reportage-005_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692014.html","width":130,"caption":"","height":86});
															thumbnails[7692011] = clik.newPhoto({"id":7692011,"src":"John_Devlin-Reportage-003_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692011.html","width":130,"caption":"","height":86});
															thumbnails[7692021] = clik.newPhoto({"id":7692021,"src":"John_Devlin-Reportage-008_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692021.html","width":130,"caption":"","height":86});
															thumbnails[7692019] = clik.newPhoto({"id":7692019,"src":"John_Devlin-Reportage-007_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692019.html","width":130,"caption":"","height":86});
															thumbnails[7692016] = clik.newPhoto({"id":7692016,"src":"John_Devlin-Reportage-006_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692016.html","width":130,"caption":"","height":86});
															thumbnails[7692012] = clik.newPhoto({"id":7692012,"src":"John_Devlin-Reportage-004_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692012.html","width":130,"caption":"","height":86});
															thumbnails[7692009] = clik.newPhoto({"id":7692009,"src":"John_Devlin-Reportage-002_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692009.html","width":130,"caption":"","height":86});
															thumbnails[7692007] = clik.newPhoto({"id":7692007,"src":"John_Devlin-Reportage-001_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7692007.html","width":130,"caption":"","height":86});
															thumbnails[7647933] = clik.newPhoto({"id":7647933,"src":"0122-11042011-002_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7647933.html","width":130,"caption":"","height":195});
															thumbnails[7647934] = clik.newPhoto({"id":7647934,"src":"0122-11042011-017_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7647934.html","width":130,"caption":"","height":195});
															thumbnails[7624080] = clik.newPhoto({"id":7624080,"src":"762_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7624080.html","width":130,"caption":"","height":238});
															thumbnails[7593688] = clik.newPhoto({"id":7593688,"src":"75_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7593688.html","width":130,"caption":"","height":197});
															thumbnails[7502897] = clik.newPhoto({"id":7502897,"src":"033_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7502897.html","width":130,"caption":"","height":196});
															thumbnails[7502895] = clik.newPhoto({"id":7502895,"src":"046_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7502895.html","width":130,"caption":"","height":197});
															thumbnails[7502893] = clik.newPhoto({"id":7502893,"src":"067_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7502893.html","width":130,"caption":"","height":195});
															thumbnails[7502890] = clik.newPhoto({"id":7502890,"src":"Emmerson-20100807-301_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7502890.html","width":130,"caption":"","height":195});
															thumbnails[7391924] = clik.newPhoto({"id":7391924,"src":"0021_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391924.html","width":130,"caption":"","height":195});
															thumbnails[7399156] = clik.newPhoto({"id":7399156,"src":"282_copy_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7399156.html","width":130,"caption":"","height":195});
															thumbnails[7391925] = clik.newPhoto({"id":7391925,"src":"0061_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391925.html","width":130,"caption":"","height":195});
															thumbnails[7391928] = clik.newPhoto({"id":7391928,"src":"0081_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391928.html","width":130,"caption":"","height":196});
															thumbnails[7391930] = clik.newPhoto({"id":7391930,"src":"0141_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391930.html","width":130,"caption":"","height":196});
															thumbnails[7391931] = clik.newPhoto({"id":7391931,"src":"0151_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391931.html","width":130,"caption":"","height":196});
															thumbnails[7391933] = clik.newPhoto({"id":7391933,"src":"0291_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391933.html","width":130,"caption":"","height":196});
															thumbnails[7391934] = clik.newPhoto({"id":7391934,"src":"0301_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391934.html","width":130,"caption":"","height":196});
															thumbnails[7391937] = clik.newPhoto({"id":7391937,"src":"0341_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391937.html","width":130,"caption":"","height":198});
															thumbnails[7391942] = clik.newPhoto({"id":7391942,"src":"0481_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391942.html","width":130,"caption":"","height":192});
															thumbnails[7391944] = clik.newPhoto({"id":7391944,"src":"0491_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391944.html","width":130,"caption":"","height":195});
															thumbnails[7391948] = clik.newPhoto({"id":7391948,"src":"0512_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391948.html","width":130,"caption":"","height":195});
															thumbnails[7391953] = clik.newPhoto({"id":7391953,"src":"0631_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391953.html","width":130,"caption":"","height":196});
															thumbnails[7391955] = clik.newPhoto({"id":7391955,"src":"0661_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391955.html","width":130,"caption":"","height":195});
															thumbnails[7391938] = clik.newPhoto({"id":7391938,"src":"0431_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391938.html","width":130,"caption":"","height":196});
															thumbnails[7391951] = clik.newPhoto({"id":7391951,"src":"0551_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391951.html","width":130,"caption":"","height":196});
															thumbnails[7391957] = clik.newPhoto({"id":7391957,"src":"0681_thumb.jpg","galleries_id":416171,"server_id":32,"link":"photo_7391957.html","width":130,"caption":"","height":195});
															thumbnails[7391961] = clik.newPhoto({"id":7391961,"src":"0711_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391961.html","width":130,"caption":"","height":195});
															thumbnails[7391964] = clik.newPhoto({"id":7391964,"src":"0721_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391964.html","width":130,"caption":"","height":195});
															thumbnails[7391967] = clik.newPhoto({"id":7391967,"src":"0731_thumb.jpg","galleries_id":402125,"server_id":32,"link":"photo_7391967.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[402125] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"section480076_402125.html","maxRecords":0.0,"photoIDs":[7647933.0,7647934.0,7624080.0,7593688.0,7502897.0,7502895.0,7502893.0,7502890.0,7391924.0,7399156.0,7391925.0,7391928.0,7391930.0,7391931.0,7391933.0,7391934.0,7391937.0,7391942.0,7391944.0,7391948.0,7391953.0,7391955.0,7391938.0,7391951.0,7391961.0,7391964.0,7391967.0],"skipIndex":0,"section_code":"section480076","featured_images":7391924.0,"id":402125,"singleSection":false});				  						galleries[416171] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings-Naturally","link":"section480076_416171.html","maxRecords":0.0,"photoIDs":[7391959.0,7692036.0,7692038.0,7692042.0,7692033.0,7692034.0,7692039.0,7692040.0,7692035.0,7692043.0,7692031.0,7692030.0,7692028.0,7692029.0,7692026.0,7706125.0,7692023.0,7692014.0,7692011.0,7692021.0,7692019.0,7692016.0,7692012.0,7692009.0,7692007.0,7391957.0],"skipIndex":0,"section_code":"section480076","featured_images":7692034.0,"id":416171,"singleSection":false});				  						galleries[402126] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Boudoir","link":"section480076_402126.html","maxRecords":0.0,"photoIDs":[7397416.0,7397438.0,7397435.0,7397448.0,7397452.0,7397441.0,7397434.0,7397439.0,7397453.0,7397443.0,7397454.0,7397442.0],"skipIndex":0,"section_code":"section480076","featured_images":7397416.0,"id":402126,"singleSection":false});				  						galleries[402127] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits & Fashion","link":"section480076_402127.html","maxRecords":0.0,"photoIDs":[7593686.0,7531454.0,7413922.0,7397467.0,7397465.0,7397470.0,7397497.0,7397480.0,7531452.0,7531453.0,7397472.0,7531451.0,7397500.0,7397475.0,7397501.0,7397487.0,7397461.0,7397491.0,7397489.0,7397485.0,7397476.0,7397479.0,7397506.0,7397566.0,7397494.0,7397495.0,7397499.0,7397483.0,7397504.0,7397469.0,7397567.0,7397572.0,7397568.0,7397569.0],"skipIndex":0,"section_code":"section480076","featured_images":7397467.0,"id":402127,"singleSection":false});				  						galleries[402128] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Payments & Bookings","link":"section480076_402128.html","maxRecords":0.0,"photoIDs":[7405153.0],"skipIndex":0,"section_code":"section480076","featured_images":7405153.0,"id":402128,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7419111';
imageSets[2] = '7405153,7397416,7397467,7692034,7391924';
imageSets[239649] = '7405153';
imageSets[3] = '7706125,7692043,7692042,7692040,7692039,7692038,7692036,7692035,7692034,7692033,7692031,7692030,7692029,7692028,7692026,7692023,7692021,7692019,7692016,7692014,7692012,7692011,7692009,7692007,7647934,7647933,7640675,7624080,7593688,7593686,7535666,7531454,7531453,7531452,7531451,7525889,7503021,7502897,7502895,7502893,7502890,7497029,7419111,7413922,7409918,7409876,7409874,7409872,7409867,7405153';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/johndev/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/johndev/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/johndev/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/johndev/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/johndev/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/johndev/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/johndev/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 += 'section480076.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 && 'section480076' != '') {
					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 = 'John Devlin Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="JOHNDEV">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

