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[1119805]=new thumbnail(1119805,"","Alone on the loch.","web451.jpg",130,130,18);thumbnails[1862039]=new thumbnail(1862039,"125321","Hand in sculpture","glove on sculpture in progress flattened no 2_thumb.jpg",130,130,18);thumbnails[1862056]=new thumbnail(1862056,"125321","2 figures","napa and gwen_thumb.jpg",130,130,18);thumbnails[1863158]=new thumbnail(1863158,"125321","The whirl pool","The Whirlpool_thumb.jpg",130,130,18);thumbnails[1863205]=new thumbnail(1863205,"125321","Planet wood","treeplanet_thumb.jpg",130,130,18);thumbnails[3543884]=new thumbnail(3543884,"","","Janesmall_thumb.jpg",60,60,18);thumbnails[5836475]=new thumbnail(5836475,"125321","The stairs","IMG_2641b_for_qimage_version_2_thumb.jpg",130,130,18);thumbnails[1119114]=new thumbnail(1119114,"81834","Reach to the light","web391.jpg",130,130,18);thumbnails[1119841]=new thumbnail(1119841,"81834","The Crofter's view","web411.jpg",130,130,18);thumbnails[1119882]=new thumbnail(1119882,"81834","Gearranan pebbles","web441.jpg",130,130,18);thumbnails[1123099]=new thumbnail(1123099,"81834","In the shadow of the mountain","web401.jpg",130,130,18);thumbnails[4046124]=new thumbnail(4046124,"81834","The dying sun","Copy_of_The_dying_sun_thumb.jpg",130,130,18);thumbnails[4046127]=new thumbnail(4046127,"81834","Two stones","IMG_0647_thumb.jpg",130,130,18);thumbnails[4046135]=new thumbnail(4046135,"81834","Wild Garlic study","IMG_0827_thumb.jpg",130,130,18);thumbnails[4046137]=new thumbnail(4046137,"81834","The herd","Laig_Bay_thumb.jpg",130,130,18);thumbnails[4046143]=new thumbnail(4046143,"81834","The last light","The_last_light_thumb.jpg",130,130,18);thumbnails[4046149]=new thumbnail(4046149,"81834","The rift","The_rift_thumb.jpg",130,130,18);thumbnails[1116885]=new thumbnail(1116885,"81834","Last sun on marram grass.","web110.jpg",130,130,18);thumbnails[1119971]=new thumbnail(1119971,"81834","Landscape in a window","web432.jpg",130,130,18);thumbnails[1117236]=new thumbnail(1117236,"81834","Tolstadh morning view.","Dweb21.jpg",130,130,18);thumbnails[1117238]=new thumbnail(1117238,"81834","The crofter's cottage.","web38.jpg",130,130,18);thumbnails[1117241]=new thumbnail(1117241,"81834","Green on Black.","Dweb6.jpg",130,130,18);thumbnails[1119815]=new thumbnail(1119815,"81834","Saltmarsh","web421.jpg",130,130,18);thumbnails[1117250]=new thumbnail(1117250,"81834","Callanish Stones","web101.jpg",130,130,18);thumbnails[1117240]=new thumbnail(1117240,"81834","Rainbow Stones.","Dweb5.jpg",130,130,18);thumbnails[1117243]=new thumbnail(1117243,"81834","Luminous Light.","web71.jpg",130,130,18);thumbnails[1117239]=new thumbnail(1117239,"81834","Stones in the marsh.","web46.jpg",130,130,18);thumbnails[1117244]=new thumbnail(1117244,"81834","Before the storm.","web81.jpg",130,130,18);thumbnails[1117352]=new thumbnail(1117352,"81834","Dalbeg Coast in twilight.","web141.jpg",130,130,18);thumbnails[1117247]=new thumbnail(1117247,"81834","Seilabost Twilight.","web91.jpg",130,130,18);thumbnails[1119018]=new thumbnail(1119018,"125322","The jurassic coast","web321.jpg",130,130,18);thumbnails[1574536]=new thumbnail(1574536,"125322","Dunstanburgh castle","dunstcastle thumb.jpg",130,130,18);thumbnails[2254745]=new thumbnail(2254745,"125322","LLanddwyn Island, Anglesey","2G1I2998_thumb.jpg",130,130,18);thumbnails[3049387]=new thumbnail(3049387,"125322","Rocks","rocks for clik pic_thumb.JPG",130,130,18);thumbnails[3059689]=new thumbnail(3059689,"125322","Logon rock at twilight","logon rocktwilight_thumb.jpg",130,130,18);thumbnails[3059698]=new thumbnail(3059698,"125322","Horse Cliff bay","Horse cliff Bay_thumb.jpg",130,130,18);thumbnails[3063339]=new thumbnail(3063339,"125322","Porth Nanven","Porth Nanven_thumb.jpg",130,130,18);thumbnails[5063919]=new thumbnail(5063919,"125322","","Godrevy_lighthouse_website_thumb.jpg",130,130,18);thumbnails[5063920]=new thumbnail(5063920,"125322","","coombe_martin_website_thumb.jpg",130,130,18);thumbnails[5836485]=new thumbnail(5836485,"125322","First light","2G1I5178_no_2_thumb.jpg",130,130,18);thumbnails[5836488]=new thumbnail(5836488,"125322","The Golden hour<br>\r\n","2G1I5974_CA_light_house_moved_thumb.jpg",130,130,18);thumbnails[5836500]=new thumbnail(5836500,"125322","","Porth_naven_sunset_cloned_no_2_thumb.jpg",130,130,18);thumbnails[1119796]=new thumbnail(1119796,"81900","Trees in the mist","web211.jpg",130,130,18);thumbnails[1119801]=new thumbnail(1119801,"81900","Haley wood","web20_thumb.jpg",130,126,18);thumbnails[1119803]=new thumbnail(1119803,"81900","Lesser Stitchwort","Lesser stitchwort_thumb.jpg",130,130,18);thumbnails[1161742]=new thumbnail(1161742,"81900","Summer Flower","flower11.jpg",130,130,18);thumbnails[1863151]=new thumbnail(1863151,"81900","Daffodil","daffodil_thumb.jpg",130,130,18);thumbnails[1863160]=new thumbnail(1863160,"81900","Bug on the flower<br>\r\n","Bug on the flower PI_thumb.jpg",130,130,18);thumbnails[4188578]=new thumbnail(4188578,"81900","The Dance","The_dance_website_thumb.jpg",130,130,18);thumbnails[4693357]=new thumbnail(4693357,"81900","Fungi & Driftwood","IMG_2603dfor_web_thumb.jpg",130,130,18);thumbnails[1119915]=new thumbnail(1119915,"81903","Moving rock","web301.jpg",130,130,18);thumbnails[1119970]=new thumbnail(1119970,"81903","Racetrack valley","web501.jpg",130,130,18);thumbnails[1862034]=new thumbnail(1862034,"81903","Dune","Dune_thumb.jpg",130,130,18);thumbnails[1862040]=new thumbnail(1862040,"81903","The pinnacles","pinnacles_thumb.jpg",130,130,18);thumbnails[1862042]=new thumbnail(1862042,"81903","Drive into death valley","death drive_thumb.jpg",130,130,18);thumbnails[1862061]=new thumbnail(1862061,"81903","Keys view","JT4_thumb.jpg",130,130,18);thumbnails[1863147]=new thumbnail(1863147,"81903","Death valley dune study","Goodall no  5_thumb.jpg",130,130,18);thumbnails[1119013]=new thumbnail(1119013,"125368","Abndoned mine","web252.jpg",130,130,18);thumbnails[1123210]=new thumbnail(1123210,"125368","Lanyon quoit","web262.jpg",130,130,18);thumbnails[1574533]=new thumbnail(1574533,"125368","Hadrian's wall sunset","Hadrians wall thumb.jpg",130,130,18);thumbnails[1574555]=new thumbnail(1574555,"125368","Sycamore gap","sycamore thumb.jpg",130,130,18);thumbnails[1574559]=new thumbnail(1574559,"125368","Steel rig view","tree and hardrian  thumb.jpg",130,130,18);thumbnails[3726731]=new thumbnail(3726731,"125368","Limestone Pavement","2G1I8798website_thumb.jpg",130,130,18);thumbnails[3726884]=new thumbnail(3726884,"125368","Pecca Falls","2G1I8933webjpg_thumb.jpg",130,130,18);thumbnails[5836333]=new thumbnail(5836333,"125368","","LIMESTONE_PAVMENTS_THUMB.jpg",130,130,18);thumbnails[1119892]=new thumbnail(1119892,"81904","The secret","web241.jpg",130,130,18);thumbnails[1119894]=new thumbnail(1119894,"81904","Feet in the sand","web231.jpg",130,130,18);thumbnails[1119899]=new thumbnail(1119899,"81904","The scream","web221.jpg",130,130,18);thumbnails[1120148]=new thumbnail(1120148,"81904","On the rocks","web161.jpg",130,130,18);thumbnails[1120170]=new thumbnail(1120170,"81904","The rockpool","web332.jpg",130,130,18);thumbnails[1177232]=new thumbnail(1177232,"81904","Grumpy old men","Grumpyoldmen2.jpg",130,130,18);thumbnails[1927881]=new thumbnail(1927881,"81904","Sunny day on the beach","harry puddles_thumb.jpg",130,130,18);thumbnails[2087565]=new thumbnail(2087565,"81904","Harry in the wood.","harryyeo_thumb.jpg",130,130,18);thumbnails[2255021]=new thumbnail(2255021,"81904","In the laundry room","2G1I2449a_thumb.jpg",130,130,18);thumbnails[2255205]=new thumbnail(2255205,"81904","On the beach","web49_thumb.jpg",130,130,18);thumbnails[3063337]=new thumbnail(3063337,"81904","Is it still raining?","is it still raining_thumb.jpg",130,130,18);thumbnails[3216571]=new thumbnail(3216571,"81904","In the laundry room","in the laundry room_thumb.jpg",130,130,18);thumbnails[4607387]=new thumbnail(4607387,"81904","The wedding guests","for_website_thumb.jpg",130,130,18);thumbnails[4607898]=new thumbnail(4607898,"81904","A little rest","2G1I8904for_web_thumb.jpg",130,130,18);thumbnails[4607908]=new thumbnail(4607908,"81904","","2G1I9256_for_website_thumb.jpg",130,130,18);thumbnails[4693314]=new thumbnail(4693314,"81904","Great Grandma's house","2G1I0296for_web_thumb.jpg",120,120,18);thumbnails[4693316]=new thumbnail(4693316,"81904","The future of Man's children","The_futureof_mans_children_for_web_thumb.jpg",130,130,18);thumbnails[4693320]=new thumbnail(4693320,"81904","Ellis","Copy_of_2G1I0217for_webl_thumb.jpg",130,130,18);thumbnails[4879198]=new thumbnail(4879198,"81904","Ellis","Ellis_for_website_thumb.jpg",130,130,18);thumbnails[4879221]=new thumbnail(4879221,"81904","After the sleep-over.","After_the_sleep_website_thumb.jpg",130,130,18);thumbnails[5836349]=new thumbnail(5836349,"81904","The door","hARRY_AND_DOORr_thumb.jpg",130,130,18);thumbnails[1176455]=new thumbnail(1176455,"84810","Clare college Gates","CLARE GATES2.jpg",130,130,18);thumbnails[1177191]=new thumbnail(1177191,"84810","Wood, iron and frost","wood iron frost1.jpg",130,130,18);thumbnails[1177194]=new thumbnail(1177194,"84810","Frosty morning","frosty morning1.jpg",130,130,18);thumbnails[1196532]=new thumbnail(1196532,"84810","Fen cottage","house_thumb.jpg",130,130,18);thumbnails[3774030]=new thumbnail(3774030,"230214","Iceland","2G1I6013_thumb.jpg",130,130,18);thumbnails[3774044]=new thumbnail(3774044,"230214","Iceland","2G1I6442_thumb.jpg",130,130,18);thumbnails[3774048]=new thumbnail(3774048,"230214","Herring factory","2G1I7357_copy_thumb.jpg",130,130,18);thumbnails[3774051]=new thumbnail(3774051,"230214","","2G1I7504_thumb.jpg",130,130,18);thumbnails[3774053]=new thumbnail(3774053,"230214","","2G1I8014_thumb.jpg",130,130,18);thumbnails[3774055]=new thumbnail(3774055,"230214","","2G1I8057_thumb.jpg",130,130,18);thumbnails[3774057]=new thumbnail(3774057,"230214","","2G1I9769_thumb.jpg",130,130,18);thumbnails[3774062]=new thumbnail(3774062,"230214","","2G1I9877_thumb.jpg",130,130,18);thumbnails[3774066]=new thumbnail(3774066,"230214","","11_thumb.jpg",130,130,18);thumbnails[3774069]=new thumbnail(3774069,"230214","","12_thumb.jpg",130,130,18);thumbnails[3774073]=new thumbnail(3774073,"230214","","Iceland_reflection_thumb.jpg",130,130,18);thumbnails[3774080]=new thumbnail(3774080,"230214","","IN_the_pool_thumb.jpg",130,130,18);var galleries=new Object();galleries[82088]=new gallery(82088,"5836500,5836488,5836485,5836333,5063920,5063919,4046149,4046143,4046137,4046135","Landscapes","gallery",[]);galleries[125321]=new gallery(125321,"5836475,1863205,1863158,1862056,1862039","Pictorial","gallery",[1862039,1862056,1863158,1863205,5836475]);galleries[81834]=new gallery(81834,"4046149,4046143,4046137,4046135,4046127,4046124,1123099,1119971,1119882,1119841","Scottish landscapes","gallery",[1119114,1119841,1119882,1123099,4046124,4046127,4046135,4046137,4046143,4046149,1116885,1119971,1117236,1117238,1117241,1119815,1117250,1117240,1117243,1117239,1117244,1117352,1117247]);galleries[125322]=new gallery(125322,"5836500,5836488,5836485,5063920,5063919,3063339,3059698,3059689,3049387,2254745","British island coastal images","gallery",[1119018,1574536,2254745,3049387,3059689,3059698,3063339,5063919,5063920,5836485,5836488,5836500]);galleries[81900]=new gallery(81900,"4693357,4188578,1863160,1863151,1161742,1119803,1119801,1119796","Fauna and Flora","gallery",[1119796,1119801,1119803,1161742,1863151,1863160,4188578,4693357]);galleries[81903]=new gallery(81903,"1863147,1862061,1862042,1862040,1862034,1119970,1119915","Deserts of U.S.A","gallery",[1119915,1119970,1862034,1862040,1862042,1862061,1863147]);galleries[125368]=new gallery(125368,"5836333,3726884,3726731,1574559,1574555,1574533,1123210,1119013","English landscapes","gallery",[1119013,1123210,1574533,1574555,1574559,3726731,3726884,5836333]);galleries[81904]=new gallery(81904,"5836349,4879221,4879198,4693320,4693316,4693314,4607908,4607898,4607387,3216571","Children","gallery",[1119892,1119894,1119899,1120148,1120170,1177232,1927881,2087565,2255021,2255205,3063337,3216571,4607387,4607898,4607908,4693314,4693316,4693320,4879198,4879221,5836349]);galleries[84810]=new gallery(84810,"1196532,1177194,1177191,1176455","Cambridge, town and country","gallery",[1176455,1177191,1177194,1196532]);galleries[230214]=new gallery(230214,"3774080,3774073,3774069,3774066,3774062,3774057,3774055,3774053,3774051,3774048","Iceland","gallery",[3774030,3774044,3774048,3774051,3774053,3774055,3774057,3774062,3774066,3774069,3774073,3774080]);var imageSets=new Object();imageSets[1]="1116885";imageSets[3]="5836500,5836488,5836485,5836475,5836349,5836333,5063920,5063919,4879221,4879198,4693357,4693320,4693316,4693314,4607908,4607898,4607387,4188578,4046149,4046143,4046137,4046135,4046127,4046124,3774080,3774073,3774069,3774066,3774062,3774057,3774055,3774053,3774051,3774048,3774044,3774030,3726884,3726731,3543884,3216571,3063339,3063337,3059698,3059689,3049387,2255205,2255021,2254745,2087565,1927881";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/jcg23/images";break}switch(a){case 1:b="http://www1.clikpic.com/jcg23/images";break}switch(a){case 2:b="http://admin.clikpic.com/jcg23/images";break}switch(a){case 24:b="http://tpc15/clikpic/jcg23/images";break}switch(a){case 4:b="http://www.clikchurch.com/jcg23/images";break}switch(a){case 5:b="http://www2.clikpic.com/jcg23/images";break}switch(a){case 22:b="http://tpc5/clikpic/jcg23/images";break}switch(a){case 23:b="http://tpc10/clikpic/jcg23/images";break}switch(a){case 25:b="http://tpc16/clikpic/jcg23/images";break}switch(a){case 15:b="http://www3.clikpic.com/jcg23/images";break}switch(a){case 18:b="http://www4.clikpic.com/jcg23/images";break}switch(a){case 19:b="http://www5.clikpic.com/jcg23/images";break}switch(a){case 31:b="http://www7.clikpic.com/jcg23/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jcg23/images";break}switch(a){case 33:b="http://www8.clikpic.com/jcg23/images";break}switch(a){case 34:b="http://www9.clikpic.com/jcg23/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jcg23/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jcg23/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="The Beautiful Light: "+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> 				&pound;"+(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+'")'})}}};