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[6145650]=new thumbnail(6145650,"","Bee on a Thistle","Bee_on_ThistleRS_thumb.jpg",130,107,1);thumbnails[540285]=new thumbnail(540285,"41017","Distant Trees, Loch Eck","48Jubilee_thumb.jpg",130,98,1);thumbnails[540287]=new thumbnail(540287,"41017","Mirror Trees","49Jubilee_thumb.jpg",130,98,1);thumbnails[727917]=new thumbnail(727917,"41017","Reflections","Loch Eck 3v2_thumb.jpg",130,98,1);thumbnails[741550]=new thumbnail(741550,"41017","Winter Sunshine","DSC038091_thumb.jpg",130,98,1);thumbnails[956863]=new thumbnail(956863,"41017","Still Waters","Ancient Tree, Loch Quoich_thumb.jpg",130,98,1);thumbnails[956876]=new thumbnail(956876,"41017","Loch Garry","Birch Tree, Loch Garry_thumb.jpg",130,98,1);thumbnails[956881]=new thumbnail(956881,"41017","Portrait Loch Shore","Birch Tree, Loch Garry 2_thumb.jpg",130,173,1);thumbnails[956911]=new thumbnail(956911,"41017","Eroded Trees","Eroded Trees, Loch Lochy_thumb.jpg",130,173,1);thumbnails[956922]=new thumbnail(956922,"41017","Golden Water","Loch Tarff_thumb.jpg",130,98,1);thumbnails[536941]=new thumbnail(536941,"72327","Dog Falls","4Dogfalls_thumb.jpg",130,173,1);thumbnails[727913]=new thumbnail(727913,"72327","In Awe","Copy of P1010086_thumb.jpg",130,98,1);thumbnails[843405]=new thumbnail(843405,"72327","High Falls","Waterfall Glen Etive_thumb.jpg",130,173,1);thumbnails[956900]=new thumbnail(956900,"72327","Cascade","Burn by Loch Lochy 3_thumb.jpg",130,173,1);thumbnails[956906]=new thumbnail(956906,"72327","Sunlit Fall","Waterfall by Loch Ness_thumb.jpg",130,173,1);thumbnails[956941]=new thumbnail(956941,"72327","Rainbow Water","River Moriston_thumb.jpg",130,173,1);thumbnails[956966]=new thumbnail(956966,"72327","The Witches Cauldron","The Witches Cauldron_thumb.jpg",130,173,1);thumbnails[1597023]=new thumbnail(1597023,"72327","Awesome Shadows","Awesome Shadows_thumb.jpg",130,173,1);thumbnails[2393325]=new thumbnail(2393325,"72327","Distant Ribbons","Distant Ribbons RS_thumb.jpg",130,173,1);thumbnails[2393328]=new thumbnail(2393328,"72327","Milky Falls","Milky Falls RS_thumb.jpg",130,98,1);thumbnails[2393338]=new thumbnail(2393338,"72327","Ribbons","Ribbons RS_thumb.jpg",130,173,1);thumbnails[3249576]=new thumbnail(3249576,"72327","Milky Rocks","Milky Rocks RS_thumb.jpg",130,98,1);thumbnails[3249582]=new thumbnail(3249582,"72327","Needles","Needles RS_thumb.jpg",130,98,1);thumbnails[3249592]=new thumbnail(3249592,"72327","Misty Burn Portrait","Misty burn P RS_thumb.jpg",130,173,1);thumbnails[3249597]=new thumbnail(3249597,"72327","Evening Tumble","Evening tumble RS_thumb.jpg",130,173,1);thumbnails[3950292]=new thumbnail(3950292,"72327","The Gantocks Dunoon","The_Gantocks_rs_thumb.jpg",130,98,1);thumbnails[6003606]=new thumbnail(6003606,"72327","Autumn in Affric","Autumn_in_Affric_-_RS_thumb.jpg",130,98,1);thumbnails[6003611]=new thumbnail(6003611,"72327","Blue Cascade","Blue_Cascade_-_RS_thumb.jpg",130,194,1);thumbnails[868125]=new thumbnail(868125,"41601","Toward the Sunset","Toward 2_thumb.jpg",130,96,1);thumbnails[956953]=new thumbnail(956953,"41601","Bootlace Seaweed","Rockpool at Hopeman 3_thumb.jpg",130,98,1);thumbnails[956963]=new thumbnail(956963,"41601","The Princes Cairn","The Princes Cairn, Loch Nan Uamh 2_thumb.jpg",130,173,1);thumbnails[956969]=new thumbnail(956969,"41601","Trees ","Trees, Loch Lochy_thumb.jpg",130,98,1);thumbnails[956970]=new thumbnail(956970,"41601","Beech Walk","Woodland Walk, Invermoriston_thumb.jpg",130,98,1);thumbnails[956985]=new thumbnail(956985,"41601","Bluebell Walk","Bluebell Walk, Ardentinny_thumb.jpg",130,173,1);thumbnails[956986]=new thumbnail(956986,"41601","Portrait Woodland Walk","Woodland Walk, Invermoriston 2_thumb.jpg",130,173,1);thumbnails[1547737]=new thumbnail(1547737,"41601","Sunset Silhouette","Sunset Silhouette_thumb.jpg",130,199,1);thumbnails[1547753]=new thumbnail(1547753,"41601","Rockpool 1","Rockpool 1_thumb.jpg",130,98,1);thumbnails[1547759]=new thumbnail(1547759,"41601","Rockpool 2","Rockpool 2_thumb.jpg",130,98,1);thumbnails[1547763]=new thumbnail(1547763,"41601","Autumn Colours","Autumn Colours_thumb.jpg",130,194,1);thumbnails[1597384]=new thumbnail(1597384,"41601","Night Lines","Night Lines_thumb.jpg",130,173,1);thumbnails[1948510]=new thumbnail(1948510,"41601","Highland Cow with Cock-Horn","Highland Cow with Cock-Horn_thumb.jpg",130,104,1);thumbnails[2393261]=new thumbnail(2393261,"41601","Bert","Bert RS_thumb.jpg",130,173,1);thumbnails[3950296]=new thumbnail(3950296,"41601","A Ring-Tailed Lemur","Lemur_cropped_rs_thumb.jpg",130,98,1);thumbnails[3950298]=new thumbnail(3950298,"41601","The Pondering Meerkat","The_Pondering_Meerkat_rs_thumb.jpg",130,173,1);thumbnails[3950300]=new thumbnail(3950300,"41601","West Bay Dunoon","West_Bay_Dunoon_rs_thumb.jpg",130,98,1);thumbnails[6003619]=new thumbnail(6003619,"41601","Another Fyne Sunset","Fyne_Sunset_2_-_RS_thumb.jpg",130,98,1);thumbnails[6091279]=new thumbnail(6091279,"41601","Loch Fyne Sunset","5_Loch_Fyne_Sunset_RS_thumb.jpg",130,98,1);thumbnails[6091284]=new thumbnail(6091284,"41601","Rhodedendrons at Ben More Gardens","8_Rhododendrons_at_Ben_More_Gardens_RS_thumb.jpg",130,93,1);thumbnails[6091301]=new thumbnail(6091301,"41601","Ardentinny Bluebells","1_Ardentinny_Bluebells_RS_thumb.jpg",130,173,1);thumbnails[6145654]=new thumbnail(6145654,"41601","Bluebells","Bluebells_RS_thumb.jpg",130,98,1);thumbnails[6145655]=new thumbnail(6145655,"41601","Dragonfly","Dragonfly_RS_thumb.jpg",130,98,1);thumbnails[956867]=new thumbnail(956867,"41148","Beech Leaves","Beech Leaves, Invermoriston_thumb.jpg",130,173,1);thumbnails[956932]=new thumbnail(956932,"41148","Pebbles","Pebbles at Findhorn_thumb.jpg",130,98,1);thumbnails[998597]=new thumbnail(998597,"41148","Timber and Pebbles","Pebbles at Findhorn 2_thumb.jpg",130,173,1);thumbnails[1547762]=new thumbnail(1547762,"41148","Pebbles 'n Sand","Pebbles 'n Sand_thumb.jpg",130,96,1);thumbnails[1547765]=new thumbnail(1547765,"41148","Hanging on","Mountain Stream_thumb.jpg",130,98,1);thumbnails[3249579]=new thumbnail(3249579,"41148","Sand Patterns","Sand Patterns RS_thumb.jpg",130,173,1);thumbnails[3249588]=new thumbnail(3249588,"41148","More pebbles","More pebbles RS_thumb.jpg",130,98,1);thumbnails[3354903]=new thumbnail(3354903,"41148","Etive Winter","Etive Winter RS_thumb.jpg",130,104,1);thumbnails[1236849]=new thumbnail(1236849,"130489","Tenacious","Tenacious_thumb.jpg",130,104,1);thumbnails[1547664]=new thumbnail(1547664,"130489","QE2 on the Clyde","QE2 on the Clyde_thumb.jpg",130,98,1);thumbnails[1547689]=new thumbnail(1547689,"130489","QE2 and Balmoral","QE2 and Balmoral_thumb.jpg",130,98,1);thumbnails[1547767]=new thumbnail(1547767,"130489","Boats on Ness","Inchnacardoch Bay_thumb.jpg",130,98,1);thumbnails[1948504]=new thumbnail(1948504,"130489","Ark Royal leaving Faslane","Ark Royal leaving Faslane_thumb.jpg",130,102,1);thumbnails[3950275]=new thumbnail(3950275,"130489","Small Rowing Boat","P1040964_rs_thumb.jpg",130,98,1);thumbnails[3950276]=new thumbnail(3950276,"130489","The Sugar Boat off Helensborough","The_Sugar_Boat_rs_thumb.jpg",130,98,1);thumbnails[3950297]=new thumbnail(3950297,"130489","mv Jupiter arriving at Dunoon Pier","MV_Jupiter_arriving_at_Dunoon_Pier_rs_thumb.jpg",130,98,1);thumbnails[4295120]=new thumbnail(4295120,"130489","Resting on Loch Striven, Argyll","P1050296v3_rs_thumb.jpg",130,98,1);thumbnails[6003613]=new thumbnail(6003613,"130489","Float On","Float_On_-_RS_thumb.jpg",130,173,1);thumbnails[537000]=new thumbnail(537000,"193138","Highland Drove Road","44Drove_thumb.jpg",130,98,1);thumbnails[599572]=new thumbnail(599572,"193138","Snow on the Coe","River Coev3_thumb.jpg",130,98,1);thumbnails[599576]=new thumbnail(599576,"193138","Desolation","River Coupall_thumb.jpg",130,173,1);thumbnails[3150808]=new thumbnail(3150808,"193138","Backlit Grasses","Backlit Grasses for uploading to website_thumb.jpg",130,87,1);thumbnails[3150823]=new thumbnail(3150823,"193138","Portrait Winter Rylock","Portrait Winter Rylock for uploading to website_thumb.jpg",130,194,1);thumbnails[3150833]=new thumbnail(3150833,"193138","Frozen Grasses","Frozen Grasses for uploading to website_thumb.jpg",130,194,1);thumbnails[6184287]=new thumbnail(6184287,"193138","Frozen Loch Eck","Frozen_Lock_Eck_Trees_RS_thumb.jpg",130,98,1);thumbnails[536938]=new thumbnail(536938,"41599","Highland Bridge","2Bridge_thumb.jpg",130,98,1);thumbnails[536965]=new thumbnail(536965,"41599","Boat Shed","18Boatshed_thumb.jpg",130,98,1);thumbnails[536966]=new thumbnail(536966,"41599","Ancient Pier","19Pier_thumb.jpg",130,98,1);thumbnails[536981]=new thumbnail(536981,"41599","Millenium Bridge","29Millenium_thumb.jpg",130,98,1);thumbnails[741740]=new thumbnail(741740,"41599","Commando Memorial","28 Commando Memorial_thumb.jpg",130,98,1);thumbnails[741741]=new thumbnail(741741,"41599","United we conquer","Portrait Spean Bridge Commando Memorial_thumb.jpg",130,173,1);thumbnails[956936]=new thumbnail(956936,"41599","Eilean Donan, North","Portrait Eilean Donan1_thumb.jpg",130,173,1);thumbnails[1547750]=new thumbnail(1547750,"41599","Glenfinnan Monument","Glenfinnan Monument_thumb.jpg",130,85,1);thumbnails[2393317]=new thumbnail(2393317,"41599","Daffodils, Eilean Donan","Daffodils Eilean Donan RS_thumb.jpg",130,98,1);var galleries=new Object();galleries[41017]=new gallery(41017,"956922,956911,956881,956876,956863,741550,727917,540287,540285","Lochs","gallery",[540285,540287,727917,741550,956863,956876,956881,956911,956922]);galleries[72327]=new gallery(72327,"6003611,6003606,3950292,3249597,3249592,3249582,3249576,2393338,2393328,2393325","Water","gallery",[536941,727913,843405,956900,956906,956941,956966,1597023,2393325,2393328,2393338,3249576,3249582,3249592,3249597,3950292,6003606,6003611]);galleries[41601]=new gallery(41601,"6145655,6145654,6091301,6091284,6091279,6003619,3950300,3950298,3950296,2393261","Miscellaneous","gallery",[868125,956953,956963,956969,956970,956985,956986,1547737,1547753,1547759,1547763,1597384,1948510,2393261,3950296,3950298,3950300,6003619,6091279,6091284,6091301,6145654,6145655]);galleries[41148]=new gallery(41148,"3354903,3249588,3249579,1547765,1547762,998597,956932,956867","Abstract","gallery",[956867,956932,998597,1547762,1547765,3249579,3249588,3354903]);galleries[130489]=new gallery(130489,"6003613,4295120,3950297,3950276,3950275,1948504,1547767,1547689,1547664,1236849","Boats and Ships","gallery",[1236849,1547664,1547689,1547767,1948504,3950275,3950276,3950297,4295120,6003613]);galleries[193138]=new gallery(193138,"6184287,3150833,3150823,3150808,599576,599572,537000","Winter Scenes","gallery",[537000,599572,599576,3150808,3150823,3150833,6184287]);galleries[41599]=new gallery(41599,"2393317,1547750,956936,741741,741740,536981,536966,536965,536938","Structures","gallery",[536938,536965,536966,536981,741740,741741,956936,1547750,2393317]);var imageSets=new Object();imageSets[1]="6145650,6091284,6003606,4295120,3950297,3950292,1948504,1236849,956963,956953,956941,956906,956881,956863,843405,741740,727917,727913,599576,540287,540285,536941";imageSets[3]="3150833";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/jerryhill/images";break}switch(a){case 1:b="http://www1.clikpic.com/jerryhill/images";break}switch(a){case 2:b="http://admin.clikpic.com/jerryhill/images";break}switch(a){case 24:b="http://tpc15/clikpic/jerryhill/images";break}switch(a){case 4:b="http://www.clikchurch.com/jerryhill/images";break}switch(a){case 5:b="http://www2.clikpic.com/jerryhill/images";break}switch(a){case 22:b="http://tpc5/clikpic/jerryhill/images";break}switch(a){case 23:b="http://tpc10/clikpic/jerryhill/images";break}switch(a){case 25:b="http://tpc16/clikpic/jerryhill/images";break}switch(a){case 15:b="http://www3.clikpic.com/jerryhill/images";break}switch(a){case 18:b="http://www4.clikpic.com/jerryhill/images";break}switch(a){case 19:b="http://www5.clikpic.com/jerryhill/images";break}switch(a){case 31:b="http://www7.clikpic.com/jerryhill/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jerryhill/images";break}switch(a){case 33:b="http://www8.clikpic.com/jerryhill/images";break}switch(a){case 34:b="http://www9.clikpic.com/jerryhill/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jerryhill/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jerryhill/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="Jerry Hill 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 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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="jerry.hill05@btinternet.com">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="jerry.hill05@btinternet.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};