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[3561771]=new thumbnail(3561771,"217809","","textiles-fair-header1_thumb.JPG",130,28,15);thumbnails[3564333]=new thumbnail(3564333,"217809","","bluebirdhat_detail_2_thumb.jpg",130,88,15);thumbnails[3731721]=new thumbnail(3731721,"217809","","art_fair_a_09_copya_thumb.jpg",130,184,15);thumbnails[4448361]=new thumbnail(4448361,"217809","","Magazine_Maxims_1_thumb.jpg",130,97,15);thumbnails[4562680]=new thumbnail(4562680,"217809","Stone Faces","2stonefaces1_thumb.jpg",130,89,15);thumbnails[4566775]=new thumbnail(4566775,"217809","","Bird_Tales_thumb.jpg",130,94,15);thumbnails[5060284]=new thumbnail(5060284,"217809","","CANNIZARO_E-FLYER1_thumb.jpg",130,156,15);thumbnails[5490319]=new thumbnail(5490319,"217809","","my_flower_mixed_collage_thumb.jpg",130,135,15);thumbnails[5498685]=new thumbnail(5498685,"217809","","ecourse_black_border_with_AC12345_thumb.jpg",130,116,15);thumbnails[3561871]=new thumbnail(3561871,"217809","","textiles-fair-header11_thumb.JPG",130,28,15);thumbnails[3561898]=new thumbnail(3561898,"217809","twin stars","twin_stars_thumb.jpg",130,74,15);thumbnails[3569419]=new thumbnail(3569419,"217809","","Create_woman_2_thumb.jpg",130,80,15);thumbnails[3561996]=new thumbnail(3561996,"217809","","Me_and_G_thumb.jpg",130,131,15);thumbnails[3394265]=new thumbnail(3394265,"207239","Create ","Create woman_thumb.jpg",130,80,15);thumbnails[4810216]=new thumbnail(4810216,"207239","Untitled","whisk-woman-2_thumb.jpg",130,131,15);thumbnails[5292343]=new thumbnail(5292343,"207239","I dream of a place . . . . ","I_dream_of_a_place_thumb.jpg",130,121,15);thumbnails[3403788]=new thumbnail(3403788,"207239","Lovely Creatures Series: Avent<br>\r\n","Avent bottle woman_thumb.jpg",130,82,15);thumbnails[3403797]=new thumbnail(3403797,"207239","Kill Bill<br>\r\n","Kill Bill_thumb.jpg",130,86,15);thumbnails[3403870]=new thumbnail(3403870,"207239","Lovely Creatures Series: Untitled","Motorbike Woman1_thumb.jpg",130,74,15);thumbnails[3403852]=new thumbnail(3403852,"207239","Sound of Dusting<br>\r\n","Sound of music_thumb.jpg",130,91,15);thumbnails[3403885]=new thumbnail(3403885,"207239","Rise","Rise_mini canvas_thumb.jpg",130,133,15);thumbnails[3405436]=new thumbnail(3405436,"207239","Ambassadors of the World","Ambassadors of the world_thumb.jpg",130,179,15);thumbnails[3543258]=new thumbnail(3543258,"207239","Lovely Creature Series: Untitled","Book_reader1_thumb.jpg",130,160,15);thumbnails[3543271]=new thumbnail(3543271,"207239","Lovely Creatures Series","drill_woman_2_thumb.jpg",130,159,15);thumbnails[3562227]=new thumbnail(3562227,"207239","Lovely Creatures Series: Untitled","gun_marriage_thumb.jpg",130,101,15);thumbnails[3562753]=new thumbnail(3562753,"207239","Lovely Creatures Series: Untitled","Flyby_bag_thumb.jpg",130,99,15);thumbnails[3544256]=new thumbnail(3544256,"207239","Lovely Creatures Series: Untitled","Tennis-player_thumb.gif",130,101,15);thumbnails[3544296]=new thumbnail(3544296,"207239","Lovely Creatures Series: Untitled","glass-eye_thumb.gif",130,158,15);thumbnails[3546725]=new thumbnail(3546725,"207239","Detail of: Lovely Creatures Series: Untitled","bluebirdhat_detail2_thumb.jpg",130,88,15);thumbnails[3550887]=new thumbnail(3550887,"207239","Lovely Creatures Series: Artist","Pregnant_camera3_thumb.jpg",130,158,15);thumbnails[3551085]=new thumbnail(3551085,"207239","Relic 1","Relic1_thumb.jpg",130,130,15);thumbnails[3605136]=new thumbnail(3605136,"207239","Relic 2","Relic_2_thumb.jpg",130,130,15);thumbnails[3605230]=new thumbnail(3605230,"207239","Relic 3","Relic_3_thumb.jpg",130,130,15);thumbnails[3605242]=new thumbnail(3605242,"207239","Relic 4","Relic_4_thumb.jpg",130,130,15);thumbnails[3605266]=new thumbnail(3605266,"207239","Walk Yourself Slim ","Walk_Yourself_Slim_thumb.jpg",130,99,15);thumbnails[3605273]=new thumbnail(3605273,"207239","Look Ten Years Younger","Look_Ten_Years_Younger_thumb.jpg",130,103,15);thumbnails[3564355]=new thumbnail(3564355,"207239","Untitled","hope_writing1_thumb.jpg",130,123,15);thumbnails[4809731]=new thumbnail(4809731,"207240","Untitled","woman_iin_red21_thumb.jpg",130,160,15);thumbnails[4903624]=new thumbnail(4903624,"207240","Untitled","red_book_back_thumb.jpg",130,101,15);thumbnails[4903637]=new thumbnail(4903637,"207240","Untitled","back_bodice_woman_thumb.jpg",130,106,15);thumbnails[4903702]=new thumbnail(4903702,"207240","Untitled","binoculars_woman_thumb.jpg",130,160,15);thumbnails[4903704]=new thumbnail(4903704,"207240","Untitled ","crown_woman_thumb.jpg",130,159,15);thumbnails[4903717]=new thumbnail(4903717,"207240","Untitled","leopard_bird_on_page_brown_paper_thumb.jpg",130,100,15);thumbnails[4903861]=new thumbnail(4903861,"207240","Untitled","lipstick_woman_thumb.jpg",130,159,15);thumbnails[4903862]=new thumbnail(4903862,"207240","Untitled","winters_tale_first_page_thumb.jpg",130,160,15);thumbnails[3545296]=new thumbnail(3545296,"207240","Lovely Creatures Series: Untitled","Ironing_woman_thumb.jpg",130,179,15);thumbnails[3545322]=new thumbnail(3545322,"207240","Lovely Creatures Series: Untitled","Bird_scale_woman_thumb.jpg",130,180,15);thumbnails[3562790]=new thumbnail(3562790,"207240","Lovely Creatures Series: Untitled","Art_Woman_thumb.jpg",130,179,15);thumbnails[3562898]=new thumbnail(3562898,"207240","Lovely Creatures Series: Bookworm","Bird_book_thumb.jpg",130,180,15);thumbnails[3562908]=new thumbnail(3562908,"207240","Lovely Creatures Series: Director","Blackberrybag_thumb.jpg",130,179,15);thumbnails[3562911]=new thumbnail(3562911,"207240","Lovely Creatures Series: Tired","Drink_it_woman_thumb.jpg",130,179,15);thumbnails[3562916]=new thumbnail(3562916,"207240","Lovely Creatures Series: Untitled","Hoover_woman_thumb.jpg",130,180,15);thumbnails[3562921]=new thumbnail(3562921,"207240","Lovely Creatures Series: Untitled","Lampshade_teddy_thumb.jpg",130,179,15);thumbnails[5445742]=new thumbnail(5445742,"307948","Untitled ","Voice_woman_thumb.jpg",130,130,15);thumbnails[5445750]=new thumbnail(5445750,"307948","Untitled","wedding_dress_thumb.jpg",130,133,15);thumbnails[5445752]=new thumbnail(5445752,"307948","Untitled","Lonesome_thumb.jpg",130,129,15);thumbnails[5445755]=new thumbnail(5445755,"307948","Untitled","black_bird_thumb.jpg",130,129,15);thumbnails[5445837]=new thumbnail(5445837,"307948","Untitled","dare_to_be_yourself_thumb.jpg",130,130,15);thumbnails[4504547]=new thumbnail(4504547,"250233","","guilt_thumb.jpg",130,97,15);thumbnails[4605174]=new thumbnail(4605174,"250233","","love_thumb.jpg",130,97,15);thumbnails[4614232]=new thumbnail(4614232,"250233","","exhausted_thumb.jpg",130,98,15);thumbnails[4810496]=new thumbnail(4810496,"250233","","frusstration_thumb.jpg",130,98,15);thumbnails[5609302]=new thumbnail(5609302,"250233","","fear_thumb.jpg",130,100,15);thumbnails[4218530]=new thumbnail(4218530,"250233","","isolation_thumb.jpg",130,90,15);thumbnails[4448637]=new thumbnail(4448637,"250233","","protective_Aug_5_09_thumb.jpg",130,93,15);thumbnails[4578042]=new thumbnail(4578042,"264944","24th August 2009","Work_2_Aug_09_thumb.jpg",130,97,15);thumbnails[4590902]=new thumbnail(4590902,"264944","26th August 2009","Art_day_with_Alice_Aug_09_thumb.jpg",130,92,15);thumbnails[4711074]=new thumbnail(4711074,"264944","13th September 2009","Aeroplane_scene_thumb.jpg",130,92,15);thumbnails[5269295]=new thumbnail(5269295,"264944","19th December 2009","ink_bird_dec_091_thumb.jpg",130,179,15);thumbnails[4569165]=new thumbnail(4569165,"264944","10th August 2009","10_Aug_09_thumb.jpg",130,96,15);thumbnails[4569286]=new thumbnail(4569286,"264944","11th August 2009","11_Aug_09_thumb.jpg",130,93,15);thumbnails[4569036]=new thumbnail(4569036,"264944","13th August 2009","13_Aug_09_thumb.jpg",130,93,15);thumbnails[4569240]=new thumbnail(4569240,"264944","23rd August 2009","23_Aug_09_thumb.jpg",130,92,15);thumbnails[3404100]=new thumbnail(3404100,"207926","Katy Dove Workshop","Katy Dove Workshop - Metropole1_thumb.jpg",130,98,15);thumbnails[3560636]=new thumbnail(3560636,"207926","Young Creatives Competition","Young_Creatives_Youth_Inclusion_10_wk_Course_image_of_work_thumb.jpg",130,96,15);thumbnails[3560629]=new thumbnail(3560629,"207926","Mixed Media Course","Mixed_Media_Adult_Horniman_thumb.jpg",130,98,15);thumbnails[3560616]=new thumbnail(3560616,"207926","Adult Mixed Media Course","Adult_Art_Course_at_Horniman_Musuem_thumb.jpg",130,98,15);thumbnails[3405034]=new thumbnail(3405034,"207926",'Art on a Postcard: "Ideas on How to Improve Your World"',"Art on a postcard project sample postcards1_thumb.jpg",130,89,15);thumbnails[3560631]=new thumbnail(3560631,"207926",'Art on a Postcard: "Ideas on How to Improve Your World". Windmill Festival, Brixton, 2005',"Art_on_a_Postcard_Project_tent_thumb.jpg",130,92,15);thumbnails[3560635]=new thumbnail(3560635,"207926","Refugee & Asylum Seekers Week","Me_running_Refugee__Asylum_Seekers_Week_Workshop_thumb.jpg",130,98,15);thumbnails[3560645]=new thumbnail(3560645,"207926","Eardley School Art Project","Garden_Course_0011_thumb.jpg",130,97,15);thumbnails[3560648]=new thumbnail(3560648,"207926","Exhibition of Eardley School art Work - Tooting Leisure Centre","Tooting_Exhib_2_thumb.jpg",130,98,15);thumbnails[3560658]=new thumbnail(3560658,"207926","Mini Masters","MiniMasters1_thumb.jpg",130,98,15);var galleries=new Object();galleries[217809]=new gallery(217809,"5498685,5490319,5060284,4566775,4562680,4448361,3731721,3569419,3564333,3561996","Private Gallery","section267245",[3561771,3564333,3731721,4448361,4562680,4566775,5060284,5490319,5498685,3561871,3561898,3569419,3561996]);galleries[207239]=new gallery(207239,"5292343,4810216,3605273,3605266,3605242,3605230,3605136,3564355,3562753,3562227","Textile Works","gallery",[3394265,4810216,5292343,3403788,3403797,3403870,3403852,3403885,3405436,3543258,3543271,3562227,3562753,3544256,3544296,3546725,3550887,3551085,3605136,3605230,3605242,3605266,3605273,3564355]);galleries[207240]=new gallery(207240,"4903862,4903861,4903717,4903704,4903702,4903637,4903624,4809731,3562921,3562916","Paper Works","gallery",[4809731,4903624,4903637,4903702,4903704,4903717,4903861,4903862,3545296,3545322,3562790,3562898,3562908,3562911,3562916,3562921]);galleries[307948]=new gallery(307948,"5445837,5445755,5445752,5445750,5445742","Canvas Works","gallery",[5445742,5445750,5445752,5445755,5445837]);galleries[250233]=new gallery(250233,"5609302,4810496,4614232,4605174,4504547,4448637,4218530","Project 1","gallery",[4504547,4605174,4614232,4810496,5609302,4218530,4448637]);galleries[264944]=new gallery(264944,"5269295,4711074,4590902,4578042,4569286,4569240,4569165,4569036","Illustration (Project 2)","gallery",[4578042,4590902,4711074,5269295,4569165,4569286,4569036,4569240]);galleries[207926]=new gallery(207926,"3560658,3560648,3560645,3560636,3560635,3560631,3560629,3560616,3405034,3404100","Workshops","gallery",[3404100,3560636,3560629,3560616,3405034,3560631,3560635,3560645,3560648,3560658]);var imageSets=new Object();imageSets[1]="5445752,5445750,5445742,5292343,4903861,4810216,3605242,3545322,3543258,3403797,3403788,3394265";imageSets[3]="5609302,5498685,5490319,5445837,5445755,5445752,5445750,5445742,5292343,5269295,5060284,4903862,4903861,4903717,4903704,4903702,4903637,4903624,4810496,4810216,4809731,4711074,4614232,4605174,4590902,4578042,4569286,4569240,4569165,4569036,4566775,4562680,4504547,4448637,4448361,4218530,3731721,3605273,3605266,3605242,3605230,3605136,3569419,3564355,3564333,3562921,3562916,3562911,3562908,3562898";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/acritchlow/images";break}switch(a){case 1:b="http://www1.clikpic.com/acritchlow/images";break}switch(a){case 2:b="http://admin.clikpic.com/acritchlow/images";break}switch(a){case 24:b="http://tpc15/clikpic/acritchlow/images";break}switch(a){case 4:b="http://www.clikchurch.com/acritchlow/images";break}switch(a){case 5:b="http://www2.clikpic.com/acritchlow/images";break}switch(a){case 22:b="http://tpc5/clikpic/acritchlow/images";break}switch(a){case 23:b="http://tpc10/clikpic/acritchlow/images";break}switch(a){case 25:b="http://tpc16/clikpic/acritchlow/images";break}switch(a){case 15:b="http://www3.clikpic.com/acritchlow/images";break}switch(a){case 18:b="http://www4.clikpic.com/acritchlow/images";break}switch(a){case 19:b="http://www5.clikpic.com/acritchlow/images";break}switch(a){case 31:b="http://www7.clikpic.com/acritchlow/images";break}switch(a){case 32:b="http://admin2.clikpic.com/acritchlow/images";break}switch(a){case 33:b="http://www8.clikpic.com/acritchlow/images";break}switch(a){case 34:b="http://www9.clikpic.com/acritchlow/images";break}switch(a){case 35:b="http://admin3.clikpic.com/acritchlow/images";break}switch(a){case 37:b="http://admin4.clikpic.com/acritchlow/images";break}switch(a){case 38:b="http://admin5.clikpic.com/acritchlow/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="amelia critchlow: "+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> 				&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="ameliacritchlow@hotmail.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="ameliacritchlow@hotmail.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+'")'})}}};