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[2304220]=new thumbnail(2304220,"150750","","No_00 (21) copy_thumb.jpg",130,173,15);thumbnails[2304224]=new thumbnail(2304224,"150750","","No_00 (24) copy_thumb.jpg",130,98,15);thumbnails[2304227]=new thumbnail(2304227,"150750","","No_00 (28) copy_thumb.jpg",130,98,15);thumbnails[2304230]=new thumbnail(2304230,"150750","","No_00 (32) copy_thumb.jpg",130,98,15);thumbnails[2304255]=new thumbnail(2304255,"150750","","No_00 (34) copy_thumb.jpg",130,98,15);thumbnails[2304273]=new thumbnail(2304273,"150750","","No_00 (42) copy_thumb.jpg",130,98,15);thumbnails[2304284]=new thumbnail(2304284,"150750","","No_00 (49) copy_thumb.jpg",130,98,15);thumbnails[2304286]=new thumbnail(2304286,"150750","","No_00 (53) copy_thumb.jpg",130,173,15);thumbnails[2304288]=new thumbnail(2304288,"150750","","No_00 (57) copy_thumb.jpg",130,173,15);thumbnails[2304310]=new thumbnail(2304310,"150750","","No_00 (66) copy_thumb.jpg",130,87,15);thumbnails[2304314]=new thumbnail(2304314,"150750","","No_00 (67) copy_thumb.jpg",130,87,15);thumbnails[2304317]=new thumbnail(2304317,"150750","","No_00 (73) copy_thumb.jpg",130,87,15);thumbnails[2304320]=new thumbnail(2304320,"150750","","No_00 (75) copy_thumb.jpg",130,98,15);thumbnails[2304321]=new thumbnail(2304321,"150750","","No_00 (85) copy_thumb.jpg",130,173,15);thumbnails[2304369]=new thumbnail(2304369,"150750","","No_00 (92) copy_thumb.jpg",130,98,15);thumbnails[2304374]=new thumbnail(2304374,"150750","","No_00 (93) copy_thumb.jpg",130,98,15);thumbnails[2304375]=new thumbnail(2304375,"150750","","No_00 (94) copy_thumb.jpg",130,173,15);thumbnails[2304379]=new thumbnail(2304379,"150750","","No_00 (95) copy_thumb.jpg",130,173,15);thumbnails[2304381]=new thumbnail(2304381,"150750","","No_00 (98) copy_thumb.jpg",130,98,15);thumbnails[2304382]=new thumbnail(2304382,"150750","","No_00 (100) copy_thumb.jpg",130,173,15);thumbnails[2304384]=new thumbnail(2304384,"150750","","No_00 (102) copy_thumb.jpg",130,173,15);thumbnails[2304387]=new thumbnail(2304387,"150750","","No_00 (107) copy_thumb.jpg",130,173,15);thumbnails[2304389]=new thumbnail(2304389,"150750","","No_00 (112) copy_thumb.jpg",130,173,15);thumbnails[2304392]=new thumbnail(2304392,"150750","","No_00 (117) copy_thumb.jpg",130,173,15);thumbnails[2304396]=new thumbnail(2304396,"150750","","No_00 (120) copy_thumb.jpg",130,98,15);thumbnails[2304401]=new thumbnail(2304401,"150750","","No_00 (129) copy_thumb.jpg",130,173,15);thumbnails[2304405]=new thumbnail(2304405,"150750","","No_00 (132) copy_thumb.jpg",130,173,15);thumbnails[2304413]=new thumbnail(2304413,"150750","","No_00 (133) copy_thumb.jpg",130,98,15);thumbnails[2304418]=new thumbnail(2304418,"150750","","No_00 (135) copy1_thumb.jpg",130,98,15);thumbnails[2304419]=new thumbnail(2304419,"150750","","No_00 (145) copy_thumb.jpg",130,184,15);thumbnails[2304004]=new thumbnail(2304004,"150429","Garfield House Hotel Wedding <br>\r\n","IMG_1470_thumb.jpg",130,98,15);thumbnails[2304037]=new thumbnail(2304037,"150429","","IMG_1539 copy_thumb.jpg",130,173,15);thumbnails[2304046]=new thumbnail(2304046,"150429","","IMG_1544 copy_thumb.jpg",130,173,15);thumbnails[2304052]=new thumbnail(2304052,"150429","","IMG_1545 copy_thumb.jpg",130,173,15);thumbnails[2304059]=new thumbnail(2304059,"150429","","IMG_1550 copy_thumb.jpg",130,173,15);thumbnails[2304060]=new thumbnail(2304060,"150429","","IMG_1558 copy_thumb.jpg",130,173,15);thumbnails[2304062]=new thumbnail(2304062,"150429","","IMG_1563 copy_thumb.jpg",130,98,15);thumbnails[2304064]=new thumbnail(2304064,"150429","","IMG_1565 copy_thumb.jpg",130,173,15);thumbnails[2304066]=new thumbnail(2304066,"150429","","IMG_1570 copy_thumb.jpg",130,173,15);thumbnails[2304068]=new thumbnail(2304068,"150429","","IMG_1571 copy_thumb.jpg",130,173,15);thumbnails[2304072]=new thumbnail(2304072,"150429","","IMG_1574 copy_thumb.jpg",130,98,15);thumbnails[2304074]=new thumbnail(2304074,"150429","","IMG_1577 copy_thumb.jpg",130,98,15);thumbnails[2304076]=new thumbnail(2304076,"150429","","IMG_1578 copy_thumb.jpg",130,98,15);thumbnails[2304078]=new thumbnail(2304078,"150429","","IMG_1581 copy_thumb.jpg",130,98,15);thumbnails[2304085]=new thumbnail(2304085,"150429","","IMG_1583 copy_thumb.jpg",130,98,15);thumbnails[2304100]=new thumbnail(2304100,"150429","","IMG_1602 copy_thumb.jpg",130,98,15);thumbnails[2304107]=new thumbnail(2304107,"150429","","IMG_1608 copy_thumb.jpg",130,98,15);thumbnails[2304113]=new thumbnail(2304113,"150429","","IMG_1613 copy_thumb.jpg",130,173,15);thumbnails[2304118]=new thumbnail(2304118,"150429","","IMG_1615 copy_thumb.jpg",130,173,15);thumbnails[2304120]=new thumbnail(2304120,"150429","","IMG_1618 copy_thumb.jpg",130,173,15);thumbnails[2304124]=new thumbnail(2304124,"150429","","IMG_1622 copy_thumb.jpg",130,173,15);thumbnails[2304142]=new thumbnail(2304142,"150429","","IMG_1632 copy1_thumb.jpg",130,173,15);thumbnails[2304147]=new thumbnail(2304147,"150429","","IMG_1640 copy_thumb.jpg",130,98,15);thumbnails[2304152]=new thumbnail(2304152,"150429","","IMG_1641 copy_thumb.jpg",130,98,15);thumbnails[2304168]=new thumbnail(2304168,"150429","","IMG_1649 copy_thumb.jpg",130,98,15);thumbnails[2304174]=new thumbnail(2304174,"150429","","IMG_1664 copy_thumb.jpg",130,173,15);thumbnails[781991]=new thumbnail(781991,"60612","","DSC (9)1.jpg",130,87,15);thumbnails[781994]=new thumbnail(781994,"60612","","DSC (3)1.jpg",130,194,15);thumbnails[781995]=new thumbnail(781995,"60612","","DSC(1)1.jpg",130,87,15);thumbnails[781996]=new thumbnail(781996,"60612","","DSC (5)1.jpg",130,194,15);thumbnails[781998]=new thumbnail(781998,"60612","","DSC (6)1.jpg",130,194,15);thumbnails[782001]=new thumbnail(782001,"60612","","DSC (7)1.jpg",130,87,15);thumbnails[782002]=new thumbnail(782002,"60612","","DSC (10)1.jpg",130,200,15);thumbnails[782005]=new thumbnail(782005,"60612","","DSC (11)1.jpg",130,194,15);thumbnails[782006]=new thumbnail(782006,"60612","","DSC (4)1.jpg",130,87,15);thumbnails[782042]=new thumbnail(782042,"60612","","DSC (8)1.jpg",130,194,15);thumbnails[782046]=new thumbnail(782046,"60612","","DSC (2)1.jpg",130,194,15);thumbnails[782142]=new thumbnail(782142,"60612","","DSC_2268_pp copy1.jpg",130,194,15);thumbnails[809427]=new thumbnail(809427,"60612","","Web (6)1.jpg",130,86,15);thumbnails[784455]=new thumbnail(784455,"60613","Edinburgh BY Night","web21.jpg",130,86,15);thumbnails[784457]=new thumbnail(784457,"60613","Edinburgh BY Night","web15.jpg",130,196,15);thumbnails[784458]=new thumbnail(784458,"60613","Edinburgh BY Night","web31.jpg",130,86,15);thumbnails[809391]=new thumbnail(809391,"60613","Edinburgh BY Night","Web (4)1.jpg",130,76,15);thumbnails[809425]=new thumbnail(809425,"60613","Edinburgh BY Night","Web (3)3.jpg",130,86,15);thumbnails[809431]=new thumbnail(809431,"60613","","Web (2)1.jpg",130,86,15);thumbnails[809434]=new thumbnail(809434,"60613","","Web(1)1.jpg",130,86,15);thumbnails[778354]=new thumbnail(778354,"58433","","JPEG_(1)1.jpg",130,87,15);thumbnails[778363]=new thumbnail(778363,"58433","","JPEG_ (2)1.jpg",130,87,15);thumbnails[778374]=new thumbnail(778374,"58433","","JPEG_ (4)1.jpg",130,98,15);thumbnails[778376]=new thumbnail(778376,"58433","","JPEG_ (5)1.jpg",130,87,15);thumbnails[778378]=new thumbnail(778378,"58433","","JPEG_ (6)1.jpg",130,98,15);thumbnails[778379]=new thumbnail(778379,"58433","","JPEG_ (7)1.jpg",130,98,15);thumbnails[778380]=new thumbnail(778380,"58433","","JPEG_ (8)1.jpg",130,98,15);thumbnails[778381]=new thumbnail(778381,"58433","","JPEG_ (9)1.jpg",130,87,15);thumbnails[778386]=new thumbnail(778386,"58433","","JPEG_ (11)1.jpg",130,98,15);thumbnails[778387]=new thumbnail(778387,"58433","","JPEG_ (12)1.jpg",130,98,15);thumbnails[778389]=new thumbnail(778389,"58433","","JPEG_ (13)1.jpg",130,87,15);thumbnails[778390]=new thumbnail(778390,"58433","","JPEG_ (14)1.jpg",130,98,15);thumbnails[778391]=new thumbnail(778391,"58433","","JPEG_(15)1.jpg",130,194,15);thumbnails[778393]=new thumbnail(778393,"58433","","JPEG_ (16)1.jpg",130,194,15);thumbnails[778404]=new thumbnail(778404,"58433","","JPEG_ (20)1.jpg",130,194,15);thumbnails[778411]=new thumbnail(778411,"58433","","JPEG_ (25)1.jpg",130,173,15);thumbnails[778414]=new thumbnail(778414,"58433","","JPEG_ (26)1.jpg",130,194,15);thumbnails[774804]=new thumbnail(774804,"59908","","Jpeg 1.jpg",130,86,15);thumbnails[778046]=new thumbnail(778046,"59908","","jpeg-52.jpg",130,86,15);thumbnails[778135]=new thumbnail(778135,"59908","","jpeg-102.jpg",130,86,15);thumbnails[778137]=new thumbnail(778137,"59908","","jpeg-143.jpg",130,196,15);thumbnails[778143]=new thumbnail(778143,"59908","","jpeg-183.jpg",130,196,15);thumbnails[778171]=new thumbnail(778171,"59908","","jpeg-193.jpg",130,196,15);thumbnails[778175]=new thumbnail(778175,"59908","","jpeg-205.jpg",130,86,15);thumbnails[778182]=new thumbnail(778182,"59908","","jpeg-172.jpg",130,86,15);thumbnails[778203]=new thumbnail(778203,"59908","","jpeg-41.jpg",130,86,15);thumbnails[778216]=new thumbnail(778216,"59908","","jpeg-34.jpg",130,86,15);thumbnails[778219]=new thumbnail(778219,"59908","","jpeg-61.jpg",130,86,15);thumbnails[778222]=new thumbnail(778222,"59908","","jpeg-71.jpg",130,86,15);thumbnails[778225]=new thumbnail(778225,"59908","","jpeg-122.jpg",130,86,15);thumbnails[778253]=new thumbnail(778253,"59908","","jpeg-132.jpg",130,86,15);thumbnails[778264]=new thumbnail(778264,"59908","","jpeg-153.jpg",130,86,15);var galleries=new Object();galleries[150750]=new gallery(150750,"2304419,2304418,2304413,2304405,2304401,2304396,2304392,2304389,2304387,2304384","Wedding Gallery No2","gallery",[2304220,2304224,2304227,2304230,2304255,2304273,2304284,2304286,2304288,2304310,2304314,2304317,2304320,2304321,2304369,2304374,2304375,2304379,2304381,2304382,2304384,2304387,2304389,2304392,2304396,2304401,2304405,2304413,2304418,2304419]);galleries[150429]=new gallery(150429,"2304004","Wedding Gallery No1","gallery",[2304004,2304037,2304046,2304052,2304059,2304060,2304062,2304064,2304066,2304068,2304072,2304074,2304076,2304078,2304085,2304100,2304107,2304113,2304118,2304120,2304124,2304142,2304147,2304152,2304168,2304174]);galleries[60612]=new gallery(60612,"781991","Portraits Gallery No3","gallery",[781991,781994,781995,781996,781998,782001,782002,782005,782006,782042,782046,782142,809427]);galleries[60613]=new gallery(60613,"784455","Landscapes","gallery",[784455,784457,784458,809391,809425,809431,809434]);galleries[58433]=new gallery(58433,"778414,778411,778354"," Wedding Gallery No4","gallery",[778354,778363,778374,778376,778378,778379,778380,778381,778386,778387,778389,778390,778391,778393,778404,778411,778414]);galleries[59908]=new gallery(59908,"778264,778253,778225,778222,778219,778216,778203,778182,778175,778171,778143,778137,778135,778046,774804"," Wedding Gallery No5","gallery",[774804,778046,778135,778137,778143,778171,778175,778182,778203,778216,778219,778222,778225,778253,778264]);var imageSets=new Object();imageSets[1]="778378";imageSets[2]="2304004,784455,781991,778414,778411,778354,778264,778253,778225,778222,778219,778216,778203,778182,778175,778171,778143,778137,778135,778046,774804";imageSets[3]="2304419,2304418,2304413,2304405,2304401,2304396,2304392,2304389,2304387,2304384,2304382,2304381,2304379,2304375,2304374,2304369,2304321,2304320,2304317,2304314,2304310,2304288,2304286,2304284,2304273,2304255,2304230,2304227,2304224,2304220,2304174,2304168,2304152,2304147,2304142,2304124,2304120,2304118,2304113,2304107,2304100,2304085,2304078,2304076,2304074,2304072,2304068,2304066,2304064,2304062";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/derekchalmers/images";break}switch(a){case 1:b="http://www1.clikpic.com/derekchalmers/images";break}switch(a){case 2:b="http://admin.clikpic.com/derekchalmers/images";break}switch(a){case 24:b="http://tpc15/clikpic/derekchalmers/images";break}switch(a){case 4:b="http://www.clikchurch.com/derekchalmers/images";break}switch(a){case 5:b="http://www2.clikpic.com/derekchalmers/images";break}switch(a){case 22:b="http://tpc5/clikpic/derekchalmers/images";break}switch(a){case 23:b="http://tpc10/clikpic/derekchalmers/images";break}switch(a){case 25:b="http://tpc16/clikpic/derekchalmers/images";break}switch(a){case 15:b="http://www3.clikpic.com/derekchalmers/images";break}switch(a){case 18:b="http://www4.clikpic.com/derekchalmers/images";break}switch(a){case 19:b="http://www5.clikpic.com/derekchalmers/images";break}switch(a){case 31:b="http://www7.clikpic.com/derekchalmers/images";break}switch(a){case 32:b="http://admin2.clikpic.com/derekchalmers/images";break}switch(a){case 33:b="http://www8.clikpic.com/derekchalmers/images";break}switch(a){case 34:b="http://www9.clikpic.com/derekchalmers/images";break}switch(a){case 35:b="http://admin3.clikpic.com/derekchalmers/images";break}switch(a){case 37:b="http://admin4.clikpic.com/derekchalmers/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="Weddings Are Us 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;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+'")'})}}};