window.thumbnails = {};
															thumbnails[2994549] = clik.newPhoto({"id":2994549,"src":"BookHeart_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Words...","height":98});
															thumbnails[3000624] = clik.newPhoto({"id":3000624,"src":"HairyRaspberryArmy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Hairy Raspberry Army","height":90});
															thumbnails[6601064] = clik.newPhoto({"id":6601064,"src":"wygyrLlio1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":90});
															thumbnails[6979045] = clik.newPhoto({"id":6979045,"src":"webcollage_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":92});
															thumbnails[4703311] = clik.newPhoto({"id":4703311,"src":"cRed_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Red","height":86});
															thumbnails[812225] = clik.newPhoto({"id":812225,"src":"Freedom_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Freedom","height":200});
															thumbnails[1255552] = clik.newPhoto({"id":1255552,"src":"curl_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Curl","height":150});
															thumbnails[814192] = clik.newPhoto({"id":814192,"src":"Skeletal_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Skeletal","height":89});
															thumbnails[1980337] = clik.newPhoto({"id":1980337,"src":"iPod_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Eye-Pod","height":43});
															thumbnails[2739354] = clik.newPhoto({"id":2739354,"src":"SouthStackSunset_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_2739354.html","width":130,"caption":"South Stack","height":86});
															thumbnails[2813328] = clik.newPhoto({"id":2813328,"src":"ogwenroad_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_2813328.html","width":130,"caption":"Ogwen Road","height":90});
															thumbnails[2999882] = clik.newPhoto({"id":2999882,"src":"BBlightning1_thumb.jpg","galleries_id":181208,"server_id":1,"link":"photo_2999882.html","width":130,"caption":"Bull Bay","height":87});
															thumbnails[2999940] = clik.newPhoto({"id":2999940,"src":"SouthStackPath1_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_2999940.html","width":130,"caption":"The Path","height":85});
															thumbnails[3000613] = clik.newPhoto({"id":3000613,"src":"TulipTrio1_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_3000613.html","width":130,"caption":"Tulip Trio","height":186});
															thumbnails[3000623] = clik.newPhoto({"id":3000623,"src":"Painting_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_3000623.html","width":130,"caption":"Painting","height":104});
															thumbnails[3905424] = clik.newPhoto({"id":3905424,"src":"sand_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3905424.html","width":130,"caption":"Dune","height":87});
															thumbnails[4703291] = clik.newPhoto({"id":4703291,"src":"greenorbc_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4703291.html","width":130,"caption":"Forest Orb","height":182});
															thumbnails[4703303] = clik.newPhoto({"id":4703303,"src":"briggsc_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_4703303.html","width":130,"caption":"Paws","height":99});
															thumbnails[5280629] = clik.newPhoto({"id":5280629,"src":"WylfaCemSwirl_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_5280629.html","width":130,"caption":"Swirls","height":85});
															thumbnails[6278818] = clik.newPhoto({"id":6278818,"src":"BrownGrasshopper_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_6278818.html","width":130,"caption":"Meadow Grasshopper","height":92});
															thumbnails[6279624] = clik.newPhoto({"id":6279624,"src":"BugsBunny_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_6279624.html","width":130,"caption":"Meadow Grasshopper","height":93});
															thumbnails[6279629] = clik.newPhoto({"id":6279629,"src":"Sawfly_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_6279629.html","width":130,"caption":"Sawfly Larvae","height":93});
															thumbnails[5174480] = clik.newPhoto({"id":5174480,"src":"robinperch_filtered_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_5174480.html","width":130,"caption":"Robin","height":96});
															thumbnails[988218] = clik.newPhoto({"id":988218,"src":"AcrosstheBay_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_988218.html","width":130,"caption":"Stormy Eve","height":87});
															thumbnails[5564941] = clik.newPhoto({"id":5564941,"src":"octeltake2_thumb.jpg","galleries_id":181208,"server_id":1,"link":"photo_5564941.html","width":130,"caption":"Rotation","height":184});
															thumbnails[6278738] = clik.newPhoto({"id":6278738,"src":"HopperFace_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_6278738.html","width":130,"caption":"Meadow Grasshopper","height":161});
															thumbnails[5794991] = clik.newPhoto({"id":5794991,"src":"fairyglenphoto_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5794991.html","width":130,"caption":"","height":192});
															thumbnails[1012748] = clik.newPhoto({"id":1012748,"src":"Nature'sCanvas_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_1012748.html","width":130,"caption":"Red Sun","height":86});
															thumbnails[1745542] = clik.newPhoto({"id":1745542,"src":"ParysMine_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_1745542.html","width":130,"caption":"Parys Mine","height":86});
															thumbnails[5351910] = clik.newPhoto({"id":5351910,"src":"penmontungsten_thumb.jpg","galleries_id":181208,"server_id":1,"link":"photo_5351910.html","width":130,"caption":"Penmon","height":186});
															thumbnails[5564931] = clik.newPhoto({"id":5564931,"src":"tassle_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5564931.html","width":130,"caption":"Tassle","height":91});
															thumbnails[7344945] = clik.newPhoto({"id":7344945,"src":"Image29_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_7344945.html","width":130,"caption":"","height":195});
															thumbnails[1399059] = clik.newPhoto({"id":1399059,"src":"Surf_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_1399059.html","width":130,"caption":"Surf","height":83});
															thumbnails[5564934] = clik.newPhoto({"id":5564934,"src":"Fly_Finale_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5564934.html","width":130,"caption":"Red Salute","height":90});
															thumbnails[7344936] = clik.newPhoto({"id":7344936,"src":"042_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_7344936.html","width":130,"caption":"","height":195});
															thumbnails[4375336] = clik.newPhoto({"id":4375336,"src":"feedmec_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_4375336.html","width":130,"caption":"Feed me!","height":155});
															thumbnails[4375544] = clik.newPhoto({"id":4375544,"src":"dunnockjuvenilec_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_4375544.html","width":130,"caption":"Dunnock","height":95});
															thumbnails[5280621] = clik.newPhoto({"id":5280621,"src":"hivis1_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5280621.html","width":130,"caption":"Mushroom","height":86});
															thumbnails[1239399] = clik.newPhoto({"id":1239399,"src":"CallaPetal_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_1239399.html","width":130,"caption":"Calla Petals","height":169});
															thumbnails[2999903] = clik.newPhoto({"id":2999903,"src":"Yacht1_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_2999903.html","width":130,"caption":"Tranquility","height":90});
															thumbnails[4375548] = clik.newPhoto({"id":4375548,"src":"femalesprwc_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_4375548.html","width":130,"caption":"Sparrow","height":92});
															thumbnails[5564936] = clik.newPhoto({"id":5564936,"src":"Shade_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5564936.html","width":130,"caption":"Lampshade","height":99});
															thumbnails[5742510] = clik.newPhoto({"id":5742510,"src":"caricls_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5742510.html","width":130,"caption":"","height":184});
															thumbnails[6279630] = clik.newPhoto({"id":6279630,"src":"ladybirddof_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_6279630.html","width":130,"caption":"7 Spot Ladybird","height":181});
															thumbnails[4375534] = clik.newPhoto({"id":4375534,"src":"BlueTit_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_4375534.html","width":130,"caption":"Blue Tit","height":88});
															thumbnails[5280616] = clik.newPhoto({"id":5280616,"src":"draiggoch_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5280616.html","width":130,"caption":"Draig Goch","height":89});
															thumbnails[4378926] = clik.newPhoto({"id":4378926,"src":"PMBWC_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_4378926.html","width":130,"caption":"Parys Mill","height":87});
															thumbnails[5795075] = clik.newPhoto({"id":5795075,"src":"lois1_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5795075.html","width":130,"caption":"","height":189});
															thumbnails[4714709] = clik.newPhoto({"id":4714709,"src":"csparkler_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4714709.html","width":130,"caption":"Mill Sparks","height":91});
															thumbnails[5351962] = clik.newPhoto({"id":5351962,"src":"eyedribble_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5351962.html","width":130,"caption":"Eyedrops","height":91});
															thumbnails[3721361] = clik.newPhoto({"id":3721361,"src":"pen_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_3721361.html","width":130,"caption":"Groyn","height":83});
															thumbnails[4375543] = clik.newPhoto({"id":4375543,"src":"feedingsprwsc_thumb.jpg","galleries_id":252221,"server_id":1,"link":"photo_4375543.html","width":130,"caption":"Feeding","height":82});
															thumbnails[4714701] = clik.newPhoto({"id":4714701,"src":"cmillorbs_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4714701.html","width":130,"caption":"Sparkle","height":85});
															thumbnails[3165058] = clik.newPhoto({"id":3165058,"src":"PenmonWave_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3165058.html","width":130,"caption":"Penmon Wave","height":87});
															thumbnails[757983] = clik.newPhoto({"id":757983,"src":"Timid_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_757983.html","width":130,"caption":"Timid","height":99});
															thumbnails[4385468] = clik.newPhoto({"id":4385468,"src":"ringlet_thumb.jpg","galleries_id":348689,"server_id":1,"link":"photo_4385468.html","width":130,"caption":"Ringlet Butterfly","height":86});
															thumbnails[784090] = clik.newPhoto({"id":784090,"src":"innerglo_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_784090.html","width":130,"caption":"Inner Glow","height":96});
															thumbnails[7344942] = clik.newPhoto({"id":7344942,"src":"Image19_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_7344942.html","width":130,"caption":"","height":87});
															thumbnails[3653700] = clik.newPhoto({"id":3653700,"src":"ChurchBaytideflow_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3653700.html","width":130,"caption":"Tidal Flow","height":85});
															thumbnails[845943] = clik.newPhoto({"id":845943,"src":"hellebore_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_845943.html","width":130,"caption":"Hellebore","height":100});
															thumbnails[3653703] = clik.newPhoto({"id":3653703,"src":"churchbayrock_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3653703.html","width":130,"caption":"Church Bay","height":87});
															thumbnails[3711060] = clik.newPhoto({"id":3711060,"src":"PenmonSea_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3711060.html","width":130,"caption":"Boat Trip","height":87});
															thumbnails[4769406] = clik.newPhoto({"id":4769406,"src":"Cspiral_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4769406.html","width":130,"caption":"Spin","height":87});
															thumbnails[1239407] = clik.newPhoto({"id":1239407,"src":"CallaLily_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_1239407.html","width":130,"caption":"Calla Lily","height":99});
															thumbnails[4769395] = clik.newPhoto({"id":4769395,"src":"Cbouncingorb_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4769395.html","width":130,"caption":"Enter Orb","height":87});
															thumbnails[852709] = clik.newPhoto({"id":852709,"src":"Llanddwyn_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_852709.html","width":130,"caption":"Llanddwyn","height":88});
															thumbnails[3165054] = clik.newPhoto({"id":3165054,"src":"Penlight_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_3165054.html","width":130,"caption":"Penmon Point","height":191});
															thumbnails[4833673] = clik.newPhoto({"id":4833673,"src":"clligwybcwhite_thumb.jpg","galleries_id":270487,"server_id":1,"link":"photo_4833673.html","width":130,"caption":"Chamber","height":85});
															thumbnails[5061704] = clik.newPhoto({"id":5061704,"src":"redder_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5061704.html","width":130,"caption":"Spinner","height":134});
															thumbnails[5280627] = clik.newPhoto({"id":5280627,"src":"welshydrop_thumb.jpg","galleries_id":280456,"server_id":1,"link":"photo_5280627.html","width":130,"caption":"Welsh Flag","height":169});
															thumbnails[2999361] = clik.newPhoto({"id":2999361,"src":"TangerineDreams_thumb.jpg","galleries_id":29494,"server_id":1,"link":"photo_2999361.html","width":130,"caption":"Orange Light","height":92});
															thumbnails[5794997] = clik.newPhoto({"id":5794997,"src":"bubbles_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5794997.html","width":130,"caption":"","height":89});
															thumbnails[5280623] = clik.newPhoto({"id":5280623,"src":"PalmWyl1_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_5280623.html","width":130,"caption":"Wylfa","height":182});
															thumbnails[7908066] = clik.newPhoto({"id":7908066,"src":"menai_bridge_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_7908066.html","width":130,"caption":"Menai Bridge 01","height":180});
															thumbnails[7908067] = clik.newPhoto({"id":7908067,"src":"menai_bridge_below_thumb.jpg","galleries_id":184336,"server_id":1,"link":"photo_7908067.html","width":130,"caption":"Menai Bridge 02","height":87});
															thumbnails[5795063] = clik.newPhoto({"id":5795063,"src":"nat_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5795063.html","width":130,"caption":"","height":89});
															thumbnails[3691932] = clik.newPhoto({"id":3691932,"src":"Groyn_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_3691932.html","width":130,"caption":"Groyn","height":200});
															thumbnails[5826949] = clik.newPhoto({"id":5826949,"src":"26_thumb.jpg","galleries_id":318935,"server_id":1,"link":"photo_5826949.html","width":130,"caption":"","height":87});
															thumbnails[2991757] = clik.newPhoto({"id":2991757,"src":"Log3_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_2991757.html","width":130,"caption":"Driftwood","height":166});
															thumbnails[359484] = clik.newPhoto({"id":359484,"src":"roses_thumb.jpg","galleries_id":225529,"server_id":1,"link":"photo_359484.html","width":130,"caption":"Roses","height":121});
															thumbnails[6667774] = clik.newPhoto({"id":6667774,"src":"BW_boat_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667774.html","width":130,"caption":"Old Boat","height":87});
															thumbnails[6667776] = clik.newPhoto({"id":6667776,"src":"3colourbw_filtered_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667776.html","width":130,"caption":"Penmaenmawr","height":87});
															thumbnails[6667800] = clik.newPhoto({"id":6667800,"src":"sssunset_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667800.html","width":130,"caption":"South Stack","height":85});
															thumbnails[6667796] = clik.newPhoto({"id":6667796,"src":"fisherman_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667796.html","width":130,"caption":"Gone Fishin'","height":92});
															thumbnails[6667789] = clik.newPhoto({"id":6667789,"src":"chbaysunset_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667789.html","width":130,"caption":"Church Bay","height":86});
															thumbnails[6667792] = clik.newPhoto({"id":6667792,"src":"cemaessilhouettess_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667792.html","width":130,"caption":"Cemaes Bay","height":101});
															thumbnails[6667812] = clik.newPhoto({"id":6667812,"src":"cemaesrock_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667812.html","width":130,"caption":"Sunset","height":86});
															thumbnails[6667805] = clik.newPhoto({"id":6667805,"src":"burial_mound_sphere_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667805.html","width":130,"caption":"Din Lligwy","height":86});
															thumbnails[6667806] = clik.newPhoto({"id":6667806,"src":"06_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667806.html","width":130,"caption":"Helmet","height":94});
															thumbnails[6667802] = clik.newPhoto({"id":6667802,"src":"octelmilllongtrails_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667802.html","width":130,"caption":"Starry Mill","height":195});
															thumbnails[6667779] = clik.newPhoto({"id":6667779,"src":"pm_thumb.jpg","galleries_id":364424,"server_id":1,"link":"photo_6667779.html","width":130,"caption":"Enginehouse","height":195});
															thumbnails[6667819] = clik.newPhoto({"id":6667819,"src":"dulas_wreck_thumb.jpg","galleries_id":364424,"server_id":37,"link":"photo_6667819.html","width":130,"caption":"Wreck by Night","height":87});
															thumbnails[2580167] = clik.newPhoto({"id":2580167,"src":"packcards_thumb.jpg","galleries_id":164283,"server_id":1,"link":"photo_2580167.html","width":130,"caption":"","height":73});
															thumbnails[6277144] = clik.newPhoto({"id":6277144,"src":"magnets_thumb.jpg","galleries_id":348693,"server_id":1,"link":"photo_6277144.html","width":130,"caption":"","height":80});
															thumbnails[6280126] = clik.newPhoto({"id":6280126,"src":"log_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6280126.html","width":130,"caption":"'Promise me you'll never forget me because if I thought you would, i'd never leave.'","height":177});
															thumbnails[6280133] = clik.newPhoto({"id":6280133,"src":"fern_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6280133.html","width":130,"caption":"'The greatest oak was once a little nut who held its ground.'","height":177});
															thumbnails[6280180] = clik.newPhoto({"id":6280180,"src":"tide_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6280180.html","width":130,"caption":"'If you live to be a hundred, I want to live to be a hundred minus one day, so I never have to live without you.'","height":104});
															thumbnails[6277065] = clik.newPhoto({"id":6277065,"src":"pea_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6277065.html","width":130,"caption":"'I may not be different, but i'm definitely not the same.'","height":109});
															thumbnails[6277044] = clik.newPhoto({"id":6277044,"src":"cat_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6277044.html","width":130,"caption":"'No day is so bad it can't be fixed with a nap.'","height":124});
															thumbnails[6277048] = clik.newPhoto({"id":6277048,"src":"heart_thumb.jpg","galleries_id":348692,"server_id":1,"link":"photo_6277048.html","width":130,"caption":"'Words are just words, for without heart they have no meaning.'","height":111});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[348693] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fridge Magnets","link":"section206634_348693.html","maxRecords":0.0,"photoIDs":[6277144.0],"skipIndex":0,"section_code":"section206634","featured_images":6277144.0,"id":348693,"singleSection":false});				  						galleries[164283] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Greetings Cards","link":"section206634_164283.html","maxRecords":0.0,"photoIDs":[2580167.0],"skipIndex":0,"section_code":"section206634","featured_images":2580167.0,"id":164283,"singleSection":false});				  						galleries[348692] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Keyrings","link":"section206634_348692.html","maxRecords":0.0,"photoIDs":[6280126.0,6280133.0,6280180.0,6277065.0,6277044.0,6277048.0],"skipIndex":0,"section_code":"section206634","featured_images":6277048.0,"id":348692,"singleSection":false});				  						galleries[364424] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Images By R.Redpath","link":"section434097.html","maxRecords":0.0,"photoIDs":[6667774.0,6667776.0,6667800.0,6667796.0,6667789.0,6667792.0,6667812.0,6667805.0,6667806.0,6667802.0,6667779.0,6667819.0],"skipIndex":0,"section_code":"section434097","featured_images":"6667819,6667812,6667806,6667805,6667802,6667800,6667796,6667792,6667789,6667779","id":364424,"singleSection":true});				  						galleries[184336] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_184336.html","maxRecords":0.0,"photoIDs":[2739354.0,2813328.0,2999940.0,3905424.0,5280629.0,988218.0,1012748.0,1745542.0,1399059.0,2999903.0,3165058.0,3653700.0,3653703.0,3711060.0,852709.0,3165054.0,5280623.0,7908066.0,7908067.0],"skipIndex":0,"section_code":"gallery","featured_images":"3905424,3653700","id":184336,"singleSection":false});				  						galleries[225529] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Monotone","link":"gallery_225529.html","maxRecords":0.0,"photoIDs":[3000623.0,4703303.0,4378926.0,3721361.0,3691932.0,2991757.0,359484.0],"skipIndex":0,"section_code":"gallery","featured_images":4378926.0,"id":225529,"singleSection":false});				  						galleries[181208] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nightscapes","link":"gallery_181208.html","maxRecords":0.0,"photoIDs":[2999882.0,5564941.0,5351910.0],"skipIndex":0,"section_code":"gallery","featured_images":2999882.0,"id":181208,"singleSection":false});				  						galleries[270487] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Light Art","link":"gallery_270487.html","maxRecords":0.0,"photoIDs":[4703291.0,4714709.0,4714701.0,4769406.0,4769395.0,4833673.0],"skipIndex":0,"section_code":"gallery","featured_images":4769395.0,"id":270487,"singleSection":false});				  						galleries[29494] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers","link":"gallery_29494.html","maxRecords":0.0,"photoIDs":[3000613.0,1239399.0,757983.0,784090.0,845943.0,1239407.0,2999361.0],"skipIndex":0,"section_code":"gallery","featured_images":2999361.0,"id":29494,"singleSection":false});				  						galleries[318935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_318935.html","maxRecords":0.0,"photoIDs":[5794991.0,7344945.0,7344936.0,5742510.0,5795075.0,7344942.0,5794997.0,5795063.0,5826949.0],"skipIndex":0,"section_code":"gallery","featured_images":5826949.0,"id":318935,"singleSection":false});				  						galleries[280456] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Water Art","link":"gallery_280456.html","maxRecords":0.0,"photoIDs":[5564931.0,5564934.0,5280621.0,5564936.0,5280616.0,5351962.0,5061704.0,5280627.0],"skipIndex":0,"section_code":"gallery","featured_images":5564931.0,"id":280456,"singleSection":false});				  						galleries[348689] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Insects","link":"gallery_348689.html","maxRecords":0.0,"photoIDs":[6278818.0,6279624.0,6279629.0,6278738.0,6279630.0,4385468.0],"skipIndex":0,"section_code":"gallery","featured_images":6278818.0,"id":348689,"singleSection":false});				  						galleries[252221] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"British Birds","link":"gallery_252221.html","maxRecords":0.0,"photoIDs":[5174480.0,4375336.0,4375544.0,4375548.0,4375534.0,4375543.0],"skipIndex":0,"section_code":"gallery","featured_images":"5174480,4375534","id":252221,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5794991,5742510,4378926';
imageSets[2] = '6278818,6277048,5826949,5564931,5174480,4769395,4378926,4375534,3905424,3653700,2999882,2999361,2994549,2580167,814192';
imageSets[3] = '7908067,7908066,7344945,7344942,7344936,6979045,6667819,6667812,6667806,6667805,6667802,6667800,6667796,6667792,6667789,6667779,6667776,6667774,6601064,6280180,6280133,6280126,6279630,6279629,6279624,6278818,6278738,6277144,6277065,6277048,6277044,5826949,5795075,5795063,5794997,5794991,5742510,5564941,5564936,5564934,5564931,5351962,5351910,5280629,5280627,5280623,5280621,5280616,5174480,5061704';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/pensans/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/pensans/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/pensans/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/pensans/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/pensans/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/pensans/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/pensans/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 = 'Pensans 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="PENSANS">';
			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({					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;
	}
}

			

