window.thumbnails = {};
															thumbnails[1236846] = clik.newPhoto({"id":1236846,"src":"grace1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_1236846.html","width":98,"caption":"Grace Jones?","height":130});
															thumbnails[1990920] = clik.newPhoto({"id":1990920,"src":"cerys21_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_1990920.html","width":98,"caption":"implied nude","height":130});
															thumbnails[1990932] = clik.newPhoto({"id":1990932,"src":"cerys3_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_1990932.html","width":130,"caption":"implied nude","height":98});
															thumbnails[1990970] = clik.newPhoto({"id":1990970,"src":"cerys6_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_1990970.html","width":98,"caption":"","height":130});
															thumbnails[1990975] = clik.newPhoto({"id":1990975,"src":"rosie_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_1990975.html","width":98,"caption":"","height":130});
															thumbnails[1990980] = clik.newPhoto({"id":1990980,"src":"rosie3_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_1990980.html","width":98,"caption":"","height":130});
															thumbnails[1990992] = clik.newPhoto({"id":1990992,"src":"tanya16_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_1990992.html","width":98,"caption":"","height":130});
															thumbnails[2417818] = clik.newPhoto({"id":2417818,"src":"DSCF3656a_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_2417818.html","width":98,"caption":"","height":130});
															thumbnails[2417820] = clik.newPhoto({"id":2417820,"src":"DSCF3823b_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_2417820.html","width":98,"caption":"","height":130});
															thumbnails[2417822] = clik.newPhoto({"id":2417822,"src":"DSCF4062a_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_2417822.html","width":130,"caption":"","height":98});
															thumbnails[2417823] = clik.newPhoto({"id":2417823,"src":"DSCF4112a_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_2417823.html","width":130,"caption":"","height":98});
															thumbnails[2417825] = clik.newPhoto({"id":2417825,"src":"DSCF4187a_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_2417825.html","width":98,"caption":"","height":130});
															thumbnails[2417826] = clik.newPhoto({"id":2417826,"src":"DSCF4542a_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_2417826.html","width":98,"caption":"","height":130});
															thumbnails[2417828] = clik.newPhoto({"id":2417828,"src":"DSCF4740_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_2417828.html","width":130,"caption":"","height":98});
															thumbnails[2417832] = clik.newPhoto({"id":2417832,"src":"DSCF3547bw_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_2417832.html","width":98,"caption":"","height":130});
															thumbnails[2417836] = clik.newPhoto({"id":2417836,"src":"DSCF4793a_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_2417836.html","width":98,"caption":"","height":130});
															thumbnails[2417837] = clik.newPhoto({"id":2417837,"src":"DSCF4996a_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_2417837.html","width":98,"caption":"","height":130});
															thumbnails[2417839] = clik.newPhoto({"id":2417839,"src":"DSCF5011a_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_2417839.html","width":98,"caption":"","height":130});
															thumbnails[2417844] = clik.newPhoto({"id":2417844,"src":"DSCF3520a_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_2417844.html","width":98,"caption":"","height":130});
															thumbnails[2417845] = clik.newPhoto({"id":2417845,"src":"DSCF3573a_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_2417845.html","width":130,"caption":"","height":98});
															thumbnails[2486107] = clik.newPhoto({"id":2486107,"src":"DSCF5523a_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_2486107.html","width":98,"caption":"","height":130});
															thumbnails[2486109] = clik.newPhoto({"id":2486109,"src":"DSCF5216a_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_2486109.html","width":98,"caption":"","height":130});
															thumbnails[3082012] = clik.newPhoto({"id":3082012,"src":"DSCF8040_320x240_thumb.JPG","galleries_id":57422,"server_id":18,"link":"photo_3082012.html","width":97,"caption":"","height":130});
															thumbnails[3082013] = clik.newPhoto({"id":3082013,"src":"DSCF8093_320x240_thumb.JPG","galleries_id":57419,"server_id":18,"link":"photo_3082013.html","width":97,"caption":"","height":130});
															thumbnails[4211569] = clik.newPhoto({"id":4211569,"src":"DSCF0541a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_4211569.html","width":130,"caption":"","height":98});
															thumbnails[4211576] = clik.newPhoto({"id":4211576,"src":"DSCF0639a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_4211576.html","width":98,"caption":"","height":130});
															thumbnails[4211582] = clik.newPhoto({"id":4211582,"src":"DSCF1348a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_4211582.html","width":130,"caption":"","height":98});
															thumbnails[4211587] = clik.newPhoto({"id":4211587,"src":"DSCF1355a1_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_4211587.html","width":130,"caption":"","height":98});
															thumbnails[4211592] = clik.newPhoto({"id":4211592,"src":"DSCF1693a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211592.html","width":98,"caption":"","height":130});
															thumbnails[4211594] = clik.newPhoto({"id":4211594,"src":"DSCF1727a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211594.html","width":98,"caption":"","height":130});
															thumbnails[4211595] = clik.newPhoto({"id":4211595,"src":"DSCF1790a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211595.html","width":98,"caption":"","height":130});
															thumbnails[4211596] = clik.newPhoto({"id":4211596,"src":"DSCF1979a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211596.html","width":98,"caption":"","height":130});
															thumbnails[4211601] = clik.newPhoto({"id":4211601,"src":"DSCF2003a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211601.html","width":130,"caption":"","height":98});
															thumbnails[4211602] = clik.newPhoto({"id":4211602,"src":"DSCF2144a1_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_4211602.html","width":130,"caption":"","height":98});
															thumbnails[4211604] = clik.newPhoto({"id":4211604,"src":"DSCF2249a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211604.html","width":98,"caption":"","height":130});
															thumbnails[4211605] = clik.newPhoto({"id":4211605,"src":"DSCF3341a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211605.html","width":98,"caption":"","height":130});
															thumbnails[4211606] = clik.newPhoto({"id":4211606,"src":"DSCF3357a1_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_4211606.html","width":130,"caption":"","height":98});
															thumbnails[4211608] = clik.newPhoto({"id":4211608,"src":"DSCF3560a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_4211608.html","width":92,"caption":"","height":130});
															thumbnails[4211610] = clik.newPhoto({"id":4211610,"src":"DSCF3574a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_4211610.html","width":98,"caption":"","height":130});
															thumbnails[4211612] = clik.newPhoto({"id":4211612,"src":"DSCF3631a1_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_4211612.html","width":98,"caption":"BODY PAINT BY MAX WRAGG","height":130});
															thumbnails[4211613] = clik.newPhoto({"id":4211613,"src":"DSCF3796a1_thumb.jpg","galleries_id":57425,"server_id":18,"link":"photo_4211613.html","width":130,"caption":"","height":98});
															thumbnails[4211615] = clik.newPhoto({"id":4211615,"src":"DSCF3812a1_thumb.jpg","galleries_id":57425,"server_id":18,"link":"photo_4211615.html","width":130,"caption":"","height":98});
															thumbnails[4451900] = clik.newPhoto({"id":4451900,"src":"promo_army_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_4451900.html","width":130,"caption":"","height":98});
															thumbnails[4451906] = clik.newPhoto({"id":4451906,"src":"promo_bike_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_4451906.html","width":98,"caption":"","height":130});
															thumbnails[4451908] = clik.newPhoto({"id":4451908,"src":"promo_group_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_4451908.html","width":130,"caption":"","height":98});
															thumbnails[4451910] = clik.newPhoto({"id":4451910,"src":"promo_tv_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_4451910.html","width":98,"caption":"","height":130});
															thumbnails[4977118] = clik.newPhoto({"id":4977118,"src":"DSCF0032asapphireblue1_thumb.jpg","galleries_id":282792,"server_id":18,"link":"photo_4977118.html","width":92,"caption":"Body paint by Max Wragg","height":130});
															thumbnails[4977163] = clik.newPhoto({"id":4977163,"src":"DSCF0037arachaelpuzzle2_thumb.jpg","galleries_id":282792,"server_id":18,"link":"photo_4977163.html","width":87,"caption":"Body art by Max Wragg","height":130});
															thumbnails[4977333] = clik.newPhoto({"id":4977333,"src":"sapphiregold1_thumb.jpg","galleries_id":282792,"server_id":18,"link":"photo_4977333.html","width":87,"caption":"Body art by Max Wragg","height":130});
															thumbnails[4977350] = clik.newPhoto({"id":4977350,"src":"DSCF3560a1_8CDD7F5E-1D09-001F-99221C76F555CF52_thumb.jpg","galleries_id":282792,"server_id":18,"link":"photo_4977350.html","width":92,"caption":"body art by Max Wragg","height":130});
															thumbnails[5021288] = clik.newPhoto({"id":5021288,"src":"DSCF0040a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_5021288.html","width":87,"caption":"","height":130});
															thumbnails[5021290] = clik.newPhoto({"id":5021290,"src":"DSCF0032a1_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_5021290.html","width":130,"caption":"","height":92});
															thumbnails[5378806] = clik.newPhoto({"id":5378806,"src":"DSCF2993_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_5378806.html","width":130,"caption":"","height":87});
															thumbnails[5378807] = clik.newPhoto({"id":5378807,"src":"DSCF3199_thumb.jpg","galleries_id":57425,"server_id":18,"link":"photo_5378807.html","width":130,"caption":"","height":92});
															thumbnails[6005215] = clik.newPhoto({"id":6005215,"src":"DSCF0127a_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_6005215.html","width":130,"caption":"","height":87});
															thumbnails[6005217] = clik.newPhoto({"id":6005217,"src":"DSCF0088a_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_6005217.html","width":87,"caption":"","height":130});
															thumbnails[6005220] = clik.newPhoto({"id":6005220,"src":"DSCF0161a_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_6005220.html","width":87,"caption":"","height":130});
															thumbnails[6600395] = clik.newPhoto({"id":6600395,"src":"DSCF8120a_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_6600395.html","width":130,"caption":"","height":92});
															thumbnails[6600400] = clik.newPhoto({"id":6600400,"src":"DSCF7906a_thumb.jpg","galleries_id":260260,"server_id":18,"link":"photo_6600400.html","width":130,"caption":"UKBPF 2010 - entry by Max Wragg","height":69});
															thumbnails[6600405] = clik.newPhoto({"id":6600405,"src":"DSCF6107_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_6600405.html","width":87,"caption":"","height":130});
															thumbnails[6600411] = clik.newPhoto({"id":6600411,"src":"DSCF6455_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_6600411.html","width":130,"caption":"","height":87});
															thumbnails[6600414] = clik.newPhoto({"id":6600414,"src":"DSCF7091a_320x240_thumb.jpg","galleries_id":338181,"server_id":18,"link":"photo_6600414.html","width":87,"caption":"","height":130});
															thumbnails[6600420] = clik.newPhoto({"id":6600420,"src":"DSCF6187_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_6600420.html","width":130,"caption":"","height":87});
															thumbnails[6600425] = clik.newPhoto({"id":6600425,"src":"DSCF6256_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_6600425.html","width":87,"caption":"","height":130});
															thumbnails[751225] = clik.newPhoto({"id":751225,"src":"2005_0106honeykearsneyjuly060085_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_751225.html","width":130,"caption":"","height":98});
															thumbnails[751337] = clik.newPhoto({"id":751337,"src":"karate_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_751337.html","width":130,"caption":"","height":98});
															thumbnails[744526] = clik.newPhoto({"id":744526,"src":"2006_0808ceryskearsney0013_2_thumb.JPG","galleries_id":338181,"server_id":18,"link":"photo_744526.html","width":130,"caption":"","height":98});
															thumbnails[749223] = clik.newPhoto({"id":749223,"src":"scobies_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_749223.html","width":130,"caption":"","height":98});
															thumbnails[751232] = clik.newPhoto({"id":751232,"src":"2006_0910kidsweekend0010_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_751232.html","width":130,"caption":"","height":98});
															thumbnails[753031] = clik.newPhoto({"id":753031,"src":"cliprianna_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_753031.html","width":130,"caption":"","height":98});
															thumbnails[751207] = clik.newPhoto({"id":751207,"src":"2006_0930wasteman0054_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_751207.html","width":130,"caption":"","height":98});
															thumbnails[751235] = clik.newPhoto({"id":751235,"src":"2006_1203kymifill0023_thumb.JPG","galleries_id":57422,"server_id":18,"link":"photo_751235.html","width":130,"caption":"","height":98});
															thumbnails[753060] = clik.newPhoto({"id":753060,"src":"clip2cerys_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_753060.html","width":130,"caption":"","height":97});
															thumbnails[749204] = clik.newPhoto({"id":749204,"src":"emma_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_749204.html","width":130,"caption":"","height":174});
															thumbnails[751216] = clik.newPhoto({"id":751216,"src":"2006_0910kidsweekend0029_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_751216.html","width":130,"caption":"","height":98});
															thumbnails[752775] = clik.newPhoto({"id":752775,"src":"fash7_640x480_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_752775.html","width":130,"caption":"","height":98});
															thumbnails[753032] = clik.newPhoto({"id":753032,"src":"cliprianna3_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_753032.html","width":98,"caption":"something a little different","height":130});
															thumbnails[753040] = clik.newPhoto({"id":753040,"src":"clipstacy_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_753040.html","width":98,"caption":"","height":130});
															thumbnails[744623] = clik.newPhoto({"id":744623,"src":"2006_1107blondie20028_thumb.JPG","galleries_id":57426,"server_id":18,"link":"photo_744623.html","width":130,"caption":"","height":174});
															thumbnails[749213] = clik.newPhoto({"id":749213,"src":"emma2_thumb.jpg","galleries_id":57424,"server_id":18,"link":"photo_749213.html","width":130,"caption":"","height":173});
															thumbnails[751228] = clik.newPhoto({"id":751228,"src":"2006_0910kidsweekend00881_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_751228.html","width":130,"caption":"","height":98});
															thumbnails[752740] = clik.newPhoto({"id":752740,"src":"port3_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_752740.html","width":130,"caption":"","height":173});
															thumbnails[752774] = clik.newPhoto({"id":752774,"src":"fash8_640x480_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_752774.html","width":130,"caption":"","height":98});
															thumbnails[751340] = clik.newPhoto({"id":751340,"src":"head_thumb.jpg","galleries_id":57426,"server_id":18,"link":"photo_751340.html","width":130,"caption":"","height":173});
															thumbnails[864777] = clik.newPhoto({"id":864777,"src":"girlband4_thumb.jpg","galleries_id":57419,"server_id":18,"link":"photo_864777.html","width":130,"caption":"","height":98});
															thumbnails[751343] = clik.newPhoto({"id":751343,"src":"wales_thumb.jpg","galleries_id":57425,"server_id":18,"link":"photo_751343.html","width":130,"caption":"","height":98});
															thumbnails[751345] = clik.newPhoto({"id":751345,"src":"wales2_thumb.jpg","galleries_id":57425,"server_id":18,"link":"photo_751345.html","width":130,"caption":"","height":98});
															thumbnails[744758] = clik.newPhoto({"id":744758,"src":"2006_0830eagleheights0042_thumb.JPG","galleries_id":57425,"server_id":18,"link":"photo_744758.html","width":130,"caption":"","height":173});
															thumbnails[752766] = clik.newPhoto({"id":752766,"src":"glam5_640x480_thumb.jpg","galleries_id":57422,"server_id":18,"link":"photo_752766.html","width":130,"caption":"","height":173});
															thumbnails[753066] = clik.newPhoto({"id":753066,"src":"clip2honey_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_753066.html","width":98,"caption":"","height":130});
															thumbnails[752756] = clik.newPhoto({"id":752756,"src":"head5_640x480_thumb.jpg","galleries_id":57426,"server_id":18,"link":"photo_752756.html","width":130,"caption":"","height":173});
															thumbnails[753019] = clik.newPhoto({"id":753019,"src":"clipblond_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_753019.html","width":98,"caption":"","height":130});
															thumbnails[752742] = clik.newPhoto({"id":752742,"src":"head6_thumb.jpg","galleries_id":57426,"server_id":18,"link":"photo_752742.html","width":130,"caption":"","height":173});
															thumbnails[752768] = clik.newPhoto({"id":752768,"src":"glam1_640x480_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_752768.html","width":130,"caption":"","height":173});
															thumbnails[744596] = clik.newPhoto({"id":744596,"src":"2006_1010lorraine20115_thumb.JPG","galleries_id":57421,"server_id":18,"link":"photo_744596.html","width":130,"caption":"","height":173});
															thumbnails[864773] = clik.newPhoto({"id":864773,"src":"DSCF6188_thumb.JPG","galleries_id":57426,"server_id":18,"link":"photo_864773.html","width":97,"caption":"","height":130});
															thumbnails[751325] = clik.newPhoto({"id":751325,"src":"dress_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_751325.html","width":130,"caption":"","height":173});
															thumbnails[752782] = clik.newPhoto({"id":752782,"src":"fash3_640x480_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_752782.html","width":130,"caption":"","height":173});
															thumbnails[752779] = clik.newPhoto({"id":752779,"src":"fash5_640x480_thumb.jpg","galleries_id":57421,"server_id":18,"link":"photo_752779.html","width":130,"caption":"","height":173});
															thumbnails[864766] = clik.newPhoto({"id":864766,"src":"DSCF6106_thumb.JPG","galleries_id":57421,"server_id":18,"link":"photo_864766.html","width":97,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[282792] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Body paint\/body art","link":"gallery_282792.html","maxRecords":0.0,"photoIDs":[4977118.0,4977163.0,4977333.0,4977350.0],"skipIndex":0,"section_code":"gallery","featured_images":"4977350,4977333,4977163,4977118","id":282792,"singleSection":false});				  						galleries[260260] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"EVENTS AND PROMOTIONS","link":"gallery_260260.html","maxRecords":0.0,"photoIDs":[4451900.0,4451906.0,4451908.0,4451910.0,6600395.0,6600400.0],"skipIndex":0,"section_code":"gallery","featured_images":"6600400,6600395,4451910,4451908,4451906,4451900","id":260260,"singleSection":false});				  						galleries[338181] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Location Photo Shoots","link":"gallery_338181.html","maxRecords":0.0,"photoIDs":[2417828.0,2417836.0,2417839.0,4211587.0,6005215.0,6005217.0,6005220.0,6600405.0,6600411.0,6600414.0,6600420.0,6600425.0,744526.0],"skipIndex":0,"section_code":"gallery","featured_images":"6600425,6600420,6600414,6600411,6600405,6005220,6005217,6005215,4211587,2417839","id":338181,"singleSection":false});				  						galleries[57419] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PORTRAITS","link":"gallery_57419.html","maxRecords":0.0,"photoIDs":[1236846.0,2417818.0,2417832.0,3082013.0,4211592.0,4211594.0,4211595.0,4211596.0,4211601.0,4211604.0,4211605.0,4211606.0,5378806.0,749223.0,753032.0,752740.0,864777.0],"skipIndex":0,"section_code":"gallery","featured_images":"5378806,4211606,4211605,4211604,4211601,4211596,4211595,4211594,4211592,3082013","id":57419,"singleSection":false});				  						galleries[57421] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FASHION PHOTOGRAPHY","link":"gallery_57421.html","maxRecords":0.0,"photoIDs":[1990980.0,1990992.0,2417823.0,2417837.0,2417845.0,4211569.0,4211576.0,4211582.0,4211608.0,4211610.0,5021288.0,5021290.0,751337.0,753060.0,752775.0,752774.0,753066.0,753019.0,752768.0,744596.0,751325.0,752782.0,752779.0,864766.0],"skipIndex":0,"section_code":"gallery","featured_images":"5021290,5021288,4211610,4211608,4211582,4211576,4211569,2417845,2417837,2417823","id":57421,"singleSection":false});				  						galleries[57422] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GLAMOUR PHOTOGRAPHY","link":"gallery_57422.html","maxRecords":0.0,"photoIDs":[1990970.0,1990975.0,2417820.0,2417825.0,2417826.0,2417844.0,2486109.0,3082012.0,4211602.0,4211612.0,753031.0,751235.0,753040.0,752766.0],"skipIndex":0,"section_code":"gallery","featured_images":"4211612,4211602,3082012,2486109,2417844,2417826,2417825,2417820,1990975,1990970","id":57422,"singleSection":false});				  						galleries[57426] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"HEAD SHOTS","link":"gallery_57426.html","maxRecords":0.0,"photoIDs":[744623.0,751340.0,752756.0,752742.0,864773.0],"skipIndex":0,"section_code":"gallery","featured_images":"864773,752756,752742,751340,744623","id":57426,"singleSection":false});				  						galleries[57424] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NUDE PHOTOGRAPHY","link":"gallery_57424.html","maxRecords":0.0,"photoIDs":[1990920.0,1990932.0,2417822.0,2486107.0,749204.0,749213.0],"skipIndex":0,"section_code":"gallery","featured_images":"2486107,2417822,1990932,1990920,749213,749204","id":57424,"singleSection":false});				  						galleries[57425] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GENERAL PHOTOGRAPHY","link":"gallery_57425.html","maxRecords":0.0,"photoIDs":[4211613.0,4211615.0,5378807.0,751225.0,751232.0,751207.0,751216.0,751228.0,751343.0,751345.0,744758.0],"skipIndex":0,"section_code":"gallery","featured_images":"5378807,4211615,4211613,751345,751343,751232,751228,751225,751216,751207","id":57425,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6600425,6600420,6600414,6600411,6600405,6600400,6600395,6005220,6005217,6005215,5378807,5378806,5021290,5021288,4977350,4977333,4977163,4977118,4451910,4451908,4451906,4451900,4211615,4211613,4211612,4211610,4211608,4211606,4211605,4211604,4211602,4211601,4211596,4211595,4211594,4211592,4211587,4211582,4211576,4211569,3082013,3082012,2486109,2486107,2417845,2417844,2417839,2417837,2417836,2417832';
imageSets[3] = '6600425,6600420,6600414,6600411,6600405,6600400,6600395,6005220,6005217,6005215,5378807,5378806,5021290,5021288,4977350,4977333,4977163,4977118,4451910,4451908,4451906,4451900,4211615,4211613,4211612,4211610,4211608,4211606,4211605,4211604,4211602,4211601,4211596,4211595,4211594,4211592,4211587,4211582,4211576,4211569,3082013,3082012,2486109,2486107,2417845,2417844,2417839,2417837,2417836,2417832';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/hidbehindthesofa/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/hidbehindthesofa/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 = 'Fashion Photography | Model Portfolio 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.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;
	}
}

			

