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[3601718]=new thumbnail(3601718,"","Sleeping","1171_thumb.jpg",130,98,15);thumbnails[6369390]=new thumbnail(6369390,"321785","Beating to the mark","Beating_to_the_mark_85x85_cm1_thumb.JPG",130,127,15);thumbnails[6369401]=new thumbnail(6369401,"321785","Beating neck and neck","Beating_neck_and_neck_101_x_101cm1_thumb.JPG",130,132,15);thumbnails[6391664]=new thumbnail(6391664,"321785","Racing under a grey sky<br>\r\n","Racing_under_a_grey_sky_101x101_cm_F68B6EF6-1D09-001F-9956ABE8CB9BC749_thumb.JPG",130,133,15);thumbnails[5680949]=new thumbnail(5680949,"321785","Thinking","040_thumb.JPG",130,95,15);thumbnails[3591738]=new thumbnail(3591738,"218357","LIFE DRAWING STUDY","KRD3_thumb.jpg",130,173,15);thumbnails[3592527]=new thumbnail(3592527,"218357","Seated man","IMG_0025_thumb.jpg",130,188,15);thumbnails[3592537]=new thumbnail(3592537,"218357","Line drawing","0952_thumb.jpg",130,173,15);thumbnails[3601115]=new thumbnail(3601115,"218357","Life drawing","0942_thumb.jpg",130,173,15);thumbnails[3636895]=new thumbnail(3636895,"218357","Lying figure","IMG_0001_NEW1_thumb.jpg",130,83,15);thumbnails[3636902]=new thumbnail(3636902,"218357","Sleeping","IMG_0002_NEW_thumb.jpg",130,98,15);thumbnails[3636941]=new thumbnail(3636941,"218357","Working drawing","IMG_0001_thumb.jpg",130,85,15);thumbnails[5071759]=new thumbnail(5071759,"218357","Drawing study for Sculpure","drawings_002_thumb.JPG",130,98,15);thumbnails[5071764]=new thumbnail(5071764,"218357","Drawing study for Sculpture","drawings_003_thumb.JPG",130,98,15);thumbnails[5071766]=new thumbnail(5071766,"218357","Sketch for Sculpture","drawings_004_thumb.JPG",130,99,15);thumbnails[5071772]=new thumbnail(5071772,"218357","Sketch for Sculpure","drawings_005_thumb.JPG",130,173,15);thumbnails[5071776]=new thumbnail(5071776,"218357","Sketch","drawings_006_thumb.JPG",130,113,15);thumbnails[5071781]=new thumbnail(5071781,"218357","Sketch","drawings_007_thumb.JPG",130,186,15);thumbnails[6368918]=new thumbnail(6368918,"218357","Thinking<br>\r\nA3","040_E7631D83-1D09-001F-99C262639DB4F316_thumb.JPG",130,95,15);thumbnails[5680959]=new thumbnail(5680959,"218357","","084_thumb.JPG",130,170,15);thumbnails[5681760]=new thumbnail(5681760,"218357","","083_thumb.JPG",130,168,15);thumbnails[3592736]=new thumbnail(3592736,"219580","","KRSculpture_work_in_process_thumb.jpg",130,98,15);thumbnails[3592886]=new thumbnail(3592886,"219580","Studio","1184_thumb.JPG",130,98,15);thumbnails[3593342]=new thumbnail(3593342,"219580","","KR__Clay_Maquettes12_thumb.jpg",130,155,15);thumbnails[3601459]=new thumbnail(3601459,"219580","Working in my studio","kate_richardson_003_thumb.JPG",130,173,15);thumbnails[3602114]=new thumbnail(3602114,"219580","Kate Richardson","2986_thumb.JPG",130,173,15);thumbnails[3636599]=new thumbnail(3636599,"219580","Lady ","IMG_0003_NEW_thumb.jpg",130,188,15);thumbnails[5681928]=new thumbnail(5681928,"219580","","name_001_thumb.JPG",130,43,15);thumbnails[6377358]=new thumbnail(6377358,"219580","","P1010439_thumb.JPG",130,98,15);thumbnails[3592711]=new thumbnail(3592711,"218356","Life drawing","120_thumb.jpg",130,98,15);thumbnails[3592731]=new thumbnail(3592731,"218356","Life drawing","122_thumb.jpg",130,98,15);thumbnails[3592761]=new thumbnail(3592761,"218356","Watching the racing","119_thumb.jpg",130,98,15);thumbnails[3592822]=new thumbnail(3592822,"218356","SAIL AWAY WITH ME HONEY","109_thumb.jpg",130,121,15);thumbnails[3592823]=new thumbnail(3592823,"218356","Sailing along in harmony","110_thumb.jpg",130,131,15);thumbnails[3601128]=new thumbnail(3601128,"218356","Cocktail party","1032_thumb.jpg",130,97,15);thumbnails[3601142]=new thumbnail(3601142,"218356","Life drawing","092_thumb.jpg",130,54,15);thumbnails[3601147]=new thumbnail(3601147,"218356","'Lightning'","1051_thumb.jpg",130,129,15);thumbnails[3601172]=new thumbnail(3601172,"218356","Life drawing","129_thumb.jpg",130,51,15);thumbnails[3601193]=new thumbnail(3601193,"218356","3 Figures","1301_thumb.jpg",130,98,15);thumbnails[3601199]=new thumbnail(3601199,"218356","Team work","1181_thumb.jpg",130,65,15);thumbnails[3601207]=new thumbnail(3601207,"218356","Racing to the mark","124_thumb.jpg",130,98,15);thumbnails[3601217]=new thumbnail(3601217,"218356","Life drawing","1041_thumb.jpg",130,173,15);thumbnails[3601266]=new thumbnail(3601266,"218356","By the sea","1001_thumb.jpg",130,173,15);thumbnails[3601299]=new thumbnail(3601299,"218356","Thinking","1071_thumb.jpg",130,173,15);thumbnails[3601314]=new thumbnail(3601314,"218356","Rounding the mark","111_thumb.jpg",130,31,15);thumbnails[3628166]=new thumbnail(3628166,"218356","Up the mast","KRP_33_80x30_cm_thumb.jpg",130,341,15);thumbnails[3628180]=new thumbnail(3628180,"218356","HELMING","KRP_34_80x30_cm_thumb.jpg",130,359,15);thumbnails[6368608]=new thumbnail(6368608,"218356","Beach Cottages<br>\r\n101 x101 cm","Beach_cottages_101x101cm_2_thumb.jpg",130,130,15);thumbnails[6368739]=new thumbnail(6368739,"218356","Three moored boats , slack tide","Three_moored_boats_slack_tide_30x120_each_90x120_cm_together_2_thumb.jpg",130,170,15);thumbnails[6369099]=new thumbnail(6369099,"218356","Waiting","Waiting_52x_42_cm_glass_frame_thumb.JPG",130,96,15);thumbnails[6369388]=new thumbnail(6369388,"218356","Beating to the mark","Beating_to_the_mark_85x85_cm_thumb.JPG",130,127,15);thumbnails[6369396]=new thumbnail(6369396,"218356","Beating neck and neck","Beating_neck_and_neck_101_x_101cm_thumb.JPG",130,132,15);thumbnails[6369398]=new thumbnail(6369398,"218356","Racing under a grey sky","Racing_under_a_grey_sky_101x101_cm_thumb.JPG",130,133,15);thumbnails[6369399]=new thumbnail(6369399,"218356","Squeezing up to the mark","Squeezing_up_to_the_mark_101x_101cm_thumb.JPG",130,127,15);thumbnails[3592574]=new thumbnail(3592574,"218356","Contemplate","1251_thumb.jpg",130,337,15);thumbnails[3592583]=new thumbnail(3592583,"218356","Let it out","128_thumb.jpg",130,340,15);thumbnails[3592559]=new thumbnail(3592559,"218356","Life drawing","098_thumb.jpg",130,336,15);thumbnails[3601221]=new thumbnail(3601221,"218356","Racing 1","113_thumb.jpg",130,98,15);thumbnails[3601234]=new thumbnail(3601234,"218356","Racing 2","114_thumb.jpg",130,98,15);thumbnails[3601242]=new thumbnail(3601242,"218356","Racing 3","115_thumb.jpg",130,98,15);thumbnails[3592724]=new thumbnail(3592724,"218356","Racing 4","112_thumb.jpg",130,98,15);thumbnails[3592613]=new thumbnail(3592613,"218356","Life drawing","108_thumb.jpg",130,173,15);thumbnails[3592640]=new thumbnail(3592640,"218356","Taking time out","102_thumb.jpg",130,98,15);thumbnails[3592594]=new thumbnail(3592594,"218356","Life drawing","101_thumb.jpg",130,173,15);thumbnails[3592627]=new thumbnail(3592627,"218356","life drawing","126_thumb.jpg",130,339,15);thumbnails[3573281]=new thumbnail(3573281,"218356","Life drawing","099_thumb.jpg",130,173,15);thumbnails[3592644]=new thumbnail(3592644,"218356","Life drawing","116_thumb.jpg",130,114,15);thumbnails[3591734]=new thumbnail(3591734,"218456","Chatting","sculpture_013_thumb.JPG",130,98,15);thumbnails[3592028]=new thumbnail(3592028,"218456","Looking out to sea","132_thumb.jpg",130,173,15);thumbnails[3592033]=new thumbnail(3592033,"218456","Moving forward","135_thumb.jpg",130,173,15);thumbnails[3592039]=new thumbnail(3592039,"218456","Standing lady","1341_thumb.jpg",130,173,15);thumbnails[3592501]=new thumbnail(3592501,"218456","Portrait","1381_thumb.jpg",130,173,15);thumbnails[3592504]=new thumbnail(3592504,"218456","Plaster Figure","136_thumb.jpg",130,173,15);thumbnails[3592742]=new thumbnail(3592742,"218456","Four people.","123_thumb.jpg",130,99,15);thumbnails[3601110]=new thumbnail(3601110,"218456","Torso","1372_thumb.jpg",130,173,15);thumbnails[3601464]=new thumbnail(3601464,"218456","Reaching out","1312_thumb.jpg",130,173,15);thumbnails[3603526]=new thumbnail(3603526,"218456","Four People","KRS_1_thumb.jpg",130,98,15);thumbnails[3603530]=new thumbnail(3603530,"218456","Four people","KRS_4_thumb.jpg",130,98,15);thumbnails[3603533]=new thumbnail(3603533,"218456","Four people (detail)","KRS_31_thumb.jpg",130,98,15);thumbnails[3636647]=new thumbnail(3636647,"218456","The inspiration of Rome","IMG_NEW_NEW_thumb.jpg",130,357,15);thumbnails[3636977]=new thumbnail(3636977,"218456","Portrait 2 ","IMG_0019_thumb.jpg",130,165,15);thumbnails[3637162]=new thumbnail(3637162,"218456","Portrait 3","IMG_0029_thumb.jpg",130,201,15);thumbnails[3637720]=new thumbnail(3637720,"218456","Seated lady","2922_thumb.JPG",130,98,15);thumbnails[3640454]=new thumbnail(3640454,"218456","Seated lady","2921_thumb.JPG",130,173,15);thumbnails[5071795]=new thumbnail(5071795,"218456","Talking","sculpture_001_thumb.JPG",130,98,15);thumbnails[5071797]=new thumbnail(5071797,"218456","Talking (Detail )","sculpture_005_thumb.JPG",130,173,15);thumbnails[3592480]=new thumbnail(3592480,"218456","Soaking up the Atmosphere","1332_thumb.jpg",130,98,15);thumbnails[5681043]=new thumbnail(5681043,"218456","Talking","075_thumb.JPG",130,98,15);var galleries=new Object();galleries[321785]=new gallery(321785,"6391664,5680949","Prints","gallery",[6369390,6369401,6391664,5680949]);galleries[218357]=new gallery(218357,"3592537","Drawings","gallery",[3591738,3592527,3592537,3601115,3636895,3636902,3636941,5071759,5071764,5071766,5071772,5071776,5071781,6368918,5680959,5681760]);galleries[219580]=new gallery(219580,"3602114,3601459","Studio","gallery",[3592736,3592886,3593342,3601459,3602114,3636599,5681928,6377358]);galleries[218356]=new gallery(218356,"3592594","Paintings","gallery",[3592711,3592731,3592761,3592822,3592823,3601128,3601142,3601147,3601172,3601193,3601199,3601207,3601217,3601266,3601299,3601314,3628166,3628180,6368608,6368739,6369099,6369388,6369396,6369398,6369399,3592574,3592583,3592559,3601221,3601234,3601242,3592724,3592613,3592640,3592594,3592627,3573281,3592644]);galleries[218456]=new gallery(218456,"3592480","Sculpture","gallery",[3591734,3592028,3592033,3592039,3592501,3592504,3592742,3601110,3601464,3603526,3603530,3603533,3636647,3636977,3637162,3637720,3640454,5071795,5071797,3592480,5681043]);var imageSets=new Object();imageSets[1]="5681928,5681760,5681043,5680949,5071797,5071795,3603533,3603530,3603526,3602114,3601718,3601193,3601172,3601147,3601142,3601128,3601115,3592736,3592731,3592711,3592640,3592537,3592480";imageSets[2]="6391664,5680949,3602114,3601459,3592594,3592537,3592480";imageSets[3]="6391664,6377358,6369401,6369399,6369398,6369396,6369390,6369388,6369099,6368918,6368739,6368608,5681928,5681760,5681043,5680959,5680949,5071797,5071795,5071781,5071776,5071772,5071766,5071764,5071759,3640454,3637720,3637162,3636977,3636941,3636902,3636895,3636647,3636599,3628180,3628166,3603533,3603530,3603526,3602114,3601718,3601464,3601459,3601314,3601299,3601266,3601242,3601234,3601221,3601217";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/kateart/images";break}switch(a){case 1:b="http://www1.clikpic.com/kateart/images";break}switch(a){case 2:b="http://admin.clikpic.com/kateart/images";break}switch(a){case 24:b="http://tpc15/clikpic/kateart/images";break}switch(a){case 4:b="http://www.clikchurch.com/kateart/images";break}switch(a){case 5:b="http://www2.clikpic.com/kateart/images";break}switch(a){case 22:b="http://tpc5/clikpic/kateart/images";break}switch(a){case 23:b="http://tpc10/clikpic/kateart/images";break}switch(a){case 25:b="http://tpc16/clikpic/kateart/images";break}switch(a){case 15:b="http://www3.clikpic.com/kateart/images";break}switch(a){case 18:b="http://www4.clikpic.com/kateart/images";break}switch(a){case 19:b="http://www5.clikpic.com/kateart/images";break}switch(a){case 31:b="http://www7.clikpic.com/kateart/images";break}switch(a){case 32:b="http://admin2.clikpic.com/kateart/images";break}switch(a){case 33:b="http://www8.clikpic.com/kateart/images";break}switch(a){case 34:b="http://www9.clikpic.com/kateart/images";break}switch(a){case 35:b="http://admin3.clikpic.com/kateart/images";break}switch(a){case 37:b="http://admin4.clikpic.com/kateart/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="'+escape(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="KATE RICHARDSON - ARTIST: "+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> 				&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="">';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="">';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+'")'})}}};