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[5629201]=new thumbnail(5629201,"",'"Twins"',"Hansell2_thumb.jpg",130,125,32);thumbnails[4379329]=new thumbnail(4379329,"","","Portrait_Party_flyer1_thumb.jpg",130,184,32);thumbnails[5475962]=new thumbnail(5475962,"329884","","Spadgies1_thumb.jpg",130,92,32);thumbnails[5651717]=new thumbnail(5651717,"","","coverage_map_thumb.JPG",130,112,32);thumbnails[5731079]=new thumbnail(5731079,"","","April_2010_Portrait_Price_List_thumb.jpg",130,184,32);thumbnails[5731081]=new thumbnail(5731081,"","","April_2010_Portrait_Price_List_page2_thumb.jpg",130,184,32);thumbnails[5828734]=new thumbnail(5828734,"329884","","Blank_cards_thumb.jpg",130,98,32);thumbnails[5424972]=new thumbnail(5424972,"201127",'A Self Portrait<br>\r\n"Jennifer Scott"',"Me_Highkey-1_thumb.jpg",130,130,32);thumbnails[5386719]=new thumbnail(5386719,"201127","","1_thumb.jpg",130,130,32);thumbnails[5386726]=new thumbnail(5386726,"201127","","9_thumb.jpg",130,130,32);thumbnails[4521411]=new thumbnail(4521411,"201127","","Jac_and_Sophie_thumb.jpg",130,130,32);thumbnails[5448437]=new thumbnail(5448437,"201127","","16_thumb.jpg",130,130,32);thumbnails[5424930]=new thumbnail(5424930,"201131","","Tom_HighKey_thumb.jpg",130,130,32);thumbnails[5480422]=new thumbnail(5480422,"201131","","Francesca2_thumb.jpg",130,130,32);thumbnails[5480424]=new thumbnail(5480424,"201131","","Francesca3_thumb.jpg",130,130,32);thumbnails[5498400]=new thumbnail(5498400,"201131","","KeiraT3_thumb.jpg",130,130,32);thumbnails[5498401]=new thumbnail(5498401,"201131","","KeiraT2_thumb.jpg",130,130,32);thumbnails[4074900]=new thumbnail(4074900,"201131","","Isaac5_thumb.jpg",130,130,32);thumbnails[4074872]=new thumbnail(4074872,"201131","","Isaac4_thumb.jpg",130,130,32);thumbnails[4074796]=new thumbnail(4074796,"201131","","Isaac3_thumb.jpg",130,130,32);thumbnails[3710884]=new thumbnail(3710884,"201131","","20090411_IBb_thumb.jpg",130,130,32);thumbnails[3710882]=new thumbnail(3710882,"201131","","20090411_IBa_thumb.jpg",130,130,32);thumbnails[3496711]=new thumbnail(3496711,"201131","","Tommy1_thumb.jpg",130,130,32);thumbnails[3496715]=new thumbnail(3496715,"201131","","Tommy2_thumb.jpg",130,130,32);thumbnails[5475803]=new thumbnail(5475803,"309913","","Keira3_thumb.jpg",130,130,32);thumbnails[5475807]=new thumbnail(5475807,"309913","","Keira_thumb.jpg",130,130,32);thumbnails[5477117]=new thumbnail(5477117,"309913","","Molly_thumb.jpg",130,130,32);thumbnails[5477120]=new thumbnail(5477120,"309913","","Hannah_thumb.jpg",130,130,32);thumbnails[5477165]=new thumbnail(5477165,"309913","","Hannah2_thumb.jpg",130,130,32);thumbnails[5478077]=new thumbnail(5478077,"309913","","MollyA1_thumb.jpg",130,130,32);thumbnails[5478079]=new thumbnail(5478079,"309913","","MollyA3_thumb.jpg",130,130,32);thumbnails[5478084]=new thumbnail(5478084,"309913","","MollyA2_thumb.jpg",130,130,32);thumbnails[5480908]=new thumbnail(5480908,"309913","","Molly3_thumb.jpg",130,130,32);thumbnails[5481024]=new thumbnail(5481024,"309913",'"Little Diva"',"Molly_Triptych_thumb.jpg",130,130,32);thumbnails[5481449]=new thumbnail(5481449,"309913","","Jake_Triptych_thumb.jpg",130,122,32);thumbnails[5481537]=new thumbnail(5481537,"309913","","Footie_thumb.jpg",130,130,32);thumbnails[5481542]=new thumbnail(5481542,"309913","","Jake_thumb.jpg",130,130,32);thumbnails[5485771]=new thumbnail(5485771,"309913","","M1_thumb.jpg",130,130,32);thumbnails[5499805]=new thumbnail(5499805,"309913","","Robert1_thumb.jpg",130,130,32);thumbnails[5499819]=new thumbnail(5499819,"309913","","Robert2_thumb.jpg",130,130,32);thumbnails[5499825]=new thumbnail(5499825,"309913","","Robert_Keira2_thumb.jpg",130,130,32);thumbnails[5396893]=new thumbnail(5396893,"309913",'"Three Wise Monkeys"',"Three_Wise_monkeys_thumb.jpg",130,130,32);thumbnails[5386953]=new thumbnail(5386953,"309913","","Highkey_Chloe1_thumb.jpg",130,130,32);thumbnails[5388903]=new thumbnail(5388903,"319121","","11_thumb.jpg",130,130,32);thumbnails[5448430]=new thumbnail(5448430,"319121","","14_thumb.jpg",130,130,32);thumbnails[5448435]=new thumbnail(5448435,"319121","","Thumb_15_thumb.jpg",130,130,32);thumbnails[5875648]=new thumbnail(5875648,"331986","","Happiness1_thumb.jpg",130,155,32);thumbnails[5875649]=new thumbnail(5875649,"331986","","M4_thumb.jpg",130,173,32);thumbnails[5875651]=new thumbnail(5875651,"331986","","Sad_B_W_uncut_thumb.jpg",130,135,32);thumbnails[3879012]=new thumbnail(3879012,"229028","","Hands4_thumb.jpg",130,130,32);thumbnails[3879491]=new thumbnail(3879491,"229028","","Hands3_thumb.jpg",130,130,32);thumbnails[3496191]=new thumbnail(3496191,"229028","","Chloe_bw_thumb.jpg",130,130,32);thumbnails[3496631]=new thumbnail(3496631,"229028","","Bucket_girl_thumb.jpg",130,130,32);thumbnails[4101709]=new thumbnail(4101709,"229028",'"48 Inches"',"Feet_thumb.jpg",130,130,32);thumbnails[5879366]=new thumbnail(5879366,"229028","","Untitled-1_thumb.jpg",130,195,32);thumbnails[5485784]=new thumbnail(5485784,"310453","","Campo_thumb.jpg",130,130,32);thumbnails[5488271]=new thumbnail(5488271,"310453","","Max_thumb.jpg",130,130,32);thumbnails[5388949]=new thumbnail(5388949,"242917","","Sophie1_thumb.jpg",130,130,32);thumbnails[5388958]=new thumbnail(5388958,"242917","","SophieTidy1_thumb.jpg",130,130,32);thumbnails[5388961]=new thumbnail(5388961,"242917","","SophieTidy2_thumb.jpg",130,130,32);thumbnails[5388962]=new thumbnail(5388962,"242917","","Tegan1_thumb.jpg",130,130,32);thumbnails[5388965]=new thumbnail(5388965,"242917","","Tegan3_thumb.jpg",130,130,32);thumbnails[5388966]=new thumbnail(5388966,"242917","","Tegan_thumb.jpg",130,130,32);thumbnails[4026272]=new thumbnail(4026272,"242917","","Sophie4_thumb.jpg",130,130,32);thumbnails[4171416]=new thumbnail(4171416,"242917","","DC1_thumb.jpg",130,130,32);thumbnails[4171417]=new thumbnail(4171417,"242917","","DC2_thumb.jpg",130,130,32);thumbnails[4171418]=new thumbnail(4171418,"242917","","DC3_thumb.jpg",130,130,32);thumbnails[4171421]=new thumbnail(4171421,"242917","","DC6_thumb.jpg",130,130,32);thumbnails[4171422]=new thumbnail(4171422,"242917","","DC7_thumb.jpg",130,130,32);thumbnails[5507007]=new thumbnail(5507007,"308070","pregnancy_mummy_delicate","Mum_thumb.jpg",130,130,32);thumbnails[5507119]=new thumbnail(5507119,"308070","","Mum1_thumb.jpg",130,130,32);thumbnails[5507127]=new thumbnail(5507127,"308070","","mum2_thumb.jpg",130,130,32);thumbnails[5507329]=new thumbnail(5507329,"308070","","Mum4_thumb.jpg",130,130,32);thumbnails[5458348]=new thumbnail(5458348,"308070","","Pregnancy1_thumb.jpg",130,130,32);thumbnails[5458350]=new thumbnail(5458350,"308070","","Pregnancy3_thumb.jpg",130,130,32);thumbnails[5458586]=new thumbnail(5458586,"308070","","Pregnancy5_thumb.jpg",130,130,32);thumbnails[5458596]=new thumbnail(5458596,"308070","","Pregnancy6_thumb.jpg",130,130,32);thumbnails[5628105]=new thumbnail(5628105,"319070","","Matt_B_S1_thumb.jpg",130,130,32);thumbnails[5628394]=new thumbnail(5628394,"319070","","Amy_thumb.jpg",130,130,32);thumbnails[5628101]=new thumbnail(5628101,"319070","","Amelia2_thumb.jpg",130,130,32);thumbnails[5475801]=new thumbnail(5475801,"304658","","Josh_double_thumb.jpg",130,130,32);thumbnails[5475867]=new thumbnail(5475867,"304658","","Josh_thumb.jpg",130,130,32);thumbnails[5475881]=new thumbnail(5475881,"304658","","Josh3_thumb.jpg",130,130,32);thumbnails[5477134]=new thumbnail(5477134,"304658","","Kieran_thumb.jpg",130,130,32);thumbnails[4521401]=new thumbnail(4521401,"304658","","Sophie_closecrop_thumb.jpg",130,130,32);thumbnails[5396860]=new thumbnail(5396860,"304658","","Sophie_50CC093E-1D09-001F-996F3B26A41A637F_thumb.jpg",130,130,32);thumbnails[4342118]=new thumbnail(4342118,"227717","","Mehendi_Hands_thumb.jpg",130,130,32);thumbnails[4342122]=new thumbnail(4342122,"227717","","Mehendi_Palms_thumb.jpg",130,130,32);thumbnails[4334877]=new thumbnail(4334877,"227717","","Bouquet_thumb.jpg",130,130,32);thumbnails[5541033]=new thumbnail(5541033,"227717","","Jewellry_thumb.jpg",130,130,32);thumbnails[4341950]=new thumbnail(4341950,"227717","","Car_Floral_thumb.jpg",130,130,32);thumbnails[5541234]=new thumbnail(5541234,"227717","","Bride2_thumb.jpg",130,130,32);thumbnails[5392949]=new thumbnail(5392949,"227717","","1_4B64C91F-1D09-001F-998B9E148A964D9D_thumb.jpg",130,130,32);thumbnails[5541127]=new thumbnail(5541127,"227717","","Bride_thumb.jpg",130,130,32);thumbnails[5541137]=new thumbnail(5541137,"227717","","Groom_thumb.jpg",130,130,32);thumbnails[5392953]=new thumbnail(5392953,"227717","","w2_thumb.jpg",130,130,32);var galleries=new Object();galleries[329884]=new gallery(329884,"5828734,5475962","Merchandise","section395268",[5475962,5828734]);galleries[327524]=new gallery(327524,"","Shop","section392632",[]);galleries[201127]=new gallery(201127,"5448437,5424972,5386726,5386719,4521411","Adult","section305265",[5424972,5386719,5386726,4521411,5448437]);galleries[201131]=new gallery(201131,"5498401,5498400,5480424,5480422,5424930,4074900,4074872,4074796,3710884,3710882","Babies & Infants","section305265",[5424930,5480422,5480424,5498400,5498401,4074900,4074872,4074796,3710884,3710882,3496711,3496715]);galleries[309913]=new gallery(309913,"5499825,5499819,5499805,5485771,5481542,5481537,5481449,5481024,5480908,5478084","Children","section305265",[5475803,5475807,5477117,5477120,5477165,5478077,5478079,5478084,5480908,5481024,5481449,5481537,5481542,5485771,5499805,5499819,5499825,5396893,5386953]);galleries[319121]=new gallery(319121,"5448435,5448430,5388903","Couples & Families","section305265",[5388903,5448430,5448435]);galleries[331986]=new gallery(331986,"5875651,5875649,5875648","Lifestyle","section305265",[5875648,5875649,5875651]);galleries[229028]=new gallery(229028,"3496631","Monochrome","section305265",[3879012,3879491,3496191,3496631,4101709,5879366]);galleries[310453]=new gallery(310453,"5488271,5485784","Pets","section305265",[5485784,5488271]);galleries[242917]=new gallery(242917,"5388966,5388965,5388962,5388961,5388958,5388949,4171422,4171421,4171418,4171417","Portrait Parties","section305265",[5388949,5388958,5388961,5388962,5388965,5388966,4026272,4171416,4171417,4171418,4171421,4171422]);galleries[308070]=new gallery(308070,"5507329,5507127,5507119,5507007,5458596,5458586,5458350,5458348","Pregnancy","section305265",[5507007,5507119,5507127,5507329,5458348,5458350,5458586,5458596]);galleries[319070]=new gallery(319070,"5628394,5628105,5628101","School/College Proms","section305265",[5628105,5628394,5628101]);galleries[304658]=new gallery(304658,"5477134,5475881,5475867,5475801,5396860,4521401","Teenagers","section305265",[5475801,5475867,5475881,5477134,4521401,5396860]);galleries[227717]=new gallery(227717,"4341950","Weddings","section305265",[4342118,4342122,4334877,5541033,4341950,5541234,5392949,5541127,5541137,5392953]);var imageSets=new Object();imageSets[1]="5629201";imageSets[2]="4341950,3496631";imageSets[3]="4341950,4074900,4074796,3710882";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/jennyscott/images";break}switch(a){case 1:b="http://www1.clikpic.com/jennyscott/images";break}switch(a){case 2:b="http://admin.clikpic.com/jennyscott/images";break}switch(a){case 24:b="http://tpc15/clikpic/jennyscott/images";break}switch(a){case 4:b="http://www.clikchurch.com/jennyscott/images";break}switch(a){case 5:b="http://www2.clikpic.com/jennyscott/images";break}switch(a){case 22:b="http://tpc5/clikpic/jennyscott/images";break}switch(a){case 23:b="http://tpc10/clikpic/jennyscott/images";break}switch(a){case 25:b="http://tpc16/clikpic/jennyscott/images";break}switch(a){case 15:b="http://www3.clikpic.com/jennyscott/images";break}switch(a){case 18:b="http://www4.clikpic.com/jennyscott/images";break}switch(a){case 19:b="http://www5.clikpic.com/jennyscott/images";break}switch(a){case 31:b="http://www7.clikpic.com/jennyscott/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jennyscott/images";break}switch(a){case 33:b="http://www8.clikpic.com/jennyscott/images";break}switch(a){case 34:b="http://www9.clikpic.com/jennyscott/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jennyscott/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jennyscott/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("section305265"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section305265.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("section305265"!=""){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="Jennifer Scott Photography Ltd: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="JENNYSCOTT">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};