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[2309739]=new thumbnail(2309739,"151088","Gannet on Water","EPV0146_thumb.JPG",130,163,32);thumbnails[2309740]=new thumbnail(2309740,"151088","Gannet Diving","EPV0149_thumb.JPG",130,163,32);thumbnails[2309744]=new thumbnail(2309744,"151088","Gannet 1","EPV0182_thumb.JPG",130,104,32);thumbnails[2309776]=new thumbnail(2309776,"151088","Gannet 2","EPV0189_thumb.JPG",130,163,32);thumbnails[2309781]=new thumbnail(2309781,"151088","Gannet in flight","EPV0213_thumb.JPG",130,104,32);thumbnails[2309942]=new thumbnail(2309942,"150077","Puffin landing","seabird_07_thumb.JPG",130,98,32);thumbnails[2309949]=new thumbnail(2309949,"150077","Puffin 2","seabird_34_thumb.JPG",130,98,32);thumbnails[2309962]=new thumbnail(2309962,"150077","Shags 2","seabird_822_thumb.JPG",130,173,32);thumbnails[2309967]=new thumbnail(2309967,"150077","Puffin in Flight 2","seabird_104_thumb.JPG",130,98,32);thumbnails[2309980]=new thumbnail(2309980,"150077","Puffin with Fish","seabird_207_thumb.JPG",130,87,32);thumbnails[2309983]=new thumbnail(2309983,"150077","Puffins Landing","seabird_217_thumb.JPG",130,130,32);thumbnails[2309992]=new thumbnail(2309992,"150077","Ring Plover","seabird_241_thumb.JPG",130,130,32);thumbnails[2309820]=new thumbnail(2309820,"150077","Shag 2","EPV0400a_thumb.jpg",130,163,32);thumbnails[2309839]=new thumbnail(2309839,"150077","Tern 1","EPV0418a_thumb.jpg",130,104,32);thumbnails[2309846]=new thumbnail(2309846,"150077","Tern 2","EPV0423a_thumb.jpg",130,104,32);thumbnails[2309854]=new thumbnail(2309854,"150077","Kittiwake","EPV0525a_thumb.jpg",130,332,32);thumbnails[2309788]=new thumbnail(2309788,"150077","Eider Duck","EPV0252_thumb.JPG",130,163,32);thumbnails[2309816]=new thumbnail(2309816,"150077","Shag 1","EPV0279_thumb.JPG",130,104,32);thumbnails[2309952]=new thumbnail(2309952,"150077","Puffin 3","seabird_57_thumb.JPG",130,173,32);thumbnails[3753493]=new thumbnail(3753493,"150077","Kittiwakes","IMG_0084_thumb.jpg",130,92,32);thumbnails[3753494]=new thumbnail(3753494,"150077","Kittiwake","IMG_0091_thumb.jpg",130,171,32);thumbnails[3753495]=new thumbnail(3753495,"150077","Kittiwake","IMG_0119_thumb.jpg",130,85,32);thumbnails[3753499]=new thumbnail(3753499,"150077","Kittiwake","IMG_0498_thumb.jpg",130,124,32);thumbnails[3753510]=new thumbnail(3753510,"150077","Kittiwake","IMG_9862_thumb.jpg",130,88,32);thumbnails[3757435]=new thumbnail(3757435,"150077","kittiwake","IMG_0469_thumb.jpg",130,74,32);thumbnails[3753496]=new thumbnail(3753496,"150077","Fulmar","IMG_0146_thumb.jpg",130,87,32);thumbnails[3753497]=new thumbnail(3753497,"150077","Fulmar","IMG_0196_thumb.jpg",130,87,32);thumbnails[3753498]=new thumbnail(3753498,"150077","Fulmar","IMG_0250_thumb.jpg",130,154,32);thumbnails[3753500]=new thumbnail(3753500,"150077","Guillemot","IMG_9721_thumb.jpg",130,83,32);thumbnails[3753506]=new thumbnail(3753506,"150077","Razorbills","IMG_9784_thumb.jpg",130,86,32);thumbnails[3753514]=new thumbnail(3753514,"150077","Razorbill","IMG_9954_thumb.jpg",130,79,32);thumbnails[3753501]=new thumbnail(3753501,"150077","Grey Seal","IMG_9746_thumb.jpg",130,79,32);thumbnails[3753502]=new thumbnail(3753502,"150077","Puffin","IMG_9755_thumb.jpg",130,117,32);thumbnails[3753503]=new thumbnail(3753503,"150077","Puffin","IMG_9765_thumb.jpg",130,106,32);thumbnails[3753508]=new thumbnail(3753508,"150077","Puffins","IMG_9792_thumb.jpg",130,87,32);thumbnails[3753511]=new thumbnail(3753511,"150077","Puffin","IMG_9881_thumb.jpg",130,73,32);thumbnails[3753504]=new thumbnail(3753504,"150077","Shag","IMG_9773_thumb.jpg",130,89,32);thumbnails[3753512]=new thumbnail(3753512,"150077","Shag","IMG_9897_thumb.jpg",130,84,32);thumbnails[3753513]=new thumbnail(3753513,"150077","Shag","IMG_9924_thumb.jpg",130,160,32);thumbnails[2287404]=new thumbnail(2287404,"150091","Ricky 2","IMG_5213_thumb.JPG",130,87,32);thumbnails[2287406]=new thumbnail(2287406,"150091","Dillon","IMG_5288_thumb.JPG",130,195,32);thumbnails[2309860]=new thumbnail(2309860,"150091","Dillon and Ricky","IMG_5104_thumb.JPG",130,87,32);thumbnails[2309870]=new thumbnail(2309870,"150091","Play Time","IMG_5129_thumb.JPG",130,79,32);thumbnails[2309894]=new thumbnail(2309894,"150091","Dillon 3","IMG_5309_thumb.JPG",130,163,32);thumbnails[2309872]=new thumbnail(2309872,"150091","Best Friends","IMG_5132_thumb.JPG",130,87,32);thumbnails[5439009]=new thumbnail(5439009,"150091","Millie","millie-1_thumb.jpg",130,87,32);thumbnails[3569592]=new thumbnail(3569592,"218213","Towards St Sunday Crag","IMG_8626_thumb.jpg",130,49,32);thumbnails[3569598]=new thumbnail(3569598,"218213","Brothers Water","IMG_8632_thumb.jpg",130,87,32);thumbnails[3569607]=new thumbnail(3569607,"218213","Deepdale near Ullswater","IMG_8600_thumb.jpg",130,88,32);thumbnails[3569612]=new thumbnail(3569612,"218213","Place Fell","IMG_8714_thumb.jpg",130,87,32);thumbnails[3569618]=new thumbnail(3569618,"218213","Brothers Water","IMG_8787_thumb.jpg",130,87,32);thumbnails[3569626]=new thumbnail(3569626,"218213","Angle Tarn I","IMG_8956_thumb.jpg",130,87,32);thumbnails[3569639]=new thumbnail(3569639,"218213","Angle Tarn III","IMG_9031_thumb.jpg",130,54,32);thumbnails[3569658]=new thumbnail(3569658,"218213","Hills Near Angle Tarn","IMG_9078_thumb.jpg",130,49,32);thumbnails[3569668]=new thumbnail(3569668,"218213","Martindale","IMG_8998_thumb.jpg",130,52,32);thumbnails[3569727]=new thumbnail(3569727,"218213","Dovedale","IMG_8530_thumb.jpg",130,87,32);thumbnails[3570001]=new thumbnail(3570001,"218213","Reflections, Brothers Water","IMG_9231_thumb.jpg",130,87,32);thumbnails[3570022]=new thumbnail(3570022,"218213","Brothers Water","IMG_9466_thumb.jpg",130,87,32);thumbnails[2309857]=new thumbnail(2309857,"151087","Sunrise in winter","IMG_2339a_thumb.jpg",130,87,32);thumbnails[2309713]=new thumbnail(2309713,"151087","Tyne Bridge","100_0084_thumb.JPG",130,98,32);thumbnails[2309918]=new thumbnail(2309918,"151087","Gateshead Millennium Bridge","rainbow2_thumb.jpg",130,98,32);thumbnails[2310003]=new thumbnail(2310003,"150090","Matterhorn in Clouds","zer_200_thumb.JPG",130,87,32);thumbnails[2287476]=new thumbnail(2287476,"150090","Taj Mahal","taj_thumb.jpg",130,104,32);thumbnails[2309907]=new thumbnail(2309907,"150090","Matterhorn","IMG_7274_thumb.JPG",130,87,32);thumbnails[2309911]=new thumbnail(2309911,"150090","View from Klein Matterhorn","panoramica_thumb.jpg",130,36,32);thumbnails[2309994]=new thumbnail(2309994,"150090","Zermatt","zer_37_thumb.JPG",130,87,32);thumbnails[2309903]=new thumbnail(2309903,"150090","Trummelbach Falls","IMG_6071_thumb.jpg",130,87,32);thumbnails[5438862]=new thumbnail(5438862,"218258","Robin","robin_thumb.jpg",130,87,32);thumbnails[5438870]=new thumbnail(5438870,"218258","Whooper Swan","wwt-1_thumb.jpg",130,87,32);thumbnails[5438874]=new thumbnail(5438874,"218258","Young Mute Swan","wwt-2_thumb.jpg",130,87,32);thumbnails[5439003]=new thumbnail(5439003,"218258","Wigeon","wwt-3_thumb.jpg",130,87,32);thumbnails[3570039]=new thumbnail(3570039,"218258","Whooper Swans ","IMG_9484_thumb.jpg",130,84,32);thumbnails[3570041]=new thumbnail(3570041,"218258","Whooper Swan","IMG_9496_thumb.jpg",130,88,32);thumbnails[3570043]=new thumbnail(3570043,"218258","Whooper Swan","IMG_9512_thumb.jpg",130,88,32);thumbnails[3570044]=new thumbnail(3570044,"218258","","IMG_9516_thumb.jpg",130,58,32);thumbnails[3570050]=new thumbnail(3570050,"218258","Canadian Geese","IMG_9560_thumb.jpg",130,46,32);thumbnails[3570052]=new thumbnail(3570052,"218258","Canada Goose","IMG_9571_thumb.jpg",130,88,32);thumbnails[3570053]=new thumbnail(3570053,"218258","Mute Swans","IMG_9650_thumb.jpg",130,133,32);thumbnails[5439024]=new thumbnail(5439024,"307525","Ring Tailed Lemur","zoo-1_thumb.jpg",130,87,32);thumbnails[5439031]=new thumbnail(5439031,"307525","Ring Tailed Lemur","zoo-2_thumb.jpg",130,87,32);thumbnails[5439034]=new thumbnail(5439034,"307525","Macaw","zoo-3_thumb.jpg",130,87,32);thumbnails[5439035]=new thumbnail(5439035,"307525","Ring Tailed Lemur","zoo-8_thumb.jpg",130,87,32);thumbnails[5439037]=new thumbnail(5439037,"307525","Baby Capuchin","zoo-7_thumb.jpg",130,195,32);thumbnails[5439041]=new thumbnail(5439041,"307525","White Handed Gibbon","zoo-6_thumb.jpg",130,195,32);thumbnails[5439065]=new thumbnail(5439065,"307525","White Handed Gibbon","zoo-5_thumb.jpg",130,87,32);thumbnails[5439066]=new thumbnail(5439066,"307525","Ring Tailed Lemur","zoo-13_thumb.jpg",130,87,32);thumbnails[5439068]=new thumbnail(5439068,"307525","White Handed Gibbons","zoo-15_thumb.jpg",130,195,32);thumbnails[5439069]=new thumbnail(5439069,"307525","White Handed Gibbon","zoo-14_thumb.jpg",130,87,32);thumbnails[5439071]=new thumbnail(5439071,"307525","Baby Capuchin","zoo-17_thumb.jpg",130,195,32);thumbnails[5439072]=new thumbnail(5439072,"307525","Black Sulawesi Macaque","zoo-16_thumb.jpg",130,87,32);thumbnails[5439078]=new thumbnail(5439078,"307526","Red Squirrel","zoo-11_thumb.jpg",130,87,32);thumbnails[5439081]=new thumbnail(5439081,"307526","Red Deer","zoo-26_thumb.jpg",130,87,32);thumbnails[5439082]=new thumbnail(5439082,"307526","Red Deer","zoo-25_thumb.jpg",130,87,32);thumbnails[5439132]=new thumbnail(5439132,"307526","Snow Monkey (Japanese Macaque)","zoo-28_thumb.jpg",130,87,32);thumbnails[5439134]=new thumbnail(5439134,"307526","Snow Monkey on Ice","zoo-30_thumb.jpg",130,87,32);thumbnails[5439135]=new thumbnail(5439135,"307526","Snow Monkey","zoo-29_thumb.jpg",130,87,32);thumbnails[5439136]=new thumbnail(5439136,"307526","Red Deer","zoo-27_thumb.jpg",130,195,32);thumbnails[5439074]=new thumbnail(5439074,"307526","Red Squirrel","zoo-10_thumb.jpg",130,87,32);thumbnails[5439076]=new thumbnail(5439076,"307526","Snow Monkey (Japanese Macaque)","zoo-9_thumb.jpg",130,87,32);var galleries=new Object();galleries[151088]=new gallery(151088,"2309744","Bass Rock","gallery",[2309739,2309740,2309744,2309776,2309781]);galleries[150077]=new gallery(150077,"3757435","Farne Islands","gallery",[2309942,2309949,2309962,2309967,2309980,2309983,2309992,2309820,2309839,2309846,2309854,2309788,2309816,2309952,3753493,3753494,3753495,3753499,3753510,3757435,3753496,3753497,3753498,3753500,3753506,3753514,3753501,3753502,3753503,3753508,3753511,3753504,3753512,3753513]);galleries[150091]=new gallery(150091,"5439009,2309894,2309872,2309870,2309860,2287406,2287404","Dogs","gallery",[2287404,2287406,2309860,2309870,2309894,2309872,5439009]);galleries[218213]=new gallery(218213,"3569607","Lake District","gallery",[3569592,3569598,3569607,3569612,3569618,3569626,3569639,3569658,3569668,3569727,3570001,3570022]);galleries[151087]=new gallery(151087,"2309918,2309857,2309713","North-East England","gallery",[2309857,2309713,2309918]);galleries[150090]=new gallery(150090,"2287476","Travels","gallery",[2310003,2287476,2309907,2309911,2309994,2309903]);galleries[218258]=new gallery(218258,"3570052","WWT","gallery",[5438862,5438870,5438874,5439003,3570039,3570041,3570043,3570044,3570050,3570052,3570053]);galleries[307525]=new gallery(307525,"5439069","South Lakes Wild Animal Park","gallery",[5439024,5439031,5439034,5439035,5439037,5439041,5439065,5439066,5439068,5439069,5439071,5439072]);galleries[307526]=new gallery(307526,"5439078","Highland Wildlife Park","gallery",[5439078,5439081,5439082,5439132,5439134,5439135,5439136,5439074,5439076]);var imageSets=new Object();imageSets[1]="5439132,5439078,5439069,5439066,5439034,5438862,3757435,3753514,3753508,3753498,3753494,3570053,3570052,3570041,3569727,3569607,2310003,2309983,2309952,2309903,2309857,2309846,2309820,2309744,2287406";imageSets[2]="5439078,5439069,3757435,3570052,3569607,2309744,2287476";imageSets[3]="5439024,5438862";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/clairewitham/images";break}switch(a){case 1:b="http://www1.clikpic.com/clairewitham/images";break}switch(a){case 2:b="http://admin.clikpic.com/clairewitham/images";break}switch(a){case 4:b="http://www.clikchurch.com/clairewitham/images";break}switch(a){case 5:b="http://www2.clikpic.com/clairewitham/images";break}switch(a){case 15:b="http://www3.clikpic.com/clairewitham/images";break}switch(a){case 21:b="http://www6.clikpic.com/clairewitham/images";break}switch(a){case 18:b="http://www4.clikpic.com/clairewitham/images";break}switch(a){case 19:b="http://www5.clikpic.com/clairewitham/images";break}switch(a){case 22:b="http://tpc5/clikpic/clairewitham/images";break}switch(a){case 23:b="http://tpc10/clikpic/clairewitham/images";break}switch(a){case 24:b="http://tpc15/clikpic/clairewitham/images";break}switch(a){case 25:b="http://tpc16/clikpic/clairewitham/images";break}switch(a){case 31:b="http://www7.clikpic.com/clairewitham/images";break}switch(a){case 32:b="http://admin2.clikpic.com/clairewitham/images";break}switch(a){case 33:b="http://www8.clikpic.com/clairewitham/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="Claire Witham 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+'")'})}}};