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[4200158]=new thumbnail(4200158,"226414","","CrackWindow4_copy_thumb.jpg",130,193,5);thumbnails[4200213]=new thumbnail(4200213,"226414","","Untitled_102_thumb.jpg",130,193,5);thumbnails[4200175]=new thumbnail(4200175,"226414","","neg47ish_copy_thumb.jpg",130,193,5);thumbnails[4200168]=new thumbnail(4200168,"226414","","neg34_thumb.jpg",130,163,5);thumbnails[4200212]=new thumbnail(4200212,"226414","","TrampFlatBedScan_thumb.jpg",130,175,5);thumbnails[4200188]=new thumbnail(4200188,"226414","","neg51_thumb.jpg",130,130,5);thumbnails[4209239]=new thumbnail(4209239,"226414","","BusStation11_1_thumb.jpg",130,130,5);thumbnails[4200197]=new thumbnail(4200197,"226414","","neg62_thumb.jpg",130,88,5);thumbnails[4369980]=new thumbnail(4369980,"226414","","neg62a_thumb.jpg",130,104,5);thumbnails[4200201]=new thumbnail(4200201,"226414","","neg83c_thumb.jpg",130,88,5);thumbnails[4200154]=new thumbnail(4200154,"226414","","BusStation9_copy_thumb.jpg",130,88,5);thumbnails[4200206]=new thumbnail(4200206,"226414","","neg126_thumb.jpg",130,88,5);thumbnails[4234855]=new thumbnail(4234855,"226414","","BusStation2_copy_thumb.jpg",130,88,5);thumbnails[4200202]=new thumbnail(4200202,"226414","","neg84_thumb.jpg",130,88,5);thumbnails[4369986]=new thumbnail(4369986,"226415","","Untitled_4_thumb.jpg",130,104,5);thumbnails[4209904]=new thumbnail(4209904,"226415","","108b_thumb.jpg",130,104,5);thumbnails[4209926]=new thumbnail(4209926,"226415","","neg108c_thumb.jpg",130,104,5);thumbnails[4209930]=new thumbnail(4209930,"226415","","neg109a_thumb.jpg",130,104,5);thumbnails[4209996]=new thumbnail(4209996,"226415","","Untitled_7_thumb.jpg",130,104,5);thumbnails[4209932]=new thumbnail(4209932,"226415","","Untitled_3_thumb.jpg",130,104,5);thumbnails[4209928]=new thumbnail(4209928,"226415","","neg109_thumb.jpg",130,104,5);thumbnails[4369988]=new thumbnail(4369988,"226415","","Untitled_12_thumb.jpg",130,104,5);thumbnails[4209912]=new thumbnail(4209912,"226415","","neg60a_thumb.jpg",130,88,5);thumbnails[4209909]=new thumbnail(4209909,"226415","","neg50_thumb.jpg",130,88,5);thumbnails[4209905]=new thumbnail(4209905,"226415","","Face_thumb.jpg",130,88,5);thumbnails[4209922]=new thumbnail(4209922,"226415","","neg84c_thumb.jpg",130,88,5);thumbnails[4209921]=new thumbnail(4209921,"226415","","neg73b_thumb.jpg",130,88,5);thumbnails[4209914]=new thumbnail(4209914,"226415","","neg70c_thumb.jpg",130,88,5);thumbnails[4209918]=new thumbnail(4209918,"226415","","neg73_thumb.jpg",130,88,5);thumbnails[4369941]=new thumbnail(4369941,"226415","","Barrackscol2_thumb.jpg",130,88,5);thumbnails[4369955]=new thumbnail(4369955,"226415","","Barrackscol4_thumb.jpg",130,88,5);thumbnails[4369949]=new thumbnail(4369949,"226415","","Barrackscol3_thumb.jpg",130,88,5);thumbnails[4369960]=new thumbnail(4369960,"226415","","Barrackscol9_thumb.jpg",130,88,5);thumbnails[4213231]=new thumbnail(4213231,"226416","","Henbury13b_thumb.jpg",130,88,5);thumbnails[4209265]=new thumbnail(4209265,"226416","","neg44_thumb.jpg",130,88,5);thumbnails[4209269]=new thumbnail(4209269,"226416","","neg44d_thumb.jpg",130,88,5);thumbnails[4209266]=new thumbnail(4209266,"226416","","neg44b_thumb.jpg",130,88,5);thumbnails[4209268]=new thumbnail(4209268,"226416","","neg44c_thumb.jpg",130,88,5);thumbnails[4209255]=new thumbnail(4209255,"226416","","DSC_0144_copy_thumb.jpg",130,88,5);thumbnails[4209263]=new thumbnail(4209263,"226416","","DSC_0201_copy_thumb.jpg",130,88,5);thumbnails[4213222]=new thumbnail(4213222,"226416","","Henbury12b_thumb.jpg",130,88,5);thumbnails[4209272]=new thumbnail(4209272,"226416","","neg45_thumb.jpg",130,104,5);thumbnails[4444948]=new thumbnail(4444948,"259877","","DSC_0072_copy_thumb.jpg",130,88,5);thumbnails[4445060]=new thumbnail(4445060,"259877","","Image89_copy_thumb.jpg",130,88,5);thumbnails[4445057]=new thumbnail(4445057,"259877","","DSC_0108_copy_thumb.jpg",130,88,5);thumbnails[4445064]=new thumbnail(4445064,"259877","","Image151_copy_thumb.jpg",130,88,5);thumbnails[4445063]=new thumbnail(4445063,"259877","","Image134_copy_thumb.jpg",130,193,5);thumbnails[4444987]=new thumbnail(4444987,"259877","","DSC_0278col_thumb.jpg",130,193,5);thumbnails[4445058]=new thumbnail(4445058,"259877","","Image70_copy_thumb.jpg",130,193,5);thumbnails[4444973]=new thumbnail(4444973,"259877","","DSC_0279_copy_thumb.jpg",130,193,5);thumbnails[4445062]=new thumbnail(4445062,"259877","","Image101_copy_thumb.jpg",130,193,5);thumbnails[4213338]=new thumbnail(4213338,"226412","","por2_thumb.jpg",130,163,5);thumbnails[4685325]=new thumbnail(4685325,"226412","","Untitled_8_thumb.jpg",130,163,5);thumbnails[4213342]=new thumbnail(4213342,"226412","","por4_thumb.jpg",130,163,5);thumbnails[4685321]=new thumbnail(4685321,"226412","","Untitled_3_1_thumb.jpg",130,163,5);thumbnails[4213348]=new thumbnail(4213348,"226412","","pot6_thumb.jpg",130,163,5);thumbnails[4685337]=new thumbnail(4685337,"226412","","Untitled_13_thumb.jpg",130,163,5);thumbnails[4685330]=new thumbnail(4685330,"226412","","Untitled_11_thumb.jpg",130,163,5);thumbnails[4213352]=new thumbnail(4213352,"226412","","pot7_thumb.jpg",130,163,5);thumbnails[4685556]=new thumbnail(4685556,"226412","","Untitled_811_thumb.jpg",130,163,5);thumbnails[4234938]=new thumbnail(4234938,"226413","","neg39c_thumb.jpg",130,104,5);thumbnails[4234942]=new thumbnail(4234942,"226413","","neg38c_thumb.jpg",130,104,5);thumbnails[4234940]=new thumbnail(4234940,"226413","","neg39b_thumb.jpg",130,104,5);thumbnails[4200386]=new thumbnail(4200386,"226413","","neg38_thumb.jpg",130,104,5);thumbnails[4200383]=new thumbnail(4200383,"226413","","DSC_0284_copy_thumb.jpg",130,88,5);thumbnails[4200406]=new thumbnail(4200406,"226413","","neg58a_thumb.jpg",130,88,5);thumbnails[4369969]=new thumbnail(4369969,"226413","","neg60b_thumb.jpg",130,88,5);thumbnails[4200413]=new thumbnail(4200413,"226413","","neg60_thumb.jpg",130,88,5);thumbnails[4369972]=new thumbnail(4369972,"226413","","neg60e_thumb.jpg",130,88,5);thumbnails[4369967]=new thumbnail(4369967,"226413","","neg60a2_thumb.jpg",130,88,5);thumbnails[4200426]=new thumbnail(4200426,"226413","","neg70_thumb.jpg",130,88,5);thumbnails[4200432]=new thumbnail(4200432,"226413","","neg70b_thumb.jpg",130,88,5);thumbnails[4200438]=new thumbnail(4200438,"226413","","neg71_thumb.jpg",130,88,5);thumbnails[4200439]=new thumbnail(4200439,"226413","","neg73a_thumb.jpg",130,88,5);thumbnails[4369984]=new thumbnail(4369984,"226413","","neg64_thumb.jpg",130,88,5);thumbnails[4369959]=new thumbnail(4369959,"226413","","Barrackscol7_thumb.jpg",130,88,5);thumbnails[4210129]=new thumbnail(4210129,"226422","","neg83_thumb.jpg",130,88,5);thumbnails[4210127]=new thumbnail(4210127,"226422","","neg81_thumb.jpg",130,88,5);thumbnails[4210124]=new thumbnail(4210124,"226422","","neg79b_thumb.jpg",130,88,5);thumbnails[4213211]=new thumbnail(4213211,"226422","","MaccForest34_thumb.jpg",130,88,5);thumbnails[4235056]=new thumbnail(4235056,"226422","","aUntitled_4_thumb.jpg",130,104,5);thumbnails[4210154]=new thumbnail(4210154,"226422","","lan4_1_thumb.jpg",130,104,5);thumbnails[4213216]=new thumbnail(4213216,"226422","","MaccForest_thumb.jpg",130,104,5);thumbnails[4210148]=new thumbnail(4210148,"226422","","MaccForest55_1_thumb.jpg",130,104,5);thumbnails[4210113]=new thumbnail(4210113,"226422","","DSC_0282_copy_thumb.jpg",130,193,5);thumbnails[4210115]=new thumbnail(4210115,"226422","","DSC_0294_copy_thumb.jpg",130,193,5);thumbnails[4210074]=new thumbnail(4210074,"226422","","DSC_0253_copy_thumb.jpg",130,193,5);thumbnails[4320737]=new thumbnail(4320737,"226424","","912_thumb.jpg",130,104,5);thumbnails[4360689]=new thumbnail(4360689,"226424","","83_thumb.jpg",130,104,5);thumbnails[4320740]=new thumbnail(4320740,"226424","","92_thumb.jpg",130,104,5);thumbnails[4360690]=new thumbnail(4360690,"226424","","76_thumb.jpg",130,104,5);thumbnails[4360691]=new thumbnail(4360691,"226424","","72_thumb.jpg",130,104,5);thumbnails[4360756]=new thumbnail(4360756,"226424","","4_thumb.jpg",130,104,5);thumbnails[4360692]=new thumbnail(4360692,"226424","","70_thumb.jpg",130,104,5);thumbnails[4360758]=new thumbnail(4360758,"226424","","30_thumb.jpg",130,104,5);thumbnails[4360703]=new thumbnail(4360703,"226424","","97_thumb.jpg",130,104,5);thumbnails[4074207]=new thumbnail(4074207,"226424","","2imagePres2_thumb.jpg",130,90,5);thumbnails[4074201]=new thumbnail(4074201,"226424","","2imagePres_thumb.jpg",130,88,5);thumbnails[4074213]=new thumbnail(4074213,"226424","","LondonFinal_thumb.jpg",130,61,5);var galleries=new Object();galleries[226414]=new gallery(226414,"4200206","in this city","gallery",[4200158,4200213,4200175,4200168,4200212,4200188,4209239,4200197,4369980,4200201,4200154,4200206,4234855,4200202]);galleries[226415]=new gallery(226415,"4209918","public art","gallery",[4369986,4209904,4209926,4209930,4209996,4209932,4209928,4369988,4209912,4209909,4209905,4209922,4209921,4209914,4209918,4369941,4369955,4369949,4369960]);galleries[226416]=new gallery(226416,"4209268","henbury high school","gallery",[4213231,4209265,4209269,4209266,4209268,4209255,4209263,4213222,4209272]);galleries[259877]=new gallery(259877,"4445060","windystock 09","gallery",[4444948,4445060,4445057,4445064,4445063,4444987,4445058,4444973,4445062]);galleries[226412]=new gallery(226412,"4213338","street fashion","gallery",[4213338,4685325,4213342,4685321,4213348,4685337,4685330,4213352,4685556]);galleries[226413]=new gallery(226413,"4234938","exploration","gallery",[4234938,4234942,4234940,4200386,4200383,4200406,4369969,4200413,4369972,4369967,4200426,4200432,4200438,4200439,4369984,4369959]);galleries[226422]=new gallery(226422,"4235056","landscapes","gallery",[4210129,4210127,4210124,4213211,4235056,4210154,4213216,4210148,4210113,4210115,4210074]);galleries[226424]=new gallery(226424,"4320740","forest management","gallery",[4320737,4360689,4320740,4360690,4360691,4360756,4360692,4360758,4360703,4074207,4074201,4074213]);var imageSets=new Object();imageSets[1]="4445064,4444987,4369967,4360689,4320740,4234938,4213342,4213338,4210129,4209926,4209918,4209912,4209909,4209272,4209268,4200432,4200386,4200212,4200197";imageSets[2]="4445060,4320740,4235056,4234938,4213338,4209918,4209268,4200206";imageSets[3]="4234942,4234940,4234855,4213231,4213222,4209996,4209932,4209930,4209928,4209926,4209922,4209912,4209909,4209905,4209904,4209272,4209269,4209268,4209266,4209265,4209263,4209255,4209239,4200439,4200438,4200432";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/mjrichards/images";break}switch(a){case 1:b="http://www1.clikpic.com/mjrichards/images";break}switch(a){case 2:b="http://admin.clikpic.com/mjrichards/images";break}switch(a){case 24:b="http://tpc15/clikpic/mjrichards/images";break}switch(a){case 4:b="http://www.clikchurch.com/mjrichards/images";break}switch(a){case 5:b="http://www2.clikpic.com/mjrichards/images";break}switch(a){case 22:b="http://tpc5/clikpic/mjrichards/images";break}switch(a){case 23:b="http://tpc10/clikpic/mjrichards/images";break}switch(a){case 25:b="http://tpc16/clikpic/mjrichards/images";break}switch(a){case 15:b="http://www3.clikpic.com/mjrichards/images";break}switch(a){case 18:b="http://www4.clikpic.com/mjrichards/images";break}switch(a){case 19:b="http://www5.clikpic.com/mjrichards/images";break}switch(a){case 31:b="http://www7.clikpic.com/mjrichards/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mjrichards/images";break}switch(a){case 33:b="http://www8.clikpic.com/mjrichards/images";break}switch(a){case 34:b="http://www9.clikpic.com/mjrichards/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mjrichards/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mjrichards/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="Michael Joseph Richards: "+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("image added to basket").show()}else{$("#paymentConfirm").text("image added to basket").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> 				&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>you can purchase this photograph now...</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="mj.richards@hotmail.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 image to your basket" 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="mj.richards@hotmail.com">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value=" " 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+'")'})}}};