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[5190237]=new thumbnail(5190237,"293049","","81_thumb.jpg",130,173,18);thumbnails[5190239]=new thumbnail(5190239,"293049","","191_thumb.jpg",130,87,18);thumbnails[5190240]=new thumbnail(5190240,"293049","","201_thumb.jpg",130,87,18);thumbnails[5190242]=new thumbnail(5190242,"293049","","211_thumb.jpg",130,84,18);thumbnails[5190243]=new thumbnail(5190243,"293049","","241_thumb.jpg",130,174,18);thumbnails[5190245]=new thumbnail(5190245,"293049","","251_thumb.jpg",130,87,18);thumbnails[5190246]=new thumbnail(5190246,"293049","","321_thumb.jpg",130,87,18);thumbnails[5190247]=new thumbnail(5190247,"293049","","331_thumb.jpg",130,87,18);thumbnails[5190249]=new thumbnail(5190249,"293049","","341_thumb.jpg",130,85,18);thumbnails[5190251]=new thumbnail(5190251,"293049","","371_thumb.jpg",130,126,18);thumbnails[5190252]=new thumbnail(5190252,"293049","","381_thumb.jpg",130,87,18);thumbnails[5190253]=new thumbnail(5190253,"293049","","382_thumb.jpg",130,87,18);thumbnails[5190254]=new thumbnail(5190254,"293049","","391_thumb.jpg",130,160,18);thumbnails[5190257]=new thumbnail(5190257,"293049","","411_thumb.jpg",130,87,18);thumbnails[5190258]=new thumbnail(5190258,"293049","","421_thumb.jpg",130,80,18);thumbnails[5190261]=new thumbnail(5190261,"293049","","431_thumb.jpg",130,195,18);thumbnails[5190262]=new thumbnail(5190262,"293049","","441_thumb.jpg",130,163,18);thumbnails[5190264]=new thumbnail(5190264,"293049","","451_thumb.jpg",130,98,18);thumbnails[5190268]=new thumbnail(5190268,"293049","","471_thumb.jpg",130,147,18);thumbnails[5190270]=new thumbnail(5190270,"293049","","521_thumb.jpg",130,94,18);thumbnails[5190281]=new thumbnail(5190281,"293049","","522_thumb.jpg",130,94,18);thumbnails[5190308]=new thumbnail(5190308,"293049","","531_thumb.jpg",130,154,18);thumbnails[5190309]=new thumbnail(5190309,"293049","","571_thumb.jpg",130,98,18);thumbnails[5190313]=new thumbnail(5190313,"293049","","611_thumb.jpg",130,68,18);thumbnails[5190314]=new thumbnail(5190314,"293049","","631_thumb.jpg",130,90,18);thumbnails[5190316]=new thumbnail(5190316,"293049","","63-11_thumb.JPG",130,173,18);thumbnails[5190318]=new thumbnail(5190318,"293049","","63-21_thumb.JPG",130,173,18);thumbnails[5190320]=new thumbnail(5190320,"293049","","63-31_thumb.JPG",130,173,18);thumbnails[5190321]=new thumbnail(5190321,"293049","","671_thumb.jpg",130,63,18);thumbnails[5190324]=new thumbnail(5190324,"293049","","681_thumb.jpg",130,78,18);thumbnails[5190325]=new thumbnail(5190325,"293049","","691_thumb.jpg",130,168,18);thumbnails[5190256]=new thumbnail(5190256,"293164","","401_thumb.jpg",130,87,18);thumbnails[5190504]=new thumbnail(5190504,"293164","","721_thumb.jpg",130,101,18);thumbnails[5190506]=new thumbnail(5190506,"293164","","731_thumb.jpg",130,93,18);thumbnails[5190508]=new thumbnail(5190508,"293164","","741_thumb.jpg",130,58,18);thumbnails[5190510]=new thumbnail(5190510,"293164","","771_thumb.jpg",130,61,18);thumbnails[5190511]=new thumbnail(5190511,"293164","","781_thumb.jpg",130,73,18);thumbnails[5190513]=new thumbnail(5190513,"293164","","851_thumb.jpg",130,89,18);thumbnails[5190515]=new thumbnail(5190515,"293164","","85-11_thumb.jpg",130,98,18);thumbnails[5190516]=new thumbnail(5190516,"293164","","85-21_thumb.JPG",130,98,18);thumbnails[5190517]=new thumbnail(5190517,"293164","","85-31_thumb.jpg",130,173,18);thumbnails[5190518]=new thumbnail(5190518,"293164","","85-41_thumb.jpg",130,173,18);thumbnails[5190520]=new thumbnail(5190520,"293164","","85-51_thumb.jpg",130,173,18);thumbnails[5190521]=new thumbnail(5190521,"293164","","881_thumb.jpg",130,86,18);thumbnails[5190522]=new thumbnail(5190522,"293164","","90_A1_thumb.jpg",130,87,18);thumbnails[5190524]=new thumbnail(5190524,"293164","","99_thumb.jpg",130,173,18);thumbnails[5190526]=new thumbnail(5190526,"293164","","99-1_thumb.JPG",130,98,18);thumbnails[5190527]=new thumbnail(5190527,"293164","","99-12_thumb.JPG",130,98,18);thumbnails[5190528]=new thumbnail(5190528,"293164","","101_thumb.jpg",130,84,18);thumbnails[5190530]=new thumbnail(5190530,"293164","","106_thumb.jpg",130,140,18);thumbnails[5190532]=new thumbnail(5190532,"293164","","108_thumb.jpg",130,87,18);thumbnails[5190533]=new thumbnail(5190533,"293164","","113_thumb.jpg",130,102,18);thumbnails[5190534]=new thumbnail(5190534,"293164","","115_thumb.jpg",130,67,18);thumbnails[5190535]=new thumbnail(5190535,"293164","","117_thumb.jpg",130,70,18);thumbnails[5190536]=new thumbnail(5190536,"293164","","1181_thumb.jpg",130,87,18);thumbnails[5190537]=new thumbnail(5190537,"293164","","124_thumb.jpg",130,167,18);thumbnails[5190538]=new thumbnail(5190538,"293164","","127_thumb.jpg",130,87,18);thumbnails[5190540]=new thumbnail(5190540,"293164","","129_thumb.jpg",130,87,18);thumbnails[5190541]=new thumbnail(5190541,"293164","","129-1_thumb.jpg",130,173,18);thumbnails[5190543]=new thumbnail(5190543,"293164","","130_thumb.jpg",130,87,18);thumbnails[5190544]=new thumbnail(5190544,"293164","","131_thumb.jpg",130,87,18);thumbnails[5190546]=new thumbnail(5190546,"293164","","132_thumb.jpg",130,87,18);thumbnails[5190548]=new thumbnail(5190548,"293164","","133_thumb.jpg",130,87,18);thumbnails[5190550]=new thumbnail(5190550,"293164","","134_thumb.jpg",130,87,18);thumbnails[5190552]=new thumbnail(5190552,"293164","","135_thumb.jpg",130,87,18);thumbnails[5190553]=new thumbnail(5190553,"293164","","136_thumb.jpg",130,181,18);thumbnails[5190554]=new thumbnail(5190554,"293164","","137_thumb.jpg",130,87,18);thumbnails[5190555]=new thumbnail(5190555,"293164","","138_thumb.jpg",130,87,18);thumbnails[5190556]=new thumbnail(5190556,"293164","","139_thumb.jpg",130,87,18);thumbnails[5190557]=new thumbnail(5190557,"293164","","140_thumb.jpg",130,88,18);thumbnails[5192729]=new thumbnail(5192729,"293247","","141_thumb.jpg",130,87,18);thumbnails[5192732]=new thumbnail(5192732,"293247","","142_thumb.jpg",130,87,18);thumbnails[5192733]=new thumbnail(5192733,"293247","","143_thumb.jpg",130,195,18);thumbnails[5192737]=new thumbnail(5192737,"293247","","144_thumb.jpg",130,195,18);thumbnails[5192740]=new thumbnail(5192740,"293247","","145_thumb.jpg",130,195,18);thumbnails[5192744]=new thumbnail(5192744,"293247","","146_thumb.jpg",130,87,18);thumbnails[5192747]=new thumbnail(5192747,"293247","","147_thumb.jpg",130,87,18);thumbnails[5192749]=new thumbnail(5192749,"293247","","148_thumb.jpg",130,87,18);thumbnails[5192751]=new thumbnail(5192751,"293247","","149_thumb.jpg",130,87,18);thumbnails[5192753]=new thumbnail(5192753,"293247","","150_thumb.jpg",130,87,18);thumbnails[5192757]=new thumbnail(5192757,"293247","","151_thumb.jpg",130,78,18);thumbnails[5192759]=new thumbnail(5192759,"293247","","152_thumb.jpg",130,87,18);thumbnails[5192762]=new thumbnail(5192762,"293247","","162_thumb.jpg",130,87,18);thumbnails[5192765]=new thumbnail(5192765,"293247","","163_thumb.jpg",130,87,18);thumbnails[5192766]=new thumbnail(5192766,"293247","","164_thumb.jpg",130,89,18);thumbnails[5192770]=new thumbnail(5192770,"293247","","165_thumb.jpg",130,87,18);thumbnails[5192772]=new thumbnail(5192772,"293247","","166_thumb.jpg",130,173,18);thumbnails[5192777]=new thumbnail(5192777,"293247","","168_thumb.jpg",130,147,18);thumbnails[5192778]=new thumbnail(5192778,"293247","","169_thumb.jpg",130,85,18);thumbnails[5192781]=new thumbnail(5192781,"293247","","170_thumb.jpg",130,55,18);var galleries=new Object();galleries[293049]=new gallery(293049,"5190325,5190324,5190321,5190320,5190318,5190316,5190314,5190313,5190309,5190308","THE WEDDING GALLERY PART ONE","gallery",[5190237,5190239,5190240,5190242,5190243,5190245,5190246,5190247,5190249,5190251,5190252,5190253,5190254,5190257,5190258,5190261,5190262,5190264,5190268,5190270,5190281,5190308,5190309,5190313,5190314,5190316,5190318,5190320,5190321,5190324,5190325]);galleries[293164]=new gallery(293164,"5190557,5190556,5190555,5190554,5190553,5190552,5190550,5190548,5190546,5190544","THE WEDDING GALLERY PART TWO","gallery",[5190256,5190504,5190506,5190508,5190510,5190511,5190513,5190515,5190516,5190517,5190518,5190520,5190521,5190522,5190524,5190526,5190527,5190528,5190530,5190532,5190533,5190534,5190535,5190536,5190537,5190538,5190540,5190541,5190543,5190544,5190546,5190548,5190550,5190552,5190553,5190554,5190555,5190556,5190557]);galleries[293247]=new gallery(293247,"5192781,5192778,5192777,5192772,5192770,5192766,5192765,5192762,5192759,5192757","THE WEDDING GALLERY PART THREE","gallery",[5192729,5192732,5192733,5192737,5192740,5192744,5192747,5192749,5192751,5192753,5192757,5192759,5192762,5192765,5192766,5192770,5192772,5192777,5192778,5192781]);var imageSets=new Object();imageSets[1]="5190557,5190556,5190555,5190554,5190553,5190552,5190550,5190548,5190546,5190544,5190543,5190541,5190540,5190538,5190537,5190536,5190535,5190534,5190533,5190532,5190530,5190528,5190527,5190526,5190524,5190522,5190521,5190520,5190518,5190517,5190516,5190515,5190513,5190511,5190510,5190508,5190506,5190504,5190325,5190324,5190321,5190320,5190318,5190316,5190314,5190313,5190309,5190308,5190281";imageSets[3]="5190557,5190556,5190555,5190554,5190553,5190552,5190550,5190548,5190546,5190544,5190543,5190541,5190540,5190538,5190537,5190536,5190535,5190534,5190533,5190532,5190530,5190528,5190527,5190526,5190524,5190522,5190521,5190520,5190518,5190517,5190516,5190515,5190513,5190511,5190510,5190508,5190506,5190504,5190325,5190324,5190321,5190320,5190318,5190316,5190314,5190313,5190309,5190308,5190281";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/WILLBAXTER/images";break}switch(a){case 1:b="http://www1.clikpic.com/WILLBAXTER/images";break}switch(a){case 2:b="http://admin.clikpic.com/WILLBAXTER/images";break}switch(a){case 4:b="http://www.clikchurch.com/WILLBAXTER/images";break}switch(a){case 5:b="http://www2.clikpic.com/WILLBAXTER/images";break}switch(a){case 15:b="http://www3.clikpic.com/WILLBAXTER/images";break}switch(a){case 21:b="http://www6.clikpic.com/WILLBAXTER/images";break}switch(a){case 18:b="http://www4.clikpic.com/WILLBAXTER/images";break}switch(a){case 19:b="http://www5.clikpic.com/WILLBAXTER/images";break}switch(a){case 22:b="http://tpc5/clikpic/WILLBAXTER/images";break}switch(a){case 23:b="http://tpc10/clikpic/WILLBAXTER/images";break}switch(a){case 24:b="http://tpc15/clikpic/WILLBAXTER/images";break}switch(a){case 25:b="http://tpc16/clikpic/WILLBAXTER/images";break}switch(a){case 31:b="http://www7.clikpic.com/WILLBAXTER/images";break}switch(a){case 32:b="http://admin2.clikpic.com/WILLBAXTER/images";break}switch(a){case 33:b="http://www8.clikpic.com/WILLBAXTER/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="WILL BAXTER PHOTOGRAPHY: "+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();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(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}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+'")'})}}};