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[1670409]=new thumbnail(1670409,"112703","'Head No. 1'.<br>\r\nInk and Acrylic on unstretched canvas.<br>\r\n182 x 140cm","'Head No1'Compressed_thumb.jpg",130,173,18);thumbnails[1670424]=new thumbnail(1670424,"112703","'Head No. 2' <br>\r\nInk and acrylic on unstreched Canvas.<br>\r\nApprox 210 x 165cm","'Head No 2' Compressed_thumb.jpg",130,173,18);thumbnails[1670430]=new thumbnail(1670430,"112703","'Depiction od Self No. 3'.<br>\r\nInk and Acrylic on Canvas,<br>\r\nApprox 210 x 170cm","Self Portrait 'No3-Compressed_thumb.jpg",130,164,18);thumbnails[1670463]=new thumbnail(1670463,"112703","'Hand'. Ink and Acrylic on Board. 43 x 53 cm","'Hand'-Edited_thumb.jpg",130,101,18);thumbnails[934735]=new thumbnail(934735,"17673","'Jon Standing'. 200 x 140 cm","Jon standing2_thumb.jpg",130,190,18);thumbnails[196306]=new thumbnail(196306,"17673","‘Jessika Facing Me’. 171 x 130 cm. <br>\r\nAcrylic, ink and emulsion on Fabriano paper.<br>\r\n","01_thumb.jpg",130,178,18);thumbnails[194250]=new thumbnail(194250,"17673","'Head of Jessika (No1)' . 46.5 x 41 cm. Ink, acrylic and emulsion on paper<br>\r\n","2_thumb..jpg",130,149,18);thumbnails[196288]=new thumbnail(196288,"17673","‘Jessika Seated’ . 83.5 x 59 cm. <br>\r\nAcrylic, ink and emulsion on paper.<br>\r\n","3_thumb.1.jpg",130,192,18);thumbnails[196251]=new thumbnail(196251,"17673","‘Dave in corner’ . 83.5 x 59 cm. <br>\r\nAcrylic and ink on paper.<br>\r\n","8_thumb.1.JPG",130,178,18);thumbnails[196239]=new thumbnail(196239,"17673","‘Jon Standing with Chair’ . 83.5 x 59 cm.<br>\r\nAcrylic, ink and emulsion on paper.<br>\r\n","6_thumb.2.jpg",130,176,18);thumbnails[196194]=new thumbnail(196194,"17673","'Jon kneeling' . 83.5 x 59 cm.<br>\r\nInk and acrylic on paper.","7_thumb..jpg",130,173,18);thumbnails[196262]=new thumbnail(196262,"17673","‘Rebecca Standing’ . 83.5 x 59 cm.<br>\r\nAcrylic, ink and emulsion on paper.<br>\r\n","4_thumb.1.jpg",130,185,18);thumbnails[196083]=new thumbnail(196083,"17673","'Rebecca Kneeling'. 83.5 x 59 cm.<br>\r\nInk, acrylic and emulsion on paper.","5_thumb..jpg",130,181,18);thumbnails[1204931]=new thumbnail(1204931,"17673","'Jon Profile'. 83.5 x 59 cm. Ink and acrylic on Paper. ","Jon Profile_thumb.jpg",130,192,18);thumbnails[196095]=new thumbnail(196095,"17673","'Jessika Standing'. 152.4 x 119.3 cm.<br>\r\nInk and acrylic on board.","9_thumb..jpg",130,168,18);thumbnails[196099]=new thumbnail(196099,"17673","'Jessika sitting with legs streched out'<br>\r\n182 x 121 cm. Ink and acrylic on board.","11_thumb..JPG",130,202,18);thumbnails[196208]=new thumbnail(196208,"17673","'Jessika with arms streched out'. <br>\r\n121 x 121 cm. Ink and acrylic on board.","18_thumb.jpg",130,131,18);thumbnails[196115]=new thumbnail(196115,"17673","'Rebecca bending over chair'. 121 x 121 cm<br>\r\nIn, acrylic and emulsion on board. ","12_thumb..jpg",130,131,18);thumbnails[196121]=new thumbnail(196121,"17673","'Jessika in chair'. 208 x 147 cm.<br>\r\nInk and acrylic on board. ","13_thumb..jpg",130,181,18);thumbnails[1205175]=new thumbnail(1205175,"17673","'Jon - Rear View' . Ink and acrylic on paper.","JonRearView_thumb.jpg",130,196,18);thumbnails[1562370]=new thumbnail(1562370,"17673","'Jon Sitting - Front View' . Ink and Acrylic on Paper ","'Jon Sitting (Front View)' 2007_thumb.jpg",130,183,18);thumbnails[1625188]=new thumbnail(1625188,"17673","'Dave Facing Me' ","New Dave_thumb.jpg",130,201,18);thumbnails[1641815]=new thumbnail(1641815,"17673","'Will Standing with Arms out' 83.5 x 59cm<br>\r\n","'Will Standing With Arms Out' 2007_thumb.jpg",130,187,18);thumbnails[1878078]=new thumbnail(1878078,"17673","'Head of Jon'. 30 x 28cm. Acrylic and ink on board.","'Head of Jon' -30x28cm-Acryliconboard_thumb.jpg",130,143,18);thumbnails[2211532]=new thumbnail(2211532,"17673","'Head of Jon 2' . 70 x 49.6 cm. Mixed media on paper.","'Head of Jon 2' 2008_thumb. 70 x 49.6 cm. Mixed media on paper..jpg",130,182,18);thumbnails[1949386]=new thumbnail(1949386,"17673","'Head of Donanald' 83.5 x 59 cm. Ink and acrylic on paper. ","'Head of Donald' 83x59cm3_thumb.jpg",130,173,18);thumbnails[2211944]=new thumbnail(2211944,"17673","'Head of Jon 3'. 83 x 59cm. Mixed media on Paper.","'Head of Jon 3' 2008COMPRESSED_thumb.jpg",130,191,18);thumbnails[2211946]=new thumbnail(2211946,"17673","'Head of Donald 2'. 83x59cm. Ink and Acrylic on Paper.","HofDonald2-Compressed_thumb.jpg",130,182,18);thumbnails[2211948]=new thumbnail(2211948,"17673","'Head of Donald 3' . 83x59cm. Ink and Acrylic on Paper.","'Head of Donald 3' COMPRESSED_thumb.jpg",130,183,18);thumbnails[3416432]=new thumbnail(3416432,"208770","","Head of Mike 1-WEB-Jpeg_thumb.jpg",130,185,18);thumbnails[3416449]=new thumbnail(3416449,"208770","'Head of Mike 2' 2008. 89.5 x 70 cm approx. Ink and Acrylic on Paper.","Head of Mike 2-WEB_thumb.jpg",130,169,18);thumbnails[3147973]=new thumbnail(3147973,"208770","'Head of Mike 4' Ink and acrylic on Paper.","HeadofMike4-Lo-Res_thumb.jpg",130,182,18);thumbnails[3416452]=new thumbnail(3416452,"208770","'Head of Mike 3' 2008. 65.7 x 50 cm. Ink and Acrylic on Paper.","Head of Mike 3-WEB-Jpeg_thumb.jpg",130,172,18);thumbnails[3416460]=new thumbnail(3416460,"208770","'Head of George 1' 2008. 99.4 x 70 cm. Ink and Acrylic on Paper.","Head of George 1-WEB-jPeg_thumb.jpg",130,184,18);thumbnails[3416467]=new thumbnail(3416467,"208770","'Head of Donald 6' 2008. 99.2 x 70.5 cm. Ink and Acrylic on Paper.","Head of Donald 6-WEB-JPEG_thumb.jpg",130,183,18);thumbnails[3416470]=new thumbnail(3416470,"208770","'Head of George 2' 2008. 79 x 49.4 cm. Ink and Acrylic on Paper.","Head of George 2-WEB-JPeg_thumb.jpg",130,210,18);thumbnails[3416472]=new thumbnail(3416472,"208770","'Head of Mike 5' 2008. 74.7 x 57 cm. Ink and Acrylic on Paper.","Head of Mike 5-Collaborative 1-WEB-Jpeg_thumb.jpg",130,170,18);thumbnails[3416475]=new thumbnail(3416475,"208770","'Head of Mike 6' 2008. 74.5 x 56.5 cm. Ink and Acrylic on Paper.","Head of Mike 6- Collaborative2-WEB-Jpeg_thumb.jpg",130,173,18);thumbnails[281287]=new thumbnail(281287,"24952","'Jack Drawings 1'","NewPaintings-June06 2_thumb.jpg",130,58,18);thumbnails[281406]=new thumbnail(281406,"24952","'Drawings of Jack 2'","NewPaintings-June06 0032_thumb.jpg",130,57,18);thumbnails[281381]=new thumbnail(281381,"24952","'Georgia No.2' . Ink and Acylic on Paper","NewPaintings-June06 0071_thumb.jpg",130,127,18);thumbnails[281401]=new thumbnail(281401,"24952","'Georgia No.3'. Ink and Acrylic on Paper.","Edited_thumb.jpg",130,98,18);thumbnails[281397]=new thumbnail(281397,"24952","'Georgia No. 1' . Ink and Acrylic on Paper.","'Georgia No_thumb. 1'.JPG",130,176,18);thumbnails[281374]=new thumbnail(281374,"24952","'Tryptich of Jack'. ","NewPaintings-June06 0051_thumb.jpg",130,57,18);thumbnails[196233]=new thumbnail(196233,"24952","‘Diptych of Jessika’. Silkscreen Print.<br>\r\nEach image approx. 30 x 23.5 cm.<br>\r\n","14 -'Dyptych of Jessika' 2006_thumb. Silscreen Print. Each image approx. 30 x 23.5 cm1.jpg",130,83,18);thumbnails[196137]=new thumbnail(196137,"24952","'Rebecca Standing' . Silkscreen Print. <br>\r\n42 x 30 cm (approx).","beccaa_thumb.jpg",130,188,18);thumbnails[1205298]=new thumbnail(1205298,"24952","'Jon Facing Me' Screenprint 200 x 140 cm","Silkscreen print Jon 003_thumb.jpg",130,184,18);thumbnails[1544648]=new thumbnail(1544648,"24952","'Self Portrait 1'. Monoprint. 13 x 12.5 cm","Self Portrait 2007 - Monoprint_thumb.jpg",130,138,18);thumbnails[1775984]=new thumbnail(1775984,"24952","'Head of Will' Drypoint Etching 3/3","'Head of Will' 2001(cropped)Edited_thumb.jpg",130,132,18);thumbnails[198535]=new thumbnail(198535,"18094","","Re-photographed paintings 006_thumb.jpg",130,97,18);thumbnails[198536]=new thumbnail(198536,"18094","","Re-photographed paintings 008_thumb.jpg",130,97,18);thumbnails[198538]=new thumbnail(198538,"18094","","Re-photographed paintings 009_thumb.jpg",130,97,18);thumbnails[198539]=new thumbnail(198539,"18094","","Re-photographed paintings 013_thumb.jpg",130,174,18);thumbnails[198540]=new thumbnail(198540,"18094","","Re-photographed paintings 016_thumb.jpg",130,97,18);thumbnails[198542]=new thumbnail(198542,"18094","","Re-photographed paintings 0141_thumb.jpg",130,97,18);thumbnails[198547]=new thumbnail(198547,"18094","","marker_thumb.jpg",130,118,18);thumbnails[586845]=new thumbnail(586845,"86368","Royal West of England Academy - <br>\r\nAutumn Exhibition Nov 2006","rwa_thumb.jpg",130,170,18);thumbnails[934769]=new thumbnail(934769,"86368","'Black and White',Claire Galleries 5/5/07","ClaireGalleries_thumb.jpg",130,98,18);thumbnails[934806]=new thumbnail(934806,"18094","Two paintings of Jon 2007","Two Paintings of Jon_thumb.jpg",130,98,18);thumbnails[1700289]=new thumbnail(1700289,"86368","The Bryrne Gaunt Gallery, 2007","Byrne Gaunt2Edited_thumb.jpg",130,98,18);thumbnails[1700290]=new thumbnail(1700290,"86368","The Byrne Gaunt Gallery 2007","ByrneGaunt1Edited_thumb.jpg",130,98,18);thumbnails[1766882]=new thumbnail(1766882,"86368","The Signal Gallery. Hoxton, London. <br>\r\nOpening Night 10/11/08","signal gallery_thumb.jpg",130,108,18);var galleries=new Object();galleries[112703]=new gallery(112703,"1670430,1670424,1670409","Past Work","gallery",[1670409,1670424,1670430,1670463]);galleries[17673]=new gallery(17673,"934735,196306,196288"," Recent Paintings","gallery",[934735,196306,194250,196288,196251,196239,196194,196262,196083,1204931,196095,196099,196208,196115,196121,1205175,1562370,1625188,1641815,1878078,2211532,1949386,2211944,2211946,2211948]);galleries[208770]=new gallery(208770,"3147973","New Paintings","gallery",[3416432,3416449,3147973,3416452,3416460,3416467,3416470,3416472,3416475]);galleries[24952]=new gallery(24952,"1205298,196233","Drawings & Prints","gallery",[281287,281406,281381,281401,281397,281374,196233,196137,1205298,1544648,1775984]);galleries[86368]=new gallery(86368,"586845","Exhibition Photographs","gallery",[586845,934769,1700289,1700290,1766882]);galleries[18094]=new gallery(18094,"934806,198542,198540","Studio ","gallery",[198535,198536,198538,198539,198540,198542,198547,934806]);var imageSets=new Object();imageSets[1]="3416460,3416452,3416449,3416432,3147973";imageSets[2]="3147973,1670430,1670424,1670409,1205298,934806,934735,586845,198542,198540,196306,196288,196233";imageSets[3]="3416475,3416472,3416470,3416467,3416460,3416452,3416449,3416432,3147973,2211948,2211946,2211944,2211532,1949386,1878078,1775984,1766882,1700290,1700289,1670463,1670430,1670424,1670409,1641815,1625188,1562370,1544648,1205298,1205175,1204931,934806,934769,934735,586845,281406,281401,281397,281381,281374,281287,198547,198542,198540,198539,198538,198536,198535,196306,196288,196262";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/hspaintings/images";break}switch(a){case 1:b="http://www1.clikpic.com/hspaintings/images";break}switch(a){case 2:b="http://admin.clikpic.com/hspaintings/images";break}switch(a){case 4:b="http://www.clikchurch.com/hspaintings/images";break}switch(a){case 5:b="http://www2.clikpic.com/hspaintings/images";break}switch(a){case 15:b="http://www3.clikpic.com/hspaintings/images";break}switch(a){case 21:b="http://www6.clikpic.com/hspaintings/images";break}switch(a){case 18:b="http://www4.clikpic.com/hspaintings/images";break}switch(a){case 19:b="http://www5.clikpic.com/hspaintings/images";break}switch(a){case 22:b="http://tpc5/clikpic/hspaintings/images";break}switch(a){case 23:b="http://tpc10/clikpic/hspaintings/images";break}switch(a){case 24:b="http://tpc15/clikpic/hspaintings/images";break}switch(a){case 25:b="http://tpc16/clikpic/hspaintings/images";break}switch(a){case 31:b="http://www7.clikpic.com/hspaintings/images";break}switch(a){case 32:b="http://admin2.clikpic.com/hspaintings/images";break}switch(a){case 33:b="http://www8.clikpic.com/hspaintings/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="HARRY SIMMONDS Paintings: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+c.item_price+"</p>";var e=c.purchase_instruction;var d=c.item_price;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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="harry_simmonds1@hotmail.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="harry_simmonds1@hotmail.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};