window.thumbnails = {};
															thumbnails[8838902] = clik.newPhoto({"id":8838902,"src":"photo15_BED41536-24E8-5EC4-4F14B50925AC8316_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[8838903] = clik.newPhoto({"id":8838903,"src":"photo15_BED89870-24E8-5EC4-4F5390746AF469D5_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":195});
															thumbnails[3435526] = clik.newPhoto({"id":3435526,"src":"jjj_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3435526.html","width":130,"caption":"","height":201});
															thumbnails[3928306] = clik.newPhoto({"id":3928306,"src":"G26P03932_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3928306.html","width":130,"caption":"GEMMA","height":194});
															thumbnails[3929838] = clik.newPhoto({"id":3929838,"src":"G26P037512_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3929838.html","width":130,"caption":"","height":196});
															thumbnails[3932097] = clik.newPhoto({"id":3932097,"src":"G26P040011_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3932097.html","width":130,"caption":"","height":196});
															thumbnails[4897234] = clik.newPhoto({"id":4897234,"src":"011_1_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_4897234.html","width":130,"caption":"ALICE","height":187});
															thumbnails[6572559] = clik.newPhoto({"id":6572559,"src":"51_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6572559.html","width":130,"caption":"","height":195});
															thumbnails[6572579] = clik.newPhoto({"id":6572579,"src":"41_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6572579.html","width":130,"caption":"","height":193});
															thumbnails[6705544] = clik.newPhoto({"id":6705544,"src":"X-PressFashion_Spring_WEB20Cover1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6705544.html","width":130,"caption":"","height":165});
															thumbnails[6705553] = clik.newPhoto({"id":6705553,"src":"X-PressMag_Spring10_WEB2021_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6705553.html","width":130,"caption":"","height":188});
															thumbnails[6705560] = clik.newPhoto({"id":6705560,"src":"X-PressMag_Spring10_WEB2031_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6705560.html","width":130,"caption":"","height":193});
															thumbnails[6706115] = clik.newPhoto({"id":6706115,"src":"3sml1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6706115.html","width":130,"caption":"","height":87});
															thumbnails[6706126] = clik.newPhoto({"id":6706126,"src":"4sml1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6706126.html","width":130,"caption":"","height":157});
															thumbnails[6706141] = clik.newPhoto({"id":6706141,"src":"2sml1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6706141.html","width":130,"caption":"","height":87});
															thumbnails[8838861] = clik.newPhoto({"id":8838861,"src":"photo12_BDD08245-24E8-5EC4-4FDFB02532039883_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_8838861.html","width":130,"caption":"WATER","height":90});
															thumbnails[6572598] = clik.newPhoto({"id":6572598,"src":"71_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6572598.html","width":130,"caption":"","height":187});
															thumbnails[1571397] = clik.newPhoto({"id":1571397,"src":"mich wedding 21.jpg","galleries_id":107134,"server_id":18,"link":"photo_1571397.html","width":130,"caption":"MICHELLE","height":175});
															thumbnails[1571407] = clik.newPhoto({"id":1571407,"src":"mich wedding 3jpg1.jpg","galleries_id":107134,"server_id":18,"link":"photo_1571407.html","width":130,"caption":"","height":173});
															thumbnails[2749801] = clik.newPhoto({"id":2749801,"src":"109_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_2749801.html","width":130,"caption":"JANETTE","height":173});
															thumbnails[4619807] = clik.newPhoto({"id":4619807,"src":"Lauren2011_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4619807.html","width":130,"caption":"","height":200});
															thumbnails[5266902] = clik.newPhoto({"id":5266902,"src":"Lauren205220BW1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_5266902.html","width":130,"caption":"","height":195});
															thumbnails[2749781] = clik.newPhoto({"id":2749781,"src":"003_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_2749781.html","width":130,"caption":"LYNN","height":173});
															thumbnails[2749786] = clik.newPhoto({"id":2749786,"src":"019_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_2749786.html","width":130,"caption":"","height":173});
															thumbnails[3272179] = clik.newPhoto({"id":3272179,"src":"IMG_2195_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3272179.html","width":130,"caption":"","height":195});
															thumbnails[2155632] = clik.newPhoto({"id":2155632,"src":"caroline4_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_2155632.html","width":130,"caption":"CAROLINE AND HUBBY","height":195});
															thumbnails[3715537] = clik.newPhoto({"id":3715537,"src":"032A1_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3715537.html","width":130,"caption":"CLAIRE","height":175});
															thumbnails[3715542] = clik.newPhoto({"id":3715542,"src":"099A1_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3715542.html","width":130,"caption":"CLAIRE AND HUBBY","height":96});
															thumbnails[3715550] = clik.newPhoto({"id":3715550,"src":"237A1_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3715550.html","width":130,"caption":"","height":175});
															thumbnails[4671857] = clik.newPhoto({"id":4671857,"src":"7620_130319393605_77300033605_2322509_4564168_n_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4671857.html","width":130,"caption":"","height":210});
															thumbnails[4890552] = clik.newPhoto({"id":4890552,"src":"8734_166133194533_773499533_3671981_6332590_n_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4890552.html","width":130,"caption":"","height":195});
															thumbnails[3228983] = clik.newPhoto({"id":3228983,"src":"wedding 2_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3228983.html","width":130,"caption":"","height":195});
															thumbnails[3929959] = clik.newPhoto({"id":3929959,"src":"091_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3929959.html","width":130,"caption":"","height":173});
															thumbnails[4631717] = clik.newPhoto({"id":4631717,"src":"Lauren20220-20colour1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4631717.html","width":130,"caption":"","height":199});
															thumbnails[3920977] = clik.newPhoto({"id":3920977,"src":"PnB_0221_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3920977.html","width":130,"caption":"PIP AND BRIDESMAIDS","height":148});
															thumbnails[3928578] = clik.newPhoto({"id":3928578,"src":"PnB_0211_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3928578.html","width":130,"caption":"","height":161});
															thumbnails[1581972] = clik.newPhoto({"id":1581972,"src":"sam doing1.jpg","galleries_id":107134,"server_id":18,"link":"photo_1581972.html","width":130,"caption":"","height":87});
															thumbnails[4671984] = clik.newPhoto({"id":4671984,"src":"7620_130319408605_77300033605_2322510_6187105_n_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4671984.html","width":130,"caption":"","height":181});
															thumbnails[1581958] = clik.newPhoto({"id":1581958,"src":"nat1.jpg","galleries_id":107134,"server_id":18,"link":"photo_1581958.html","width":130,"caption":"Natalie","height":87});
															thumbnails[4263692] = clik.newPhoto({"id":4263692,"src":"81_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4263692.html","width":130,"caption":"","height":195});
															thumbnails[4897247] = clik.newPhoto({"id":4897247,"src":"013_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4897247.html","width":130,"caption":"","height":198});
															thumbnails[3710530] = clik.newPhoto({"id":3710530,"src":"079_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3710530.html","width":130,"caption":"Louise and bridesmaids","height":98});
															thumbnails[3710610] = clik.newPhoto({"id":3710610,"src":"080_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3710610.html","width":130,"caption":"","height":104});
															thumbnails[1582146] = clik.newPhoto({"id":1582146,"src":"nik1.jpg","galleries_id":107134,"server_id":18,"link":"photo_1582146.html","width":130,"caption":"NICKY","height":87});
															thumbnails[1585341] = clik.newPhoto({"id":1585341,"src":"nicky1.jpg","galleries_id":107134,"server_id":18,"link":"photo_1585341.html","width":130,"caption":"","height":193});
															thumbnails[2876188] = clik.newPhoto({"id":2876188,"src":"106_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_2876188.html","width":130,"caption":"BRIDESMAIDS","height":171});
															thumbnails[3932088] = clik.newPhoto({"id":3932088,"src":"092_thumb.JPG","galleries_id":107134,"server_id":18,"link":"photo_3932088.html","width":130,"caption":"BRIDESMAID","height":173});
															thumbnails[3435627] = clik.newPhoto({"id":3435627,"src":"picky_thumb.jpg","galleries_id":107134,"server_id":18,"link":"photo_3435627.html","width":130,"caption":"BRIDESMAIDS","height":98});
															thumbnails[4897271] = clik.newPhoto({"id":4897271,"src":"011_2_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4897271.html","width":130,"caption":"","height":187});
															thumbnails[4263740] = clik.newPhoto({"id":4263740,"src":"101_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4263740.html","width":130,"caption":"","height":182});
															thumbnails[4164753] = clik.newPhoto({"id":4164753,"src":"CloseUp1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4164753.html","width":130,"caption":"","height":195});
															thumbnails[4209062] = clik.newPhoto({"id":4209062,"src":"4969_97800323605_77300033605_1891919_3935810_n_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4209062.html","width":130,"caption":"","height":196});
															thumbnails[4246666] = clik.newPhoto({"id":4246666,"src":"Plastik20321_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4246666.html","width":130,"caption":"","height":186});
															thumbnails[4246667] = clik.newPhoto({"id":4246667,"src":"plastik2031_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4246667.html","width":130,"caption":"","height":194});
															thumbnails[4164672] = clik.newPhoto({"id":4164672,"src":"plastik2021_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4164672.html","width":130,"caption":"","height":191});
															thumbnails[3456736] = clik.newPhoto({"id":3456736,"src":"DSC_0106_thumb.JPG","galleries_id":108108,"server_id":18,"link":"photo_3456736.html","width":130,"caption":"","height":194});
															thumbnails[5266898] = clik.newPhoto({"id":5266898,"src":"Photo20Bohdan20Warchomij_MG_8336WEB1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_5266898.html","width":130,"caption":"","height":195});
															thumbnails[3456176] = clik.newPhoto({"id":3456176,"src":"n565336090_1939516_637_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3456176.html","width":130,"caption":"","height":194});
															thumbnails[1581929] = clik.newPhoto({"id":1581929,"src":"tracey1.jpg","galleries_id":108108,"server_id":18,"link":"photo_1581929.html","width":130,"caption":"","height":194});
															thumbnails[3453140] = clik.newPhoto({"id":3453140,"src":"3282934564_7117b04d54_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3453140.html","width":130,"caption":"","height":194});
															thumbnails[3733933] = clik.newPhoto({"id":3733933,"src":"Kitty1_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3733933.html","width":130,"caption":"","height":195});
															thumbnails[3453190] = clik.newPhoto({"id":3453190,"src":"DSC_0186a_thumb.JPG","galleries_id":108108,"server_id":18,"link":"photo_3453190.html","width":130,"caption":"","height":87});
															thumbnails[3569913] = clik.newPhoto({"id":3569913,"src":"n773499533_2229324_6823252_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3569913.html","width":130,"caption":"","height":88});
															thumbnails[3958999] = clik.newPhoto({"id":3958999,"src":"DSC_0396_thumb.JPG","galleries_id":108108,"server_id":18,"link":"photo_3958999.html","width":130,"caption":"","height":87});
															thumbnails[4263906] = clik.newPhoto({"id":4263906,"src":"21_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4263906.html","width":130,"caption":"","height":87});
															thumbnails[3564632] = clik.newPhoto({"id":3564632,"src":"49b549d0050bc_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3564632.html","width":130,"caption":"","height":87});
															thumbnails[3853873] = clik.newPhoto({"id":3853873,"src":"love_it_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_3853873.html","width":130,"caption":"","height":94});
															thumbnails[4216898] = clik.newPhoto({"id":4216898,"src":"5770_98854453605_77300033605_1905456_5240037_n_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_4216898.html","width":130,"caption":"","height":85});
															thumbnails[6572627] = clik.newPhoto({"id":6572627,"src":"61_thumb.jpg","galleries_id":108108,"server_id":18,"link":"photo_6572627.html","width":130,"caption":"","height":191});
															thumbnails[1582445] = clik.newPhoto({"id":1582445,"src":"hair1.jpg","galleries_id":108108,"server_id":18,"link":"photo_1582445.html","width":130,"caption":"","height":188});
															thumbnails[8838809] = clik.newPhoto({"id":8838809,"src":"photo1_BD0846E9-24E8-5EC4-4FCED91924B0AEAF_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_8838809.html","width":130,"caption":"fire","height":87});
															thumbnails[8838888] = clik.newPhoto({"id":8838888,"src":"photo11_BE5061F9-24E8-5EC4-4F4A6D163514209F_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_8838888.html","width":130,"caption":"WIND","height":87});
															thumbnails[6572657] = clik.newPhoto({"id":6572657,"src":"35278_419788993605_77300033605_4468947_672889_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572657.html","width":130,"caption":"","height":95});
															thumbnails[6572659] = clik.newPhoto({"id":6572659,"src":"35278_419788998605_77300033605_4468948_8102980_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572659.html","width":130,"caption":"","height":94});
															thumbnails[6572663] = clik.newPhoto({"id":6572663,"src":"35278_419789008605_77300033605_4468950_4508327_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572663.html","width":130,"caption":"","height":94});
															thumbnails[6572546] = clik.newPhoto({"id":6572546,"src":"35278_419789003605_77300033605_4468949_1758455_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572546.html","width":130,"caption":"","height":94});
															thumbnails[6572517] = clik.newPhoto({"id":6572517,"src":"35278_419789013605_77300033605_4468951_3438424_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572517.html","width":130,"caption":"","height":95});
															thumbnails[6572534] = clik.newPhoto({"id":6572534,"src":"35278_419789018605_77300033605_4468952_235653_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572534.html","width":130,"caption":"","height":94});
															thumbnails[6572503] = clik.newPhoto({"id":6572503,"src":"Jonte20Pike_STMlogoWEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6572503.html","width":130,"caption":"","height":194});
															thumbnails[6229607] = clik.newPhoto({"id":6229607,"src":"X-Press20Fashion20Winter202010_9WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6229607.html","width":130,"caption":"","height":175});
															thumbnails[6229159] = clik.newPhoto({"id":6229159,"src":"Amanda20Norton_STMWEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6229159.html","width":130,"caption":"","height":195});
															thumbnails[6222318] = clik.newPhoto({"id":6222318,"src":"X-Press20Fashion20Winter202010_7WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6222318.html","width":130,"caption":"","height":175});
															thumbnails[6222321] = clik.newPhoto({"id":6222321,"src":"X-Press20Fashion20Winter202010_2WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6222321.html","width":130,"caption":"","height":175});
															thumbnails[6229579] = clik.newPhoto({"id":6229579,"src":"4707981834_58d4202f8d_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6229579.html","width":130,"caption":"","height":178});
															thumbnails[6229585] = clik.newPhoto({"id":6229585,"src":"X-Press20Fashion20Winter202010_6WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6229585.html","width":130,"caption":"","height":175});
															thumbnails[5629652] = clik.newPhoto({"id":5629652,"src":"4419768084_1beed79e6d_b1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629652.html","width":130,"caption":"","height":195});
															thumbnails[6222329] = clik.newPhoto({"id":6222329,"src":"X-Press20Fashion20Winter202010_11WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6222329.html","width":130,"caption":"","height":175});
															thumbnails[5629725] = clik.newPhoto({"id":5629725,"src":"26393_359303586772_8815791772_3841830_6936393_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629725.html","width":130,"caption":"","height":195});
															thumbnails[5629824] = clik.newPhoto({"id":5629824,"src":"26393_359303596772_8815791772_3841831_3508031_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629824.html","width":130,"caption":"","height":195});
															thumbnails[7178363] = clik.newPhoto({"id":7178363,"src":"Otilee_Totomoto_Fish_WEB1.jpg","galleries_id":156187,"server_id":18,"link":"photo_7178363.html","width":130,"caption":"Totomoto Designs","height":187});
															thumbnails[5629828] = clik.newPhoto({"id":5629828,"src":"26393_359303606772_8815791772_3841832_1428831_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629828.html","width":130,"caption":"","height":195});
															thumbnails[5629832] = clik.newPhoto({"id":5629832,"src":"front_cover_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629832.html","width":130,"caption":"","height":178});
															thumbnails[5629867] = clik.newPhoto({"id":5629867,"src":"4419779268_fc096f267b_b1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5629867.html","width":130,"caption":"","height":195});
															thumbnails[6839599] = clik.newPhoto({"id":6839599,"src":"62123_433466952306_344918592306_5704725_2014116_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6839599.html","width":130,"caption":"","height":95});
															thumbnails[6839601] = clik.newPhoto({"id":6839601,"src":"62123_433466977306_344918592306_5704730_6224156_n_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_6839601.html","width":130,"caption":"","height":94});
															thumbnails[5266918] = clik.newPhoto({"id":5266918,"src":"x-press_11_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5266918.html","width":130,"caption":"","height":195});
															thumbnails[5266924] = clik.newPhoto({"id":5266924,"src":"xpress2_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5266924.html","width":130,"caption":"","height":195});
															thumbnails[5266963] = clik.newPhoto({"id":5266963,"src":"4186571107_acfc288a75_o1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5266963.html","width":130,"caption":"","height":200});
															thumbnails[5266967] = clik.newPhoto({"id":5266967,"src":"4187333582_66e3e5af3e_o2_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5266967.html","width":130,"caption":"","height":176});
															thumbnails[5430014] = clik.newPhoto({"id":5430014,"src":"shoot_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5430014.html","width":130,"caption":"","height":195});
															thumbnails[4849046] = clik.newPhoto({"id":4849046,"src":"28_IMG_6655_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_4849046.html","width":130,"caption":"","height":205});
															thumbnails[5266984] = clik.newPhoto({"id":5266984,"src":"Photo20Bohdan20Warchomij_MG_8466WEB1_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_5266984.html","width":130,"caption":"","height":195});
															thumbnails[4849056] = clik.newPhoto({"id":4849056,"src":"18_IMG_7800_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_4849056.html","width":130,"caption":"","height":193});
															thumbnails[4164522] = clik.newPhoto({"id":4164522,"src":"FurStole_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_4164522.html","width":130,"caption":"","height":195});
															thumbnails[4849060] = clik.newPhoto({"id":4849060,"src":"43_IMG_6781_thumb.jpg","galleries_id":156187,"server_id":18,"link":"photo_4849060.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[107134] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WEDDINGS","link":"gallery_107134.html","maxRecords":0.0,"photoIDs":[3435526.0,3928306.0,3929838.0,3932097.0,4897234.0,1571397.0,1571407.0,2749801.0,2749781.0,2749786.0,3272179.0,2155632.0,3715537.0,3715542.0,3715550.0,3228983.0,3929959.0,3920977.0,3928578.0,1581972.0,1581958.0,3710530.0,3710610.0,1582146.0,1585341.0,2876188.0,3932088.0,3435627.0],"skipIndex":0,"section_code":"gallery","featured_images":3928306.0,"id":107134,"singleSection":false});				  						galleries[108108] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FASHION","link":"gallery_108108.html","maxRecords":0.0,"photoIDs":[6572559.0,6572579.0,6706115.0,6706126.0,6706141.0,6572598.0,4619807.0,5266902.0,4671857.0,4890552.0,4631717.0,4671984.0,4263692.0,4897247.0,4897271.0,4263740.0,4164753.0,4209062.0,4246666.0,4246667.0,4164672.0,3456736.0,5266898.0,3456176.0,1581929.0,3453140.0,3733933.0,3453190.0,3569913.0,3958999.0,4263906.0,3564632.0,3853873.0,4216898.0,6572627.0,1582445.0],"skipIndex":0,"section_code":"gallery","featured_images":3453140.0,"id":108108,"singleSection":false});				  						galleries[156187] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"EDITORIAL","link":"gallery_156187.html","maxRecords":0.0,"photoIDs":[6705544.0,6705553.0,6705560.0,8838861.0,8838809.0,8838888.0,6572657.0,6572659.0,6572663.0,6572546.0,6572517.0,6572534.0,6572503.0,6229607.0,6229159.0,6222318.0,6222321.0,6229579.0,6229585.0,5629652.0,6222329.0,5629725.0,5629824.0,7178363.0,5629828.0,5629832.0,5629867.0,6839599.0,6839601.0,5266918.0,5266924.0,5266963.0,5266967.0,5430014.0,4849046.0,5266984.0,4849056.0,4164522.0,4849060.0],"skipIndex":0,"section_code":"gallery","featured_images":"8838888,8838861,8838809,6705544,6222329","id":156187,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8838861,6706115,6705553,6705544,4246667,8838888,8838809,6222329,5629832';
imageSets[2] = '8838861,6705544,3928306,3453140,8838888,8838809,6222329';
imageSets[3] = '8838861,8838888,8838809';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/samtictac/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/samtictac/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/samtictac/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Sam Enticknap Make-Up Artist : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

