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[4864660]=new thumbnail(4864660,"277529","Oryzopsis miliacea","8653-Oryzopsis-milliacea2_thumb.jpg",130,195,18);thumbnails[4335743]=new thumbnail(4335743,"254158","Flowers of Festuca 'Elijah Blue'","8708Festuca_thumb.jpg",130,195,18);thumbnails[4864740]=new thumbnail(4864740,"277529","Muhlenbergia dumosa","7013-Muhlenbergia-dumosa_thumb.jpg",130,195,18);thumbnails[4335795]=new thumbnail(4335795,"254158","Pennisetum villosum","375_Pennisetumvillosum-01_thumb.jpg",130,87,18);thumbnails[4864651]=new thumbnail(4864651,"277529"," Pennisetum marourum","8785-Pennisetum-macrourum--_thumb.jpg",130,195,18);thumbnails[6167304]=new thumbnail(6167304,"254158","Panicum 'Warrior'","0150Panicum_Warrio_thumb.jpg",130,87,18);thumbnails[4335812]=new thumbnail(4335812,"254158","Emerging flower of Pennisetum x advena 'Rubrum'","0209EmergingRubrum_thumb.jpg",130,87,18);thumbnails[4864734]=new thumbnail(4864734,"277529","Bouteloua gracilis","8814-Bouteloua-gracilis1_thumb.jpg",130,195,18);thumbnails[4335810]=new thumbnail(4335810,"254158","Miscanthus nepalensis","4604Miscanthusnepalensis_thumb.jpg",130,195,18);thumbnails[4864586]=new thumbnail(4864586,"277529","","7888-Hyperrhenia-hirta-vill_thumb.jpg",130,87,18);thumbnails[4447472]=new thumbnail(4447472,"254158","Stipa tenuissima","_MG_8774-Stipa-tenuissima_thumb.jpg",130,87,18);thumbnails[4447485]=new thumbnail(4447485,"254158","Panicum 'North Wind'","_MG_4089-panicum-North-Wind_thumb.jpg",130,195,18);thumbnails[4864848]=new thumbnail(4864848,"277529","Stipa gigantea","_MG_7983-Stipa-gigantea-011_thumb.jpg",130,195,18);thumbnails[4447574]=new thumbnail(4447574,"254158","Pennisetum 'Fairy Tails'","3702_PennisetumFairyTails_thumb.jpg",130,195,18);thumbnails[4447610]=new thumbnail(4447610,"254158","Carex spissa","2452Carexspissa_thumb.jpg",130,195,18);thumbnails[6319697]=new thumbnail(6319697,"254164","Allium christophii","_MG_8817-Allium-christophii_2_thumb.jpg",130,195,18);thumbnails[4338215]=new thumbnail(4338215,"254164","Echinacea 'Leuchtstern'","_MG_2165-Echinacea-Leuchtst_thumb.jpg",130,87,18);thumbnails[4337305]=new thumbnail(4337305,"254164","Echinacea with Pennisetum 'Hameln'","_MG_4299-Echinacea-seedhea-_thumb.jpg",130,178,18);thumbnails[4326716]=new thumbnail(4326716,"254164","Seed pods of Papaver somniferum","1834SeedpodsofPapaversomniferum-01_thumb.jpg",130,87,18);thumbnails[4330131]=new thumbnail(4330131,"254164","Seedheads of Pulsatilla vulgaris","7818_Seedheadsof_pusatillavulgari_thumb.jpg",130,87,18);thumbnails[4337461]=new thumbnail(4337461,"254164","Seedhead of Pulsatilla vulgaris","0405Pulsatilla2_thumb.jpg",130,195,18);thumbnails[4337458]=new thumbnail(4337458,"254164","Parahebe perfoliata with frost","2093Parahebewithfrost1_thumb.jpg",130,195,18);thumbnails[4338262]=new thumbnail(4338262,"254164","Anthriscus sylvestris 'Ravenswing' with Aquilegia 'Ruby Port'","_MG_8041Anthriscus-sylvestr_thumb.jpg",130,195,18);thumbnails[4338288]=new thumbnail(4338288,"254164","Backlit Salvia 'Rose Queen'","_MG_8407-Backlit-Salvia-Ros_thumb.jpg",130,195,18);thumbnails[4336846]=new thumbnail(4336846,"254165","' By the Way', Woodfalls, Hampshire featuring the only National Collection of Clematis montana in the UK","7626By-the-Way_thumb.jpg",130,195,18);thumbnails[4336854]=new thumbnail(4336854,"254165"," The Decennium Garden in September, Knoll Gardens, Dorset","_MG_3595Decennium-view_thumb.jpg",130,87,18);thumbnails[4337093]=new thumbnail(4337093,"254165","Knitson Old Farmhouse Garden, Swanage, Dorset","_MG_8577-Rosa-at-Knitson3_thumb.jpg",130,195,18);thumbnails[4338036]=new thumbnail(4338036,"254165","Papaver rhoeas in the Corn Meadow,  RHS Gardens, Wisley","_MG_8980-Papaver-rhoeas-in-_thumb.jpg",130,195,18);thumbnails[6167317]=new thumbnail(6167317,"254165","Snowdrops at East Lambrook Manor, Somerset","_MG_5797_Snowdrops_at_East_Lambrook_Manor_Garden_thumb.jpg",130,87,18);thumbnails[4320236]=new thumbnail(4320236,"254165","Persicaria bistorta with Festuca paniculata, Knoll Gardens, Dorset","_PersicariabistortawithFestucapaniculata_thumb.jpg",130,87,18);thumbnails[4864867]=new thumbnail(4864867,"277533","","Allium-sphaerocephalon-and-_thumb.jpg",130,202,18);thumbnails[4336835]=new thumbnail(4336835,"254165","'By the Way', Woodfalls, Hampshire featuring the only National Collection of Clematis montana in the UK","7436b_theWayview12_thumb.jpg",130,195,18);thumbnails[4864893]=new thumbnail(4864893,"277533","","AutumnKG_thumb.jpg",130,88,18);thumbnails[4885630]=new thumbnail(4885630,"254165","Euonymus hamiltonianus ssp. sieboldianus at Knoll Gardens in October","_MG_2010-Euonymus-hamiltoni_thumb.jpg",130,87,18);thumbnails[4312629]=new thumbnail(4312629,"254165","Winter view of Gravel Garden, Knoll Gardens, Dorset","WinterGravelGarden_thumb.jpg",130,97,18);thumbnails[4338093]=new thumbnail(4338093,"254165"," View of the North American Meadow, RHS Gardens, Wisley","_MG_8941-North-American-Mea_thumb.jpg",130,87,18);thumbnails[6167056]=new thumbnail(6167056,"254162","Corky Fruited Water Dropwort","1692CorkyfruitedWater_Dropwort_thumb.jpg",130,87,18);thumbnails[4337343]=new thumbnail(4337343,"254162","Wild Carrot- Daucus carota","2044_WildCarrot12_thumb.jpg",130,195,18);thumbnails[4329832]=new thumbnail(4329832,"254162","Red Clover - Trifolium pratense","0357RedClover1_thumb.jpg",130,87,18);thumbnails[4326810]=new thumbnail(4326810,"254162","Bee Orchid- Ophrys apifera","BeeOrchid1_thumb.jpg",130,195,18);thumbnails[4313241]=new thumbnail(4313241,"254162","Cow Parsley and Spring Blossom","7344StonyLaneAnthriscus_thumb.jpg",130,87,18);thumbnails[4341905]=new thumbnail(4341905,"254162","Self heal- Prunella vulgaris","_MG_8954-Prunella-01_thumb.jpg",130,195,18);thumbnails[4355666]=new thumbnail(4355666,"254162","Early Purple Orchid - Orchis mascula","_MG_0332-Early-Purple-Orchi_thumb.jpg",130,195,18);thumbnails[4355649]=new thumbnail(4355649,"254162","Goatsbeard clock-Tragopogon pratensi","_MG_8447-Goatsbeard-Clock_thumb.jpg",130,195,18);thumbnails[4337284]=new thumbnail(4337284,"254162","Autumn Ladies Tresses- Spiranthes spiralis","_MG_008AutumnLadiesTresses_thumb.jpg",130,195,18);thumbnails[4370943]=new thumbnail(4370943,"255200","Silhouette Of Pyramidal Orchid","_MG_1536___Pyramidal_Orchid_3120_thumb.jpg",130,195,18);thumbnails[4370982]=new thumbnail(4370982,"255200","Silhouette of Rough Hawkbit","_MG_1544_Rough_Hawkbit___31201_thumb.jpg",130,195,18);thumbnails[4370986]=new thumbnail(4370986,"255200","Silhouette of Ox- Eye Daisies","_MG_1582_Ox_-Eye_Daisies__3120_thumb.jpg",130,200,18);thumbnails[4371028]=new thumbnail(4371028,"255200","Silhouette of Ribwort Plantain","_MG_1610-Ribwort-Plantain_thumb.jpg",130,195,18);thumbnails[4371029]=new thumbnail(4371029,"255200","Silhouette of Wild Grasses","_MG_1524--Wild-Grasses_thumb.jpg",130,195,18);thumbnails[4371032]=new thumbnail(4371032,"255200","Silhouette of Salad Burnet","_MG_1570-Salad-Burnet_thumb.jpg",130,195,18);thumbnails[4370994]=new thumbnail(4370994,"255200","Silhouette of Wild Parsnip","_MG_1966-Wild-Parsnip_thumb.jpg",130,83,18);thumbnails[5356251]=new thumbnail(5356251,"254169","After the Storm, Sandbanks Beach, Poole","_MG_2660-After-the-Storm-Sa_thumb.jpg",130,195,18);thumbnails[4355787]=new thumbnail(4355787,"254169","Sandbanks Beach, Poole, Dorset","_MG_4978-Sandbanks-view-01_thumb.jpg",130,195,18);thumbnails[4372198]=new thumbnail(4372198,"254169","Evening Hill at Sunrise, Poole Harbour, Dorset","Evening-Hill_thumb.jpg",130,85,18);thumbnails[4615195]=new thumbnail(4615195,"254169","After the Storm,<br>\r\nSandbanks Beach, Poole, Dorset","_MG_6482-After-the-Storm-S_thumb.jpg",130,195,18);thumbnails[6167212]=new thumbnail(6167212,"254169","Sandbanks Beach, Dorset","6451Sandbanks_4189EBED-1D09-001F-99D4529CE0638137_thumb.jpg",130,87,18);thumbnails[6319709]=new thumbnail(6319709,"254169","","_MG_8747-Chesil-Beach-Dorse_2_thumb.jpg",130,195,18);thumbnails[4337300]=new thumbnail(4337300,"254169","Marram Grass at Sunset, Poole, Dorset","1236-MarramPoole_thumb.jpg",130,195,18);thumbnails[6319707]=new thumbnail(6319707,"254169","Eype Beach, Dorset","_MG_6715-Eype-Beach-Dorset_2_thumb.jpg",130,195,18);thumbnails[4372099]=new thumbnail(4372099,"254169","Aldeburgh, Suffolk","_MG_1767-Aldeburgh-01_thumb.jpg",130,195,18);thumbnails[6319577]=new thumbnail(6319577,"350509","","_MG_4508_Sandbanks_abstract_thumb.jpg",130,195,18);thumbnails[6319574]=new thumbnail(6319574,"350509","","_MG_4469_Sandbanks_abstract_thumb.jpg",130,195,18);thumbnails[6319569]=new thumbnail(6319569,"350509","","_MG_4466_Sandbanks_abstract_thumb.jpg",130,195,18);thumbnails[4556440]=new thumbnail(4556440,"264287","Country Living December 2007 - Knoll Gardens in the Winter","CL-KG_DEC07_thumb.jpg",130,93,18);thumbnails[4556455]=new thumbnail(4556455,"264287"," Gardens Illustrated October 2008<br>\r\nCover Shot","GI-cover_OCT__thumb.jpg",130,184,18);thumbnails[4615281]=new thumbnail(4615281,"264287","Country Living March 2009","acers_CL1_thumb.jpg",130,85,18);thumbnails[4556477]=new thumbnail(4556477,"264287","Country Living May 2009<br>\r\nFlowers of Grasses","CL-grasses_MAY09_thumb.jpg",130,94,18);thumbnails[4556529]=new thumbnail(4556529,"264287","Outdoor Photography May 2009<br>\r\nPortfolio","OP-KG_thumb.jpg",130,90,18);thumbnails[4556502]=new thumbnail(4556502,"264287","The English Garden August 2009<br>\r\nPlant Focus: Stipa","TEG-AUG09_thumb.jpg",130,184,18);thumbnails[4613443]=new thumbnail(4613443,"264287","Gardeners' World<br>\r\nSeptember 2009<br>\r\nGrasses ","grasses0909id1NF-1-1_thumb.jpg",130,86,18);thumbnails[6167029]=new thumbnail(6167029,"264287","Country Living January 2010","Bud_Burst-1_copy_thumb.jpg",130,88,18);thumbnails[6166949]=new thumbnail(6166949,"264287","The English Garden June 2010","Cornus_thumb.jpg",130,181,18);thumbnails[4889407]=new thumbnail(4889407,"278809","'Teasels'<br>\r\nStudland Beach, Dorset","Teasels1_thumb.jpg",130,89,18);var galleries=new Object();galleries[254158]=new gallery(254158,"6167304,4447610,4447574,4447485,4447472,4335812,4335810,4335795,4335743","Grasses","gallery",[4335743,4335795,6167304,4335812,4335810,4447472,4447485,4447574,4447610]);galleries[277529]=new gallery(277529,"4864848,4864740,4864734,4864660,4864651,4864586","International Garden Photographer of the Year 2008","gallery",[4864660,4864740,4864651,4864734,4864586,4864848]);galleries[254164]=new gallery(254164,"4337305","Plant Portraits","gallery",[6319697,4338215,4337305,4326716,4330131,4337461,4337458,4338262,4338288]);galleries[254165]=new gallery(254165,"4312629","Garden Views","gallery",[4336846,4336854,4337093,4338036,6167317,4320236,4336835,4885630,4312629,4338093]);galleries[277533]=new gallery(277533,"4864893,4864867","RHS Garden Photographer of the Year Competitions","gallery",[4864867,4864893]);galleries[254162]=new gallery(254162,"6167056,4355666,4355649,4341905,4337343,4337284,4329832,4326810,4313241","Wildflowers","gallery",[6167056,4337343,4329832,4326810,4313241,4341905,4355666,4355649,4337284]);galleries[255200]=new gallery(255200,"4370943","Monochrome","gallery",[4370943,4370982,4370986,4371028,4371029,4371032,4370994]);galleries[254169]=new gallery(254169,"6319709,6319707,6167212,5356251,4615195,4372198,4372099,4355787,4337300","Coastal","gallery",[5356251,4355787,4372198,4615195,6167212,6319709,4337300,6319707,4372099]);galleries[350509]=new gallery(350509,"6319577","Coastal Abstracts","gallery",[6319577,6319574,6319569]);galleries[264287]=new gallery(264287,"4556455","Publications","gallery",[4556440,4556455,4615281,4556477,4556529,4556502,4613443,6167029,6166949]);galleries[278809]=new gallery(278809,"4889407","Imagine Yesterday...Today","gallery",[4889407]);galleries[277526]=new gallery(277526,"4889407","Awards","gallery",[]);var imageSets=new Object();imageSets[1]="6167304,6167212,6167056,4885630,4372198,4370994,4338093,4330131,4326716,4312629";imageSets[2]="6319577,4889407,4556455,4370943,4337305,4312629";imageSets[3]="6167317,6167304,6167212,6167056,6167029,6166949,5356251,4889407,4885630,4864893,4864867,4864848,4864740,4864734,4864660,4864651,4864586,4615281,4615195,4613443,4556529,4556502,4556477,4556455,4556440,4447610,4447574,4447485,4447472,4372198,4372099,4371032,4371029,4371028,4370994,4370986,4370982,4370943,4355787,4355666,4355649,4341905,4338288,4338262,4338215,4338093,4338036,4337461,4337458,4337343,4337305,4337300,4337284,4337093,4336854,4336846,4336835,4335812,4335810,4335795,4335743,4330131,4329832,4326810,4326716,4320236,4313241";imageSets[231519]="6167304,6167056,4312629";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 21:b="http://www6.clikpic.com/dianna/images";break}switch(a){case 1:b="http://www1.clikpic.com/dianna/images";break}switch(a){case 2:b="http://admin.clikpic.com/dianna/images";break}switch(a){case 24:b="http://tpc15/clikpic/dianna/images";break}switch(a){case 4:b="http://www.clikchurch.com/dianna/images";break}switch(a){case 5:b="http://www2.clikpic.com/dianna/images";break}switch(a){case 22:b="http://tpc5/clikpic/dianna/images";break}switch(a){case 23:b="http://tpc10/clikpic/dianna/images";break}switch(a){case 25:b="http://tpc16/clikpic/dianna/images";break}switch(a){case 15:b="http://www3.clikpic.com/dianna/images";break}switch(a){case 18:b="http://www4.clikpic.com/dianna/images";break}switch(a){case 19:b="http://www5.clikpic.com/dianna/images";break}switch(a){case 31:b="http://www7.clikpic.com/dianna/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dianna/images";break}switch(a){case 33:b="http://www8.clikpic.com/dianna/images";break}switch(a){case 34:b="http://www9.clikpic.com/dianna/images";break}switch(a){case 35:b="http://admin3.clikpic.com/dianna/images";break}switch(a){case 37:b="http://admin4.clikpic.com/dianna/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="'+escape(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="Dianna Jazwinski@Fizzphotos: "+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+'")'})}}};