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[3701404]=new thumbnail(3701404,"","david hockney luc-godard","david_hockney_luc-godard_thumb.jpg",113,113,15);thumbnails[3578679]=new thumbnail(3578679,"","home","house_thumb.jpg",113,113,15);thumbnails[4236290]=new thumbnail(4236290,"","store","store_thumb.jpg",113,113,15);thumbnails[4236258]=new thumbnail(4236258,"","legs","leg_no_leg_thumb.JPG",113,113,15);thumbnails[5194175]=new thumbnail(5194175,"206086","disintegration","disintegration2_thumb.jpg",113,113,15);thumbnails[3545039]=new thumbnail(3545039,"206086","clearing","clearing_thumb.jpg",113,113,15);thumbnails[5270499]=new thumbnail(5270499,"206086","lashes","lashes_thumb.jpg",113,113,15);thumbnails[3587523]=new thumbnail(3587523,"206086","trail","trail_thumb.jpg",113,113,15);thumbnails[3700937]=new thumbnail(3700937,"206086","stairs","stairs1_thumb.jpg",113,113,15);thumbnails[5194183]=new thumbnail(5194183,"206086","coat","petal_thumb.jpg",113,113,15);thumbnails[3587368]=new thumbnail(3587368,"206086","narrator","crime_and_punishment_thumb.jpg",113,113,15);thumbnails[3587375]=new thumbnail(3587375,"206086","kite","kites_thumb.jpg",113,113,15);thumbnails[3540795]=new thumbnail(3540795,"206086","new year","new_year_thumb.jpg",113,113,15);thumbnails[5267933]=new thumbnail(5267933,"206086","hour","hour3_thumb.jpg",113,113,15);thumbnails[5194177]=new thumbnail(5194177,"206086","spores","limbs_thumb.jpg",113,113,15);thumbnails[3578695]=new thumbnail(3578695,"206086","tour de france","tour_de_france_thumb.jpg",113,113,15);thumbnails[5194176]=new thumbnail(5194176,"206086","diagram","diagram_thumb.jpg",113,113,15);thumbnails[5190642]=new thumbnail(5190642,"206086","ship","passing_ship1_thumb.jpg",113,113,15);thumbnails[5194179]=new thumbnail(5194179,"206086","concert","concert_thumb.jpg",113,113,15);thumbnails[5190580]=new thumbnail(5190580,"206086","exhibition","exhibition_thumb.jpg",113,113,15);thumbnails[4019909]=new thumbnail(4019909,"206086","5:30","530_thumb.jpg",113,113,15);thumbnails[5267923]=new thumbnail(5267923,"206086","slight girl","girl_movements_thumb.jpg",113,113,15);thumbnails[3578681]=new thumbnail(3578681,"206086","misinformation","misinformation_thumb.jpg",113,113,15);thumbnails[5267922]=new thumbnail(5267922,"206086","mopeds","mopeds_thumb.jpg",113,113,15);thumbnails[3701199]=new thumbnail(3701199,"203403","foot","hoof_thumb.jpg",113,113,15);thumbnails[3700932]=new thumbnail(3700932,"203403","piccolo","piccolo_thumb.jpg",113,113,15);thumbnails[3578796]=new thumbnail(3578796,"203403","information","information1_thumb.jpg",113,113,15);thumbnails[3700949]=new thumbnail(3700949,"203403","M","M_thumb.jpg",113,113,15);thumbnails[5190560]=new thumbnail(5190560,"203403","heavy petting","heavy_petting_thumb.jpg",113,113,15);thumbnails[3578805]=new thumbnail(3578805,"203403","funnel","dog_thumb.jpg",113,113,15);thumbnails[3578825]=new thumbnail(3578825,"203403","milk","milk_thumb.jpg",113,113,15);thumbnails[3540828]=new thumbnail(3540828,"203403","impossible metal value","impossible_metal_value1_thumb.jpg",113,113,15);thumbnails[3543449]=new thumbnail(3543449,"203403","bicing","bicing_thumb.jpg",113,113,15);thumbnails[3587305]=new thumbnail(3587305,"203403","succession","succession_thumb.jpg",113,113,15);thumbnails[3543581]=new thumbnail(3543581,"203403","train tunnel","train_tunnel_thumb.jpg",113,113,15);thumbnails[3543334]=new thumbnail(3543334,"203403","cold","cold_thumb.jpg",113,113,15);thumbnails[5267921]=new thumbnail(5267921,"203403","marriage","marriage_thumb.jpg",113,113,15);thumbnails[3578678]=new thumbnail(3578678,"203403","submarine","submarine_thumb.jpg",113,113,15);thumbnails[3578781]=new thumbnail(3578781,"203403","cable car","cable_car_thumb.jpg",113,113,15);thumbnails[3543281]=new thumbnail(3543281,"203403","jug of water","jug_of_water_thumb.jpg",113,113,15);thumbnails[3543492]=new thumbnail(3543492,"203403","barceloneta","barceloneta_thumb.jpg",113,113,15);thumbnails[5267920]=new thumbnail(5267920,"203403","you cannot live","you_cannot_live_thumb.jpg",113,113,15);thumbnails[4255182]=new thumbnail(4255182,"203403","container","container_thumb.jpg",113,113,15);thumbnails[3700907]=new thumbnail(3700907,"203403","cutting record","cutting_record12_thumb.jpg",113,113,15);thumbnails[3543267]=new thumbnail(3543267,"206087","legs","legs_thumb.jpg",113,113,15);thumbnails[3543296]=new thumbnail(3543296,"206087","information desk","information_thumb.jpg",113,113,15);thumbnails[3543321]=new thumbnail(3543321,"206087","graham","graham_thumb.jpg",113,113,15);thumbnails[3543432]=new thumbnail(3543432,"206087","camera","camera_thumb.jpg",113,113,15);thumbnails[3543550]=new thumbnail(3543550,"206087","sei","sei_thumb.jpg",113,113,15);thumbnails[3545045]=new thumbnail(3545045,"206087","record player","record_player_thumb.jpg",113,113,15);thumbnails[3545113]=new thumbnail(3545113,"206087","fox","fox_thumb.jpg",113,113,15);thumbnails[3545118]=new thumbnail(3545118,"206087","iņigo","inigo_thumb.jpg",113,113,15);thumbnails[3587448]=new thumbnail(3587448,"206087","origin / end","origin_end_thumb.jpg",113,113,15);thumbnails[3587434]=new thumbnail(3587434,"206087","forest","forest_thumb.jpg",113,113,15);thumbnails[3587438]=new thumbnail(3587438,"206087","weight","weight_thumb.jpg",113,113,15);thumbnails[3587452]=new thumbnail(3587452,"206087","hold your own hand","hold_your_own_hand_thumb.jpg",113,113,15);thumbnails[3587460]=new thumbnail(3587460,"206087","after affect","after_affect_thumb.jpg",113,113,15);thumbnails[5270504]=new thumbnail(5270504,"206087","receiver","receiver_thumb.jpg",113,113,15);thumbnails[3587494]=new thumbnail(3587494,"206087","unlocated","unlocated_thumb.jpg",113,113,15);thumbnails[3587501]=new thumbnail(3587501,"206087","mother","mother_thumb.jpg",113,113,15);thumbnails[3701101]=new thumbnail(3701101,"206087","birds","birds_thumb.jpg",113,113,15);thumbnails[3701040]=new thumbnail(3701040,"206087","5 chickens competing for 23 seeds","5_chickens_competing_for_23_seeds_thumb.jpg",113,113,15);thumbnails[3587488]=new thumbnail(3587488,"206087","head","head_thumb.jpg",113,113,15);thumbnails[3540818]=new thumbnail(3540818,"206087","hands","hands1_thumb.jpg",113,113,15);thumbnails[3540752]=new thumbnail(3540752,"203404","hole","hole_thumb.jpg",113,113,15);thumbnails[3540771]=new thumbnail(3540771,"203404","pavement","not_walking_thumb.jpg",113,113,15);thumbnails[3540655]=new thumbnail(3540655,"203404","lunette","lune1_thumb.jpg",113,113,15);thumbnails[3941469]=new thumbnail(3941469,"203404","the dining table","lying_on_the_dining_table_thumb.jpg",113,113,15);thumbnails[3540775]=new thumbnail(3540775,"203404","apple","apple2_thumb.jpg",113,113,15);thumbnails[3540686]=new thumbnail(3540686,"203404","autoportrait","self_portrait_thumb.jpg",113,113,15);thumbnails[3540803]=new thumbnail(3540803,"203404","hanging gallery","hanging_gallery1_thumb.jpg",113,113,15);thumbnails[3540761]=new thumbnail(3540761,"203404","aeroplane","aeroplane_thumb.jpg",113,113,15);thumbnails[3540722]=new thumbnail(3540722,"203404","square","square_thumb.jpg",113,113,15);thumbnails[3540772]=new thumbnail(3540772,"203404","earthed tree","earthed_tree1_thumb.jpg",113,113,15);thumbnails[3540800]=new thumbnail(3540800,"203404","perch","bird2_thumb.jpg",113,113,15);thumbnails[3540806]=new thumbnail(3540806,"203404","durleigh","dog_water1_thumb.jpg",113,113,15);thumbnails[3540807]=new thumbnail(3540807,"203404","kitchen","kitchen_thumb.jpg",113,113,15);thumbnails[3540811]=new thumbnail(3540811,"203404","filter","whale_shark_thumb.jpg",113,113,15);thumbnails[3540812]=new thumbnail(3540812,"203404","light bisecting richard lin","light_bisecting_richard_lin1_thumb.jpg",113,113,15);thumbnails[3540816]=new thumbnail(3540816,"203404","two rectangles","two_rectangles1_thumb.jpg",113,113,15);thumbnails[3701138]=new thumbnail(3701138,"203404","long memory","long_memory_thumb.jpg",113,113,15);thumbnails[3701406]=new thumbnail(3701406,"203404","22 records and still no record player","22_records_and_still_no_record_player_thumb.jpg",113,113,15);thumbnails[3587514]=new thumbnail(3587514,"203404","vennel","vennel_thumb.jpg",113,113,15);thumbnails[3587515]=new thumbnail(3587515,"203404","central park","central_park_thumb.jpg",113,113,15);var galleries=new Object();galleries[206086]=new gallery(206086,"5270499,5267933,5267923,5267922,5194183,5194179,5194177,5194176,5194175,5190642,5190580,3700937,3587523,3587375,3587368,3578695,3578681,3545039,3540795","2 0 0 9","gallery",[5194175,3545039,5270499,3587523,3700937,5194183,3587368,3587375,3540795,5267933,5194177,3578695,5194176,5190642,5194179,5190580,4019909,5267923,3578681,5267922]);galleries[203403]=new gallery(203403,"5267921,5190560,4255182,3701199,3700949,3700932,3700907,3587305,3578825,3578805,3578796,3578781,3578678,3543581,3543492,3543449,3543334,3543281,3540828","2 0 0 8","gallery",[3701199,3700932,3578796,3700949,5190560,3578805,3578825,3540828,3543449,3587305,3543581,3543334,5267921,3578678,3578781,3543281,3543492,5267920,4255182,3700907]);galleries[206087]=new gallery(206087,"5270504,3701101,3701040,3587501,3587494,3587488,3587460,3587452,3587448,3587438,3587434,3545118,3545113,3545045,3543550,3543432,3543321,3543267,3540818","2 0 0 7","gallery",[3543267,3543296,3543321,3543432,3543550,3545045,3545113,3545118,3587448,3587434,3587438,3587452,3587460,5270504,3587494,3587501,3701101,3701040,3587488,3540818]);galleries[203404]=new gallery(203404,"3941469,3701406,3701138,3587515,3587514,3540816,3540812,3540811,3540807,3540806,3540803,3540800,3540775,3540772,3540771,3540761,3540752,3540722,3540686,3540655","0 0 0 0","gallery",[3540752,3540771,3540655,3941469,3540775,3540686,3540803,3540761,3540722,3540772,3540800,3540806,3540807,3540811,3540812,3540816,3701138,3701406,3587514,3587515]);var imageSets=new Object();imageSets[1]="5270504,5270499,5267933,5267923,5267922,5267921,5194183,5194179,5194177,5194176,5194175,5190642,5190580,5190560,4255182,3941469,3701199,3701138,3701101,3701040,3700949,3700932,3700907,3587523,3587515,3587514,3587501,3587494,3587488,3587452,3587448,3587438,3587434,3587368,3587305,3578825,3578805,3578796,3578695,3578681,3578678,3545118,3545045,3545039,3543581,3543550,3543492,3543449,3543334,3543321,3543281,3543267,3540828,3540818,3540816,3540812,3540811,3540807,3540806,3540803,3540800,3540795,3540775,3540771,3540752,3540722,3540655";imageSets[2]="5270504,5270499,5267933,5267923,5267922,5267921,5194183,5194179,5194177,5194176,5194175,5190642,5190580,5190560,4255182,3941469,3701406,3701199,3701138,3701101,3701040,3700949,3700937,3700932,3700907,3587523,3587515,3587514,3587501,3587494,3587488,3587460,3587452,3587448,3587438,3587434,3587375,3587368,3587305,3578825,3578805,3578796,3578781,3578695,3578681,3578678,3545118,3545113,3545045,3545039,3543581,3543550,3543492,3543449,3543432,3543334,3543321,3543281,3543267,3540828,3540818,3540816,3540812,3540811,3540807,3540806,3540803,3540800,3540795,3540775,3540772,3540771,3540761,3540752,3540722,3540686,3540655";imageSets[3]="5270504,5270499,5267933,5267923,5267922,5267921,5194183,5194179,5194177,5194176,5194175,5190642,5190580,5190560,3700949,3587452,3587434,3587368,3587305,3578681";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/craigstewart/images";break}switch(a){case 1:b="http://www1.clikpic.com/craigstewart/images";break}switch(a){case 2:b="http://admin.clikpic.com/craigstewart/images";break}switch(a){case 24:b="http://tpc15/clikpic/craigstewart/images";break}switch(a){case 4:b="http://www.clikchurch.com/craigstewart/images";break}switch(a){case 5:b="http://www2.clikpic.com/craigstewart/images";break}switch(a){case 22:b="http://tpc5/clikpic/craigstewart/images";break}switch(a){case 23:b="http://tpc10/clikpic/craigstewart/images";break}switch(a){case 25:b="http://tpc16/clikpic/craigstewart/images";break}switch(a){case 15:b="http://www3.clikpic.com/craigstewart/images";break}switch(a){case 18:b="http://www4.clikpic.com/craigstewart/images";break}switch(a){case 19:b="http://www5.clikpic.com/craigstewart/images";break}switch(a){case 31:b="http://www7.clikpic.com/craigstewart/images";break}switch(a){case 32:b="http://admin2.clikpic.com/craigstewart/images";break}switch(a){case 33:b="http://www8.clikpic.com/craigstewart/images";break}switch(a){case 34:b="http://www9.clikpic.com/craigstewart/images";break}switch(a){case 35:b="http://admin3.clikpic.com/craigstewart/images";break}switch(a){case 37:b="http://admin4.clikpic.com/craigstewart/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="craig stewart: "+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("print added to cart").show()}else{$("#paymentConfirm").text("print 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>prints:</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="craigstewart9@gmail.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="craigstewart9@gmail.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+'")'})}}};