window.thumbnails = {};
															thumbnails[2163388] = clik.newPhoto({"id":2163388,"src":"Bone sac (4)_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Bone sack","height":173});
															thumbnails[2163433] = clik.newPhoto({"id":2163433,"src":"Bone sac(detail 2)_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Bone sack (detail)","height":173});
															thumbnails[2163444] = clik.newPhoto({"id":2163444,"src":"Bone sac (detail 4)_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Bone sack (detail)","height":173});
															thumbnails[8803734] = clik.newPhoto({"id":8803734,"src":"P1010026_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8803734.html","width":130,"caption":"Hi Chuck","height":98});
															thumbnails[8803738] = clik.newPhoto({"id":8803738,"src":"P1010027_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8803738.html","width":130,"caption":"Family time","height":98});
															thumbnails[8803741] = clik.newPhoto({"id":8803741,"src":"P1010028_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8803741.html","width":130,"caption":"cheeky chicken","height":98});
															thumbnails[8803743] = clik.newPhoto({"id":8803743,"src":"P1010029_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8803743.html","width":130,"caption":"cheeky chicken","height":98});
															thumbnails[8803749] = clik.newPhoto({"id":8803749,"src":"P1010030_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8803749.html","width":130,"caption":"cheeky chicken","height":98});
															thumbnails[8843802] = clik.newPhoto({"id":8843802,"src":"chicken_stroll_F34248C9-1EC9-D45B-1C91355E7D018A3A_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8843802.html","width":130,"caption":"chicken stroll","height":98});
															thumbnails[8843826] = clik.newPhoto({"id":8843826,"src":"chicken_stroll_detail_F351C130-1EC9-D45B-1C014C25FFF23600_thumb.JPG","galleries_id":463465,"server_id":5,"link":"photo_8843826.html","width":130,"caption":"chicken stroll (detail)","height":98});
															thumbnails[4479346] = clik.newPhoto({"id":4479346,"src":"cute_cocker_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479346.html","width":130,"caption":"cute cocker card 6 x 4\"","height":182});
															thumbnails[4479679] = clik.newPhoto({"id":4479679,"src":"doodle_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479679.html","width":130,"caption":"doodle card 6 x 4\"","height":93});
															thumbnails[4479816] = clik.newPhoto({"id":4479816,"src":"happy_dog_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479816.html","width":130,"caption":"happy dog card 6 x 4\"","height":93});
															thumbnails[4479822] = clik.newPhoto({"id":4479822,"src":"lanky_legs_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479822.html","width":130,"caption":"lanky legs card 8 x 4\"","height":65});
															thumbnails[4479834] = clik.newPhoto({"id":4479834,"src":"laughing_dog_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479834.html","width":130,"caption":"laughing dog card 8 x 4\"","height":65});
															thumbnails[4479843] = clik.newPhoto({"id":4479843,"src":"mr_allsorts_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479843.html","width":130,"caption":"mr allsorts card 8 x 4\"","height":65});
															thumbnails[4479851] = clik.newPhoto({"id":4479851,"src":"romper_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479851.html","width":130,"caption":"romper card 8 x4\"","height":65});
															thumbnails[4479870] = clik.newPhoto({"id":4479870,"src":"scribble_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479870.html","width":130,"caption":"scribble card 6 x 4\"","height":93});
															thumbnails[4479890] = clik.newPhoto({"id":4479890,"src":"short_and_hairy_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479890.html","width":130,"caption":"short and hairy card 6 x 4\"","height":93});
															thumbnails[4479915] = clik.newPhoto({"id":4479915,"src":"scruffy_thumb.jpg","galleries_id":261209,"server_id":5,"link":"photo_4479915.html","width":130,"caption":"scruffy card 6 x 4\"","height":93});
															thumbnails[4775817] = clik.newPhoto({"id":4775817,"src":"Cornfield_Chase_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775817.html","width":130,"caption":"Cornfield chase","height":54});
															thumbnails[4775822] = clik.newPhoto({"id":4775822,"src":"Dogs_Day_Out_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775822.html","width":130,"caption":"dogs day out!","height":54});
															thumbnails[4775823] = clik.newPhoto({"id":4775823,"src":"Happy_Hounds_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775823.html","width":130,"caption":"happy hounds hanging around","height":54});
															thumbnails[4775825] = clik.newPhoto({"id":4775825,"src":"Our_house_in_the_country_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775825.html","width":130,"caption":"our house in the country","height":315});
															thumbnails[4775828] = clik.newPhoto({"id":4775828,"src":"Cute_Cockers_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775828.html","width":130,"caption":"cute cockers","height":130});
															thumbnails[4775831] = clik.newPhoto({"id":4775831,"src":"Happy_Dog_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775831.html","width":130,"caption":"happy dog","height":130});
															thumbnails[4775833] = clik.newPhoto({"id":4775833,"src":"Scruffy_chases_a_butterfly_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775833.html","width":130,"caption":"scruffy chases a butterfly","height":130});
															thumbnails[4775835] = clik.newPhoto({"id":4775835,"src":"Laughing_dog_art2card_jpeg_thumb.jpg","galleries_id":273429,"server_id":5,"link":"photo_4775835.html","width":130,"caption":"Laughing dog","height":130});
															thumbnails[5303681] = clik.newPhoto({"id":5303681,"src":"romper_106x4_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5303681.html","width":130,"caption":"Romper","height":98});
															thumbnails[5398092] = clik.newPhoto({"id":5398092,"src":"curly16x4_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5398092.html","width":130,"caption":"curly","height":98});
															thumbnails[5398096] = clik.newPhoto({"id":5398096,"src":"scamper16x4_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5398096.html","width":130,"caption":"scamper","height":98});
															thumbnails[5398104] = clik.newPhoto({"id":5398104,"src":"springy16x4_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5398104.html","width":130,"caption":"springy","height":98});
															thumbnails[5398107] = clik.newPhoto({"id":5398107,"src":"waggy16x4_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5398107.html","width":130,"caption":"waggy","height":98});
															thumbnails[5748302] = clik.newPhoto({"id":5748302,"src":"sunseasand_and_sniffs120x8_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5748302.html","width":130,"caption":"sun,sea,sand and sniffs","height":98});
															thumbnails[5748306] = clik.newPhoto({"id":5748306,"src":"sunseasand_and_sniffs1detail_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5748306.html","width":130,"caption":"sun,sea,sand and sniffs (detail)","height":98});
															thumbnails[5748309] = clik.newPhoto({"id":5748309,"src":"allsorts_of_fun_at_the_beach18x8_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5748309.html","width":130,"caption":"allsorts of fun at the beach","height":98});
															thumbnails[5748313] = clik.newPhoto({"id":5748313,"src":"springing_in_the_sea18x8_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_5748313.html","width":130,"caption":"springing in the sea","height":98});
															thumbnails[6928040] = clik.newPhoto({"id":6928040,"src":"mooching_along18x8_thumb.JPG","galleries_id":155686,"server_id":5,"link":"photo_6928040.html","width":130,"caption":"mooching along","height":98});
															thumbnails[3708596] = clik.newPhoto({"id":3708596,"src":"cute_cockers_paddling28x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3708596.html","width":130,"caption":"cute cockers paddling","height":98});
															thumbnails[3708603] = clik.newPhoto({"id":3708603,"src":"happy_dog_taking_a_dip1_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3708603.html","width":130,"caption":"happy dog taking a dip","height":98});
															thumbnails[3708609] = clik.newPhoto({"id":3708609,"src":"romping_in_the_sea18x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3708609.html","width":130,"caption":"romping in the sea","height":98});
															thumbnails[3708615] = clik.newPhoto({"id":3708615,"src":"surfs_up120x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3708615.html","width":130,"caption":"surf's up!","height":98});
															thumbnails[3708622] = clik.newPhoto({"id":3708622,"src":"surfs_up1detail_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3708622.html","width":130,"caption":"surf's up!(detail)","height":98});
															thumbnails[4181934] = clik.newPhoto({"id":4181934,"src":"frolicing_in_the_sea18x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181934.html","width":130,"caption":"frolicing in the sea","height":98});
															thumbnails[4181936] = clik.newPhoto({"id":4181936,"src":"laughing_dog_leaping78x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181936.html","width":130,"caption":"laughing dog leaping","height":98});
															thumbnails[4181939] = clik.newPhoto({"id":4181939,"src":"lanky_legs_leaping28x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181939.html","width":130,"caption":"lanky legs leaping","height":98});
															thumbnails[4181940] = clik.newPhoto({"id":4181940,"src":"mr_allsorts76x41_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181940.html","width":130,"caption":"mr allsorts","height":98});
															thumbnails[4181941] = clik.newPhoto({"id":4181941,"src":"cute_cocker_paddling16x4_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181941.html","width":130,"caption":"cute cocker paddling","height":173});
															thumbnails[4181942] = clik.newPhoto({"id":4181942,"src":"doodle116x4_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181942.html","width":130,"caption":"doodle","height":98});
															thumbnails[4181944] = clik.newPhoto({"id":4181944,"src":"happy_dog106x4_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181944.html","width":130,"caption":"happy dog","height":98});
															thumbnails[4181945] = clik.newPhoto({"id":4181945,"src":"lanky_legs106x4_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181945.html","width":130,"caption":"lanky legs","height":98});
															thumbnails[4181946] = clik.newPhoto({"id":4181946,"src":"laughing_dog86x4_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_4181946.html","width":130,"caption":"laughing dog","height":98});
															thumbnails[3415949] = clik.newPhoto({"id":3415949,"src":"mr scruffy hits the beach(1)8x8_thumb.JPG","galleries_id":249060,"server_id":5,"link":"photo_3415949.html","width":130,"caption":"mr scruffy hits the beach","height":98});
															thumbnails[3781093] = clik.newPhoto({"id":3781093,"src":"countryside_capers160x161_thumb.JPG","galleries_id":230531,"server_id":5,"link":"photo_3781093.html","width":130,"caption":"countryside capers","height":98});
															thumbnails[3781095] = clik.newPhoto({"id":3781095,"src":"countryside_capersdetail1_thumb.JPG","galleries_id":230531,"server_id":5,"link":"photo_3781095.html","width":130,"caption":"countryside capers(detail)","height":98});
															thumbnails[4719120] = clik.newPhoto({"id":4719120,"src":"fun_and_frolics_in_the_fields_36x121_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719120.html","width":130,"caption":"Fun and frolics in the fields","height":98});
															thumbnails[4719135] = clik.newPhoto({"id":4719135,"src":"fun_and_frolics_in_the_fieldsdetail1_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719135.html","width":130,"caption":"Fun and frolics in the fields(detail 1)","height":98});
															thumbnails[4719137] = clik.newPhoto({"id":4719137,"src":"fun_and_frolics_in_the_fieldsdetail_21_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719137.html","width":130,"caption":"fun and frolics in the fields(detail 2)","height":98});
															thumbnails[4719142] = clik.newPhoto({"id":4719142,"src":"fun_and_frolics_in_the_fieldsdetail_31_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719142.html","width":130,"caption":"Fun and frolics in the fields(detail 3)","height":98});
															thumbnails[4719144] = clik.newPhoto({"id":4719144,"src":"wet_dogs_and_sandy_paws36x12_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719144.html","width":130,"caption":"Wet dogs and sandy paws","height":98});
															thumbnails[4719247] = clik.newPhoto({"id":4719247,"src":"wet_dogs_and_sandy_pawsdetail_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719247.html","width":130,"caption":"Wet dogs and sandy paws(detail 1)","height":98});
															thumbnails[4719387] = clik.newPhoto({"id":4719387,"src":"wet_dogs_and_sandy_pawsdetail_2_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719387.html","width":130,"caption":"Wet dogs and sandy paws(detail 2)","height":98});
															thumbnails[4719391] = clik.newPhoto({"id":4719391,"src":"wet_dogs_and_sandy_pawsdetail_3_thumb.JPG","galleries_id":271137,"server_id":5,"link":"photo_4719391.html","width":130,"caption":"Wet dogs and sandy paws (detail 3 )","height":98});
															thumbnails[3781080] = clik.newPhoto({"id":3781080,"src":"river_tails1detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3781080.html","width":130,"caption":"river tails (detail)","height":98});
															thumbnails[3781077] = clik.newPhoto({"id":3781077,"src":"river_tails120x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3781077.html","width":130,"caption":"river tails","height":98});
															thumbnails[3469177] = clik.newPhoto({"id":3469177,"src":"highland fling(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469177.html","width":130,"caption":"highland fling","height":98});
															thumbnails[3469695] = clik.newPhoto({"id":3469695,"src":"highland fling(1)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469695.html","width":130,"caption":"highland fling (detail)","height":98});
															thumbnails[3469180] = clik.newPhoto({"id":3469180,"src":"muddy paws(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469180.html","width":130,"caption":"muddy paws","height":98});
															thumbnails[3469697] = clik.newPhoto({"id":3469697,"src":"muddy paws(1)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469697.html","width":130,"caption":"muddy paws (detail)","height":98});
															thumbnails[3469188] = clik.newPhoto({"id":3469188,"src":"there's a bone at the end of the rainbow(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469188.html","width":130,"caption":"there's a bone at the end of the rainbow","height":98});
															thumbnails[3469699] = clik.newPhoto({"id":3469699,"src":"there's a bone at the end of the rainbow(1)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469699.html","width":130,"caption":"there's a bone at the end of the rainbow(detail)","height":98});
															thumbnails[3469195] = clik.newPhoto({"id":3469195,"src":"waggy tails and tartan trails(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469195.html","width":130,"caption":"waggy tails and tartan trails","height":98});
															thumbnails[3469703] = clik.newPhoto({"id":3469703,"src":"waggy tails and tartan tails(1) detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469703.html","width":130,"caption":"waggy tails and tartan trails(detail)","height":98});
															thumbnails[3017321] = clik.newPhoto({"id":3017321,"src":"happy hounds hanging around(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017321.html","width":130,"caption":"happy hounds hanging around","height":98});
															thumbnails[3469705] = clik.newPhoto({"id":3469705,"src":"happy hounds hanging around(1)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469705.html","width":130,"caption":"happy hounds hanging around(detail)","height":98});
															thumbnails[3404359] = clik.newPhoto({"id":3404359,"src":"happy dancing dogs(2)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3404359.html","width":130,"caption":"happy dancing dogs","height":98});
															thumbnails[3469714] = clik.newPhoto({"id":3469714,"src":"happy dancing dogs(2)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469714.html","width":130,"caption":"happy dancing dogs(detail)","height":98});
															thumbnails[3017318] = clik.newPhoto({"id":3017318,"src":"having a swirl of a time(4)3D20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017318.html","width":130,"caption":"having a swirl of a time","height":98});
															thumbnails[3469717] = clik.newPhoto({"id":3469717,"src":"having a swirl of a time(4)3D detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469717.html","width":130,"caption":"having a swirl of a tme(detail)","height":98});
															thumbnails[3079970] = clik.newPhoto({"id":3079970,"src":"dogs day out!(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3079970.html","width":130,"caption":"dogs day out!","height":98});
															thumbnails[3469544] = clik.newPhoto({"id":3469544,"src":"dogs day out!(2)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469544.html","width":130,"caption":"dogs day out detail","height":98});
															thumbnails[3079983] = clik.newPhoto({"id":3079983,"src":"cornfield chase(1)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3079983.html","width":130,"caption":"cornfield chase","height":98});
															thumbnails[3469548] = clik.newPhoto({"id":3469548,"src":"cornfield chase(3)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3469548.html","width":130,"caption":"cornfield chase detail","height":98});
															thumbnails[3017331] = clik.newPhoto({"id":3017331,"src":"chasing_tails4_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017331.html","width":130,"caption":"chasing tails","height":98});
															thumbnails[3017327] = clik.newPhoto({"id":3017327,"src":"chasing_tails4detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017327.html","width":130,"caption":"chasing tails (detail)","height":98});
															thumbnails[3017338] = clik.newPhoto({"id":3017338,"src":"woof,wag and roll (1) 20x81_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017338.html","width":130,"caption":"woof,wag and roll","height":98});
															thumbnails[3017328] = clik.newPhoto({"id":3017328,"src":"woof,wag and roll (1)(detail)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_3017328.html","width":130,"caption":"woof,wag and roll(detail)","height":98});
															thumbnails[2402858] = clik.newPhoto({"id":2402858,"src":"sniffing scents1_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2402858.html","width":130,"caption":"sniffing scents","height":98});
															thumbnails[2402871] = clik.newPhoto({"id":2402871,"src":"sniffing scents(detail)1_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2402871.html","width":130,"caption":"sniffing scents(detail)","height":98});
															thumbnails[2163314] = clik.newPhoto({"id":2163314,"src":"our_house_in_the_country720x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163314.html","width":130,"caption":"Our house in the country","height":173});
															thumbnails[2163317] = clik.newPhoto({"id":2163317,"src":"0ur_house_in_the_country7detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163317.html","width":130,"caption":"Our house in the country(detail)","height":173});
															thumbnails[2163265] = clik.newPhoto({"id":2163265,"src":"midday sun(1)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163265.html","width":130,"caption":"only mad dogs and happy dogs go out in the midday sun","height":98});
															thumbnails[2163279] = clik.newPhoto({"id":2163279,"src":"midday sun(detail 1)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163279.html","width":130,"caption":"only mad dogs and happy dogs go out in the midday sun (detail)","height":98});
															thumbnails[2163285] = clik.newPhoto({"id":2163285,"src":"a_walk_in_the_park320x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163285.html","width":130,"caption":"a walk in the park","height":98});
															thumbnails[2163294] = clik.newPhoto({"id":2163294,"src":"a_walk_in_the_park3detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163294.html","width":130,"caption":"A walk in the park (detail)","height":98});
															thumbnails[2163108] = clik.newPhoto({"id":2163108,"src":"fun run(5)20x8_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163108.html","width":130,"caption":"fun run","height":98});
															thumbnails[2163111] = clik.newPhoto({"id":2163111,"src":"fun run(5)detail_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163111.html","width":130,"caption":"fun run (detail)","height":98});
															thumbnails[2163113] = clik.newPhoto({"id":2163113,"src":"dogs just wanna have fun(2)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163113.html","width":130,"caption":"Dogs just wanna have fun","height":98});
															thumbnails[2163257] = clik.newPhoto({"id":2163257,"src":"dogs just wanna have fun(detail3)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163257.html","width":130,"caption":"dogs just wanna have fun(detail)","height":98});
															thumbnails[2163301] = clik.newPhoto({"id":2163301,"src":"wild thing_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163301.html","width":130,"caption":"swirls of of fun and laughter","height":98});
															thumbnails[2163304] = clik.newPhoto({"id":2163304,"src":"wild thing (detail2)_thumb.JPG","galleries_id":143365,"server_id":5,"link":"photo_2163304.html","width":130,"caption":"swirls of fun and laughter (detail)","height":98});
															thumbnails[3415939] = clik.newPhoto({"id":3415939,"src":"laughing_dog_leaping98x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415939.html","width":130,"caption":"laughing dog leaping","height":98});
															thumbnails[3415962] = clik.newPhoto({"id":3415962,"src":"big_friendly_dog10_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415962.html","width":130,"caption":"big friendly dog","height":98});
															thumbnails[3415974] = clik.newPhoto({"id":3415974,"src":"big_paws38x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415974.html","width":130,"caption":"big paws","height":98});
															thumbnails[3415977] = clik.newPhoto({"id":3415977,"src":"bundle_of_fun108x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415977.html","width":130,"caption":"bundle of fun","height":98});
															thumbnails[3415981] = clik.newPhoto({"id":3415981,"src":"mrs frolic(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415981.html","width":130,"caption":" frolic","height":98});
															thumbnails[3415983] = clik.newPhoto({"id":3415983,"src":"mrs graceful(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415983.html","width":130,"caption":"mrs graceful","height":98});
															thumbnails[3415987] = clik.newPhoto({"id":3415987,"src":"mrs woolly(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415987.html","width":130,"caption":"woolly","height":98});
															thumbnails[3416040] = clik.newPhoto({"id":3416040,"src":"sniffer(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3416040.html","width":130,"caption":"sniffer","height":98});
															thumbnails[3416042] = clik.newPhoto({"id":3416042,"src":"snuffle(2)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3416042.html","width":130,"caption":"snuffle","height":98});
															thumbnails[3416043] = clik.newPhoto({"id":3416043,"src":"stately hound(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3416043.html","width":130,"caption":"stately hound","height":98});
															thumbnails[3708606] = clik.newPhoto({"id":3708606,"src":"mr_hurdle18x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3708606.html","width":130,"caption":"mr hurdle","height":98});
															thumbnails[6928035] = clik.newPhoto({"id":6928035,"src":"cute_cockers68x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_6928035.html","width":130,"caption":"two cute cockers","height":98});
															thumbnails[2190723] = clik.newPhoto({"id":2190723,"src":"happy_dog148x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2190723.html","width":130,"caption":"happy dog","height":98});
															thumbnails[3415958] = clik.newPhoto({"id":3415958,"src":"lanky legs leaping(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415958.html","width":130,"caption":"lanky legs leaping","height":98});
															thumbnails[3415951] = clik.newPhoto({"id":3415951,"src":"mrs snooty sniffing flowers(1)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3415951.html","width":130,"caption":"snooty sniffing flowers","height":98});
															thumbnails[2190718] = clik.newPhoto({"id":2190718,"src":"setter looking pretty(2)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2190718.html","width":130,"caption":"snooty looking pretty","height":98});
															thumbnails[3017316] = clik.newPhoto({"id":3017316,"src":"an air of elegance(2)_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_3017316.html","width":130,"caption":"an air of elegance","height":98});
															thumbnails[2190706] = clik.newPhoto({"id":2190706,"src":"scruffy_chases_a_butterfly128x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2190706.html","width":130,"caption":"mr scruffy chases a butterfly","height":98});
															thumbnails[2958193] = clik.newPhoto({"id":2958193,"src":"taking_a_stroll10_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2958193.html","width":130,"caption":"taking a stroll","height":98});
															thumbnails[2190698] = clik.newPhoto({"id":2190698,"src":"cute cocker(5)8x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2190698.html","width":130,"caption":"cute cocker","height":98});
															thumbnails[2958195] = clik.newPhoto({"id":2958195,"src":"pointy_noses_having_fun68x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2958195.html","width":130,"caption":"pointy noses having fun","height":98});
															thumbnails[2190715] = clik.newPhoto({"id":2190715,"src":"doodling_along108x8_thumb.JPG","galleries_id":145025,"server_id":5,"link":"photo_2190715.html","width":130,"caption":"doodling along","height":98});
															thumbnails[3637545] = clik.newPhoto({"id":3637545,"src":"bundle26x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637545.html","width":130,"caption":"bundle","height":98});
															thumbnails[3637547] = clik.newPhoto({"id":3637547,"src":"doodle56x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637547.html","width":130,"caption":"doodle","height":98});
															thumbnails[3637550] = clik.newPhoto({"id":3637550,"src":"happy_dog166x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637550.html","width":130,"caption":"happy dog","height":98});
															thumbnails[3637551] = clik.newPhoto({"id":3637551,"src":"lanky_legs76x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637551.html","width":130,"caption":"lanky legs","height":98});
															thumbnails[3637553] = clik.newPhoto({"id":3637553,"src":"laughing_dog66x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637553.html","width":130,"caption":"laughing dog","height":98});
															thumbnails[3637555] = clik.newPhoto({"id":3637555,"src":"leg_it16x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637555.html","width":130,"caption":"leg it","height":98});
															thumbnails[3637567] = clik.newPhoto({"id":3637567,"src":"pointy_nose46x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637567.html","width":130,"caption":"pointy nose","height":98});
															thumbnails[3637572] = clik.newPhoto({"id":3637572,"src":"romper26x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637572.html","width":130,"caption":"romper","height":98});
															thumbnails[3637602] = clik.newPhoto({"id":3637602,"src":"short_and_hairy36x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637602.html","width":130,"caption":"short and hairy","height":98});
															thumbnails[3637604] = clik.newPhoto({"id":3637604,"src":"sniffer16x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637604.html","width":130,"caption":"sniffer","height":98});
															thumbnails[3637606] = clik.newPhoto({"id":3637606,"src":"snooty46x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637606.html","width":130,"caption":"snooty","height":173});
															thumbnails[3637609] = clik.newPhoto({"id":3637609,"src":"stocky56x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_3637609.html","width":130,"caption":"stocky","height":98});
															thumbnails[4181947] = clik.newPhoto({"id":4181947,"src":"hound_dog26x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_4181947.html","width":130,"caption":"hound dog","height":98});
															thumbnails[2402902] = clik.newPhoto({"id":2402902,"src":"cute_cocker30_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2402902.html","width":130,"caption":"cute cocker","height":173});
															thumbnails[2958248] = clik.newPhoto({"id":2958248,"src":"mr scribble(3)6x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2958248.html","width":130,"caption":" scribble","height":98});
															thumbnails[2402895] = clik.newPhoto({"id":2402895,"src":"scruffy166x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2402895.html","width":130,"caption":" scruffy","height":98});
															thumbnails[2958221] = clik.newPhoto({"id":2958221,"src":"poodle doodle(1)_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2958221.html","width":130,"caption":"poodle doodle","height":98});
															thumbnails[2958239] = clik.newPhoto({"id":2958239,"src":"mr scramble(1)6x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2958239.html","width":130,"caption":"scramble","height":98});
															thumbnails[2402910] = clik.newPhoto({"id":2402910,"src":"mr_allsorts146x4_thumb.JPG","galleries_id":155703,"server_id":5,"link":"photo_2402910.html","width":130,"caption":"mr allsorts","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[271137] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Canvases 32x12\"","link":"section325923.html","maxRecords":0.0,"photoIDs":[4719120.0,4719135.0,4719137.0,4719142.0,4719144.0,4719247.0,4719387.0,4719391.0],"skipIndex":0,"section_code":"section325923","featured_images":"4719391,4719387,4719247,4719144,4719142,4719137,4719135,4719120","id":271137,"singleSection":true});				  						galleries[463465] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cheeky Chickens","link":"section561120.html","maxRecords":0.0,"photoIDs":[8803734.0,8803738.0,8803741.0,8803743.0,8803749.0,8843802.0,8843826.0],"skipIndex":0,"section_code":"section561120","featured_images":"8843826,8843802,8803749,8803743,8803741,8803738,8803734","id":463465,"singleSection":true});				  						galleries[261209] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NEW! dogsinstitches card designs","link":"section315118.html","maxRecords":0.0,"photoIDs":[4479346.0,4479679.0,4479816.0,4479822.0,4479834.0,4479843.0,4479851.0,4479870.0,4479890.0,4479915.0],"skipIndex":0,"section_code":"section315118","featured_images":"4479915,4479890,4479870,4479851,4479843,4479834,4479822,4479816,4479679,4479346","id":261209,"singleSection":true});				  						galleries[273429] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NEW! dogsinstitches limited edition giclee prints","link":"section324933.html","maxRecords":0.0,"photoIDs":[4775817.0,4775822.0,4775823.0,4775825.0,4775828.0,4775831.0,4775833.0,4775835.0],"skipIndex":0,"section_code":"section324933","featured_images":"4775835,4775833,4775831,4775828,4775825,4775823,4775822,4775817","id":273429,"singleSection":true});				  						galleries[155686] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New designs & dog characters","link":"section197957.html","maxRecords":0.0,"photoIDs":[5303681.0,5398092.0,5398096.0,5398104.0,5398107.0,5748302.0,5748306.0,5748309.0,5748313.0,6928040.0],"skipIndex":0,"section_code":"section197957","featured_images":"6928040,5748313,5748309,5748306,5748302,5398107,5398104,5398096,5398092,5303681","id":155686,"singleSection":true});				  						galleries[249060] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Beach frolics collection","link":"section301578.html","maxRecords":0.0,"photoIDs":[3708596.0,3708603.0,3708609.0,3708615.0,3708622.0,4181934.0,4181936.0,4181939.0,4181940.0,4181941.0,4181942.0,4181944.0,4181945.0,4181946.0,3415949.0],"skipIndex":0,"section_code":"section301578","featured_images":"4181944,4181942,4181940,4181939,4181936,4181934,3708622,3708615,3708609,3708603,3708596,3415949","id":249060,"singleSection":true});				  						galleries[143365] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"canvases 20x8\"","link":"gallery.html","maxRecords":0.0,"photoIDs":[3781080.0,3781077.0,3469177.0,3469695.0,3469180.0,3469697.0,3469188.0,3469699.0,3469195.0,3469703.0,3017321.0,3469705.0,3404359.0,3469714.0,3017318.0,3469717.0,3079970.0,3469544.0,3079983.0,3469548.0,3017331.0,3017327.0,3017338.0,3017328.0,2402858.0,2402871.0,2163314.0,2163317.0,2163265.0,2163279.0,2163285.0,2163294.0,2163108.0,2163111.0,2163113.0,2163257.0,2163301.0,2163304.0],"skipIndex":0,"section_code":"gallery","featured_images":"3781080,3781077,3469714,3469705,3469703,3469699,3469697,3469695,3469548,3469544,3469195,3469188,3469180,3469177,3404359,3079983,3079970,3017338,3017331,3017328,3017327,3017321,3017318,2402858,2163279,2163265,2163113","id":143365,"singleSection":true});				  						galleries[145025] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"canvases 8x8\"","link":"section184684.html","maxRecords":0.0,"photoIDs":[3415939.0,3415962.0,3415974.0,3415977.0,3415981.0,3415983.0,3415987.0,3416040.0,3416042.0,3416043.0,3708606.0,6928035.0,2190723.0,3415958.0,3415951.0,2190718.0,3017316.0,2190706.0,2958193.0,2190698.0,2958195.0,2190715.0],"skipIndex":0,"section_code":"section184684","featured_images":"3708606,3416043,3416042,3416040,3415987,3415983,3415981,3415977,3415962,3415958,3415951,3415939,2958195,2958193,2190723,2190718,2190706,2190698","id":145025,"singleSection":true});				  						galleries[230531] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"canvases 60x16\"","link":"section281779.html","maxRecords":0.0,"photoIDs":[3781093.0,3781095.0],"skipIndex":0,"section_code":"section281779","featured_images":"3781095,3781093","id":230531,"singleSection":true});				  						galleries[155703] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"canvases 6x4\"","link":"section197958.html","maxRecords":0.0,"photoIDs":[3637545.0,3637547.0,3637550.0,3637551.0,3637553.0,3637555.0,3637567.0,3637572.0,3637602.0,3637604.0,3637606.0,3637609.0,4181947.0,2402902.0,2958248.0,2402895.0,2958221.0,2958239.0,2402910.0],"skipIndex":0,"section_code":"section197958","featured_images":4181947.0,"id":155703,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4181947,4181944,4181942,4181940,4181939,4181936,4181934,3781095,3781093,3781080,3708622,3708615,3708609,3708606,3708603,3708596,3416043,3416042,3416040,3415987,3415983,3415981,3415977,3415962,3415939,3781077,3469177,3469695,3469180,3469697,3469188,3469699,3469195,3469703,3017321,3469705,3404359,2190723,3469714,3017318,3415949,3415958,3415951,3079970,3469544,3079983,3469548,3017331,2958193,3017327,3017338,3017328,2402858,2958195,2163265,2163279,2163113,2163257';
