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[5196448]=new thumbnail(5196448,"169052","","5DSC_010610X8ALLPIX_thumb.jpg",130,86,5);thumbnails[5196449]=new thumbnail(5196449,"169052","","10DSC_0083PPD_thumb.jpg",130,196,5);thumbnails[5196450]=new thumbnail(5196450,"169052","","15DSC_0143PPD_thumb.jpg",130,86,5);thumbnails[5196452]=new thumbnail(5196452,"169052","","20DSC_0042PPD_thumb.jpg",130,86,5);thumbnails[5196455]=new thumbnail(5196455,"169052","","5E1DSC_0053_thumb.jpg",130,87,5);thumbnails[5196459]=new thumbnail(5196459,"169052","","10DSC_0009_C5_thumb.jpg",130,87,5);thumbnails[5196461]=new thumbnail(5196461,"169052","","15DSC_0200PPD_thumb.jpg",130,96,5);thumbnails[5196468]=new thumbnail(5196468,"169052","","20E1DSC_00321_thumb.jpg",130,87,5);thumbnails[5196471]=new thumbnail(5196471,"169052","","23E1DSC_0037_thumb.jpg",130,87,5);thumbnails[5196475]=new thumbnail(5196475,"169052","","25E1DSC_0040_thumb.jpg",130,87,5);thumbnails[5196479]=new thumbnail(5196479,"169052","","5DSC_0096_C4_thumb.jpg",130,88,5);thumbnails[5196481]=new thumbnail(5196481,"169052","","10DSC_0189QPP_thumb.jpg",130,87,5);thumbnails[2681825]=new thumbnail(2681825,"169052","","SRtssf161QPPcopy_thumb.jpg",130,88,5);thumbnails[2681775]=new thumbnail(2681775,"169052","","S&RtrialimageoddPS_thumb.jpg",130,86,5);thumbnails[5196491]=new thumbnail(5196491,"169052","","25DSC_0151C4_thumb.jpg",130,87,5);thumbnails[5196493]=new thumbnail(5196493,"169052","","26DSC_0167C4_thumb.jpg",130,87,5);thumbnails[2681795]=new thumbnail(2681795,"169052","","S&RtrialimageoddPS2_thumb.jpg",130,87,5);thumbnails[5196495]=new thumbnail(5196495,"169052","","27DSC_0116_C4_thumb.jpg",130,194,5);thumbnails[2681810]=new thumbnail(2681810,"169052","","SR161QPPoddPS_thumb.jpg",130,86,5);thumbnails[5196486]=new thumbnail(5196486,"169052","","20DSC_0036C4_thumb.jpg",130,89,5);thumbnails[5196498]=new thumbnail(5196498,"169052","","34DSC_0234C4_thumb.jpg",130,90,5);thumbnails[5196499]=new thumbnail(5196499,"169052","","40DSC_0211C6_COPY_thumb.jpg",130,87,5);thumbnails[5196501]=new thumbnail(5196501,"169052","","43DSC_0199C6_thumb.jpg",130,91,5);thumbnails[5196502]=new thumbnail(5196502,"169052","","44DSC_0220C6_thumb.jpg",130,88,5);thumbnails[5196504]=new thumbnail(5196504,"169052","","DSC_0032C8_thumb.jpg",130,86,5);thumbnails[2684265]=new thumbnail(2684265,"169394","","DSC_0334 copy 1_thumb.jpg",130,87,5);thumbnails[2684266]=new thumbnail(2684266,"169394","","DSC_0335 copy 1_thumb.jpg",130,87,5);thumbnails[2684267]=new thumbnail(2684267,"169394","","DSC_0381 copy 1_thumb.jpg",130,88,5);thumbnails[2684268]=new thumbnail(2684268,"169394","","DSC_0383 copy 1_thumb.jpg",130,194,5);thumbnails[2684269]=new thumbnail(2684269,"169394","","DSC_0393 copy 1_thumb.jpg",130,194,5);thumbnails[2684270]=new thumbnail(2684270,"169394","","DSC_0398 copy 1_thumb.jpg",130,194,5);thumbnails[2684272]=new thumbnail(2684272,"169394","","DSC_0429 copy 1_thumb.jpg",130,86,5);thumbnails[2684273]=new thumbnail(2684273,"169394","","DSC_0508 copy 1_thumb.jpg",130,194,5);thumbnails[2684274]=new thumbnail(2684274,"169394","","DSC_0509 copy 1_thumb.jpg",130,194,5);thumbnails[2684275]=new thumbnail(2684275,"169394","","DSC_0518 copy 1_thumb.jpg",130,86,5);thumbnails[2684276]=new thumbnail(2684276,"169394","","DSC_0522 copy 1_thumb.jpg",130,194,5);thumbnails[2684277]=new thumbnail(2684277,"169394","","DSC_0542 copy 1_thumb.jpg",130,93,5);thumbnails[2684278]=new thumbnail(2684278,"169394","","DSC_0546 copy 1_thumb.jpg",130,94,5);thumbnails[2684279]=new thumbnail(2684279,"169394","","DSC_0554 copy 1_thumb.jpg",130,87,5);thumbnails[2684280]=new thumbnail(2684280,"169394","","DSC_0558 copy 1_thumb.jpg",130,87,5);thumbnails[2684281]=new thumbnail(2684281,"169394","","DSC_0569 copy 1_thumb.jpg",130,87,5);thumbnails[2684282]=new thumbnail(2684282,"169394","","DSC_0575 copy 1_thumb.jpg",130,87,5);thumbnails[2684283]=new thumbnail(2684283,"169394","","DSC_0579 copy 1_thumb.jpg",130,87,5);thumbnails[2684284]=new thumbnail(2684284,"169393","","DSC_0004d2xsQPP copy_thumb.jpg",130,85,5);thumbnails[2684285]=new thumbnail(2684285,"169393","","DSC_0023d2xsQPP copy_thumb.jpg",130,89,5);thumbnails[2684286]=new thumbnail(2684286,"169393","","DSC_0034d2xsQPP copy_thumb.jpg",130,88,5);thumbnails[2684287]=new thumbnail(2684287,"169393","","DSC_0046c3QPP copy_thumb.jpg",130,84,5);thumbnails[2684288]=new thumbnail(2684288,"169393","","DSC_0057c3QPP copy_thumb.jpg",130,88,5);thumbnails[2684289]=new thumbnail(2684289,"169393","","DSC_0154c1QPP copy_thumb.jpg",130,89,5);thumbnails[2684290]=new thumbnail(2684290,"169393","","DSC_0208c1QPP copy_thumb.jpg",130,87,5);thumbnails[2684291]=new thumbnail(2684291,"169393","","DSC_0155c3QPP copy1_thumb.jpg",130,87,5);thumbnails[2684292]=new thumbnail(2684292,"169393","","DSC_0211c3QPP copy_thumb.jpg",130,87,5);thumbnails[2684294]=new thumbnail(2684294,"169393","","DSC_0220c2QPP copy_thumb.jpg",130,85,5);thumbnails[2684299]=new thumbnail(2684299,"169393","","DSC_0216c2QPP copy4_thumb.jpg",130,192,5);thumbnails[2684300]=new thumbnail(2684300,"169393","","DSC_0227c3QPP copy2_thumb.jpg",130,189,5);thumbnails[5187321]=new thumbnail(5187321,"169053","","DSC_10010C1APPd_thumb.jpg",130,85,5);thumbnails[5187322]=new thumbnail(5187322,"169053","","DSC_20010APPd_thumb.jpg",130,86,5);thumbnails[5187324]=new thumbnail(5187324,"169053","","DSC_30071APPd_thumb.jpg",130,86,5);thumbnails[5187353]=new thumbnail(5187353,"169053","","DSC_40095APPd_thumb.jpg",130,86,5);thumbnails[5187356]=new thumbnail(5187356,"169053","","DSC_50099APPd_thumb.jpg",130,86,5);thumbnails[5187358]=new thumbnail(5187358,"169053","","DSC_60123APPd_thumb.jpg",130,195,5);thumbnails[5187360]=new thumbnail(5187360,"169053","","DSC_70044APPd_thumb.jpg",130,90,5);thumbnails[5187364]=new thumbnail(5187364,"169053","","DSC_80064APPd_thumb.jpg",130,88,5);thumbnails[5187365]=new thumbnail(5187365,"169053","","DSC_90083APPd_thumb.jpg",130,88,5);thumbnails[5187366]=new thumbnail(5187366,"169053","","DSC_100133C2APPd_thumb.jpg",130,87,5);thumbnails[5187367]=new thumbnail(5187367,"169053","","DSC_110141APPd_thumb.jpg",130,87,5);thumbnails[5187369]=new thumbnail(5187369,"169053","","DSC_120174APPd_thumb.jpg",130,87,5);thumbnails[5187371]=new thumbnail(5187371,"169053","","DSC_130224APPd_thumb.jpg",130,87,5);thumbnails[5187372]=new thumbnail(5187372,"169053","","DSC_140015APPd_thumb.jpg",130,87,5);thumbnails[5187376]=new thumbnail(5187376,"169053","","DSC_150099APPd1_thumb.jpg",130,91,5);thumbnails[5187378]=new thumbnail(5187378,"169053","","DSC_160055APPd_thumb.jpg",130,88,5);thumbnails[5187381]=new thumbnail(5187381,"169053","","DSC_170035APPd_thumb.jpg",130,88,5);thumbnails[5187382]=new thumbnail(5187382,"169053","","DSC_180031APPdcroppednsized10by8_thumb.jpg",130,104,5);thumbnails[2684301]=new thumbnail(2684301,"169397","","DSC_0039QPPbouquet copy_thumb.jpg",130,88,5);thumbnails[2686799]=new thumbnail(2686799,"169397","","DSC_0122_thumb.jpg",130,86,5);thumbnails[2686802]=new thumbnail(2686802,"169397","","DSC_0126_thumb.jpg",130,86,5);thumbnails[5195688]=new thumbnail(5195688,"169397","","5HeatherRams-Album-AFRs-EXTRA--100QPP_thumb.jpg",130,86,5);thumbnails[5195689]=new thumbnail(5195689,"169397","","10HeatherRams-Album-AFRs-EXTRA-101QPP_thumb.jpg",130,90,5);thumbnails[5195690]=new thumbnail(5195690,"169397","","15HeatherRams-Album-AFRs-EXTRA-102QPP1_thumb.jpg",130,195,5);thumbnails[5195692]=new thumbnail(5195692,"169397","","20HeatherRams-Album-AFRs-EXTRA--104QPP_thumb.jpg",130,88,5);thumbnails[5195694]=new thumbnail(5195694,"169397","","25HeatherRams-Album-AFRs-EXTRA--105QPP_thumb.jpg",130,90,5);thumbnails[5195697]=new thumbnail(5195697,"169397","","30HeatherRams-Album-AFRs-EXTRA--106QPP_thumb.jpg",130,89,5);thumbnails[5196020]=new thumbnail(5196020,"169397","","3044QPPdCJP_400pixels_high_thumb.jpg",130,188,5);thumbnails[2686093]=new thumbnail(2686093,"169398","","24_thumb.6.08VB5072dpi.jpg",130,88,5);thumbnails[2686113]=new thumbnail(2686113,"169398","","DSC_0095_thumb.jpg",130,86,5);thumbnails[2686226]=new thumbnail(2686226,"169398","","DSC_0034C11_thumb.jpg",130,86,5);thumbnails[2686234]=new thumbnail(2686234,"169398","","DSC_0043C1_thumb.jpg",130,86,5);thumbnails[2686240]=new thumbnail(2686240,"169398","","DSC_0050C1_thumb.jpg",130,86,5);thumbnails[2686242]=new thumbnail(2686242,"169398","","DSC_0053_thumb.jpg",130,86,5);thumbnails[2686792]=new thumbnail(2686792,"169398","","DSC_0079_thumb.jpg",130,86,5);thumbnails[2686795]=new thumbnail(2686795,"169398","","DSC_0085C1_thumb.jpg",130,86,5);thumbnails[2686797]=new thumbnail(2686797,"169398","","DSC_0107_thumb.jpg",130,86,5);thumbnails[2686803]=new thumbnail(2686803,"169398","","DSC_0135_thumb.jpg",130,86,5);thumbnails[2690056]=new thumbnail(2690056,"169398","","24_thumb.6.08VB22.72dpi1.jpg",130,203,5);thumbnails[2863823]=new thumbnail(2863823,"169398","","DSC_0039 copyQPPweb_thumb.jpg",129,200,5);thumbnails[2863825]=new thumbnail(2863825,"169398","","DSC_0053 copyQPPweb_thumb.jpg",130,194,5);thumbnails[2863826]=new thumbnail(2863826,"169398","","DSC_0063 copy 1QPPweb_thumb.jpg",130,194,5);thumbnails[2863827]=new thumbnail(2863827,"169398","","DSC_0064 copyQPPweb_thumb.jpg",129,87,5);thumbnails[5195705]=new thumbnail(5195705,"169398","","DSC_0272QPP_to_upload_thumb.jpg",130,86,5);thumbnails[2686005]=new thumbnail(2686005,"169399","","C1_019872dpi10x6_thumb.6'.jpg",130,87,5);thumbnails[2686006]=new thumbnail(2686006,"169399","","C2_003972dpi10x6_thumb.6'.jpg",130,92,5);thumbnails[2686009]=new thumbnail(2686009,"169399","","C3_0203 COPY72dpi10x6_thumb.6'.jpg",130,87,5);thumbnails[2686012]=new thumbnail(2686012,"169399","","C4_0069 COPY72dpi10x6_thumb.6'.jpg",130,88,5);thumbnails[2686017]=new thumbnail(2686017,"169399","","C2DSC_0015QPP_thumb.jpg",130,87,5);thumbnails[2686020]=new thumbnail(2686020,"169399","","C2DSC_0133QPP_thumb.jpg",130,87,5);thumbnails[2686031]=new thumbnail(2686031,"169399","","C4DSC_0254QPP96dpi_thumb.jpg",130,87,5);thumbnails[2686033]=new thumbnail(2686033,"169399","","DSC_0016_thumb.jpg",130,87,5);thumbnails[2690059]=new thumbnail(2690059,"169399","","DSC_00211_thumb.jpg",130,86,5);thumbnails[5195964]=new thumbnail(5195964,"169399","","DSC_5073-COPYemailsize_thumb.jpg",130,86,5);thumbnails[5195965]=new thumbnail(5195965,"169399","","DSC_5076-COPYemailsize_thumb.jpg",130,84,5);thumbnails[5195966]=new thumbnail(5195966,"169399","","DSC_5180-COPYemailsize_thumb.jpg",130,86,5);thumbnails[5195968]=new thumbnail(5195968,"169399","","DSC_5195-COPYemailsize_thumb.jpg",130,86,5);thumbnails[5195985]=new thumbnail(5195985,"169399","","DSC_2677emailsize_thumb.jpg",130,87,5);thumbnails[5195990]=new thumbnail(5195990,"169399","","DSC_2762emailsize_thumb.jpg",130,87,5);thumbnails[5195991]=new thumbnail(5195991,"169399","","DSC_2966emailsize_thumb.jpg",130,87,5);thumbnails[5195992]=new thumbnail(5195992,"169399","","DSC_2979emailsize_thumb.jpg",130,87,5);thumbnails[5195993]=new thumbnail(5195993,"169399","","DSC_2980emailsize_thumb.jpg",130,87,5);thumbnails[5195994]=new thumbnail(5195994,"169399","","DSC_3060emailsize_thumb.jpg",130,87,5);thumbnails[2686046]=new thumbnail(2686046,"169401","","DSC_0186_thumb.jpg",130,87,5);thumbnails[2686049]=new thumbnail(2686049,"169401","","DSC_0188_thumb.jpg",130,87,5);thumbnails[2686052]=new thumbnail(2686052,"169401","","DSC_0211_thumb.jpg",130,87,5);thumbnails[2686098]=new thumbnail(2686098,"169401","","71 qpp to send Tessa_thumb.jpg",130,86,5);thumbnails[2690053]=new thumbnail(2690053,"169401","","DSC_0237 copy_thumb.jpg",130,194,5);thumbnails[2690054]=new thumbnail(2690054,"169401","","DSC_0241 copy_thumb.jpg",130,194,5);thumbnails[2690057]=new thumbnail(2690057,"169401","","47 qpp to send Tessa1_thumb.jpg",130,184,5);thumbnails[2690058]=new thumbnail(2690058,"169401","","53 qpp to send tessa1_thumb.jpg",130,182,5);var galleries=new Object();galleries[169052]=new gallery(169052,"2681825,2681795","Sara and Robbie","gallery",[5196448,5196449,5196450,5196452,5196455,5196459,5196461,5196468,5196471,5196475,5196479,5196481,2681825,2681775,5196491,5196493,2681795,5196495,2681810,5196486,5196498,5196499,5196501,5196502,5196504]);galleries[169394]=new gallery(169394,"2684278","Tony and Karen","gallery",[2684265,2684266,2684267,2684268,2684269,2684270,2684272,2684273,2684274,2684275,2684276,2684277,2684278,2684279,2684280,2684281,2684282,2684283]);galleries[169393]=new gallery(169393,"2684287","Vicky and Pete","gallery",[2684284,2684285,2684286,2684287,2684288,2684289,2684290,2684291,2684292,2684294,2684299,2684300]);galleries[169053]=new gallery(169053,"5187372,5187353,5187322","Rob and Jane","gallery",[5187321,5187322,5187324,5187353,5187356,5187358,5187360,5187364,5187365,5187366,5187367,5187369,5187371,5187372,5187376,5187378,5187381,5187382]);galleries[169397]=new gallery(169397,"5195694","Wedding Portfolio","gallery",[2684301,2686799,2686802,5195688,5195689,5195690,5195692,5195694,5195697,5196020]);galleries[169398]=new gallery(169398,"5195705,2686226,2686093","Other Work","gallery",[2686093,2686113,2686226,2686234,2686240,2686242,2686792,2686795,2686797,2686803,2690056,2863823,2863825,2863826,2863827,5195705]);galleries[169399]=new gallery(169399,"5195993,5195985,5195968,5195966,2686006,2686005","Other Events","gallery",[2686005,2686006,2686009,2686012,2686017,2686020,2686031,2686033,2690059,5195964,5195965,5195966,5195968,5195985,5195990,5195991,5195992,5195993,5195994]);galleries[169401]=new gallery(169401,"2686098,2686052","Extra","gallery",[2686046,2686049,2686052,2686098,2690053,2690054,2690057,2690058]);var imageSets=new Object();imageSets[1]="5196481,5196448,5196020,5195690,5187372,5187353,5187322,2684301,2684294,2684290,2684287,2684278,2684277,2681825,2681795";imageSets[2]="5195993,5195985,5195968,5195966,5195705,5195694,5187372,5187353,5187322,2686226,2686098,2686093,2686052,2686006,2686005,2684287,2684278,2681825,2681795";imageSets[3]="5196504,5196502,5196501,5196499,5196498,5196495,5196493,5196491,5196486,5196481,5196479,5196475,5196471,5196468,5196461,5196459,5196455,5196452,5196450,5196449,5196448,5196020,5195994,5195993,5195992,5195991,5195990,5195985,5195968,5195966,5195965,5195964,5195705,5195697,5195694,5195692,5195690,5195689,5195688,5187382,5187381,5187378,5187376,5187372,5187371,5187369,5187367,5187366,5187365,5187364";imageSets[128960]="5196504,5196502,5196501,5196499,5196498,5196495,5196493,5196491,5196486,5196481,5196479,5196475,5196471,5196468,5196461,5196459,5196455,5196452,5196450,5196449,5196448,2681810,2681795,2681775";imageSets[128961]="2684272,2684267,2684266";imageSets[128962]="2684287";imageSets[128963]="5187382,5187381,5187378,5187376,5187372,5187371,5187369,5187367,5187366,5187365,5187364,5187360,5187358,5187356,5187353,5187324,5187322,5187321";imageSets[128964]="5196020,5195697,5195694,5195692,5195690,5195689,5195688,2684301";imageSets[128965]="5195705,2863825,2686226";imageSets[128966]="5195994,5195993,5195992,5195991,5195990,5195985,5195968,5195966,5195965,5195964";imageSets[128967]="2686052,2686049,2686046";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/jamesfarrell/images";break}switch(a){case 1:b="http://www1.clikpic.com/jamesfarrell/images";break}switch(a){case 2:b="http://admin.clikpic.com/jamesfarrell/images";break}switch(a){case 4:b="http://www.clikchurch.com/jamesfarrell/images";break}switch(a){case 5:b="http://www2.clikpic.com/jamesfarrell/images";break}switch(a){case 15:b="http://www3.clikpic.com/jamesfarrell/images";break}switch(a){case 21:b="http://www6.clikpic.com/jamesfarrell/images";break}switch(a){case 18:b="http://www4.clikpic.com/jamesfarrell/images";break}switch(a){case 19:b="http://www5.clikpic.com/jamesfarrell/images";break}switch(a){case 22:b="http://tpc5/clikpic/jamesfarrell/images";break}switch(a){case 23:b="http://tpc10/clikpic/jamesfarrell/images";break}switch(a){case 24:b="http://tpc15/clikpic/jamesfarrell/images";break}switch(a){case 25:b="http://tpc16/clikpic/jamesfarrell/images";break}switch(a){case 31:b="http://www7.clikpic.com/jamesfarrell/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jamesfarrell/images";break}switch(a){case 33:b="http://www8.clikpic.com/jamesfarrell/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="a fine romance wedding 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;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+'")'})}}};