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[5534016]=new thumbnail(5534016,"309918","Cloisters","Cloisters_thumb.jpg",130,145,18);thumbnails[5534059]=new thumbnail(5534059,"309918","Gallery View","Gallery_View_thumb.jpg",130,84,18);thumbnails[5534073]=new thumbnail(5534073,"309918","Glasgow Art Gallery","Glasgow_Art_Gallery_thumb.jpg",130,86,18);thumbnails[5534166]=new thumbnail(5534166,"309918","University Cloisters","University_Cloisters1_thumb.jpg",130,87,18);thumbnails[5534177]=new thumbnail(5534177,"309918","Glasgow University Cloisters","Glasgow_University_Cloisters12_thumb.jpg",130,87,18);thumbnails[673788]=new thumbnail(673788,"51260","The armadillo","armadillo_thumb.jpg",130,90,18);thumbnails[1031006]=new thumbnail(1031006,"51260","Clyde at Night","Clyde at night_thumb..jpg",130,54,18);thumbnails[1090067]=new thumbnail(1090067,"51260","Sunset over Clyde","Sunset over clyde_thumb.jpg",130,87,18);thumbnails[1090089]=new thumbnail(1090089,"51260","Night Time","Night time_thumb.jpg",130,61,18);thumbnails[1789931]=new thumbnail(1789931,"51260","Eilean Donan","Eilean Donan_thumb..jpg",130,53,18);thumbnails[1661725]=new thumbnail(1661725,"112170","Douglas Park","Douglas Park 1_thumb.jpg",130,53,18);thumbnails[1661792]=new thumbnail(1661792,"112170","Douglas Park","Douglas  Park 5_thumb.jpg",130,57,18);thumbnails[1661797]=new thumbnail(1661797,"112170","Douglas Park","Douglas Park 6_thumb.jpg",130,52,18);thumbnails[675546]=new thumbnail(675546,"51266","The River Allander.","River Allander_thumb.jpg",130,97,18);thumbnails[764848]=new thumbnail(764848,"51266","Lake of Menteith","Lake of Menthieth_thumb.jpg",130,33,18);thumbnails[774464]=new thumbnail(774464,"51266","Across the moor","Across the moor_thumb.jpg",130,76,18);thumbnails[1030986]=new thumbnail(1030986,"51266","Ardnarmurchan Sunset","Ardnarmurchan sunset_thumb..jpg",130,81,18);thumbnails[1122576]=new thumbnail(1122576,"51266","Ross Priory","Ross Priory_thumb.jpg",130,57,18);thumbnails[1122699]=new thumbnail(1122699,"51266","Rannoch moor","Rannoch moor_thumb..jpg",130,87,18);thumbnails[1237049]=new thumbnail(1237049,"51266","The Sky at Night","sky at night_thumb..jpg",130,87,18);thumbnails[1237064]=new thumbnail(1237064,"51266","Through the Clouds","Through the Clouds_thumb..jpg",130,87,18);thumbnails[1297904]=new thumbnail(1297904,"51266","Sunflowers","Sunflowers_thumb.jpg",130,87,18);thumbnails[1661704]=new thumbnail(1661704,"51266","Glenfinnan Jacobite","Glenfinnan Jacobite_thumb..jpg",130,68,18);thumbnails[1661712]=new thumbnail(1661712,"51266","Glenfinnan Monument","Glenfinnan Monument_thumb..jpg",130,87,18);thumbnails[1730505]=new thumbnail(1730505,"51266","Panoramic Buachaille Etive Mor","Panoramic Buachaille Etive Mor_thumb.jpg",130,59,18);thumbnails[1730534]=new thumbnail(1730534,"51266","Buachaille Etive Mor, Glencoe","Buachaille Etive Mor, Glencoe_thumb.jpg",130,87,18);thumbnails[1789836]=new thumbnail(1789836,"51266","Eilean Donan Castle","Eilean Donan Castle_thumb..jpg",130,87,18);thumbnails[2554108]=new thumbnail(2554108,"51266","Beauchille view","Beauchille view 5_thumb.jpg",130,82,18);thumbnails[2554163]=new thumbnail(2554163,"51266","Morning Light","Morning light_thumb.jpg",130,56,18);thumbnails[2554186]=new thumbnail(2554186,"51266","Tree of Life","Tree of Life_thumb.jpg",130,195,18);thumbnails[5533219]=new thumbnail(5533219,"51266","Journey through time","Journey_through_Time_thumb.jpg",130,87,18);thumbnails[774480]=new thumbnail(774480,"51264","Rannoch Cloudburst","Rannoch cloudburst_thumb.jpg",130,87,18);thumbnails[1079599]=new thumbnail(1079599,"51264","Menteith","menteith2_thumb.jpg",130,87,18);thumbnails[1090063]=new thumbnail(1090063,"51264","Lomond Shores","Lomond Shores_thumb.jpg",130,77,18);thumbnails[1090071]=new thumbnail(1090071,"51264","Maid of the Loch","Maid of the Loch_thumb.jpg",130,87,18);thumbnails[1090093]=new thumbnail(1090093,"51264","Cloisters","Clousters_thumb.jpg",130,83,18);thumbnails[1122721]=new thumbnail(1122721,"51264","Rannoch Sunrise","Rannoch sunrise_thumb..jpg",130,67,18);thumbnails[1237029]=new thumbnail(1237029,"51264","It's Colours They Are Fine","It's Colours they are fine_thumb..jpg",130,87,18);thumbnails[1730557]=new thumbnail(1730557,"51264","Rannoch Moor, Glencoe","Rannoch Moor, Glencoe_thumb.jpg",130,72,18);thumbnails[2548732]=new thumbnail(2548732,"51264","Loch Reflections","Loch Reflections_thumb.jpg",130,87,18);thumbnails[2554117]=new thumbnail(2554117,"51264","Blue Reflections","Blue reflections_thumb.jpg",130,58,18);thumbnails[2554156]=new thumbnail(2554156,"51264","Castle Reflection","Castle reflections_thumb.jpg",130,64,18);thumbnails[2554169]=new thumbnail(2554169,"51264","Morning sunshine","morning sunshine_thumb.jpg",130,87,18);thumbnails[2554170]=new thumbnail(2554170,"51264","Take a view","Take a view_thumb.jpg",130,87,18);thumbnails[2554180]=new thumbnail(2554180,"51264","Tranquility","Tranquility_thumb.jpg",130,69,18);thumbnails[5533557]=new thumbnail(5533557,"51264","Through the mist","Through_the_Mists_thumb.jpg",130,68,18);thumbnails[5533698]=new thumbnail(5533698,"51264","Viewpoint","viewpoint_thumb.jpg",130,87,18);thumbnails[688218]=new thumbnail(688218,"51267","Autumn","autumn_thumb.jpg",130,90,18);thumbnails[1661715]=new thumbnail(1661715,"51267","Jacobite Steam Train","Jacobite Steam Train_thumb..jpg",130,43,18);thumbnails[2473330]=new thumbnail(2473330,"51267","BUACHAILLE ETIVE MOR","Buachaille Etive Mor 2_thumb.jpg",130,87,18);thumbnails[2466937]=new thumbnail(2466937,"158686","Rannoch in Winter","rannoch in winter_thumb.jpg",130,86,18);thumbnails[2467883]=new thumbnail(2467883,"158686","Tree of Light","tree of light 2_thumb.jpg",130,195,18);thumbnails[2473597]=new thumbnail(2473597,"158686","View from the Kingshouse","view from the kingshouse_thumb.jpg",130,81,18);thumbnails[2485765]=new thumbnail(2485765,"158686","Buachaille View","Buachaille view_thumb.jpg",130,85,18);thumbnails[2485918]=new thumbnail(2485918,"158686","On the Moor","on the moor_thumb.jpg",130,87,18);thumbnails[2548728]=new thumbnail(2548728,"158686","Loch Leven Sunshine","Loch Leven sunshine_thumb.jpg",130,87,18);thumbnails[2554162]=new thumbnail(2554162,"158686","Evening Light","evening light_thumb.jpg",130,87,18);thumbnails[2554189]=new thumbnail(2554189,"158686","Wilderness","Wilderness_thumb.jpg",130,84,18);thumbnails[5533682]=new thumbnail(5533682,"158686","Sunshine on Leven","Sunshine_on_Leven_thumb.jpg",130,87,18);thumbnails[5533690]=new thumbnail(5533690,"158686","Viewpoint from Kingshouse","Viewpoint_from_kingshouse_thumb.jpg",130,87,18);thumbnails[5533056]=new thumbnail(5533056,"175749"," Bay at the back of the Ocean","Bay_at_the_back_of_Ocean_thumb.jpg",130,87,18);thumbnails[5533124]=new thumbnail(5533124,"175749","Clearwater","clearwater_thumb.jpg",130,185,18);thumbnails[5533146]=new thumbnail(5533146,"175749","Darksun","Darksun_thumb.jpg",130,87,18);thumbnails[5533252]=new thumbnail(5533252,"175749","Rockform","Rockform_thumb.jpg",130,84,18);thumbnails[5533314]=new thumbnail(5533314,"175749","The Reading","The_Reading_thumb.jpg",130,180,18);thumbnails[5533330]=new thumbnail(5533330,"175749","Sand Dancing","sand_dancing_thumb.jpg",130,87,18);thumbnails[5533391]=new thumbnail(5533391,"175749","Sandpattern","sandpattern_thumb.jpg",130,196,18);thumbnails[5533401]=new thumbnail(5533401,"175749","When the boat comes in","When_the_boat_comes_in_thumb.jpg",130,83,18);thumbnails[5533466]=new thumbnail(5533466,"175749","The view across to Mull","The_view_across_to_Mull_thumb.jpg",130,84,18);thumbnails[2811620]=new thumbnail(2811620,"175749","The Sound of Iona","The Sound of Iona_thumb.jpg",130,78,18);thumbnails[2811629]=new thumbnail(2811629,"175749","View to Mull","View to Mull_thumb.jpg",130,81,18);thumbnails[2811683]=new thumbnail(2811683,"175749","The Cloisters","Cloisters 2_thumb.jpg",130,87,18);thumbnails[2811695]=new thumbnail(2811695,"175749","Quiet Moments","Quiet moments_thumb.jpg",130,114,18);thumbnails[2811642]=new thumbnail(2811642,"175749","The view across the Sound","The view across the sound_thumb.jpg",130,189,18);var galleries=new Object();galleries[309918]=new gallery(309918,"5534177,5534166,5534073,5534059,5534016","New Work","gallery",[5534016,5534059,5534073,5534166,5534177]);galleries[51260]=new gallery(51260,"1789931,1090089,1090067,1031006,673788","After Dark Gallery","gallery",[673788,1031006,1090067,1090089,1789931]);galleries[112170]=new gallery(112170,"1661797,1661792,1661725","Scotland's Golf","gallery",[1661725,1661792,1661797]);galleries[51266]=new gallery(51266,"5533219,2554186,2554163,2554108,1789836,1730534,1730505,1661712,1661704,1297904","Scottish Elements Gallery","gallery",[675546,764848,774464,1030986,1122576,1122699,1237049,1237064,1297904,1661704,1661712,1730505,1730534,1789836,2554108,2554163,2554186,5533219]);galleries[51264]=new gallery(51264,"5533698,5533557,2554180,2554170,2554169,2554156,2554117,2548732,1730557,1237029","Scottish Reflections","gallery",[774480,1079599,1090063,1090071,1090093,1122721,1237029,1730557,2548732,2554117,2554156,2554169,2554170,2554180,5533557,5533698]);galleries[51267]=new gallery(51267,"2473330,1661715,688218","Autumn","gallery",[688218,1661715,2473330]);galleries[158686]=new gallery(158686,"5533690,5533682,2554189,2554162,2548728,2485918,2485765,2473597,2467883,2466937","Digital","gallery",[2466937,2467883,2473597,2485765,2485918,2548728,2554162,2554189,5533682,5533690]);galleries[175749]=new gallery(175749,"5533466,5533401,5533391,5533330,5533314,5533252,5533146,5533124,5533056,2811695","Iona","gallery",[5533056,5533124,5533146,5533252,5533314,5533330,5533391,5533401,5533466,2811620,2811629,2811683,2811695,2811642]);var imageSets=new Object();imageSets[1]="5534177,5534166,5534073,5534059,5534016,5533690,5533682,5533557,5533466,5533401,5533391,5533330,5533314,5533252,5533219,2811695,2811683,2811642,2811629,2811620,2554189,2554186,2554180,2554170,2554169,2554163,2554162,2554156,2554117,2554108,2548732,2548728,2485918,2485765,2473597,2473330,2467883,2466937,1789931,1789836,1730557,1730534,1730505,1661797,1661792,1661725,1661715,1661712,1661704,1297904,1237064,1237049,1237029,1122721,1122699,1122576,1090093,1090089,1090071,1090067,1090063,1079599,1031006,1030986,774480,774464,764848,688218,675546,673788";imageSets[3]="5534177,5534166,5534073,5534059,5534016,5533698,5533690,5533682,5533557,5533466,5533401,5533391,5533330,5533314,5533252,5533219,5533146,5533124,5533056,2811695,2811683,2811642,2811629,2811620,2554189,2554186,2554180,2554170,2554169,2554163,2554162,2554156,2554117,2554108,2548732,2548728,2485918,2485765,2473597,2473330,2467883,2466937,1789931,1789836,1730557,1730534,1730505,1661797,1661792,1661725";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/JamesCarrickPhotography/images";break}switch(a){case 1:b="http://www1.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 2:b="http://admin.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 24:b="http://tpc15/clikpic/JamesCarrickPhotography/images";break}switch(a){case 4:b="http://www.clikchurch.com/JamesCarrickPhotography/images";break}switch(a){case 5:b="http://www2.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 22:b="http://tpc5/clikpic/JamesCarrickPhotography/images";break}switch(a){case 23:b="http://tpc10/clikpic/JamesCarrickPhotography/images";break}switch(a){case 25:b="http://tpc16/clikpic/JamesCarrickPhotography/images";break}switch(a){case 15:b="http://www3.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 18:b="http://www4.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 19:b="http://www5.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 31:b="http://www7.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 32:b="http://admin2.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 33:b="http://www8.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 34:b="http://www9.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 35:b="http://admin3.clikpic.com/JamesCarrickPhotography/images";break}switch(a){case 37:b="http://admin4.clikpic.com/JamesCarrickPhotography/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="James Carrick 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;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="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="jimcarrick@btinternet.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 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="jimcarrick@btinternet.com">';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+'")'})}}};