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[2767997]=new thumbnail(2767997,"","","IMG_0521w_1_thumb.jpg",130,87,5);thumbnails[2881305]=new thumbnail(2881305,"","","IMG_0800a_1_thumb.jpg",129,283,5);thumbnails[2881312]=new thumbnail(2881312,"","","IMG_0811b_1_thumb.jpg",130,195,5);thumbnails[3800524]=new thumbnail(3800524,"","","IMG_1536b_1_thumb.jpg",130,130,5);thumbnails[2767983]=new thumbnail(2767983,"","","IMG_0066w_1_thumb.jpg",130,195,5);thumbnails[3993617]=new thumbnail(3993617,"","","IMG_2245a_1_thumb.jpg",130,127,5);thumbnails[3993627]=new thumbnail(3993627,"","","IMG_2317a_1_thumb.jpg",130,124,5);thumbnails[3993622]=new thumbnail(3993622,"","Backwater Reflections","IMG_2305a_1_thumb.jpg",130,137,5);thumbnails[3993641]=new thumbnail(3993641,"","","IMG_2426a_1_thumb.jpg",130,56,5);thumbnails[3993624]=new thumbnail(3993624,"","","IMG_2313a_1_thumb.jpg",130,184,5);thumbnails[3993635]=new thumbnail(3993635,"","","IMG_2391a_1_thumb.jpg",130,189,5);thumbnails[3993655]=new thumbnail(3993655,"","","IMG_2502b_1_thumb.jpg",130,191,5);thumbnails[4005245]=new thumbnail(4005245,"241492","Grand Canal Gondolas","IMG_2245b_1_thumb.jpg",130,130,5);thumbnails[3993619]=new thumbnail(3993619,"241492","Venice awaits","IMG_2303a_1_thumb.jpg",130,125,5);thumbnails[3993623]=new thumbnail(3993623,"241492","Trattoria Sempione","IMG_2311b_1_thumb.jpg",130,125,5);thumbnails[3993633]=new thumbnail(3993633,"241492","Hotel Lisbona","IMG_2349b_1_thumb.jpg",130,130,5);thumbnails[4005487]=new thumbnail(4005487,"241492","Ponte dei Bareteri","IMG_2317b_1_thumb.jpg",130,130,5);thumbnails[3993636]=new thumbnail(3993636,"241492","Sunset Silhouette","IMG_2406a_1_thumb.jpg",130,127,5);thumbnails[4007017]=new thumbnail(4007017,"241492","Backwater Reflections","IMG_2305b_1_thumb.jpg",130,130,5);thumbnails[3993652]=new thumbnail(3993652,"241492","Grand Canal 1","IMG_2488a_1_thumb.jpg",130,118,5);thumbnails[3993638]=new thumbnail(3993638,"241492","Evening Clouds Gathering","IMG_2430a_1_thumb.jpg",130,96,5);thumbnails[3993607]=new thumbnail(3993607,"241492","Grand Canal 2","IMG_2226a_1_thumb.jpg",130,90,5);thumbnails[3993615]=new thumbnail(3993615,"241492","Grand Canal 3","IMG_2241a_1_thumb.jpg",130,93,5);thumbnails[3993631]=new thumbnail(3993631,"241492","Palazzo Ducale","IMG_2334a_1_thumb.jpg",130,106,5);thumbnails[3993634]=new thumbnail(3993634,"241492","Giudecca Evening Light","IMG_2389a_1_thumb.jpg",130,54,5);thumbnails[4005668]=new thumbnail(4005668,"241492","Campanile Sunset","IMG_2426b_1_thumb.jpg",130,54,5);thumbnails[3993644]=new thumbnail(3993644,"241492","Evening Skyline 1","IMG_2436a_thumb.jpg",130,54,5);thumbnails[3993639]=new thumbnail(3993639,"241492","Evening Skyline 2","IMG_2408a_1_thumb.jpg",130,59,5);thumbnails[3993645]=new thumbnail(3993645,"241492","Evening Skyline 3","IMG_2437a_1_thumb.jpg",130,60,5);thumbnails[3993642]=new thumbnail(3993642,"241492","Evening Skyline 4","IMG_2434a_1_thumb.jpg",130,46,5);thumbnails[3993658]=new thumbnail(3993658,"241492","Salute","IMG_2478a_1_thumb.jpg",130,78,5);thumbnails[3993646]=new thumbnail(3993646,"241492","San Giorgio Maggiore","IMG_2473a_1_thumb.jpg",130,85,5);thumbnails[4005535]=new thumbnail(4005535,"241492","Ponte dei Bareteri","IMG_2313b_1_thumb.jpg",130,195,5);thumbnails[4005548]=new thumbnail(4005548,"241492","Masts","IMG_2391b_1_thumb.jpg",130,195,5);thumbnails[4005567]=new thumbnail(4005567,"241492","Ponte Storto","IMG_2502c_1_thumb.jpg",130,195,5);thumbnails[3993651]=new thumbnail(3993651,"241492","Morning Tranquility","IMG_2481a_1_thumb.jpg",130,146,5);thumbnails[2767979]=new thumbnail(2767979,"173443","","IMG_0072_1_thumb.jpg",130,195,5);thumbnails[2767970]=new thumbnail(2767970,"173443","","IMG_0063w_1_thumb.jpg",130,195,5);thumbnails[2768067]=new thumbnail(2768067,"173443","","IMG_0538a_1_thumb.jpg",130,188,5);thumbnails[2881313]=new thumbnail(2881313,"173443","","IMG_0822a_1_thumb.jpg",129,188,5);thumbnails[4390997]=new thumbnail(4390997,"173443","","IMG_0066e_1_thumb.jpg",130,130,5);thumbnails[2767978]=new thumbnail(2767978,"173443","","IMG_0044cw_11_thumb.jpg",130,130,5);thumbnails[2881289]=new thumbnail(2881289,"173443","","IMG_0778a_1_thumb.jpg",130,129,5);thumbnails[2881283]=new thumbnail(2881283,"173443","","IMG_0771a_1_thumb.jpg",130,130,5);thumbnails[2881290]=new thumbnail(2881290,"173443","","IMG_0781b_1_thumb.jpg",129,285,5);thumbnails[3630598]=new thumbnail(3630598,"173443","","IMG_1538a_1_thumb.jpg",130,259,5);thumbnails[2881307]=new thumbnail(2881307,"173443","","IMG_0801b_1_thumb.jpg",129,283,5);thumbnails[3800530]=new thumbnail(3800530,"173443","","IMG_1820_1_thumb.jpg",130,86,5);thumbnails[2881285]=new thumbnail(2881285,"178825","Panorama","IMG_0773a_1_thumb.jpg",130,84,5);thumbnails[4391018]=new thumbnail(4391018,"257601","Keswick Landing","IMG_2052a_1_thumb.jpg",130,130,5);thumbnails[4391022]=new thumbnail(4391022,"257601","Crummock Water from Rannerdale","IMG_2110a_1_thumb.jpg",130,130,5);thumbnails[4391008]=new thumbnail(4391008,"257601","Derwent Water from Ashness","IMG_9998_1_thumb.jpg",130,86,5);thumbnails[2881302]=new thumbnail(2881302,"178825","","IMG_0794a_1_thumb.jpg",130,91,5);thumbnails[2881304]=new thumbnail(2881304,"178825","","IMG_0798b_1_thumb.jpg",130,86,5);thumbnails[2881303]=new thumbnail(2881303,"178825","","IMG_0798a_1_thumb.jpg",130,129,5);thumbnails[2767992]=new thumbnail(2767992,"173445","","IMG_0418_1_thumb.jpg",130,87,5);thumbnails[2767994]=new thumbnail(2767994,"173445","","IMG_0431_1_thumb.jpg",130,87,5);thumbnails[2767991]=new thumbnail(2767991,"173445","","IMG_0383_1_thumb.jpg",130,87,5);thumbnails[2767985]=new thumbnail(2767985,"173445","","IMG_0146w_1_thumb.jpg",130,87,5);thumbnails[3800515]=new thumbnail(3800515,"173445","","IMG_1632a_1_thumb.jpg",130,130,5);thumbnails[3800519]=new thumbnail(3800519,"173445","","IMG_1722a_1_thumb.jpg",130,130,5);thumbnails[3800518]=new thumbnail(3800518,"173445","","IMG_1696a_1_thumb.jpg",130,130,5);thumbnails[3800520]=new thumbnail(3800520,"173445","","IMG_1726a_1_thumb.jpg",130,130,5);thumbnails[2881277]=new thumbnail(2881277,"173445","","IMG_0735_1_thumb.jpg",130,195,5);thumbnails[2881281]=new thumbnail(2881281,"173445","","IMG_0741b_1_thumb.jpg",130,130,5);thumbnails[3800535]=new thumbnail(3800535,"231608","","IMG_1975a_1_thumb.jpg",130,60,5);thumbnails[3800537]=new thumbnail(3800537,"231608","","IMG_1970a_1_thumb.jpg",130,60,5);thumbnails[3800539]=new thumbnail(3800539,"231608","","IMG_1614_1_thumb.jpg",130,86,5);thumbnails[2768004]=new thumbnail(2768004,"173446","","IMG_0548w_2_thumb.jpg",130,87,5);thumbnails[2768006]=new thumbnail(2768006,"173446","","IMG_0549w_1_thumb.jpg",130,87,5);thumbnails[2768000]=new thumbnail(2768000,"173446","","IMG_0547aw_2_thumb.jpg",130,87,5);thumbnails[2767999]=new thumbnail(2767999,"173446","","IMG_0539qw_1_thumb.jpg",130,130,5);thumbnails[2768008]=new thumbnail(2768008,"173447","","IMG_0563w_1_thumb.jpg",130,87,5);thumbnails[2768009]=new thumbnail(2768009,"173447","","IMG_0564w_1_thumb.jpg",130,87,5);thumbnails[2766413]=new thumbnail(2766413,"173248","","IMG_9999wtrim_1_thumb.jpg",130,80,5);thumbnails[2881402]=new thumbnail(2881402,"178827","","IMG_0774a_1_thumb.jpg",130,282,5);thumbnails[2768010]=new thumbnail(2768010,"173248","","IMG_9999w_1_thumb.jpg",130,176,5);thumbnails[3140102]=new thumbnail(3140102,"178827","","IMG_0781bCD_thumb.jpg",130,286,5);thumbnails[3140105]=new thumbnail(3140105,"178827","","IMG_0801bCD_thumb.jpg",130,282,5);thumbnails[3344658]=new thumbnail(3344658,"173248","Mounted and Framed","IMG_1232_1_thumb.jpg",130,195,5);thumbnails[3140104]=new thumbnail(3140104,"178827","","IMG_0800aCD_thumb.jpg",130,285,5);thumbnails[2881403]=new thumbnail(2881403,"178827","","IMG_0814a_1_thumb.jpg",129,283,5);thumbnails[2881416]=new thumbnail(2881416,"178827","","IMG_0640_1_1_thumb.jpg",130,282,5);thumbnails[2881421]=new thumbnail(2881421,"178838","","IMG_0383_1_1_thumb.jpg",130,59,5);thumbnails[2881424]=new thumbnail(2881424,"178838","","IMG_0434_1_1_thumb.jpg",130,59,5);thumbnails[2881425]=new thumbnail(2881425,"178838","","IMG_0146_1_1_thumb.jpg",130,59,5);thumbnails[3140119]=new thumbnail(3140119,"192568","","IMG_0555cd_1_thumb.jpg",130,182,5);thumbnails[3140124]=new thumbnail(3140124,"192568","","IMG_0562acd2_1_thumb.jpg",130,183,5);thumbnails[3140087]=new thumbnail(3140087,"192576","","IMG_0548acd_1_thumb.jpg",130,93,5);thumbnails[3140089]=new thumbnail(3140089,"192576","","IMG_0549cd_1_thumb.jpg",130,93,5);thumbnails[3140082]=new thumbnail(3140082,"192576","","IMG_0547acd_1_thumb.jpg",130,93,5);thumbnails[3140080]=new thumbnail(3140080,"192576","","IMG_0545cd_1_thumb.jpg",130,92,5);thumbnails[3140134]=new thumbnail(3140134,"231637","Rockfish Cards","IMG_0845acd_1_thumb.jpg",130,183,5);var galleries=new Object();galleries[241492]=new gallery(241492,"3993633","Simply Venice","gallery",[4005245,3993619,3993623,3993633,4005487,3993636,4007017,3993652,3993638,3993607,3993615,3993631,3993634,4005668,3993644,3993639,3993645,3993642,3993658,3993646,4005535,4005548,4005567,3993651]);galleries[173443]=new gallery(173443,"2767978","Architectural","gallery",[2767979,2767970,2768067,2881313,4390997,2767978,2881289,2881283,2881290,3630598,2881307,3800530]);galleries[178825]=new gallery(178825,"2881303","Alfama","section222291",[2881285,2881302,2881304,2881303]);galleries[257601]=new gallery(257601,"4391018","The Lakes","gallery",[4391018,4391022,4391008]);galleries[173445]=new gallery(173445,"3800518","Botanics","gallery",[2767992,2767994,2767991,2767985,3800515,3800519,3800518,3800520,2881277,2881281]);galleries[231608]=new gallery(231608,"3800539","Seascape","gallery",[3800535,3800537,3800539]);galleries[173446]=new gallery(173446,"2768000","Mosaics","gallery",[2768004,2768006,2768000,2767999]);galleries[173447]=new gallery(173447,"2768008","Dining","gallery",[2768008,2768009]);galleries[178827]=new gallery(178827,"3140102,2881416","Cards - Collection 1","section222291",[2881402,3140102,3140105,3140104,2881403,2881416]);galleries[173248]=new gallery(173248,"2766413","Signature","gallery",[2766413,2768010,3344658]);galleries[178838]=new gallery(178838,"2881424","Cards - Collection 2","section222291",[2881421,2881424,2881425]);galleries[192568]=new gallery(192568,"3140119","Cards - Collection 3","section222291",[3140119,3140124]);galleries[192576]=new gallery(192576,"3140089,3140087,3140082,3140080","Cards - Collection 4","section222291",[3140087,3140089,3140082,3140080]);galleries[231637]=new gallery(231637,"3140134","Events","section222291",[3140134]);var imageSets=new Object();imageSets[1]="2766413";imageSets[2]="4391018,3993633,3800539,3800518,3140119,3140102,2881424,2881416,2881303,2768008,2768000,2767978,2766413";imageSets[3]="4391022,4391018,4391008,4390997,4007017,4005668,4005567,4005548,4005535,4005487,4005245,3993658,3993655,3993652,3993651,3993646,3993645,3993644,3993642,3993641,3993639,3993638,3993636,3993635,3993634,3993633,3993631,3993627,3993624,3993623,3993622,3993619,3993617,3993615,3993607,3800539,3800537,3800535,3800530,3800524,3800520,3800519,3800518,3800515,3630598,3344658,3140134,3140124,3140119,3140105";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/martinw/images";break}switch(a){case 1:b="http://www1.clikpic.com/martinw/images";break}switch(a){case 2:b="http://admin.clikpic.com/martinw/images";break}switch(a){case 24:b="http://tpc15/clikpic/martinw/images";break}switch(a){case 4:b="http://www.clikchurch.com/martinw/images";break}switch(a){case 5:b="http://www2.clikpic.com/martinw/images";break}switch(a){case 22:b="http://tpc5/clikpic/martinw/images";break}switch(a){case 23:b="http://tpc10/clikpic/martinw/images";break}switch(a){case 25:b="http://tpc16/clikpic/martinw/images";break}switch(a){case 15:b="http://www3.clikpic.com/martinw/images";break}switch(a){case 18:b="http://www4.clikpic.com/martinw/images";break}switch(a){case 19:b="http://www5.clikpic.com/martinw/images";break}switch(a){case 31:b="http://www7.clikpic.com/martinw/images";break}switch(a){case 32:b="http://admin2.clikpic.com/martinw/images";break}switch(a){case 33:b="http://www8.clikpic.com/martinw/images";break}switch(a){case 34:b="http://www9.clikpic.com/martinw/images";break}switch(a){case 35:b="http://admin3.clikpic.com/martinw/images";break}switch(a){case 37:b="http://admin4.clikpic.com/martinw/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="Rockfish 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>"}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).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 online</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="MARTINW">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};