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[537951]=new thumbnail(537951,"125922","Hiada Man","Haidaman_thumb.jpg",130,132,18);thumbnails[537953]=new thumbnail(537953,"125922","Second Haida Man","haidaman2_thumb.jpg",130,131,18);thumbnails[537958]=new thumbnail(537958,"125922","Fire Truck","firetruck_thumb.jpg",130,131,18);thumbnails[543032]=new thumbnail(543032,"125922","Port Clem Sunset","portclemset_thumb.jpg",130,131,18);thumbnails[543033]=new thumbnail(543033,"125922","Queen Charlotte City Sunset","sunset_thumb.jpg",130,131,18);thumbnails[1002133]=new thumbnail(1002133,"125922","Lazy Trees","treeset_thumb.jpg",130,194,18);thumbnails[1872957]=new thumbnail(1872957,"125922","Stones","stones_thumb.jpg",130,131,18);thumbnails[1872959]=new thumbnail(1872959,"125922","Simon and Garf","simonandgarfunkle_thumb.jpg",130,131,18);thumbnails[6395595]=new thumbnail(6395595,"353478","","0011_thumb.jpg",130,104,18);thumbnails[6396046]=new thumbnail(6396046,"353478","","002_thumb.jpg",130,104,18);thumbnails[6396051]=new thumbnail(6396051,"353478","","003_thumb.jpg",130,163,18);thumbnails[6396054]=new thumbnail(6396054,"353478","","004_thumb.jpg",130,104,18);thumbnails[6396057]=new thumbnail(6396057,"353478","","005_thumb.jpg",130,104,18);thumbnails[6396060]=new thumbnail(6396060,"353478","","006_thumb.jpg",130,104,18);thumbnails[6396065]=new thumbnail(6396065,"353478","","007_thumb.jpg",130,104,18);thumbnails[6396073]=new thumbnail(6396073,"353478","","008_thumb.jpg",130,163,18);thumbnails[6396077]=new thumbnail(6396077,"353478","","009_thumb.jpg",130,104,18);thumbnails[6396097]=new thumbnail(6396097,"353478","","0101_thumb.jpg",130,163,18);thumbnails[6396083]=new thumbnail(6396083,"353478","","011_thumb.jpg",130,163,18);thumbnails[537934]=new thumbnail(537934,"41841","Brown's","browns2_thumb.jpg",130,132,18);thumbnails[537938]=new thumbnail(537938,"41841","Dog House","doghouse_thumb.jpg",130,131,18);thumbnails[537944]=new thumbnail(537944,"41841","Snow Drift","snowdrift_thumb.jpg",130,131,18);thumbnails[537948]=new thumbnail(537948,"41841","GMC","GMC_thumb.jpg",130,132,18);thumbnails[543041]=new thumbnail(543041,"41841","Robert Service Bank","robertservice_thumb.jpg",130,135,18);thumbnails[543042]=new thumbnail(543042,"41841","Sloap Street","sloapstreet1_thumb.jpg",130,131,18);thumbnails[543043]=new thumbnail(543043,"41841","Leaning Shack","leaningshack2_thumb.jpg",130,132,18);thumbnails[543044]=new thumbnail(543044,"41841","The Flora Dora","floradora_thumb.jpg",130,131,18);thumbnails[607499]=new thumbnail(607499,"41841","Night Street","nightstreet_thumb.jpg",130,133,18);thumbnails[607502]=new thumbnail(607502,"41841","Klondike Kates","katesnight_thumb.jpg",130,132,18);thumbnails[1872933]=new thumbnail(1872933,"41841","Dawson City","dawsonview_thumb.jpg",130,131,18);thumbnails[1872955]=new thumbnail(1872955,"41841","Mary's Rooms","marysrooms_thumb.jpg",130,132,18);thumbnails[3283240]=new thumbnail(3283240,"200214","Christo, Cochabamba","CHRIST_thumb.jpg",130,144,18);thumbnails[3283243]=new thumbnail(3283243,"200214","Barco, Chapare, Amazon Basin","boat_thumb.jpg",130,132,18);thumbnails[3283246]=new thumbnail(3283246,"200214","Bicicleta, Chapare Amazon Basin","bike1_thumb.jpg",130,129,18);thumbnails[3283249]=new thumbnail(3283249,"200214","Steamer Wheel, chapare amazon Basin","evil wheel_thumb.jpg",130,132,18);thumbnails[3283251]=new thumbnail(3283251,"200214","Salar de Yuni, Bolivia","f4_thumb.jpg",130,86,18);thumbnails[3283252]=new thumbnail(3283252,"200214","Salar de Yuni, Bolivia","f5_thumb.jpg",130,86,18);thumbnails[3283259]=new thumbnail(3283259,"200214","Chapare, Bolivia","fridge_thumb.jpg",130,132,18);thumbnails[3283260]=new thumbnail(3283260,"200214","Tongariki, Isla de pascua, Easter Island, Chile","I de P_thumb.jpg",130,132,18);thumbnails[3283262]=new thumbnail(3283262,"200214","Tongariki, Isla de pascua, Easter Island, Chile","I de P2_thumb.jpg",130,132,18);thumbnails[3283275]=new thumbnail(3283275,"200214","Tongariki, Isla de pascua, Easter Island, Chile","i de p4_thumb.jpg",130,86,18);thumbnails[3283277]=new thumbnail(3283277,"200214","Tiawanako, La Paz","La paz2_thumb.jpg",130,132,18);thumbnails[3283286]=new thumbnail(3283286,"200214","Mercado de Brujas, Whitches Market, La Paz","lapaz_thumb.jpg",130,132,18);thumbnails[3283288]=new thumbnail(3283288,"200214","Te Pito Kura, Magnetic Spherical Stone, Isla de Pascua","mag stones_thumb.jpg",130,132,18);thumbnails[3283290]=new thumbnail(3283290,"200214","Aprenda matematica Mental, Learn Mental Arithmetics, Cochabamba, Bolivia","Mathmatical_thumb.jpg",130,131,18);thumbnails[3283299]=new thumbnail(3283299,"200214","Plaza Principal, Cochabamba, Bolivia","PP cholita_thumb.jpg",130,126,18);thumbnails[3283300]=new thumbnail(3283300,"200214","Plaza Principal, Cochabamba, Bolivia","PP pigieons_thumb.jpg",130,132,18);thumbnails[3283304]=new thumbnail(3283304,"200214","Salt Desert, Salar de Yuni, Bolivia","S de U2_thumb.jpg",130,102,18);thumbnails[4440006]=new thumbnail(4440006,"259664","Using Fabiola’s recipe","1_book_thumb.jpg",130,86,18);thumbnails[4440007]=new thumbnail(4440007,"259664","Too many cooks?","2_legs_thumb.jpg",130,86,18);thumbnails[4440009]=new thumbnail(4440009,"259664","Meats","3_meat_thumb.jpg",130,86,18);thumbnails[4440011]=new thumbnail(4440011,"259664","Dough","4_dough_thumb.jpg",130,86,18);thumbnails[4440012]=new thumbnail(4440012,"259664","Eggs & Olives","5_eggs_thumb.jpg",130,86,18);thumbnails[4440013]=new thumbnail(4440013,"259664","Too many tasters?","6_hands_thumb.jpg",130,86,18);thumbnails[4440015]=new thumbnail(4440015,"259664","Spill","7_spill_thumb.jpg",130,195,18);thumbnails[4440017]=new thumbnail(4440017,"259664","Pans","8_pans_thumb.jpg",130,86,18);thumbnails[4440018]=new thumbnail(4440018,"259664","Filling","9_filling_thumb.jpg",130,86,18);thumbnails[4440019]=new thumbnail(4440019,"259664","Skilled hands making","10_making_thumb.jpg",130,86,18);thumbnails[4440020]=new thumbnail(4440020,"259664","Saltena's","11_cooked_thumb.jpg",130,86,18);thumbnails[537969]=new thumbnail(537969,"41844","Motel","Motel_thumb.jpg",130,87,18);thumbnails[537971]=new thumbnail(537971,"41844","Morning Quiet","nanbed3_thumb.jpg",130,86,18);thumbnails[537973]=new thumbnail(537973,"41844","Motel Taps","Moteltaps_thumb.jpg",130,87,18);thumbnails[537975]=new thumbnail(537975,"41844","Shower Head","Motelshower_thumb.jpg",130,87,18);thumbnails[537977]=new thumbnail(537977,"41844","Floor","loo floor_thumb.jpg",130,85,18);thumbnails[537979]=new thumbnail(537979,"41844","Smallest Shower","smallestshower_thumb.jpg",130,87,18);thumbnails[543051]=new thumbnail(543051,"41844","Sea Raven Red","searavenred_thumb.jpg",130,86,18);thumbnails[543052]=new thumbnail(543052,"41844","Rainbow Inn, Paul","rainbowPaul_thumb.jpg",130,87,18);thumbnails[607522]=new thumbnail(607522,"41844","Bed","bed_thumb.jpg",130,131,18);thumbnails[1872983]=new thumbnail(1872983,"41844","Light Shade","cosy_thumb.jpg",130,86,18);thumbnails[1872985]=new thumbnail(1872985,"41844","Toronto Taps","ttaps_thumb.jpg",130,86,18);thumbnails[1872986]=new thumbnail(1872986,"41844","Crappy Kitchen","crappykitchen_thumb.jpg",130,87,18);thumbnails[1872988]=new thumbnail(1872988,"41844","Paul","Topaul_thumb.jpg",130,87,18);thumbnails[1872991]=new thumbnail(1872991,"41844","It was a rainy day in Pizzaville","pizzaville_thumb.jpg",130,87,18);thumbnails[1872992]=new thumbnail(1872992,"41844","Bad Chicken","india_thumb.jpg",130,87,18);thumbnails[3654825]=new thumbnail(3654825,"223270","","B5_thumb.jpg",130,86,18);thumbnails[3654826]=new thumbnail(3654826,"223270","","B6_thumb.jpg",130,86,18);thumbnails[3654830]=new thumbnail(3654830,"223270","","B7_thumb.jpg",130,86,18);thumbnails[3654831]=new thumbnail(3654831,"223270","","B8_thumb.jpg",130,86,18);thumbnails[3654832]=new thumbnail(3654832,"223270","","B10_thumb.jpg",130,86,18);thumbnails[3654833]=new thumbnail(3654833,"223270","","B11_thumb.jpg",130,86,18);thumbnails[3654834]=new thumbnail(3654834,"223270","","B12_thumb.jpg",130,86,18);thumbnails[3654835]=new thumbnail(3654835,"223270","","B13_thumb.jpg",130,86,18);thumbnails[3654836]=new thumbnail(3654836,"223270","","B16_thumb.jpg",130,86,18);thumbnails[3280740]=new thumbnail(3280740,"200048","","facing_thumb.jpg",130,85,18);thumbnails[3280742]=new thumbnail(3280742,"200048","","backdetail_thumb.jpg",130,198,18);thumbnails[3280743]=new thumbnail(3280743,"200048","","couple_thumb.jpg",130,85,18);thumbnails[3280744]=new thumbnail(3280744,"200048","","flowers_thumb.jpg",130,85,18);thumbnails[3280748]=new thumbnail(3280748,"200048","","flowersrings_thumb.jpg",130,85,18);thumbnails[3280750]=new thumbnail(3280750,"200048","","glass_thumb.jpg",130,198,18);thumbnails[3280753]=new thumbnail(3280753,"200048","","neck_thumb.jpg",130,198,18);thumbnails[3280755]=new thumbnail(3280755,"200048","","holdinghands_thumb.jpg",130,85,18);thumbnails[3280756]=new thumbnail(3280756,"200048","","sideface_thumb.jpg",130,85,18);thumbnails[3280940]=new thumbnail(3280940,"200071","","A003 full_thumb.jpg",130,195,18);thumbnails[3280941]=new thumbnail(3280941,"200071","","B003_thumb.jpg",130,47,18);thumbnails[3280942]=new thumbnail(3280942,"200071","","greentop_thumb.jpg",130,166,18);thumbnails[3280947]=new thumbnail(3280947,"200071","","slate_thumb.jpg",130,87,18);thumbnails[3280948]=new thumbnail(3280948,"200071","","wood detail_thumb.jpg",130,87,18);thumbnails[3280950]=new thumbnail(3280950,"200071","","woodstone_thumb.jpg",130,132,18);thumbnails[3280951]=new thumbnail(3280951,"200071","","E024 three angle_thumb.jpg",130,87,18);thumbnails[3280953]=new thumbnail(3280953,"200071","","Side Vert_thumb.jpg",130,195,18);var galleries=new Object();galleries[353478]=new gallery(353478,"6396097,6396083,6396077,6396073,6396065,6396060,6396057,6396054,6396051,6396046","Clare and Rob's Wedding","gallery",[6395595,6396046,6396051,6396054,6396057,6396060,6396065,6396073,6396077,6396097,6396083]);galleries[125922]=new gallery(125922,"1872959,1872957,1002133,543033,543032,537958,537953,537951","Haida Gwaii, British Columbia","gallery",[537951,537953,537958,543032,543033,1002133,1872957,1872959]);galleries[41841]=new gallery(41841,"543043","Dawson City, Yukon","gallery",[537934,537938,537944,537948,543041,543042,543043,543044,607499,607502,1872933,1872955]);galleries[125921]=new gallery(125921,"543043","Canadian Documentary Travel Photography","gallery",[]);galleries[200214]=new gallery(200214,"3283304,3283300,3283299,3283290,3283288,3283286,3283277,3283275,3283262,3283260","South American Travel Documentary Photography","gallery",[3283240,3283243,3283246,3283249,3283251,3283252,3283259,3283260,3283262,3283275,3283277,3283286,3283288,3283290,3283299,3283300,3283304]);galleries[259664]=new gallery(259664,"4440020,4440019,4440018,4440017,4440015,4440013,4440012,4440011,4440009,4440007","Saltena","gallery",[4440006,4440007,4440009,4440011,4440012,4440013,4440015,4440017,4440018,4440019,4440020]);galleries[41844]=new gallery(41844,"1872992,1872991,1872988,1872986,1872985,1872983,607522,543052,543051,537979","Motel","gallery",[537969,537971,537973,537975,537977,537979,543051,543052,607522,1872983,1872985,1872986,1872988,1872991,1872992]);galleries[223270]=new gallery(223270,"3654836,3654835,3654834,3654833,3654832,3654831,3654830,3654826,3654825","Interior Decorating Images","gallery",[3654825,3654826,3654830,3654831,3654832,3654833,3654834,3654835,3654836]);galleries[200048]=new gallery(200048,"3280756,3280755,3280753,3280750,3280748,3280744,3280743,3280742,3280740","Wedding Photography","gallery",[3280740,3280742,3280743,3280744,3280748,3280750,3280753,3280755,3280756]);galleries[200071]=new gallery(200071,"3280953,3280951,3280950,3280948,3280947,3280942,3280941,3280940","Architecture Photography ","gallery",[3280940,3280941,3280942,3280947,3280948,3280950,3280951,3280953]);var imageSets=new Object();imageSets[1]="6396097,6396083,6396077,6396073,6396065,6396060,6396057,6396054,6396051,6396046,6395595,4440020,4440019,4440018,4440017,4440015,4440013,4440012,4440011,4440009,4440007,4440006,3654836,3654835,3654834,3654833,3654832,3654831,3654830,3654826,3654825,3283304,3283300,3283299,3283290,3283288,3283286,3283277,3283275,3283262,3283260,3283259,3283252,3283251,3283249,3283246,3283243,3283240,3280953,3280951";imageSets[2]="543043";imageSets[3]="6396097,6396083,6396077,6396073,6396065,6396060,6396057,6396054,6396051,6396046,6395595,4440020,4440019,4440018,4440017,4440015,4440013,4440012,4440011,4440009,4440007,4440006,3654836,3654835,3654834,3654833,3654832,3654831,3654830,3654826,3654825,3283304,3283300,3283299,3283290,3283288,3283286,3283277,3283275,3283262,3283260,3283259,3283252,3283251,3283249,3283246,3283243,3283240,3280953,3280951";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/hayleyrobinson/images";break}switch(a){case 1:b="http://www1.clikpic.com/hayleyrobinson/images";break}switch(a){case 2:b="http://admin.clikpic.com/hayleyrobinson/images";break}switch(a){case 24:b="http://tpc15/clikpic/hayleyrobinson/images";break}switch(a){case 4:b="http://www.clikchurch.com/hayleyrobinson/images";break}switch(a){case 5:b="http://www2.clikpic.com/hayleyrobinson/images";break}switch(a){case 22:b="http://tpc5/clikpic/hayleyrobinson/images";break}switch(a){case 23:b="http://tpc10/clikpic/hayleyrobinson/images";break}switch(a){case 25:b="http://tpc16/clikpic/hayleyrobinson/images";break}switch(a){case 15:b="http://www3.clikpic.com/hayleyrobinson/images";break}switch(a){case 18:b="http://www4.clikpic.com/hayleyrobinson/images";break}switch(a){case 19:b="http://www5.clikpic.com/hayleyrobinson/images";break}switch(a){case 31:b="http://www7.clikpic.com/hayleyrobinson/images";break}switch(a){case 32:b="http://admin2.clikpic.com/hayleyrobinson/images";break}switch(a){case 33:b="http://www8.clikpic.com/hayleyrobinson/images";break}switch(a){case 34:b="http://www9.clikpic.com/hayleyrobinson/images";break}switch(a){case 35:b="http://admin3.clikpic.com/hayleyrobinson/images";break}switch(a){case 37:b="http://admin4.clikpic.com/hayleyrobinson/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="Black White Silver 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+'")'})}}};