function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[727771]=new thumbnail(727771,"55552","","IMG_10042_thumb.jpg",130,108,1);thumbnails[728165]=new thumbnail(728165,"56030","Lucie and Karl-0014","Lucie and Karl-00141_thumb.jpg",130,87,1);thumbnails[2735176]=new thumbnail(2735176,"","","Debbie and Darren  302_thumb.jpg",130,182,1);thumbnails[727772]=new thumbnail(727772,"55552","","IMG_10102_thumb.jpg",130,196,1);thumbnails[727784]=new thumbnail(727784,"55552","","IMG_10841_thumb.jpg",130,77,1);thumbnails[728166]=new thumbnail(728166,"56030","Lucie and Karl-0019","Lucie and Karl-00191_thumb.jpg",130,114,1);thumbnails[727773]=new thumbnail(727773,"55552","","IMG_10141_thumb.jpg",130,87,1);thumbnails[728167]=new thumbnail(728167,"56030","Lucie and Karl-0030","Lucie and Karl-00301_thumb.jpg",130,218,1);thumbnails[727774]=new thumbnail(727774,"55552","","IMG_10161_thumb.jpg",130,87,1);thumbnails[728168]=new thumbnail(728168,"56030","Lucie and Karl-0038","Lucie and Karl-00381_thumb.jpg",130,196,1);thumbnails[727775]=new thumbnail(727775,"55552","","IMG_10172_thumb.jpg",130,83,1);thumbnails[728169]=new thumbnail(728169,"56030","Lucie and Karl-0042","Lucie and Karl-00421_thumb.jpg",130,87,1);thumbnails[727776]=new thumbnail(727776,"55552","","IMG_10241_thumb.jpg",130,88,1);thumbnails[728170]=new thumbnail(728170,"56030","Lucie and Karl-0049","Lucie and Karl-00491_thumb.jpg",130,196,1);thumbnails[727777]=new thumbnail(727777,"55552","","IMG_10261_thumb.jpg",130,196,1);thumbnails[728171]=new thumbnail(728171,"56030","Lucie and Karl-0055","Lucie and Karl-00551_thumb.jpg",130,87,1);thumbnails[727778]=new thumbnail(727778,"55552","","IMG_10321_thumb.jpg",130,87,1);thumbnails[728172]=new thumbnail(728172,"56030","Lucie and Karl-0061","Lucie and Karl-00611_thumb.jpg",130,87,1);thumbnails[727779]=new thumbnail(727779,"55552","","IMG_10381_thumb.jpg",130,87,1);thumbnails[728173]=new thumbnail(728173,"56030","Lucie and Karl-0067bw","Lucie and Karl-0067bw1_thumb.jpg",130,97,1);thumbnails[727780]=new thumbnail(727780,"55552","","IMG_10431_thumb.jpg",130,87,1);thumbnails[728174]=new thumbnail(728174,"56030","Lucie and Karl-0091","Lucie and Karl-00911_thumb.jpg",130,98,1);thumbnails[727781]=new thumbnail(727781,"55552","","IMG_10491_thumb.jpg",130,196,1);thumbnails[728175]=new thumbnail(728175,"56030","Lucie and Karl-0092","Lucie and Karl-00921_thumb.jpg",130,174,1);thumbnails[727782]=new thumbnail(727782,"55552","","IMG_10611_thumb.jpg",130,87,1);thumbnails[728176]=new thumbnail(728176,"56030","Lucie and Karl-0094","Lucie and Karl-00941_thumb.jpg",130,196,1);thumbnails[728177]=new thumbnail(728177,"56030","Lucie and Karl-0099","Lucie and Karl-00991_thumb.jpg",130,96,1);thumbnails[727783]=new thumbnail(727783,"55552","","IMG_10771_thumb.jpg",130,155,1);thumbnails[728178]=new thumbnail(728178,"56030","Lucie and Karl-0104","Lucie and Karl-01041_thumb.jpg",130,178,1);thumbnails[727793]=new thumbnail(727793,"55552","IMG 1092","IMG_10922_thumb.jpg",130,87,1);thumbnails[728179]=new thumbnail(728179,"56030","Lucie and Karl-0108","Lucie and Karl-01081_thumb.jpg",130,87,1);thumbnails[727800]=new thumbnail(727800,"55552","","IMG_10951_thumb.jpg",130,87,1);thumbnails[728180]=new thumbnail(728180,"56030","Lucie and Karl-0116","Lucie and Karl-01161_thumb.jpg",130,160,1);thumbnails[727801]=new thumbnail(727801,"55552","","IMG_10961_thumb.jpg",130,87,1);thumbnails[728181]=new thumbnail(728181,"56030","Lucie and Karl-0128","Lucie and Karl-01281_thumb.jpg",130,87,1);thumbnails[728217]=new thumbnail(728217,"56029","Zoe and Tony0101bwc","Zoe and Tony0101bwc2_thumb.jpg",130,196,1);thumbnails[727802]=new thumbnail(727802,"55552","","IMG_1105bw1_thumb.jpg",130,87,1);thumbnails[728182]=new thumbnail(728182,"56030","Lucie and Karl-0130","Lucie and Karl-01301_thumb.jpg",130,85,1);thumbnails[727803]=new thumbnail(727803,"55552","","IMG_11071_thumb.jpg",130,87,1);thumbnails[728183]=new thumbnail(728183,"56030","Lucie and Karl-0132","Lucie and Karl-01321_thumb.jpg",130,87,1);thumbnails[727804]=new thumbnail(727804,"55552","","IMG_1110bw1_thumb.jpg",130,87,1);thumbnails[727805]=new thumbnail(727805,"55552","","IMG_11111_thumb.jpg",130,87,1);thumbnails[727806]=new thumbnail(727806,"55552","","IMG_11121_thumb.jpg",130,87,1);thumbnails[728184]=new thumbnail(728184,"56030","Lucie and Karl-0141","Lucie and Karl-01411_thumb.jpg",130,88,1);thumbnails[727807]=new thumbnail(727807,"55552","","IMG_11141_thumb.jpg",130,196,1);thumbnails[727808]=new thumbnail(727808,"55552","","IMG_11151_thumb.jpg",130,202,1);thumbnails[728185]=new thumbnail(728185,"56030","Lucie and Karl-0154","Lucie and Karl-01541_thumb.jpg",130,107,1);thumbnails[727809]=new thumbnail(727809,"55552","","IMG_11171_thumb.jpg",130,135,1);thumbnails[727812]=new thumbnail(727812,"55552","","IMG_11221_thumb.jpg",130,196,1);thumbnails[728186]=new thumbnail(728186,"56030","Lucie and Karl-0157","Lucie and Karl-01571_thumb.jpg",130,196,1);thumbnails[727813]=new thumbnail(727813,"55552","","IMG_11241_thumb.jpg",130,87,1);thumbnails[728187]=new thumbnail(728187,"56030","Lucie and Karl-0162","Lucie and Karl-01621_thumb.jpg",130,87,1);thumbnails[727814]=new thumbnail(727814,"55552","","IMG_11401_thumb.jpg",130,87,1);thumbnails[728188]=new thumbnail(728188,"56030","Lucie and Karl-0204","Lucie and Karl-02041_thumb.jpg",130,136,1);thumbnails[728189]=new thumbnail(728189,"56030","Lucie and Karl-0212","Lucie and Karl-0212_thumb.jpg",130,87,1);thumbnails[728190]=new thumbnail(728190,"56030","Lucie and Karl-02121","Lucie and Karl-02121_thumb.jpg",130,87,1);thumbnails[728191]=new thumbnail(728191,"56030","Lucie and Karl-0223","Lucie and Karl-02231_thumb.jpg",130,178,1);thumbnails[725179]=new thumbnail(725179,"43451","","Zoe and Tony0101bwc1_thumb.jpg",130,196,1);thumbnails[564017]=new thumbnail(564017,"43451","","Web Joannawedding 001_thumb.jpg",130,90,1);thumbnails[564018]=new thumbnail(564018,"43451","","Web Lwedding 004_thumb.jpg",130,187,1);thumbnails[727815]=new thumbnail(727815,"42699","","IMG_15021_thumb.jpg",130,87,1);thumbnails[727822]=new thumbnail(727822,"42699","","IMG_15041_thumb.jpg",130,87,1);thumbnails[727823]=new thumbnail(727823,"42699","","IMG_1509_thumb.jpg",130,196,1);thumbnails[727824]=new thumbnail(727824,"42699","","IMG_1515_thumb.jpg",130,87,1);thumbnails[727825]=new thumbnail(727825,"42699","","IMG_1518_thumb.jpg",130,182,1);thumbnails[727827]=new thumbnail(727827,"42699","","IMG_1525_thumb.jpg",130,196,1);thumbnails[727828]=new thumbnail(727828,"42699","","IMG_1526_thumb.jpg",130,108,1);thumbnails[727829]=new thumbnail(727829,"42699","","IMG_1527_thumb.jpg",130,87,1);thumbnails[727830]=new thumbnail(727830,"42699","","IMG_1556_thumb.jpg",130,93,1);thumbnails[727831]=new thumbnail(727831,"42699","","IMG_15631_thumb.jpg",130,196,1);thumbnails[727832]=new thumbnail(727832,"42699","","IMG_1592_thumb.jpg",130,87,1);thumbnails[727838]=new thumbnail(727838,"42699","","IMG_1596_thumb.jpg",130,88,1);thumbnails[727839]=new thumbnail(727839,"42699","","IMG_1605_thumb.jpg",130,182,1);thumbnails[727840]=new thumbnail(727840,"42699","","IMG_1615_thumb.jpg",130,87,1);thumbnails[727841]=new thumbnail(727841,"42699","","IMG_1629_thumb.jpg",130,196,1);thumbnails[727873]=new thumbnail(727873,"42714","","Lucie and Karl-0204_thumb.jpg",130,136,1);thumbnails[585505]=new thumbnail(585505,"42714","","Bphotoneg_thumb.jpg",130,51,1);var galleries=new Object();galleries[55552]=new gallery(55552,"727814,727813,727812,727809,727808,727807,727806,727805,727804,727803","Hannah and Richard","gallery",[727771,727772,727784,727773,727774,727775,727776,727777,727778,727779,727780,727781,727782,727783,727793,727800,727801,727802,727803,727804,727805,727806,727807,727808,727809,727812,727813,727814]);galleries[56030]=new gallery(56030,"728191,728190,728189,728188,728187,728186,728185,728184,728183,728182","Lucie and Karl","gallery",[728165,728166,728167,728168,728169,728170,728171,728172,728173,728174,728175,728176,728177,728178,728179,728180,728181,728182,728183,728184,728185,728186,728187,728188,728189,728190,728191]);galleries[56029]=new gallery(56029,"728217","Zoe and Tony","gallery",[728217]);galleries[43451]=new gallery(43451,"725179,564018,564017","General Wedding Gallery","gallery",[725179,564017,564018]);galleries[42699]=new gallery(42699,"727841,727840,727839,727838,727832,727831,727830,727829,727828,727827","Paula and Richards Weddings","gallery",[727815,727822,727823,727824,727825,727827,727828,727829,727830,727831,727832,727838,727839,727840,727841]);galleries[42714]=new gallery(42714,"727873,585505","Details of The Day","gallery",[727873,585505]);var imageSets=new Object();imageSets[1]="2735176";imageSets[2]="727873,585505";imageSets[3]="2735176,728217,728191,728190,728189,728188,728187,728186,728185,728184,728183,728182,728181,728180,728179,728178,728177,728176,728175,728174,728173,728172,728171,728170,728169,728168,728167,728166,728165,727873,727841,727840,727839,727838,727832,727831,727830,727829,727828,727827,727825,727824,727823,727822,727815,727814,727813,727812,727809,727808";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 34:b="http://www9.clikpic.com/briony/images";break}switch(a){case 1:b="http://www1.clikpic.com/briony/images";break}switch(a){case 2:b="http://admin.clikpic.com/briony/images";break}switch(a){case 4:b="http://www.clikchurch.com/briony/images";break}switch(a){case 5:b="http://www2.clikpic.com/briony/images";break}switch(a){case 15:b="http://www3.clikpic.com/briony/images";break}switch(a){case 21:b="http://www6.clikpic.com/briony/images";break}switch(a){case 18:b="http://www4.clikpic.com/briony/images";break}switch(a){case 19:b="http://www5.clikpic.com/briony/images";break}switch(a){case 22:b="http://tpc5/clikpic/briony/images";break}switch(a){case 23:b="http://tpc10/clikpic/briony/images";break}switch(a){case 24:b="http://tpc15/clikpic/briony/images";break}switch(a){case 25:b="http://tpc16/clikpic/briony/images";break}switch(a){case 31:b="http://www7.clikpic.com/briony/images";break}switch(a){case 32:b="http://admin2.clikpic.com/briony/images";break}switch(a){case 33:b="http://www8.clikpic.com/briony/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("gallery"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+backgrounds[imageID].caption+'" border="0">';if("gallery"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="BrionyPhotographic: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;resizePhotoInfo({centre:true});toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};