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[923609]=new thumbnail(923609,"70298","five<br>\r\n","house 0021.jpg",130,98,15);thumbnails[923636]=new thumbnail(923636,"70298","five","house 0043.jpg",130,98,15);thumbnails[926727]=new thumbnail(926727,"70298","fives in a glass cupboard","house 0101.jpg",130,104,15);thumbnails[926732]=new thumbnail(926732,"70298","blue yunomis","blue pots 0051.jpg",130,98,15);thumbnails[932621]=new thumbnail(932621,"70298","white bowls with chimney pot motif","ROSsimoncook 0041.jpg",130,87,15);thumbnails[932623]=new thumbnail(932623,"70298","porcelain bowls with blue glazes","ROSsimoncook 0051.jpg",130,87,15);thumbnails[932625]=new thumbnail(932625,"70298","porcelain bowls with blue glazes","ROSsimoncook 0071.jpg",130,87,15);thumbnails[932626]=new thumbnail(932626,"70298","porcelain bowls about to lose their integrity","ROSsimoncook 0081.jpg",130,87,15);thumbnails[932627]=new thumbnail(932627,"70298","losely thrown porcelain with copper and cobalt oxides","ROSsimoncook 0091.jpg",130,87,15);thumbnails[932631]=new thumbnail(932631,"70298","porcelain cylinders with chimney pot motif","ROSsimoncook 0101.jpg",130,87,15);thumbnails[932633]=new thumbnail(932633,"70298","white pots","IMG_13691.JPG",130,98,15);thumbnails[1028309]=new thumbnail(1028309,"","Stone arrangement used for rubbing","IMG_11401.JPG",130,98,15);thumbnails[1028315]=new thumbnail(1028315,"","8 Stones used for rubbing","IMG_11491.JPG",130,98,15);thumbnails[1028339]=new thumbnail(1028339,"","3 stone rubbing/erasing","IMG_1154_edited-11.JPG",130,97,15);thumbnails[1978057]=new thumbnail(1978057,"70298","grid with torquoise and pink bowls","IMG_1275_for WEB_thumb.jpg",130,115,15);thumbnails[1978078]=new thumbnail(1978078,"70298","yunomis with gold","IMG_0892_for WEB_2_thumb.jpg",130,103,15);thumbnails[1978107]=new thumbnail(1978107,"70298","porcelain cylinders with flower impress","IMG_0763_for WEB_thumb.jpg",130,86,15);thumbnails[1978134]=new thumbnail(1978134,"70298","porcelain vessels","IMG_0759_for WEB_thumb.jpg",130,97,15);thumbnails[4234827]=new thumbnail(4234827,"","Jewelery Qtr arch with drawing","IMG_0279_2_thumb.jpg",130,173,15);thumbnails[4234908]=new thumbnail(4234908,"","Snow Hill window with drawing","IMG_0305_2_thumb.jpg",130,173,15);thumbnails[3514670]=new thumbnail(3514670,"70295","Looking down on blue","test1_thumb.jpg",130,98,15);thumbnails[3853659]=new thumbnail(3853659,"70295","circle line<br>\r\n","a_thumb.jpg",130,98,15);thumbnails[5190113]=new thumbnail(5190113,"70295","circle line,detail","web3_thumb.jpg",130,98,15);thumbnails[3981899]=new thumbnail(3981899,"70295","blue line","126_2_thumb.jpg",130,98,15);thumbnails[3981868]=new thumbnail(3981868,"70295","","042_2_thumb.jpg",130,98,15);thumbnails[989140]=new thumbnail(989140,"70295","Tatami/Screen","tatami3.jpg",130,98,15);thumbnails[3963228]=new thumbnail(3963228,"70295","Colours","pic1-web_thumb.jpg",130,173,15);thumbnails[981513]=new thumbnail(981513,"70295","Mantelpiece ","Mantelpiece 21.jpg",130,173,15);thumbnails[932659]=new thumbnail(932659,"70295","shadow mirror","AUBIMG_10121.jpg",130,94,15);thumbnails[926693]=new thumbnail(926693,"70295","walk in washington","AUBWalk in Washington1.jpg",130,85,15);thumbnails[926696]=new thumbnail(926696,"70295","globe skeleton","Globe deatail 11.jpg",130,98,15);thumbnails[932656]=new thumbnail(932656,"70295","walk through london erased into globe","AUBIMG_09901.jpg",130,100,15);thumbnails[1003278]=new thumbnail(1003278,"70295","Stone","IMG_11091.JPG",130,170,15);thumbnails[990107]=new thumbnail(990107,"70295","Rocks","IMG_10873.jpg",130,152,15);thumbnails[1028275]=new thumbnail(1028275,"70295","8 Stone rubbing/erasing","IMG_1151_edited-11.JPG",130,98,15);thumbnails[1028307]=new thumbnail(1028307,"70295","2 stone rubbing/erasing","IMG_1153_edited-11.JPG",130,173,15);thumbnails[932655]=new thumbnail(932655,"70295","connection drawing 1","AUBIMG_10021.jpg",130,98,15);thumbnails[932657]=new thumbnail(932657,"70295","connection drawing 2, pencil over charcoal","AUBIMG_10081.jpg",130,104,15);thumbnails[926708]=new thumbnail(926708,"70295","connection drawing 3","IMG_10051.JPG",130,98,15);thumbnails[923433]=new thumbnail(923433,"70295","water bottle condensation, detail","104_04011.JPG",130,98,15);thumbnails[926699]=new thumbnail(926699,"70295","water bottle condensation<br>\r\n","bottle condensation2.jpg",130,198,15);thumbnails[925932]=new thumbnail(925932,"70272","cup drawing","Cup2_thumb.jpg",130,98,15);thumbnails[926071]=new thumbnail(926071,"70272","ribbon drawing","Ribbon Drawing2.jpg",130,136,15);thumbnails[926082]=new thumbnail(926082,"70272","motion model in perspex","motion model8.jpg",130,160,15);thumbnails[926086]=new thumbnail(926086,"70272","motion study 1","motion study1.jpg",130,121,15);thumbnails[926176]=new thumbnail(926176,"70272","motion study 2","Lithograph2_2_thumb.jpg",130,102,15);thumbnails[926200]=new thumbnail(926200,"70272","motion study 3","Lithograph1_2_thumb.jpg",130,106,15);thumbnails[953382]=new thumbnail(953382,"70272","cube animation","cube animation2.JPG",130,97,15);thumbnails[5416741]=new thumbnail(5416741,"70272","cube drawing, detail","cube_drawing1_thumb.jpg",130,100,15);thumbnails[5417937]=new thumbnail(5417937,"70272","cube sculpture","cubesculpture4_2_thumb.jpg",130,191,15);thumbnails[1988826]=new thumbnail(1988826,"70272","pan drawing study 1","TAKAKO's pans_thumb.jpg",130,97,15);thumbnails[2110362]=new thumbnail(2110362,"70272","pan drawing study 2","3_thumb.jpg",130,94,15);thumbnails[3963242]=new thumbnail(3963242,"70272","pan drawing","IMG_0274_3_thumb.jpg",130,102,15);thumbnails[926305]=new thumbnail(926305,"70272","organic city","Tokyo22.jpg",130,90,15);thumbnails[933728]=new thumbnail(933728,"70272","plug drawing, detail","plagu3.jpg",130,98,15);thumbnails[1454334]=new thumbnail(1454334,"70272","self portrait","Selfportrait17.jpg",130,138,15);thumbnails[5418243]=new thumbnail(5418243,"306163","walking/drawing/maping london","Citywalk2_thumb.jpg",130,85,15);thumbnails[5418244]=new thumbnail(5418244,"306163","recording london","Londonbox1_21_thumb.jpg",130,115,15);thumbnails[933737]=new thumbnail(933737,"306163","london map, detail","CITY WALK4.jpg",130,104,15);thumbnails[5418326]=new thumbnail(5418326,"100494","10 mins drawing-1","DSCF0647_2_thumb.jpg",130,173,15);thumbnails[5418345]=new thumbnail(5418345,"100494","10 mins drawing-2","DSCF0648_2_thumb.JPG",130,173,15);thumbnails[5418347]=new thumbnail(5418347,"100494","10mins drawing-3","DSCF0654_2_thumb.JPG",130,87,15);thumbnails[5418351]=new thumbnail(5418351,"100494","10 mins drawing-4","DSCF0649_2_thumb.JPG",130,173,15);thumbnails[5418354]=new thumbnail(5418354,"100494","10 mins drawing-5","DSCF0650_2_thumb.JPG",130,173,15);thumbnails[5418357]=new thumbnail(5418357,"100494","10 mins drawing-6","DSCF0665_2_thumb.JPG",130,98,15);thumbnails[5418365]=new thumbnail(5418365,"100494","10 mins drawing-7","DSCF0667_2_thumb.JPG",130,159,15);thumbnails[5418363]=new thumbnail(5418363,"100494","10 mins drawing-8","DSCF0666_2_thumb.JPG",130,166,15);thumbnails[5418360]=new thumbnail(5418360,"100494","10 mins drawing-9","DSCF0652_1_thumb.JPG",130,173,15);thumbnails[1454316]=new thumbnail(1454316,"100494","2 mins drawing-1","life drawing121.jpg",130,179,15);thumbnails[1454318]=new thumbnail(1454318,"100494","2 mins drawing-2","life drawing141.jpg",130,179,15);thumbnails[1454321]=new thumbnail(1454321,"100494","2 mins drawing-3","life drawing171.jpg",130,179,15);thumbnails[1454325]=new thumbnail(1454325,"100494","2 mins drawing-4","life drawing214.jpg",130,179,15);thumbnails[1454326]=new thumbnail(1454326,"100494","2 mins drawing-5","life drawing224.jpg",130,179,15);thumbnails[1454327]=new thumbnail(1454327,"100494","2 mins drawing-6","life drawing272.jpg",130,179,15);thumbnails[1997512]=new thumbnail(1997512,"100494","stool","S_thumb.jpg",130,182,15);var galleries=new Object();galleries[77053]=new gallery(77053,"5190113,3981899,3981868,3963228,3853659,3514670,1028307,1028275,1003278,990107","Auberon Bayley","gallery",[]);galleries[70295]=new gallery(70295,"5190113,3981899,3981868,3963228,3853659,3514670,1028307,1028275,1003278,990107","Drawings","gallery",[3514670,3853659,5190113,3981899,3981868,989140,3963228,981513,932659,926693,926696,932656,1003278,990107,1028275,1028307,932655,932657,926708,923433,926699]);galleries[70298]=new gallery(70298,"1978134,1978107,1978078,1978057,932633,932631,932627,932626,932625,932623","Ros Bayley","gallery",[923609,923636,926727,926732,932621,932623,932625,932626,932627,932631,932633,1978057,1978078,1978107,1978134]);galleries[100493]=new gallery(100493,"5418365,5418363,5418360,5418357,5418354,5418351,5418347,5418345,5418326,5418244","Takako Nishioka","gallery",[]);galleries[70272]=new gallery(70272,"5417937,5416741,3963242,2110362,1988826,1454334,953382,933728,926305,926200","Projects","gallery",[925932,926071,926082,926086,926176,926200,953382,5416741,5417937,1988826,2110362,3963242,926305,933728,1454334]);galleries[306163]=new gallery(306163,"5418244,5418243,933737","City walk","gallery",[5418243,5418244,933737]);galleries[100494]=new gallery(100494,"5418365,5418363,5418360,5418357,5418354,5418351,5418347,5418345,5418326,1997512","Drawing practice","gallery",[5418326,5418345,5418347,5418351,5418354,5418357,5418365,5418363,5418360,1454316,1454318,1454321,1454325,1454326,1454327,1997512]);var imageSets=new Object();imageSets[1]="926696,926071,923609,923433";imageSets[3]="5418365,5418363,5418360,5418357,5418354,5418351,5418347,5418345,5418326,5418244,5418243,5417937,5416741,5190113,4234908,4234827,3981899,3981868,3963242,3963228,3853659,3514670,2110362,1997512,1988826,1978134,1978107,1978078,1978057,1454334,1454327,1454326,1454325,1454321,1454318,1454316,1028339,1028315,1028309,1028307,1028275,1003278,990107,989140,981513,953382,933737,933728,932659,932657";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/wabbit/images";break}switch(a){case 1:b="http://www1.clikpic.com/wabbit/images";break}switch(a){case 2:b="http://admin.clikpic.com/wabbit/images";break}switch(a){case 4:b="http://www.clikchurch.com/wabbit/images";break}switch(a){case 5:b="http://www2.clikpic.com/wabbit/images";break}switch(a){case 15:b="http://www3.clikpic.com/wabbit/images";break}switch(a){case 21:b="http://www6.clikpic.com/wabbit/images";break}switch(a){case 18:b="http://www4.clikpic.com/wabbit/images";break}switch(a){case 19:b="http://www5.clikpic.com/wabbit/images";break}switch(a){case 22:b="http://tpc5/clikpic/wabbit/images";break}switch(a){case 23:b="http://tpc10/clikpic/wabbit/images";break}switch(a){case 24:b="http://tpc15/clikpic/wabbit/images";break}switch(a){case 25:b="http://tpc16/clikpic/wabbit/images";break}switch(a){case 31:b="http://www7.clikpic.com/wabbit/images";break}switch(a){case 32:b="http://admin2.clikpic.com/wabbit/images";break}switch(a){case 33:b="http://www8.clikpic.com/wabbit/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="Drawing & Ceramic Arts: "+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+'")'})}}};