window.thumbnails = {};
thumbnails[9008743] = clik.newPhoto({"link":"#","caption":"Corporate Cake, sheet style","height":120,"id":9008743,"server_id":21,"src":"corporate1_2_thumb.JPG","galleries_id":"","width":160});
thumbnails[9027128] = clik.newPhoto({"link":"#","caption":"Sheet cake","height":120,"id":9027128,"server_id":21,"src":"corporatecake_thumb.JPG","galleries_id":"","width":160});
thumbnails[9027695] = clik.newPhoto({"link":"#","caption":"The \"Hairy Legs Challenge\" Goring-on-Thames","height":213,"id":9027695,"server_id":21,"src":"003_2_thumb.JPG","galleries_id":"","width":160});
thumbnails[9008434] = clik.newPhoto({"link":"photo_9008434.html","caption":"Peacock feather wedding cake","height":213,"id":9008434,"server_id":21,"src":"016_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9027347] = clik.newPhoto({"link":"photo_9027347.html","caption":"Vintage Style with lace","height":250,"id":9027347,"server_id":21,"src":"roselace_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9027080] = clik.newPhoto({"link":"photo_9027080.html","caption":"A Tim Burton Wedding Cake","height":261,"id":9027080,"server_id":21,"src":"scrivencake_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9027367] = clik.newPhoto({"link":"photo_9027367.html","caption":"Sugar rose petals","height":213,"id":9027367,"server_id":21,"src":"rosepetals_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9027370] = clik.newPhoto({"link":"photo_9027370.html","caption":"Cascading pink and white roses","height":213,"id":9027370,"server_id":21,"src":"pinkweddingvenue_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9027428] = clik.newPhoto({"link":"photo_9027428.html","caption":"A cake with a fresh orchid garland","height":213,"id":9027428,"server_id":21,"src":"orchidcake_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9045905] = clik.newPhoto({"link":"photo_9045905.html","caption":"Sharp edges and simple design for a more modern look","height":235,"id":9045905,"server_id":21,"src":"modernrosesmarque_thumb.jpg","galleries_id":474686,"width":160});
thumbnails[9027723] = clik.newPhoto({"link":"photo_9027723.html","caption":"Vintage Styled wedding cake with lace","height":227,"id":9027723,"server_id":21,"src":"vintageweddinginbarn_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9026910] = clik.newPhoto({"link":"photo_9026910.html","caption":"Simple tiered wedding cake with brooch","height":213,"id":9026910,"server_id":21,"src":"rachelgallery_thumb.JPG","galleries_id":474686,"width":160});
thumbnails[9045949] = clik.newPhoto({"link":"photo_9045949.html","caption":"A simple, elegant wedding cake","height":189,"id":9045949,"server_id":21,"src":"simplesquare_thumb.jpg","galleries_id":474686,"width":160});
thumbnails[9046011] = clik.newPhoto({"link":"photo_9046011.html","caption":"Brooch wedding cake","height":213,"id":9046011,"server_id":21,"src":"broochcake_thumb.jpg","galleries_id":474686,"width":160});
thumbnails[9046023] = clik.newPhoto({"link":"photo_9046023.html","caption":"Tiers floating on flowers","height":213,"id":9046023,"server_id":21,"src":"flowertiers_thumb.jpg","galleries_id":474686,"width":160});
thumbnails[9008426] = clik.newPhoto({"link":"photo_9008426.html","caption":"White Chocolate curls and Maltesers","height":223,"id":9008426,"server_id":21,"src":"maltesers_thumb.JPG","galleries_id":474706,"width":160});
thumbnails[9027531] = clik.newPhoto({"link":"photo_9027531.html","caption":"Chocolate shards with fresh gerbera","height":213,"id":9027531,"server_id":21,"src":"maltweddinggerbera_2_thumb.JPG","galleries_id":474706,"width":160});
thumbnails[9027542] = clik.newPhoto({"link":"photo_9027542.html","caption":"Chocolate shards with truffles","height":213,"id":9027542,"server_id":21,"src":"truffles_thumb.JPG","galleries_id":474706,"width":160});
thumbnails[9016191] = clik.newPhoto({"link":"photo_9016191.html","caption":"Chanel cosmetic bag","height":213,"id":9016191,"server_id":21,"src":"chanelbag_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026466] = clik.newPhoto({"link":"photo_9026466.html","caption":"100th Birthday Cake","height":213,"id":9026466,"server_id":21,"src":"100candles_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027308] = clik.newPhoto({"link":"photo_9027308.html","caption":"A Louis Vuitton Hand Bag","height":213,"id":9027308,"server_id":21,"src":"lvbag_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026993] = clik.newPhoto({"link":"photo_9026993.html","caption":"A Golf Cake","height":201,"id":9026993,"server_id":21,"src":"golf21_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027012] = clik.newPhoto({"link":"photo_9027012.html","caption":"A 1957 Lotus Cake","height":178,"id":9027012,"server_id":21,"src":"lotus_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026470] = clik.newPhoto({"link":"photo_9026470.html","caption":"Patterned birthday cake","height":189,"id":9026470,"server_id":21,"src":"joyce_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026936] = clik.newPhoto({"link":"photo_9026936.html","caption":"A Gift Box Cake","height":215,"id":9026936,"server_id":21,"src":"boxcake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026970] = clik.newPhoto({"link":"photo_9026970.html","caption":"A Reading FC Cake","height":213,"id":9026970,"server_id":21,"src":"readingfc_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9030774] = clik.newPhoto({"link":"photo_9030774.html","caption":"Chanel Handbag Cake","height":213,"id":9030774,"server_id":21,"src":"035_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026949] = clik.newPhoto({"link":"photo_9026949.html","caption":"A Jazz themed cake","height":158,"id":9026949,"server_id":21,"src":"jazz1_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027073] = clik.newPhoto({"link":"photo_9027073.html","caption":"For a retired dress-maker","height":213,"id":9027073,"server_id":21,"src":"bettyscake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026982] = clik.newPhoto({"link":"photo_9026982.html","caption":"A Simple Cake with Roses","height":213,"id":9026982,"server_id":21,"src":"80_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027085] = clik.newPhoto({"link":"photo_9027085.html","caption":"A sailing dinghy cake","height":238,"id":9027085,"server_id":21,"src":"dinghy_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027228] = clik.newPhoto({"link":"photo_9027228.html","caption":"A shoe box with icing shoe","height":148,"id":9027228,"server_id":21,"src":"SAM_0268_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9030767] = clik.newPhoto({"link":"photo_9030767.html","caption":"A Gift Box Cake with looped sugar bow","height":213,"id":9030767,"server_id":21,"src":"070_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027240] = clik.newPhoto({"link":"photo_9027240.html","caption":"Walking the whole of the Thames Path","height":149,"id":9027240,"server_id":21,"src":"thameswalk_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027312] = clik.newPhoto({"link":"photo_9027312.html","caption":"A Porche Badge","height":213,"id":9027312,"server_id":21,"src":"023_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9045921] = clik.newPhoto({"link":"photo_9045921.html","caption":"Clay pigeon shooting cake","height":213,"id":9045921,"server_id":21,"src":"shootingcake_thumb.jpg","galleries_id":474992,"width":160});
thumbnails[9030505] = clik.newPhoto({"link":"photo_9030505.html","caption":"A Mountain Bike Cake","height":213,"id":9030505,"server_id":21,"src":"robbiecake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027339] = clik.newPhoto({"link":"photo_9027339.html","caption":"A wrapped present cake","height":213,"id":9027339,"server_id":21,"src":"presentcake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027342] = clik.newPhoto({"link":"photo_9027342.html","caption":"Sweet Peas","height":213,"id":9027342,"server_id":21,"src":"sweetpeascake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027416] = clik.newPhoto({"link":"photo_9027416.html","caption":"Pink satin cosmetic bag","height":213,"id":9027416,"server_id":21,"src":"pinkbag_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027594] = clik.newPhoto({"link":"photo_9027594.html","caption":"A personalised red wine bottle","height":213,"id":9027594,"server_id":21,"src":"carolscake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027687] = clik.newPhoto({"link":"photo_9027687.html","caption":"A hobbies cake for 4 ladies","height":120,"id":9027687,"server_id":21,"src":"hobbiesbirthdaycake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9028310] = clik.newPhoto({"link":"photo_9028310.html","caption":"A simple daisy cake","height":213,"id":9028310,"server_id":21,"src":"catherine_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9030703] = clik.newPhoto({"link":"photo_9030703.html","caption":"Springer Spaniel","height":213,"id":9030703,"server_id":21,"src":"spaniel_thumb.jpg","galleries_id":474992,"width":160});
thumbnails[9008560] = clik.newPhoto({"link":"photo_9008560.html","caption":"Dora the Explorer cake","height":213,"id":9008560,"server_id":21,"src":"dora_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9016195] = clik.newPhoto({"link":"photo_9016195.html","caption":"A ballerina teddy bear cake","height":151,"id":9016195,"server_id":21,"src":"teddydecorations_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026465] = clik.newPhoto({"link":"photo_9026465.html","caption":"Batman Cake","height":213,"id":9026465,"server_id":21,"src":"batman_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026930] = clik.newPhoto({"link":"photo_9026930.html","caption":"A Mr Men cake","height":144,"id":9026930,"server_id":21,"src":"mr_men_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026469] = clik.newPhoto({"link":"photo_9026469.html","caption":"Pony cake","height":200,"id":9026469,"server_id":21,"src":"tillycake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026475] = clik.newPhoto({"link":"photo_9026475.html","caption":"The Stig","height":204,"id":9026475,"server_id":21,"src":"stig2._thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026922] = clik.newPhoto({"link":"photo_9026922.html","caption":"A bug cake","height":213,"id":9026922,"server_id":21,"src":"100_4373_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026931] = clik.newPhoto({"link":"photo_9026931.html","caption":"A boy's castle with dragon","height":169,"id":9026931,"server_id":21,"src":"olly_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026945] = clik.newPhoto({"link":"photo_9026945.html","caption":"A Little Red Tractor Cake","height":154,"id":9026945,"server_id":21,"src":"redtractor1_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9026955] = clik.newPhoto({"link":"photo_9026955.html","caption":"A Kitten Cake","height":199,"id":9026955,"server_id":21,"src":"kittencake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027002] = clik.newPhoto({"link":"photo_9027002.html","caption":"A Cbeebie's Numberjacks Cake","height":183,"id":9027002,"server_id":21,"src":"numberjacks_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027013] = clik.newPhoto({"link":"photo_9027013.html","caption":"A Kayak Cake","height":177,"id":9027013,"server_id":21,"src":"kyak_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027036] = clik.newPhoto({"link":"photo_9027036.html","caption":"Peppa Pig","height":203,"id":9027036,"server_id":21,"src":"013_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027058] = clik.newPhoto({"link":"photo_9027058.html","caption":"In the Night Garden","height":120,"id":9027058,"server_id":21,"src":"nitika1_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027092] = clik.newPhoto({"link":"photo_9027092.html","caption":"For a First Birthday","height":151,"id":9027092,"server_id":21,"src":"noah1_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027064] = clik.newPhoto({"link":"photo_9027064.html","caption":"A Princess Castle","height":216,"id":9027064,"server_id":21,"src":"princesscastle_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027096] = clik.newPhoto({"link":"photo_9027096.html","caption":"A Waybulloo Cake","height":213,"id":9027096,"server_id":21,"src":"waybulloo_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027110] = clik.newPhoto({"link":"photo_9027110.html","caption":"Darth Vader","height":213,"id":9027110,"server_id":21,"src":"starwarscake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027293] = clik.newPhoto({"link":"photo_9027293.html","caption":"Aa sweet 16 Birthday with sugar plaque","height":248,"id":9027293,"server_id":21,"src":"16cupcakes_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9030711] = clik.newPhoto({"link":"photo_9030711.html","caption":"Monkey","height":213,"id":9030711,"server_id":21,"src":"monkey_thumb.jpg","galleries_id":474992,"width":160});
thumbnails[9027432] = clik.newPhoto({"link":"photo_9027432.html","caption":"In the Night Garden - Ninky Nonk","height":213,"id":9027432,"server_id":21,"src":"ninkynonk_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027606] = clik.newPhoto({"link":"photo_9027606.html","caption":"Batman","height":196,"id":9027606,"server_id":21,"src":"batmancake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9045914] = clik.newPhoto({"link":"photo_9045914.html","caption":"Wired starburst","height":213,"id":9045914,"server_id":21,"src":"starburstcake_thumb.jpg","galleries_id":474992,"width":160});
thumbnails[9027650] = clik.newPhoto({"link":"photo_9027650.html","caption":"Formula One Cake","height":213,"id":9027650,"server_id":21,"src":"formula1_2_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027671] = clik.newPhoto({"link":"photo_9027671.html","caption":"A busy bee garden cake","height":213,"id":9027671,"server_id":21,"src":"gardencake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9027681] = clik.newPhoto({"link":"photo_9027681.html","caption":"A ten pin bowling cake","height":213,"id":9027681,"server_id":21,"src":"bowlingcake_thumb.JPG","galleries_id":474992,"width":160});
thumbnails[9009009] = clik.newPhoto({"link":"photo_9009009.html","caption":"White chocolate cigarillo cake","height":213,"id":9009009,"server_id":21,"src":"032_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9013373] = clik.newPhoto({"link":"photo_9013373.html","caption":"Chocolate Treasure Chest","height":190,"id":9013373,"server_id":21,"src":"046_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9026464] = clik.newPhoto({"link":"photo_9026464.html","caption":"Chocolate Violin Cake","height":178,"id":9026464,"server_id":21,"src":"violincake_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9027261] = clik.newPhoto({"link":"photo_9027261.html","caption":"Rustic chocolate Shards Cake","height":213,"id":9027261,"server_id":21,"src":"shards_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9027466] = clik.newPhoto({"link":"photo_9027466.html","caption":"A music themed chocolate cake","height":213,"id":9027466,"server_id":21,"src":"musicalchocolatecake_2_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9027331] = clik.newPhoto({"link":"photo_9027331.html","caption":"Chocolate shards with chocolate roses","height":213,"id":9027331,"server_id":21,"src":"rebeccashards_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9027576] = clik.newPhoto({"link":"photo_9027576.html","caption":"Small chocolate shards cake","height":213,"id":9027576,"server_id":21,"src":"mumshards_thumb.JPG","galleries_id":474994,"width":160});
thumbnails[9028365] = clik.newPhoto({"link":"photo_9028365.html","caption":"Wedding Cupcakes with rosebuds","height":213,"id":9028365,"server_id":21,"src":"weddingswanatstreatley_thumb.JPG","galleries_id":475733,"width":160});
thumbnails[9028379] = clik.newPhoto({"link":"photo_9028379.html","caption":"Fondant icing with rosebuds in pastel shades","height":213,"id":9028379,"server_id":21,"src":"swancupcakes_thumb.JPG","galleries_id":475733,"width":160});
thumbnails[9028500] = clik.newPhoto({"link":"photo_9028500.html","caption":"Swirly iced cupcakes with handmade sugar rosebuds","height":213,"id":9028500,"server_id":21,"src":"redrosebudcupcakes_thumb.JPG","galleries_id":475733,"width":160});
thumbnails[9028514] = clik.newPhoto({"link":"photo_9028514.html","caption":"Mixed colours, decorations and flavours","height":213,"id":9028514,"server_id":21,"src":"018_thumb.JPG","galleries_id":475733,"width":160});
thumbnails[9030755] = clik.newPhoto({"link":"photo_9030755.html","caption":"For a Christmas Eve proposal.  She said yes!","height":120,"id":9030755,"server_id":21,"src":"For_a_Christmas_Eve_proposal_thumb.jpg","galleries_id":475733,"width":160});
thumbnails[9008657] = clik.newPhoto({"link":"photo_9008657.html","caption":"Christening cake with hand made sugar booties","height":157,"id":9008657,"server_id":21,"src":"IMG_9831_Oscar_Christening_thumb.jpg","galleries_id":474701,"width":160});
thumbnails[9027216] = clik.newPhoto({"link":"photo_9027216.html","caption":"Teddy and Blocks Christening Cake","height":120,"id":9027216,"server_id":21,"src":"Picture_or_Videoella_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9026939] = clik.newPhoto({"link":"photo_9026939.html","caption":"A Cake for a Joint Christening","height":213,"id":9026939,"server_id":21,"src":"melchristening_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9027392] = clik.newPhoto({"link":"photo_9027392.html","caption":"Very pale blue stars","height":213,"id":9027392,"server_id":21,"src":"starchristencake1_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9027070] = clik.newPhoto({"link":"photo_9027070.html","caption":"A boat shaped baptism cake","height":213,"id":9027070,"server_id":21,"src":"baptismboat_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9026463] = clik.newPhoto({"link":"photo_9026463.html","caption":"Golden Wedding  Cake","height":185,"id":9026463,"server_id":21,"src":"golden_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9026973] = clik.newPhoto({"link":"photo_9026973.html","caption":"Square Golden Wedding","height":213,"id":9026973,"server_id":21,"src":"biggolden1_thumb.JPG","galleries_id":474701,"width":160});
thumbnails[9027018] = clik.newPhoto({"link":"photo_9027018.html","caption":"A Ruby Wedding Cake","height":213,"id":9027018,"server_id":21,"src":"rubyround_thumb.JPG","galleries_id":474701,"width":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[474686] = clik.newGallery({"photoIDs":[9008434,9027347,9027080,9027367,9027370,9027428,9045905,9027723,9026910,9045949,9046011,9046023],"link":"section578042.html","skipIndex":0,"section_code":"section578042","id":474686,"parentGallery":"","featured_images":"9046023,9046011,9045949,9045905,9027723,9027428,9027370,9027367,9027347,9027080","maxRecords":0,"usePopups":false,"singleSection":true,"title":"Iced Wedding cakes "});galleries[474706] = clik.newGallery({"photoIDs":[9008426,9027531,9027542],"link":"section578060.html","skipIndex":0,"section_code":"section578060","id":474706,"parentGallery":"","featured_images":"9027542,9027531,9008426","maxRecords":0,"usePopups":false,"singleSection":true,"title":"Chocolate Wedding Cakes"});galleries[474992] = clik.newGallery({"photoIDs":[9016191,9026466,9027308,9026993,9027012,9026470,9026936,9026970,9030774,9026949,9027073,9026982,9027085,9027228,9030767,9027240,9027312,9045921,9030505,9027339,9027342,9027416,9027594,9027687,9028310,9030703,9008560,9016195,9026465,9026930,9026469,9026475,9026922,9026931,9026945,9026955,9027002,9027013,9027036,9027058,9027092,9027064,9027096,9027110,9027293,9030711,9027432,9027606,9045914,9027650,9027671,9027681],"link":"section578045.html","skipIndex":0,"section_code":"section578045","id":474992,"parentGallery":"","featured_images":"9016195,9016191","maxRecords":0,"usePopups":false,"singleSection":true,"title":"Birthday Cakes"});galleries[474994] = clik.newGallery({"photoIDs":[9009009,9013373,9026464,9027261,9027466,9027331,9027576],"link":"section578061.html","skipIndex":0,"section_code":"section578061","id":474994,"parentGallery":"","featured_images":9013373,"maxRecords":0,"usePopups":false,"singleSection":true,"title":"Chocolate Covered Birthday Cakes"});galleries[474701] = clik.newGallery({"photoIDs":[9008657,9027216,9026939,9027392,9027070,9026463,9026973,9027018],"link":"section578043.html","skipIndex":0,"section_code":"section578043","id":474701,"parentGallery":"","featured_images":"9027392,9027216,9027070,9027018,9026973,9026939,9026463,9008657","maxRecords":0,"usePopups":false,"singleSection":true,"title":"Christening and Anniversary Cakes"});galleries[475733] = clik.newGallery({"photoIDs":[9028365,9028379,9028500,9028514,9030755],"link":"section578972.html","skipIndex":0,"section_code":"section578972","id":475733,"parentGallery":"","featured_images":9028514,"maxRecords":0,"usePopups":false,"singleSection":true,"title":"Cupcakes"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '9046023,9046011,9045949,9045921,9045914,9045905,9030774,9030767,9030755,9030711,9030703,9030505,9028514,9028500,9028379,9028365,9028310,9027723,9027695,9027687,9027681,9027671,9027650,9027606,9027594,9027576,9027542,9027531,9027466,9027432,9027428,9027416,9027392,9027370,9027367,9027347,9027342,9027339,9027331,9027312,9027308,9027293,9027261,9027240,9027228,9027216,9027128,9027110,9027096,9027092';
imageSets[2] = '9013373,9028514,9016191,9016195';
imageSets[1] = '9009009,9008434,9013373,9008657,9016191,9008560,9016195';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/beccabell/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/beccabell/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/beccabell/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 += 'section578042.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 && 'section578042' != '') {
					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 = 'Streatley Village Cakes: ' + 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.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
			
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

