window.thumbnails = {};
															thumbnails[1640734] = clik.newPhoto({"id":1640734,"src":"camb360_gorleston_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Gorleston On Sea","height":31});
															thumbnails[1640736] = clik.newPhoto({"id":1640736,"src":"cam360_norwich_006_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"City Hall, Norwich","height":39});
															thumbnails[1640741] = clik.newPhoto({"id":1640741,"src":"camb360_forum_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"The Forum, Norwich","height":44});
															thumbnails[1640744] = clik.newPhoto({"id":1640744,"src":"camb360_norwich_8bit_002_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"The Guild Hall, Norwich","height":38});
															thumbnails[1640750] = clik.newPhoto({"id":1640750,"src":"camb360_gorleston_8bit_002_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Gorleston On Sea","height":33});
															thumbnails[1640754] = clik.newPhoto({"id":1640754,"src":"camb360_forum_8bit_002_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"The Forum, Norwich","height":38});
															thumbnails[1640768] = clik.newPhoto({"id":1640768,"src":"camb360_royal_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Royal Arcade, Norwich","height":39});
															thumbnails[1640777] = clik.newPhoto({"id":1640777,"src":"camb360_norwich_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Norwich Market","height":38});
															thumbnails[1640783] = clik.newPhoto({"id":1640783,"src":"camb360_royal_8bit_002_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Royal Arcade, Norwich","height":38});
															thumbnails[1641226] = clik.newPhoto({"id":1641226,"src":"cam360_nutshell_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"The Nutshell Pub, Bury St Edmunds","height":30});
															thumbnails[1641410] = clik.newPhoto({"id":1641410,"src":"Camb360_bury_st_Eds_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Bury St Edmunds","height":37});
															thumbnails[1641412] = clik.newPhoto({"id":1641412,"src":"Camb360_bury_st_Eds_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"St Edmunds Bury Cathedral","height":31});
															thumbnails[1645182] = clik.newPhoto({"id":1645182,"src":"camb360_calpe_8bit_010_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"The Old Town, Calpe,","height":31});
															thumbnails[1645200] = clik.newPhoto({"id":1645200,"src":"camb360_calpe_8bit_012_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Calpe, Costa Blanca, three","height":38});
															thumbnails[1646786] = clik.newPhoto({"id":1646786,"src":"cam360_singa_05_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Singapore Waterfront, one","height":31});
															thumbnails[1646788] = clik.newPhoto({"id":1646788,"src":"bangkokbackstreet4 copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Bangkok back street","height":37});
															thumbnails[1646789] = clik.newPhoto({"id":1646789,"src":"thaipano2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Cha Am Beach, one","height":34});
															thumbnails[1646793] = clik.newPhoto({"id":1646793,"src":"camb360_raffles_01_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Raffles Hotel","height":41});
															thumbnails[1646798] = clik.newPhoto({"id":1646798,"src":"Hua-Hin-pano-2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Hua Hin Street scene","height":37});
															thumbnails[1646802] = clik.newPhoto({"id":1646802,"src":"Thia_beach_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Cha Am Beach, two","height":48});
															thumbnails[1646805] = clik.newPhoto({"id":1646805,"src":"camb360_singapore_8bit_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Singapore waterfront, two","height":34});
															thumbnails[2128085] = clik.newPhoto({"id":2128085,"src":"Bali_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Bali, Indonesia","height":43});
															thumbnails[2128087] = clik.newPhoto({"id":2128087,"src":"Clarks_key_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Clarke Quay, Singapore.","height":43});
															thumbnails[3062066] = clik.newPhoto({"id":3062066,"src":"Hong_kong_001_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Hong Kong 2007","height":32});
															thumbnails[8320570] = clik.newPhoto({"id":8320570,"src":"voucher_30__cp_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"£30.00 Gift voucher","height":66});
															thumbnails[8320545] = clik.newPhoto({"id":8320545,"src":"voucher_15__cp_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"£15.00 Gift voucher","height":66});
															thumbnails[8320548] = clik.newPhoto({"id":8320548,"src":"voucher_25_cp_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"£25.gift voucher","height":66});
															thumbnails[2689326] = clik.newPhoto({"id":2689326,"src":"PanTiles_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2689326.html","width":130,"caption":"The Pantiles","height":195});
															thumbnails[2300640] = clik.newPhoto({"id":2300640,"src":"daisy_003_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2300640.html","width":130,"caption":"Daisy","height":195});
															thumbnails[1640170] = clik.newPhoto({"id":1640170,"src":"camb360_bikes_8bit_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640170.html","width":130,"caption":"Kings Parade cambridge","height":38});
															thumbnails[1640216] = clik.newPhoto({"id":1640216,"src":"camb360_Magdalene_8bit_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640216.html","width":130,"caption":"Magdalene Street, Cambridge","height":35});
															thumbnails[1640218] = clik.newPhoto({"id":1640218,"src":"camb360_the_cow_8bit_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640218.html","width":130,"caption":"The Cow public house, cambridge","height":38});
															thumbnails[1640225] = clik.newPhoto({"id":1640225,"src":"cam360_madingley_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640225.html","width":130,"caption":"American War Cemetery","height":38});
															thumbnails[1640235] = clik.newPhoto({"id":1640235,"src":"cam360_old_addenbrooks_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640235.html","width":130,"caption":"Old addenbrookes Site","height":38});
															thumbnails[1640240] = clik.newPhoto({"id":1640240,"src":"cam360_westminster_002_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640240.html","width":130,"caption":"Westminster College","height":38});
															thumbnails[1640243] = clik.newPhoto({"id":1640243,"src":"camb360_bikes_8bit_002_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640243.html","width":130,"caption":"Bikes at Great St Marys","height":38});
															thumbnails[1640254] = clik.newPhoto({"id":1640254,"src":"camb360_camb_8bit_004_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640254.html","width":130,"caption":"The Waterfront two","height":38});
															thumbnails[1640261] = clik.newPhoto({"id":1640261,"src":"camb360_cineworld_8bit_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640261.html","width":130,"caption":"The Junction and Cineworld","height":37});
															thumbnails[1640265] = clik.newPhoto({"id":1640265,"src":"camb360_cineworld_8bit_004_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640265.html","width":130,"caption":"The Junction","height":38});
															thumbnails[1640270] = clik.newPhoto({"id":1640270,"src":"camb360_magdalene_8bit_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640270.html","width":130,"caption":"Magdalene College.","height":38});
															thumbnails[1640274] = clik.newPhoto({"id":1640274,"src":"camb360_cineworld_8bit_006_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640274.html","width":130,"caption":"Cambridge Leisure Park two","height":38});
															thumbnails[1640298] = clik.newPhoto({"id":1640298,"src":"camb360_trinitygate_8bit_00_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_1640298.html","width":130,"caption":"Trinity Gate, the Backs","height":37});
															thumbnails[2126783] = clik.newPhoto({"id":2126783,"src":"300x450_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126783.html","width":130,"caption":"Milton cycle bridge","height":195});
															thumbnails[2126828] = clik.newPhoto({"id":2126828,"src":"arcade_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126828.html","width":130,"caption":"The Grand Arcade","height":195});
															thumbnails[2126829] = clik.newPhoto({"id":2126829,"src":"boats_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126829.html","width":130,"caption":"River Cam Jesus Green","height":195});
															thumbnails[2126830] = clik.newPhoto({"id":2126830,"src":"cam2_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126830.html","width":130,"caption":"River Cam Mid summer common","height":195});
															thumbnails[2126831] = clik.newPhoto({"id":2126831,"src":"cam_003_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126831.html","width":130,"caption":"River Cam, Chesterton road","height":195});
															thumbnails[2126832] = clik.newPhoto({"id":2126832,"src":"fair_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126832.html","width":130,"caption":"Mid summer common Fair","height":195});
															thumbnails[2126833] = clik.newPhoto({"id":2126833,"src":"mid_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126833.html","width":130,"caption":"Mid summer House Restaurant","height":195});
															thumbnails[2126834] = clik.newPhoto({"id":2126834,"src":"Trinity_st_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126834.html","width":130,"caption":"Trinity Street","height":195});
															thumbnails[2126835] = clik.newPhoto({"id":2126835,"src":"orchard_tone_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126835.html","width":130,"caption":"Grantchester Orchard","height":195});
															thumbnails[2126840] = clik.newPhoto({"id":2126840,"src":"cam_bridge_0021_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126840.html","width":130,"caption":"Green Dragon Foot Bridge looking down","height":195});
															thumbnails[2126841] = clik.newPhoto({"id":2126841,"src":"cam_bridge_0041_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126841.html","width":130,"caption":"Green Dragon Foot bridge looking up","height":195});
															thumbnails[2126843] = clik.newPhoto({"id":2126843,"src":"Green_Dragon1_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126843.html","width":130,"caption":"The green dragon Pub<br>\r\n","height":195});
															thumbnails[2126885] = clik.newPhoto({"id":2126885,"src":"homerton_place_tiny (2)1_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126885.html","width":130,"caption":"Homerton Place","height":195});
															thumbnails[2126886] = clik.newPhoto({"id":2126886,"src":"jesus_green1_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126886.html","width":130,"caption":"Jesus Green","height":195});
															thumbnails[2126887] = clik.newPhoto({"id":2126887,"src":"kings_parade_0051_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126887.html","width":130,"caption":"Kings Parade","height":195});
															thumbnails[2126888] = clik.newPhoto({"id":2126888,"src":"madingley_0021_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126888.html","width":130,"caption":"Madingley American WWII Cemetery","height":195});
															thumbnails[2126956] = clik.newPhoto({"id":2126956,"src":"mill_pond_223_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126956.html","width":130,"caption":"The Mill Pond and Granta Pub","height":195});
															thumbnails[2126958] = clik.newPhoto({"id":2126958,"src":"fort_st_george_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2126958.html","width":130,"caption":"The Fort Saint George Pub","height":43});
															thumbnails[2126959] = clik.newPhoto({"id":2126959,"src":"newnham_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2126959.html","width":130,"caption":"Newnham College","height":40});
															thumbnails[2126965] = clik.newPhoto({"id":2126965,"src":"swarovski_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2126965.html","width":130,"caption":"The Swarovski shop, Grand Arcade","height":195});
															thumbnails[2152350] = clik.newPhoto({"id":2152350,"src":"ryle_tele_0012_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2152350.html","width":130,"caption":"The Ryle Telescope cambridge","height":195});
															thumbnails[2300645] = clik.newPhoto({"id":2300645,"src":"fort_st_george_globe_tp_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2300645.html","width":130,"caption":"The Fort St George Pub","height":195});
															thumbnails[2302327] = clik.newPhoto({"id":2302327,"src":"cows_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302327.html","width":130,"caption":"Red Poll Cows Midsummer Common","height":195});
															thumbnails[2302329] = clik.newPhoto({"id":2302329,"src":"dogbiridge_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302329.html","width":130,"caption":"The new bridge over the river Cam","height":195});
															thumbnails[2302331] = clik.newPhoto({"id":2302331,"src":"jesus_bridge_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302331.html","width":130,"caption":"Jesus lock footbridge","height":195});
															thumbnails[2302332] = clik.newPhoto({"id":2302332,"src":"market44_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302332.html","width":130,"caption":"Cambridge Market","height":195});
															thumbnails[2302333] = clik.newPhoto({"id":2302333,"src":"mil_pond_003_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302333.html","width":130,"caption":"Newnham Millpond","height":195});
															thumbnails[2302345] = clik.newPhoto({"id":2302345,"src":"reality_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2302345.html","width":130,"caption":"Reality Checkpoint Parkers Piece","height":195});
															thumbnails[2462893] = clik.newPhoto({"id":2462893,"src":"Great_Saint_Marys_TP_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2462893.html","width":130,"caption":"Great Saint Mary's","height":195});
															thumbnails[2470807] = clik.newPhoto({"id":2470807,"src":"newhall_tp_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2470807.html","width":130,"caption":"Newhall College Cambridge","height":195});
															thumbnails[2470816] = clik.newPhoto({"id":2470816,"src":"newnham_colledge_TP_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2470816.html","width":130,"caption":"Newnham College Cambridge","height":195});
															thumbnails[2470830] = clik.newPhoto({"id":2470830,"src":"st_johns_001_TP_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2470830.html","width":130,"caption":"St John's College Cambridge","height":195});
															thumbnails[2470853] = clik.newPhoto({"id":2470853,"src":"shire_hall_TP_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2470853.html","width":130,"caption":"Shirehall Cambridge","height":195});
															thumbnails[2470888] = clik.newPhoto({"id":2470888,"src":"Round_Church_001_TP_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2470888.html","width":130,"caption":"Round Church","height":195});
															thumbnails[2572113] = clik.newPhoto({"id":2572113,"src":"Kings_parade_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2572113.html","width":130,"caption":"Kings Parade","height":42});
															thumbnails[2572119] = clik.newPhoto({"id":2572119,"src":"tele_rape_UR_005_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2572119.html","width":130,"caption":"The Ryle Telescope","height":42});
															thumbnails[2572128] = clik.newPhoto({"id":2572128,"src":"cows_UR_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2572128.html","width":130,"caption":"Midsummer Common","height":42});
															thumbnails[2644774] = clik.newPhoto({"id":2644774,"src":"mil_pond_0031_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2644774.html","width":130,"caption":"Punts at Newnham Millpond","height":42});
															thumbnails[2644776] = clik.newPhoto({"id":2644776,"src":"fort_st_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2644776.html","width":130,"caption":"The Fort Saint george Pub","height":42});
															thumbnails[2644779] = clik.newPhoto({"id":2644779,"src":"Holiday_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2644779.html","width":130,"caption":"Punting on the river Cam, Cambridge","height":42});
															thumbnails[2689321] = clik.newPhoto({"id":2689321,"src":"Pan_tiles_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2689321.html","width":130,"caption":"The Pantiles","height":195});
															thumbnails[2711386] = clik.newPhoto({"id":2711386,"src":"sidney_street_011_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2711386.html","width":130,"caption":"Sidney Street","height":195});
															thumbnails[2734886] = clik.newPhoto({"id":2734886,"src":"histon_TP_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2734886.html","width":130,"caption":"Histon Green","height":195});
															thumbnails[2836351] = clik.newPhoto({"id":2836351,"src":"Cambridge_Blue_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2836351.html","width":130,"caption":"The Cambridge Blue","height":42});
															thumbnails[2836354] = clik.newPhoto({"id":2836354,"src":"Cambridge_Blue_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2836354.html","width":130,"caption":"Gwydir Street","height":195});
															thumbnails[2836359] = clik.newPhoto({"id":2836359,"src":"Cambridge_Blue_TPI_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_2836359.html","width":130,"caption":"The Cambridge Blue","height":195});
															thumbnails[2850324] = clik.newPhoto({"id":2850324,"src":"chirchill_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850324.html","width":130,"caption":"Churchill College Cambridge University","height":42});
															thumbnails[2850331] = clik.newPhoto({"id":2850331,"src":"Clare_Hall_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850331.html","width":130,"caption":"Clare Hall College Cambridge University","height":42});
															thumbnails[2850335] = clik.newPhoto({"id":2850335,"src":"Magdalene_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850335.html","width":130,"caption":"Magdalene College Cambridge University","height":42});
															thumbnails[2850440] = clik.newPhoto({"id":2850440,"src":"robinson_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850440.html","width":130,"caption":"Robinson College Cambridge University","height":42});
															thumbnails[2850443] = clik.newPhoto({"id":2850443,"src":"selwyn_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850443.html","width":130,"caption":"Selwyn College Cambridge University","height":42});
															thumbnails[2850452] = clik.newPhoto({"id":2850452,"src":"Senate_002_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850452.html","width":130,"caption":"Senate House, Gt St Mary's, Gonville and Caius","height":42});
															thumbnails[2850456] = clik.newPhoto({"id":2850456,"src":"sidney_sussex_01_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850456.html","width":130,"caption":"Sidney Street, Cambridge.","height":42});
															thumbnails[3044509] = clik.newPhoto({"id":3044509,"src":"Corpus_clock_010_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_3044509.html","width":130,"caption":"The Corpus clock, Cambridge.","height":41});
															thumbnails[3061804] = clik.newPhoto({"id":3061804,"src":"Jesus_Green_0033_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3061804.html","width":130,"caption":"Jesus Green, Cambridge.","height":186});
															thumbnails[3068652] = clik.newPhoto({"id":3068652,"src":"camb360_Ely_UR_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_3068652.html","width":130,"caption":"Ely Cathedral","height":42});
															thumbnails[3139569] = clik.newPhoto({"id":3139569,"src":"longstanton_003_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_3139569.html","width":130,"caption":"All Saints Church, Longstanton, Cambridgeshire","height":33});
															thumbnails[3139570] = clik.newPhoto({"id":3139570,"src":"longstanton_0011_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_3139570.html","width":130,"caption":"All Saints Church, Longstanton Cambridgeshire","height":33});
															thumbnails[3168239] = clik.newPhoto({"id":3168239,"src":"Kings_parade_002_TP_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3168239.html","width":130,"caption":"Kings College Chapel, Kings Parade, Cambridge","height":169});
															thumbnails[3239960] = clik.newPhoto({"id":3239960,"src":"camb360_Ely_8bit_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_3239960.html","width":130,"caption":"Wide Ely","height":37});
															thumbnails[3373692] = clik.newPhoto({"id":3373692,"src":"10x12_baley_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373692.html","width":130,"caption":"The Barley Mow Public House, Histon","height":156});
															thumbnails[3373695] = clik.newPhoto({"id":3373695,"src":"Bury_fen_ice_Globe_011_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373695.html","width":130,"caption":"Ice Skating on Bury Fen, Earith","height":130});
															thumbnails[3373699] = clik.newPhoto({"id":3373699,"src":"chirchill_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373699.html","width":130,"caption":"Chruchill College","height":173});
															thumbnails[3373704] = clik.newPhoto({"id":3373704,"src":"cottenham_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373704.html","width":130,"caption":"The Village Green at Cottenham","height":173});
															thumbnails[3373709] = clik.newPhoto({"id":3373709,"src":"eat_fosters_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373709.html","width":130,"caption":"The Fosters Bank Building","height":173});
															thumbnails[3373715] = clik.newPhoto({"id":3373715,"src":"ely_molly_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373715.html","width":130,"caption":"Ely Apple Day 2008","height":173});
															thumbnails[3373726] = clik.newPhoto({"id":3373726,"src":"ely_quay_TP_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373726.html","width":130,"caption":"Ely","height":173});
															thumbnails[3373729] = clik.newPhoto({"id":3373729,"src":"impington_church_tp_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373729.html","width":130,"caption":"Impington Church","height":173});
															thumbnails[3373735] = clik.newPhoto({"id":3373735,"src":"robinson_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373735.html","width":130,"caption":"Robinson College","height":173});
															thumbnails[3373746] = clik.newPhoto({"id":3373746,"src":"rusty_TP_004_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373746.html","width":130,"caption":"Rustat Ave","height":173});
															thumbnails[3373751] = clik.newPhoto({"id":3373751,"src":"rusty_TP_003_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373751.html","width":130,"caption":"Rustat Ave","height":173});
															thumbnails[3373756] = clik.newPhoto({"id":3373756,"src":"saffron_Church_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373756.html","width":130,"caption":"Saffron Walden","height":173});
															thumbnails[3373762] = clik.newPhoto({"id":3373762,"src":"the _station_view_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373762.html","width":130,"caption":"The Station View Public house, Histon","height":173});
															thumbnails[3373765] = clik.newPhoto({"id":3373765,"src":"madingley_pub_TP_001_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3373765.html","width":130,"caption":"The Three Horse Shoes, Madingley","height":173});
															thumbnails[3550782] = clik.newPhoto({"id":3550782,"src":"Senate_TP_002_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_3550782.html","width":130,"caption":"Gonville and Caius","height":195});
															thumbnails[4176043] = clik.newPhoto({"id":4176043,"src":"queens_Pano_003_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_4176043.html","width":130,"caption":"Queens College and Silver Street Bridge","height":42});
															thumbnails[4176044] = clik.newPhoto({"id":4176044,"src":"queens_TP_003_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_4176044.html","width":130,"caption":"Queens College and Silver Street Bridge Tiny Planet Picture","height":156});
															thumbnails[4233576] = clik.newPhoto({"id":4233576,"src":"Thoday_001_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_4233576.html","width":130,"caption":"Thoday Street ","height":173});
															thumbnails[4762840] = clik.newPhoto({"id":4762840,"src":"hsbc_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_4762840.html","width":130,"caption":"Peas Hill","height":38});
															thumbnails[5029707] = clik.newPhoto({"id":5029707,"src":"Swarovski_B10889D3-1D09-001F-995F7AEB70009D04_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_5029707.html","width":130,"caption":"The Swarovski store Grand Arcade Cambridge.","height":65});
															thumbnails[5261356] = clik.newPhoto({"id":5261356,"src":"Kings_0116_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_5261356.html","width":130,"caption":"Kings College, Cambridge","height":41});
															thumbnails[5261596] = clik.newPhoto({"id":5261596,"src":"Kings_snow_0020_thumb.jpg","galleries_id":188998,"server_id":1,"link":"photo_5261596.html","width":130,"caption":"Kings College Cambridge","height":50});
															thumbnails[6412156] = clik.newPhoto({"id":6412156,"src":"Kings_parade_0022_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412156.html","width":87,"caption":"Kings College Chapel","height":130});
															thumbnails[6412243] = clik.newPhoto({"id":6412243,"src":"Cambridge_Blue_TP_001_0B32DC43-24E8-5EC4-4F41EB712F2BF9B4_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412243.html","width":87,"caption":"The Cambridge Blue","height":130});
															thumbnails[6412244] = clik.newPhoto({"id":6412244,"src":"Chesterto_River_TP_003_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412244.html","width":87,"caption":"Chesterton Road and the River Cam","height":130});
															thumbnails[6412246] = clik.newPhoto({"id":6412246,"src":"clare_TP_0099_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412246.html","width":87,"caption":"Clare College Cambridge","height":130});
															thumbnails[6412247] = clik.newPhoto({"id":6412247,"src":"Corpus_clock_TP_007_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412247.html","width":87,"caption":"The Corpus Christie Clock","height":130});
															thumbnails[6412249] = clik.newPhoto({"id":6412249,"src":"daisy_TP_002_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412249.html","width":87,"caption":"Daisies, Papworth.","height":130});
															thumbnails[6412250] = clik.newPhoto({"id":6412250,"src":"Histon_snow_002_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412250.html","width":87,"caption":"Histon Green, Winter 2010","height":130});
															thumbnails[6412252] = clik.newPhoto({"id":6412252,"src":"histon_TP_002_0B37871C-24E8-5EC4-4F99CCC8E1FB165D_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412252.html","width":87,"caption":"Histon Green Summer","height":130});
															thumbnails[6412256] = clik.newPhoto({"id":6412256,"src":"kingspike_TP_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412256.html","width":87,"caption":"Kings Parade, Cambridge","height":130});
															thumbnails[6412308] = clik.newPhoto({"id":6412308,"src":"madingley_pub_TP_001_0B39A01C-24E8-5EC4-4FF1FE57AB7F9A30_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412308.html","width":87,"caption":"The Three Horse Shoes, Madingley","height":130});
															thumbnails[6412359] = clik.newPhoto({"id":6412359,"src":"market_004_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412359.html","width":87,"caption":"Market Square, Cambridge","height":130});
															thumbnails[6412361] = clik.newPhoto({"id":6412361,"src":"michaelhouse_007_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412361.html","width":87,"caption":"Saint Michaels Church, Cambridge","height":130});
															thumbnails[6412417] = clik.newPhoto({"id":6412417,"src":"midsummer_fair_TP_2009_002_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412417.html","width":87,"caption":"Midsummer Fair, Cambridge","height":130});
															thumbnails[6412421] = clik.newPhoto({"id":6412421,"src":"midsummer_house_TP_099_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412421.html","width":87,"caption":"Midsummer House, Cambriridge.","height":130});
															thumbnails[6412423] = clik.newPhoto({"id":6412423,"src":"Mill_pond_004_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412423.html","width":87,"caption":"Newnham Millpond, Cambridge","height":130});
															thumbnails[6412424] = clik.newPhoto({"id":6412424,"src":"Milton_cycle_bridge_TP_003_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412424.html","width":87,"caption":"The Milton Cycle Bridge","height":130});
															thumbnails[6412484] = clik.newPhoto({"id":6412484,"src":"newnham_april_TP_2010_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412484.html","width":87,"caption":"Newnham College, Cambridge.","height":130});
															thumbnails[6412487] = clik.newPhoto({"id":6412487,"src":"reality_X_point_TP_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412487.html","width":87,"caption":"Reality Check point, Cambridge.","height":130});
															thumbnails[6412496] = clik.newPhoto({"id":6412496,"src":"red_poll_cows_TP_001_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412496.html","width":87,"caption":"The Red Poll Steers, Cambridge","height":130});
															thumbnails[6412498] = clik.newPhoto({"id":6412498,"src":"tele_rape_TP_005_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412498.html","width":87,"caption":"The Ryle Telescope.","height":130});
															thumbnails[6412506] = clik.newPhoto({"id":6412506,"src":"The_Avenue_TP_001_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412506.html","width":87,"caption":"The Avenue, Trinity College.","height":130});
															thumbnails[6412507] = clik.newPhoto({"id":6412507,"src":"trinny_summer_tp_thumb.jpg","galleries_id":354242,"server_id":1,"link":"photo_6412507.html","width":87,"caption":"Trinity Street, Cambridge.","height":130});
															thumbnails[8344089] = clik.newPhoto({"id":8344089,"src":"senate_TP0033_thumb.jpg","galleries_id":99818,"server_id":1,"link":"photo_8344089.html","width":99,"caption":"The Senate House","height":130});
															thumbnails[2850150] = clik.newPhoto({"id":2850150,"src":"St_Cats_001_thumb.jpg","galleries_id":91959,"server_id":1,"link":"photo_2850150.html","width":130,"caption":"St Catharines College Cambridge","height":42});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[188998] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"New Work","link":"gallery_188998.html","maxRecords":0.0,"photoIDs":[4176043.0,4176044.0,4233576.0,5029707.0,5261356.0,5261596.0],"skipIndex":0,"section_code":"gallery","featured_images":"5261596,5261356,5029707,4233576,4176044,4176043","id":188998,"singleSection":false});				  						galleries[91959] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cambridgeshire","link":"gallery_91959.html","maxRecords":0.0,"photoIDs":[1640170.0,1640216.0,1640218.0,1640225.0,1640235.0,1640240.0,1640243.0,1640254.0,1640261.0,1640265.0,1640270.0,1640274.0,1640298.0,2126958.0,2126959.0,2572113.0,2572119.0,2572128.0,2644774.0,2644776.0,2644779.0,2836351.0,2850324.0,2850331.0,2850335.0,2850440.0,2850443.0,2850452.0,2850456.0,3044509.0,3068652.0,3139569.0,3139570.0,3239960.0,4762840.0,2850150.0],"skipIndex":0,"section_code":"gallery","featured_images":"4762840,3239960,3139570,3139569,3068652,3044509,2850456,2850452,2850443,2850440","id":91959,"singleSection":false});				  						galleries[99818] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Tiny Planet","link":"gallery_99818.html","maxRecords":0.0,"photoIDs":[2689326.0,2300640.0,2126783.0,2126828.0,2126829.0,2126830.0,2126831.0,2126832.0,2126833.0,2126834.0,2126835.0,2126840.0,2126841.0,2126843.0,2126885.0,2126886.0,2126887.0,2126888.0,2126956.0,2126965.0,2152350.0,2300645.0,2302327.0,2302329.0,2302331.0,2302332.0,2302333.0,2302345.0,2462893.0,2470807.0,2470816.0,2470830.0,2470853.0,2470888.0,2689321.0,2711386.0,2734886.0,2836354.0,2836359.0,3061804.0,3168239.0,3373692.0,3373695.0,3373699.0,3373704.0,3373709.0,3373715.0,3373726.0,3373729.0,3373735.0,3373746.0,3373751.0,3373756.0,3373762.0,3373765.0,3550782.0,8344089.0],"skipIndex":0,"section_code":"gallery","featured_images":2126833.0,"id":99818,"singleSection":false});				  						galleries[354242] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Michaelhouse Exhibition","link":"gallery_354242.html","maxRecords":0.0,"photoIDs":[6412156.0,6412243.0,6412244.0,6412246.0,6412247.0,6412249.0,6412250.0,6412252.0,6412256.0,6412308.0,6412359.0,6412361.0,6412417.0,6412421.0,6412423.0,6412424.0,6412484.0,6412487.0,6412496.0,6412498.0,6412506.0,6412507.0],"skipIndex":0,"section_code":"gallery","featured_images":"6412507,6412506,6412498,6412496,6412487,6412484,6412424,6412423,6412421,6412417","id":354242,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6412507,6412506,6412498,6412496,6412487,2126843,2126841,2126835,2126834,2126833,2126832,2126831,2126830,2126829,1640274,1640218,1640216';
imageSets[2] = '2126833';
imageSets[3] = '6412424,3168239';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/cambridge360/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/cambridge360/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Cambridge360: ' + 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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="ian.mccarney@btinternet.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="ian.mccarney@btinternet.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

