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[394379]=new thumbnail(394379,"31814","West Face of Chichester Cathedral","EX288-Chichester-Cathedral-_thumb.jpg",130,85,15);thumbnails[394461]=new thumbnail(394461,"31814","Great Court","EL160-Great-Court-copy_thumb.jpg",130,85,15);thumbnails[394465]=new thumbnail(394465,"31814","The Millennium Bridge","EN84-Bridge-copy_thumb.jpg",130,86,15);thumbnails[394469]=new thumbnail(394469,"31814","Bridge to Selfridges","EP140-Selfridges-Walkway-co_thumb.jpg",130,85,15);thumbnails[394547]=new thumbnail(394547,"31814","Taal Monument","SA97-Paarl-copy_thumb.jpg",130,85,15);thumbnails[394765]=new thumbnail(394765,"31814","Grande Arche","F440-Arche-Steps-copy_thumb.jpg",130,83,15);thumbnails[394783]=new thumbnail(394783,"31814","Jewish Museum","IMG_0359-copy1_thumb.jpg",130,84,15);thumbnails[3762615]=new thumbnail(3762615,"31814","Angel of the North","Angel-of-the-North-print-copy_thumb.jpg",130,87,15);thumbnails[394371]=new thumbnail(394371,"229497","Bluebell Wood","X5137-Soft-Bluebell-Wood-co_thumb.jpg",130,85,15);thumbnails[3762393]=new thumbnail(3762393,"229497","Double Vision","The-Chase--A4-print-copy_thumb.jpg",67,100,15);thumbnails[3762605]=new thumbnail(3762605,"229497","Walkway in Red","S257-Glasgow-walkway-copy_thumb.jpg",130,87,15);thumbnails[3762626]=new thumbnail(3762626,"229497","Angel of Venice","large-print-soft-border-flattened-copy_thumb.jpg",67,100,15);thumbnails[3787703]=new thumbnail(3787703,"229497","At the Dogs","_MG_0277-Zoomed-dogs_thumb.jpg",130,68,15);thumbnails[3787713]=new thumbnail(3787713,"229497","At the Pallant","Pallant-Surrealism-by-Jean-Brooks_thumb.jpg",130,85,15);thumbnails[394374]=new thumbnail(394374,"229497","Aspen trees","Aspens-1-copy_thumb.jpg",130,85,15);thumbnails[394538]=new thumbnail(394538,"229497","Poplars","Poplar-Impression-copy_thumb.jpg",130,85,15);thumbnails[3762698]=new thumbnail(3762698,"31817","Cottonwoods","_MG_2972-print-copy1_thumb.jpg",130,87,15);thumbnails[3788652]=new thumbnail(3788652,"31817","Birks of Aberfeldy","S7467-Birks_thumb.jpg",130,87,15);thumbnails[3788655]=new thumbnail(3788655,"31817","Autumn in Westonbirt","_MG_7541-copy_thumb.jpg",130,85,15);thumbnails[411660]=new thumbnail(411660,"31817","Poplar trees","Poplars-V2181-copy_thumb.jpg",130,84,15);thumbnails[402358]=new thumbnail(402358,"31817","Clematis","V1212-Clematis-copy_thumb.jpg",130,86,15);thumbnails[402362]=new thumbnail(402362,"31817","Wildflowers","V1234-Spanish-Meadow-copy_thumb.jpg",130,86,15);thumbnails[402367]=new thumbnail(402367,"31817","Daisies","V1174-Daisies-copy_thumb.jpg",130,83,15);thumbnails[394530]=new thumbnail(394530,"31817","Tulip","Tulip_thumb.jpg",130,85,15);thumbnails[395071]=new thumbnail(395071,"31816","Town Quay Lymington","Boats-at-Town-Quay-copy_thumb.jpg",130,82,15);thumbnails[395072]=new thumbnail(395072,"31816","The Church in the Field","EH72_Idsworth_thumb.jpg",130,86,15);thumbnails[395073]=new thumbnail(395073,"31816","Mill Pond","EH1631-Swan-on-Mill-Pond-co_thumb.jpg",130,85,15);thumbnails[395078]=new thumbnail(395078,"31816","Field Patterns","Snow-in-Meon-Valley-copy_thumb.jpg",130,85,15);thumbnails[395080]=new thumbnail(395080,"31816","King Alfred","Winchester,-King-Alfred's-S_thumb.jpg",130,84,15);thumbnails[395082]=new thumbnail(395082,"31816","Old Post Office","Old-Post-Office-(now-closed_thumb.jpg",130,85,15);thumbnails[395095]=new thumbnail(395095,"31816","Hampshire countryside","View-from-Old-Winchester-Hi_thumb.jpg",130,84,15);thumbnails[3762701]=new thumbnail(3762701,"31816","Inn on the Beach","EH784-Inn-on-Beach-print-copy_thumb.jpg",130,87,15);thumbnails[395076]=new thumbnail(395076,"31816","Spinnaker Tower","EH2048-Spinnaker-at-dusk-co_thumb.jpg",130,198,15);thumbnails[411482]=new thumbnail(411482,"31816","Autumn tree","EH391-Winchester-Cathedral-_thumb.jpg",130,197,15);thumbnails[411475]=new thumbnail(411475,"31816","Church East Meon","EH121-East-Meon-Church-prin_thumb.jpg",130,198,15);thumbnails[4529716]=new thumbnail(4529716,"263124","","_MG_8122_thumb.jpg",130,87,15);thumbnails[4529725]=new thumbnail(4529725,"263124","","_MG_8113_thumb.jpg",130,87,15);thumbnails[4529729]=new thumbnail(4529729,"263124","","_MG_8131_thumb.jpg",130,87,15);thumbnails[4529733]=new thumbnail(4529733,"263124","","_MG_8129_copy_thumb.jpg",130,87,15);thumbnails[4529735]=new thumbnail(4529735,"263124","","_MG_8112_thumb.jpg",130,87,15);thumbnails[4529736]=new thumbnail(4529736,"263124","","_MG_8069_thumb.jpg",130,87,15);thumbnails[4529739]=new thumbnail(4529739,"263124","","_MG_8133_thumb.jpg",130,87,15);thumbnails[4529744]=new thumbnail(4529744,"263124","","_MG_8124_thumb.jpg",130,87,15);thumbnails[4529748]=new thumbnail(4529748,"263124","","_MG_8063_thumb.jpg",130,67,15);thumbnails[395005]=new thumbnail(395005,"31818","Cumbrian Hills","EM2-Tebay-copy_thumb.jpg",130,81,15);thumbnails[395008]=new thumbnail(395008,"31818","Hoodoos in Snow","Bryce---Hoodoos-in-Snow-cop1_thumb.jpg",130,85,15);thumbnails[395010]=new thumbnail(395010,"31818","Brighton Pier","EX334Palace-Pier-copy_thumb.jpg",130,84,15);thumbnails[395013]=new thumbnail(395013,"31818","Heather on the Moors","Heather-Moors-copy_thumb.jpg",130,83,15);thumbnails[395017]=new thumbnail(395017,"31818","Tuscan Farmhouse","I26-Tuscan-Sand-2-copy_thumb.jpg",130,85,15);thumbnails[395022]=new thumbnail(395022,"31818","Rhum View","S72-Eigg-sunset-copy2-copy_thumb.jpg",130,79,15);thumbnails[395026]=new thumbnail(395026,"31818","Taransay from Harris","S312-Taransay-from-Harris-c_thumb.jpg",130,85,15);thumbnails[395028]=new thumbnail(395028,"31818","Moulton Ranch","U108-Moulton-Ranch-copy_thumb.jpg",130,85,15);thumbnails[395093]=new thumbnail(395093,"31818","The beach at sunset","Saltburn-X2168-print-no-gra_thumb.jpg",130,83,15);thumbnails[411486]=new thumbnail(411486,"31818","Yellowstone Lake","Yellowstone-Lake-at-Dawn-co_thumb.jpg",130,81,15);thumbnails[411494]=new thumbnail(411494,"31818","Black Sand Basin","Yellowstone,-Black-Sand-Bas_thumb.jpg",130,85,15);thumbnails[3762621]=new thumbnail(3762621,"31818","West Wittering","_MG_7220-West-Wittering-copy_thumb.jpg",130,87,15);thumbnails[3761264]=new thumbnail(3761264,"229431","Raffles Hotel","SG8150-Raffles-and-Equinox_thumb.jpg",130,87,15);thumbnails[3761288]=new thumbnail(3761288,"229431","Hanging out the Washing","SG8216-Sago-Lane-Chinatown_thumb.jpg",130,87,15);thumbnails[3761317]=new thumbnail(3761317,"229431","Restored houses, Chinatown","SG8234-Conservation-District_thumb.jpg",130,87,15);thumbnails[3761319]=new thumbnail(3761319,"229431","Twilight Skyline","SG8254-Skyline-Twilight_thumb.jpg",130,87,15);thumbnails[3761321]=new thumbnail(3761321,"229431","Morning View from the swimming pool","SG8287-Swimmers--Morning-view-from-pool_thumb.jpg",130,87,15);thumbnails[3761323]=new thumbnail(3761323,"229431","Cricket on the Padang","SG8308-Cricket_thumb.jpg",130,87,15);thumbnails[3762284]=new thumbnail(3762284,"229431","War Memorial","SG8162-War-Memorial_thumb.jpg",130,87,15);thumbnails[3762286]=new thumbnail(3762286,"229431","Crocodile","SG8194-School-trip-to-Mosque_thumb.jpg",130,87,15);thumbnails[3761278]=new thumbnail(3761278,"229431","Sago Street, Chinatown, Singapore","SG8213-Sago-St_thumb.jpg",67,100,15);thumbnails[3762292]=new thumbnail(3762292,"229431","Skyscraper Reflections","SG8167-Business-District_thumb.jpg",67,100,15);thumbnails[3761267]=new thumbnail(3761267,"229431","Sri Mariamman Temple","SG8199-Sri-Mariamman-Temple_thumb.jpg",67,100,15);thumbnails[3761255]=new thumbnail(3761255,"229431","Clash of cultures","_MG_8202-copy_thumb.jpg",66,100,15);thumbnails[1982816]=new thumbnail(1982816,"145630","Slot Canyon #1","2916-copy_thumb.jpg",67,100,15);thumbnails[2203468]=new thumbnail(2203468,"145630","Slot Canyon #2","_MG_3091_thumb.jpg",67,100,15);thumbnails[2203520]=new thumbnail(2203520,"145630","Slot Canyon #3","_MG_3094_thumb.jpg",67,100,15);thumbnails[2203523]=new thumbnail(2203523,"145630","Slot Canyon #4","_MG_3100_thumb.jpg",67,100,15);thumbnails[2203525]=new thumbnail(2203525,"145630","Slot Canyon #5","_MG_3109 Canyon floor_thumb.jpg",67,100,15);thumbnails[2203528]=new thumbnail(2203528,"145630","Slot Canyon #6","3070_thumb.jpg",67,100,15);thumbnails[2203547]=new thumbnail(2203547,"145630","Slot Canyon #7","3088 The Bear_thumb.jpg",67,100,15);thumbnails[2203558]=new thumbnail(2203558,"145630","Slot Canyon #8","2909 Lone Photographer_thumb.jpg",67,100,15);thumbnails[411446]=new thumbnail(411446,"31815","Bloubergstrand","SA4P-Bloubergstrand-copy_thumb.jpg",130,47,15);thumbnails[394711]=new thumbnail(394711,"31815","Wall Street Crossroads","Wall-Street-original-copy_thumb.jpg",130,85,15);thumbnails[411655]=new thumbnail(411655,"31815","Falasarna Beach","Cretan-Paradise2_thumb.jpg",130,81,15);thumbnails[394708]=new thumbnail(394708,"31815","The Wall","GR34-Tourist-at-Berlin-Wall_thumb.jpg",130,83,15);thumbnails[411702]=new thumbnail(411702,"31815","Reichstag Dome","GR45D-Couple-on-Roof-copy_thumb.jpg",130,85,15);thumbnails[394745]=new thumbnail(394745,"31815","San Marco","I44-copy_thumb.jpg",130,84,15);thumbnails[411442]=new thumbnail(411442,"31815","Hallstatt","438-Hallstatt_thumb.jpg",130,84,15);thumbnails[394720]=new thumbnail(394720,"31815","Sunset at La Defense","F448-Arch-at-Night-copy_thumb.jpg",130,84,15);thumbnails[411451]=new thumbnail(411451,"31815","MuseumsQuartier","A-556-MQ-Reflection-copy_thumb.jpg",130,199,15);thumbnails[411690]=new thumbnail(411690,"31815","Kohlmarkt at Xmas","A638-Kohlmarkt-copy2_thumb.jpg",130,200,15);thumbnails[395089]=new thumbnail(395089,"31815","Tube at Canary Wharf","EL207-copy_thumb.jpg",130,202,15);thumbnails[394722]=new thumbnail(394722,"31815","Plaza de Espana","SP59-Fountain-copy_thumb.jpg",130,200,15);var galleries=new Object();galleries[31814]=new gallery(31814,"394465","Architectural Design","gallery",[394379,394461,394465,394469,394547,394765,394783,3762615]);galleries[229497]=new gallery(229497,"394371","Creative","gallery",[394371,3762393,3762605,3762626,3787703,3787713,394374,394538]);galleries[31817]=new gallery(31817,"3788655,3788652,3762698,411660,402367,402362,402358,394530","Flowers & Trees","gallery",[3762698,3788652,3788655,411660,402358,402362,402367,394530]);galleries[31816]=new gallery(31816,"395095","Hampshire","gallery",[395071,395072,395073,395078,395080,395082,395095,3762701,395076,411482,411475]);galleries[263124]=new gallery(263124,"4529748,4529744,4529739,4529736,4529735,4529733,4529729,4529725,4529716","Hayling Island","gallery",[4529716,4529725,4529729,4529733,4529735,4529736,4529739,4529744,4529748]);galleries[31818]=new gallery(31818,"411486","Landscapes & Seascapes","gallery",[395005,395008,395010,395013,395017,395022,395026,395028,395093,411486,411494,3762621]);galleries[229431]=new gallery(229431,"3762292,3762286,3762284,3761323,3761321,3761319,3761317,3761288,3761278,3761267","Singapore","gallery",[3761264,3761288,3761317,3761319,3761321,3761323,3762284,3762286,3761278,3762292,3761267,3761255]);galleries[145630]=new gallery(145630,"2203558,2203547,2203528,2203525,2203523,2203520,2203468,1982816","Slot Canyon","gallery",[1982816,2203468,2203520,2203523,2203525,2203528,2203547,2203558]);galleries[31815]=new gallery(31815,"394745","Travel","gallery",[411446,394711,411655,394708,411702,394745,411442,394720,411451,411690,395089,394722]);var imageSets=new Object();imageSets[1]="4529748,4529744,4529739,4529736,4529735,4529733,4529729,4529725,4529716,3788655,3788652,3787713,3787703,3762701,3762698,3762626,3762621,3762615,3762605,3762393,3762292,3762286,3762284,3761323,3761321,3761319,3761317,3761288,3761278,3761267,3761264,3761255,2203558,2203547,2203528,2203525,2203523,2203520,2203468,1982816,411702,411690,411660,411655,411494,411486,411482,411475,411451,411446";imageSets[2]="411486,395095,394745,394465,394371";imageSets[3]="4529748,4529744,4529739,4529736,4529735,4529733,4529729,4529725,4529716,3788655,3788652,3787713,3787703,3762701,3762698,3762626,3762621,3762615,3762605,3762393,3762292,3762286,3762284,3761323,3761321,3761319,3761317,3761288,3761278,3761267,3761264,3761255,2203558,2203547,2203528,2203525,2203523,2203520,2203468,1982816,411702,411690,411660,411655,411494,411486,411482,411475,411451,411446";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/jfbrooks/images";break}switch(a){case 1:b="http://www1.clikpic.com/jfbrooks/images";break}switch(a){case 2:b="http://admin.clikpic.com/jfbrooks/images";break}switch(a){case 4:b="http://www.clikchurch.com/jfbrooks/images";break}switch(a){case 5:b="http://www2.clikpic.com/jfbrooks/images";break}switch(a){case 15:b="http://www3.clikpic.com/jfbrooks/images";break}switch(a){case 21:b="http://www6.clikpic.com/jfbrooks/images";break}switch(a){case 18:b="http://www4.clikpic.com/jfbrooks/images";break}switch(a){case 19:b="http://www5.clikpic.com/jfbrooks/images";break}switch(a){case 22:b="http://tpc5/clikpic/jfbrooks/images";break}switch(a){case 23:b="http://tpc10/clikpic/jfbrooks/images";break}switch(a){case 24:b="http://tpc15/clikpic/jfbrooks/images";break}switch(a){case 25:b="http://tpc16/clikpic/jfbrooks/images";break}switch(a){case 31:b="http://www7.clikpic.com/jfbrooks/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jfbrooks/images";break}switch(a){case 33:b="http://www8.clikpic.com/jfbrooks/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="JEAN BROOKS 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+"</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+'<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+'")'})}}};