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[4320087]=new thumbnail(4320087,"","","EH1-Home_thumb.jpg",130,130,1);thumbnails[4320102]=new thumbnail(4320102,"","","JRCG-Home_thumb.jpg",130,87,1);thumbnails[4320109]=new thumbnail(4320109,"","","DS-Home_thumb.jpg",130,87,1);thumbnails[2601620]=new thumbnail(2601620,"175106","","LMN2_thumb.jpg",130,130,1);thumbnails[3197239]=new thumbnail(3197239,"175106","","CW1_thumb.jpg",87,130,1);thumbnails[2799426]=new thumbnail(2799426,"175106","","AR2_thumb.jpg",130,92,1);thumbnails[2799428]=new thumbnail(2799428,"175106","","TL2_thumb.jpg",130,130,1);thumbnails[2799430]=new thumbnail(2799430,"175106","","TL3_thumb.jpg",87,130,1);thumbnails[2799432]=new thumbnail(2799432,"175106","","AR1_thumb.jpg",130,87,1);thumbnails[2799438]=new thumbnail(2799438,"175106","","TL1_thumb.jpg",87,130,1);thumbnails[2799440]=new thumbnail(2799440,"175106","","TL4_thumb.jpg",130,87,1);thumbnails[4318305]=new thumbnail(4318305,"175106","","JRCG1_thumb.jpg",87,130,1);thumbnails[5146968]=new thumbnail(5146968,"95815","","RD1_thumb.jpg",130,92,1);thumbnails[5081593]=new thumbnail(5081593,"95815","","WC1_thumb.jpg",130,130,1);thumbnails[4670782]=new thumbnail(4670782,"95815","","LR3_thumb.jpg",130,65,1);thumbnails[1372426]=new thumbnail(1372426,"95815","","Rebecca-by-candlelight_thumb.gif",130,87,1);thumbnails[1712590]=new thumbnail(1712590,"95815","","Charlie-3-in-1_thumb.jpg",130,92,1);thumbnails[4670777]=new thumbnail(4670777,"95815","","LR1_thumb.jpg",87,130,1);thumbnails[1511590]=new thumbnail(1511590,"95815","","Rebecca-the-ice-skater_thumb.jpg",130,87,1);thumbnails[5051501]=new thumbnail(5051501,"95815","","ES1_thumb.jpg",130,92,1);thumbnails[4670798]=new thumbnail(4670798,"95815","","LR4_thumb.jpg",130,65,1);thumbnails[1438263]=new thumbnail(1438263,"95815","","Rebecca-in-stripes_thumb.gif",87,130,1);thumbnails[1511636]=new thumbnail(1511636,"95815","","Charlie-close-up_thumb.jpg",87,130,1);thumbnails[5051632]=new thumbnail(5051632,"95815","","AW1_thumb.jpg",130,92,1);thumbnails[1889322]=new thumbnail(1889322,"95815","","IMG_5501-B-&-W_thumb.jpg",87,130,1);thumbnails[4670902]=new thumbnail(4670902,"95815","","LR5_thumb.jpg",130,92,1);thumbnails[1950918]=new thumbnail(1950918,"95815","","Harry-x-3_thumb.jpg",130,92,1);thumbnails[3047268]=new thumbnail(3047268,"95815","","SM8_thumb.jpg",130,92,1);thumbnails[3038180]=new thumbnail(3038180,"95815","","SM6_thumb.jpg",130,92,1);thumbnails[1512718]=new thumbnail(1512718,"95815","","Holding-Rebecca_thumb.jpg",130,87,1);thumbnails[3041101]=new thumbnail(3041101,"95815","","SM7_thumb.jpg",93,130,1);thumbnails[3870469]=new thumbnail(3870469,"95815","","EH1_thumb.jpg",130,130,1);thumbnails[3047317]=new thumbnail(3047317,"95815","","DH3_thumb.jpg",87,130,1);thumbnails[1511595]=new thumbnail(1511595,"95815","","Rebecca-with-rose_thumb.jpg",87,130,1);thumbnails[2565582]=new thumbnail(2565582,"95815","","A&C2_thumb.jpg",130,87,1);thumbnails[3077008]=new thumbnail(3077008,"95815","","SM9_thumb.jpg",130,87,1);thumbnails[3077009]=new thumbnail(3077009,"95815","","SM10_thumb.jpg",130,92,1);thumbnails[3038177]=new thumbnail(3038177,"95815","","SM1_thumb.jpg",130,92,1);thumbnails[3870519]=new thumbnail(3870519,"95815","","EH2_thumb.jpg",87,130,1);thumbnails[4317686]=new thumbnail(4317686,"95815","","OR4_thumb.jpg",130,104,1);thumbnails[4318310]=new thumbnail(4318310,"95815","","SNMB1_thumb.jpg",130,89,1);thumbnails[4318313]=new thumbnail(4318313,"95815","","SNMB2_thumb.jpg",87,130,1);thumbnails[2069334]=new thumbnail(2069334,"102506","","IMG_5991_thumb.jpg",130,87,1);thumbnails[1742855]=new thumbnail(1742855,"102506","","The-Hillbacks-3_thumb.jpg",130,92,1);thumbnails[1758156]=new thumbnail(1758156,"102506","","IMG_5031_thumb.jpg",130,87,1);thumbnails[1742851]=new thumbnail(1742851,"102506","","The-Hillbacks_thumb.jpg",130,87,1);thumbnails[1758160]=new thumbnail(1758160,"102506","","IMG_5040-Soft-Focus_thumb.jpg",87,130,1);thumbnails[3717457]=new thumbnail(3717457,"102506","","WD1_thumb.jpg",93,130,1);thumbnails[2401445]=new thumbnail(2401445,"102506","","IMG_6434SL_thumb.jpg",87,130,1);thumbnails[2069332]=new thumbnail(2069332,"102506","","IMG_5983_thumb.jpg",87,130,1);thumbnails[3249380]=new thumbnail(3249380,"102506","","LB2_thumb.jpg",92,130,1);thumbnails[2069325]=new thumbnail(2069325,"102506","","IMG_6046_thumb.jpg",87,130,1);thumbnails[1950917]=new thumbnail(1950917,"102506","","IMG_5642-B-&-W_thumb.jpg",87,130,1);thumbnails[3798459]=new thumbnail(3798459,"102506","","RA3_thumb.jpg",87,130,1);thumbnails[2565557]=new thumbnail(2565557,"102506","","L&H11_thumb.jpg",130,87,1);thumbnails[2069337]=new thumbnail(2069337,"102506","","IMG_5980_thumb.jpg",130,130,1);thumbnails[2832842]=new thumbnail(2832842,"102506","","SL31_thumb.jpg",130,130,1);thumbnails[2565491]=new thumbnail(2565491,"102506","","L&H2_thumb.jpg",130,87,1);thumbnails[3392094]=new thumbnail(3392094,"102506","","OR21_thumb.jpg",130,92,1);thumbnails[3487674]=new thumbnail(3487674,"102506","","JH1_thumb.jpg",87,130,1);thumbnails[3249390]=new thumbnail(3249390,"102506","","LB1_thumb.jpg",92,130,1);thumbnails[3197317]=new thumbnail(3197317,"102506","","W1_thumb.jpg",130,87,1);thumbnails[2566793]=new thumbnail(2566793,"163799","","DS1_thumb.jpg",92,130,1);thumbnails[3798448]=new thumbnail(3798448,"163799","","NT1_thumb.jpg",87,130,1);thumbnails[4317669]=new thumbnail(4317669,"163799","","NT12_thumb.jpg",87,130,1);thumbnails[2565441]=new thumbnail(2565441,"163799","","IMG_7024_thumb.jpg",130,130,1);thumbnails[2565447]=new thumbnail(2565447,"163799","","IMG_7034_thumb.jpg",130,130,1);thumbnails[4317672]=new thumbnail(4317672,"163799","","SB2_thumb.jpg",130,130,1);thumbnails[2832468]=new thumbnail(2832468,"163799","","HL1_thumb.jpg",87,130,1);thumbnails[3070609]=new thumbnail(3070609,"163799","","DH21_thumb.jpg",87,130,1);thumbnails[3070610]=new thumbnail(3070610,"163799","","DH1_thumb.jpg",87,130,1);thumbnails[3197341]=new thumbnail(3197341,"163799","","W8_thumb.jpg",92,130,1);thumbnails[3197322]=new thumbnail(3197322,"163799","","W3_thumb.jpg",87,130,1);thumbnails[3197325]=new thumbnail(3197325,"163799","","W4_thumb.jpg",92,130,1);thumbnails[3197335]=new thumbnail(3197335,"163799","","W5_thumb.jpg",130,92,1);thumbnails[3855274]=new thumbnail(3855274,"163799","","DE1_thumb.jpg",87,130,1);thumbnails[4317676]=new thumbnail(4317676,"130649","","SB3_thumb.jpg",130,98,1);thumbnails[3047318]=new thumbnail(3047318,"130649","","H4_thumb.jpg",87,130,1);thumbnails[4317663]=new thumbnail(4317663,"130649","","SB41_thumb.jpg",130,92,1);thumbnails[4670765]=new thumbnail(4670765,"130649","","LR2_thumb.jpg",130,87,1);thumbnails[3038166]=new thumbnail(3038166,"130649","","SM2_thumb.jpg",130,92,1);thumbnails[3038167]=new thumbnail(3038167,"130649","","SM4_thumb.jpg",130,92,1);thumbnails[3038161]=new thumbnail(3038161,"130649","","SM5_thumb.jpg",92,130,1);thumbnails[3197346]=new thumbnail(3197346,"130649","","W6_thumb.jpg",92,130,1);thumbnails[3197357]=new thumbnail(3197357,"130649","","W7_thumb.jpg",93,130,1);thumbnails[2832846]=new thumbnail(2832846,"130649","","SL2_thumb.jpg",87,130,1);thumbnails[2832808]=new thumbnail(2832808,"130649","","SL1_thumb.jpg",92,130,1);thumbnails[1950907]=new thumbnail(1950907,"130649","","IMG_5637-combined_thumb.jpg",87,130,1);thumbnails[1950908]=new thumbnail(1950908,"130649","","IMG_5811_thumb.jpg",87,130,1);thumbnails[1950904]=new thumbnail(1950904,"130649","","IMG_5635_thumb.jpg",130,87,1);thumbnails[3870508]=new thumbnail(3870508,"130649","","EH3_thumb.jpg",130,87,1);thumbnails[1950921]=new thumbnail(1950921,"130649","","IMG_5591_thumb.jpg",130,87,1);thumbnails[2601722]=new thumbnail(2601722,"130649","","LMN1_thumb.jpg",130,87,1);thumbnails[4317637]=new thumbnail(4317637,"130649","","SB1_thumb.jpg",130,92,1);thumbnails[3392081]=new thumbnail(3392081,"130649","","OR12_thumb.jpg",130,92,1);thumbnails[4318308]=new thumbnail(4318308,"130649","","JRCG2_thumb.jpg",130,87,1);thumbnails[4318317]=new thumbnail(4318317,"130649","","SNMB3_thumb.jpg",87,130,1);thumbnails[1689655]=new thumbnail(1689655,"104232","","Charlie-vignette_thumb.jpg",87,130,1);thumbnails[1608266]=new thumbnail(1608266,"104232","","Seamus-3_thumb.jpg",87,130,1);thumbnails[2111133]=new thumbnail(2111133,"104232","","Alice-2_thumb.jpg",87,130,1);thumbnails[1537567]=new thumbnail(1537567,"104232","","Micza_thumb.jpg",87,130,1);thumbnails[2374525]=new thumbnail(2374525,"104232","","Fly-2_thumb.jpg",130,87,1);thumbnails[2111105]=new thumbnail(2111105,"104232","","Alice-and-Sam_thumb.jpg",130,87,1);thumbnails[1778252]=new thumbnail(1778252,"104232","","Louis-the-Weimeraner_thumb.jpg",130,130,1);thumbnails[2111059]=new thumbnail(2111059,"104232","","Sam_thumb.jpg",130,87,1);thumbnails[2601790]=new thumbnail(2601790,"104232","","AC1_thumb.jpg",130,87,1);thumbnails[2374501]=new thumbnail(2374501,"104232","","Fly-1_thumb.jpg",130,130,1);thumbnails[1689652]=new thumbnail(1689652,"104232","","Charlie-and-puppy_thumb.jpg",130,87,1);thumbnails[2036114]=new thumbnail(2036114,"104232","","IMG_5860_thumb.jpg",130,87,1);thumbnails[1747937]=new thumbnail(1747937,"104232","","Charlie-sitting_thumb.jpg",92,130,1);thumbnails[2401388]=new thumbnail(2401388,"104232","","IMG_6641_thumb.jpg",130,87,1);thumbnails[2799807]=new thumbnail(2799807,"104232","","BARN2_thumb.jpg",130,87,1);thumbnails[1608264]=new thumbnail(1608264,"104232","","Seamus-1_thumb.jpg",87,130,1);thumbnails[3796106]=new thumbnail(3796106,"104232","","MT2_thumb.jpg",92,130,1);thumbnails[3796108]=new thumbnail(3796108,"104232","","MT1_thumb.jpg",130,92,1);thumbnails[4318145]=new thumbnail(4318145,"104232","","J1_thumb.jpg",130,87,1);var galleries=new Object();galleries[175106]=new gallery(175106,"3197239","Tiddlers","gallery",[2601620,3197239,2799426,2799428,2799430,2799432,2799438,2799440,4318305]);galleries[95815]=new gallery(95815,"3870469","Tykes","gallery",[5146968,5081593,4670782,1372426,1712590,4670777,1511590,5051501,4670798,1438263,1511636,5051632,1889322,4670902,1950918,3047268,3038180,1512718,3041101,3870469,3047317,1511595,2565582,3077008,3077009,3038177,3870519,4317686,4318310,4318313]);galleries[102506]=new gallery(102506,"2069325","Teens","gallery",[2069334,1742855,1758156,1742851,1758160,3717457,2401445,2069332,3249380,2069325,1950917,3798459,2565557,2069337,2832842,2565491,3392094,3487674,3249390,3197317]);galleries[163799]=new gallery(163799,"2566793","Twenty one +","gallery",[2566793,3798448,4317669,2565441,2565447,4317672,2832468,3070609,3070610,3197341,3197322,3197325,3197335,3855274]);galleries[130649]=new gallery(130649,"3047318","Tribes","gallery",[4317676,3047318,4317663,4670765,3038166,3038167,3038161,3197346,3197357,2832846,2832808,1950907,1950908,1950904,3870508,1950921,2601722,4317637,3392081,4318308,4318317]);galleries[104232]=new gallery(104232,"1689655","Two legs +","gallery",[1689655,1608266,2111133,1537567,2374525,2111105,1778252,2111059,2601790,2374501,1689652,2036114,1747937,2401388,2799807,1608264,3796106,3796108,4318145]);var imageSets=new Object();imageSets[1]="5146968,5051632,5051501,4320109,4320102,4320087,3796108,3796106,3197239,2832842,2799438,2799430,2565557,2374501,2069334,2069325,1511590,1438263";imageSets[2]="3870469,3197239,3047318,2566793,2069325,1689655";imageSets[3]="4317676";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/CapturePhotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/CapturePhotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/CapturePhotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/CapturePhotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/CapturePhotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/CapturePhotography/images";break}switch(a){case 21:b="http://www6.clikpic.com/CapturePhotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/CapturePhotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/CapturePhotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/CapturePhotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/CapturePhotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/CapturePhotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/CapturePhotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/CapturePhotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/CapturePhotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/CapturePhotography/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="Capture Photography Crowton: "+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;resizePhotoInfo();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+'")'})}}};