imageSets[2] = '4181947,4181944,4181942,4181940,4181939,4181936,4181934,3781095,3781093,3781080,3708622,3708615,3708609,3708606,3708603,3708596,3416043,3416042,3416040,3415987,3415983,3415981,3415977,3415962,3415939,3781077,3469177,3469695,3469180,3469697,3469188,3469699,3469195,3469703,3017321,3469705,3404359,2190723,3469714,3017318,3415949,3415958,3415951,2190718,3079970,3469544,3079983,2190706,3469548,3017331,2958193,3017327,3017338,2190698,3017328,2402858,2958195,2163265,2163279,2163113';
imageSets[3] = '8843826,8843802,8803749,8803743,8803741,8803738,8803734,6928040,6928035,5748313,5748309,5748306,5748302,5398107,5398104,5398096,5398092,5303681,4775835,4775833,4775831,4775828,4775825,4775823,4775822,4775817,4719391,4719387,4719247,4719144,4719142,4719137,4719135,4719120,4479915,4479890,4479870,4479851,4479843,4479834,4479822,4479816,4479679,4479346,4181947,4181946,4181945,4181944,4181942,4181941';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/suebritton/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/suebritton/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/suebritton/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 += 'section561120.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 && 'section561120' != '') {
					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 = 'dogsinstitches: ' + 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 !== '' || 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({					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;
	}
}

			

