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[3673530]=new thumbnail(3673530,"262453","Liverpool Reflected","exhbibshot_thumb.jpg",130,67,15);thumbnails[4500800]=new thumbnail(4500800,"262171","Sunet and Turbines","sunset2_thumb.jpg",130,200,15);thumbnails[4511179]=new thumbnail(4511179,"262171","Waves","waves_thumb.jpg",130,180,15);thumbnails[4511314]=new thumbnail(4511314,"262171","Dandelion in the Lakes","Dandy_thumb.jpg",130,199,15);thumbnails[4511323]=new thumbnail(4511323,"262171","Dramatic Sunset, New Brighton","sunset1_thumb.jpg",130,72,15);thumbnails[4511426]=new thumbnail(4511426,"262453","Skyline Post Storm","Liverpool_Skyline_Post_Storm_O_thumb.jpg",130,76,15);thumbnails[4511428]=new thumbnail(4511428,"262453","Waiting to Leave","merseyblur_thumb.jpg",130,49,15);thumbnails[4511435]=new thumbnail(4511435,"262453","3 Graces by Night","Night_Skyline_thumb.jpg",130,77,15);thumbnails[4511445]=new thumbnail(4511445,"262453","Changing Face","Night_Skyline2_thumb.jpg",130,56,15);thumbnails[4541222]=new thumbnail(4541222,"262453","Liverpool Skyline & Warship","Liverpool_City_Panorama_thumb.jpg",130,56,15);thumbnails[4546614]=new thumbnail(4546614,"262453","The Pier Head of 2009","The_New_Pier_Head4web_thumb.jpg",130,38,15);thumbnails[5455823]=new thumbnail(5455823,"262171","Thundersnow Storm","snowstorm_thumb.jpg",130,98,15);thumbnails[5455832]=new thumbnail(5455832,"262171","Wales and Wirral at Sunset","wirral_thumb.jpg",130,96,15);thumbnails[5455863]=new thumbnail(5455863,"262453","Magnificent Mersey","skyline_thumb.jpg",130,92,15);thumbnails[6173719]=new thumbnail(6173719,"","The Prints Header","The_Prints_thumb.jpg",130,12,15);thumbnails[6154463]=new thumbnail(6154463,"262171","Leap","squiz_thumb.jpg",130,188,15);thumbnails[3673268]=new thumbnail(3673268,"224339","The First Step is the Hardest","cobbledock_thumb.jpg",130,221,15);thumbnails[3697194]=new thumbnail(3697194,"224339","Teeny Town Hall","tiltshift_thumb.jpg",130,212,15);thumbnails[4511336]=new thumbnail(4511336,"224339","An Ancient Robot","_Wall_E_Liverpool_Style_O_thumb.jpg",130,86,15);thumbnails[4511338]=new thumbnail(4511338,"224339","A380 Emerging","a380_thumb.jpg",130,66,15);thumbnails[4511343]=new thumbnail(4511343,"224339","Farmer and Robot","bokeh_thumb.jpg",130,90,15);thumbnails[4511371]=new thumbnail(4511371,"224339","Jet Ski Mersey","jetski_thumb.jpg",130,61,15);thumbnails[4511378]=new thumbnail(4511378,"224339","Men at Work","menatwork_thumb.jpg",130,213,15);thumbnails[4511382]=new thumbnail(4511382,"224339","Rusty Muldoon","Rusty_Muldoon_O_thumb.jpg",130,78,15);thumbnails[4511389]=new thumbnail(4511389,"224339","White Lines","whitelining_thumb.jpg",130,82,15);thumbnails[4511398]=new thumbnail(4511398,"224339","The Lights","lights_thumb.jpg",130,71,15);thumbnails[6154422]=new thumbnail(6154422,"224339","Depth of Field","F122_CP_thumb.jpg",130,195,15);thumbnails[3697197]=new thumbnail(3697197,"224340","John","gent2_thumb.jpg",130,195,15);thumbnails[3697202]=new thumbnail(3697202,"224340","Williamson Sq Man","btest_thumb.jpg",130,87,15);thumbnails[4532933]=new thumbnail(4532933,"224340","Church St ","sgirl3_thumb.jpg",130,196,15);thumbnails[4532940]=new thumbnail(4532940,"224340","Man leaving Liverpool One","streetbloke_thumb.jpg",130,199,15);thumbnails[4532950]=new thumbnail(4532950,"224340","Woman leaving Liverpool One","streetgirl2_thumb.jpg",130,157,15);thumbnails[6154417]=new thumbnail(6154417,"224340","Parklife 2","Parklife2_-_Liverpool_2010CP_thumb.jpg",130,211,15);thumbnails[4510996]=new thumbnail(4510996,"224340","Caught coming out of the Swan","dude_thumb.jpg",130,196,15);thumbnails[6154344]=new thumbnail(6154344,"224340","Parklife 1","Parklife1_-_Liverpool_2010_CP_thumb.jpg",130,217,15);thumbnails[3673345]=new thumbnail(3673345,"224348","3 Graces - Autumn","Pier_Head_GVC_thumb.jpg",130,102,15);thumbnails[3697185]=new thumbnail(3697185,"224348","Stairwell Geometry","archi_thumb.jpg",130,88,15);thumbnails[3697187]=new thumbnail(3697187,"224348","Jurys Inn","jurys_thumb.jpg",130,76,15);thumbnails[3697206]=new thumbnail(3697206,"224348","The Philharmonic Pub","phil_thumb.jpg",130,188,15);thumbnails[4533010]=new thumbnail(4533010,"224348","Cathdedral Tryptych","Cat_Trpy_thumb.jpg",130,79,15);thumbnails[4533018]=new thumbnail(4533018,"224348","Derelict - Four Bridges","Derelict_-_Four_Bridges_O_thumb.jpg",130,195,15);thumbnails[4533067]=new thumbnail(4533067,"224348","The new canal link","new_muzz_thumb.jpg",130,76,15);thumbnails[4533071]=new thumbnail(4533071,"224348","New Ferry Terminal","new_ferry_thumb.jpg",130,231,15);thumbnails[4533073]=new thumbnail(4533073,"224348","Condemned","derilict1_thumb.jpg",130,95,15);thumbnails[4533078]=new thumbnail(4533078,"224348","Red Alley","alley_thumb.jpg",130,216,15);thumbnails[4533080]=new thumbnail(4533080,"224348","Ferrys Rest","ferrybed_thumb.jpg",130,68,15);thumbnails[5455820]=new thumbnail(5455820,"224348","Graces Reflected","graces1_thumb.jpg",130,98,15);thumbnails[6154437]=new thumbnail(6154437,"224348","City of Light","City_of_Light_-_Liverpool_2010CP_thumb.jpg",130,91,15);thumbnails[6154428]=new thumbnail(6154428,"224348","The new additions to the Albert Dock","Wheel__Arena_Albert_Dock_Liverpool_2010CP_thumb.jpg",130,105,15);thumbnails[3697189]=new thumbnail(3697189,"225943","Contemplate","candid1_thumb.jpg",130,192,15);thumbnails[3697289]=new thumbnail(3697289,"225943","Studying Form","candid2_thumb.jpg",130,174,15);thumbnails[4533001]=new thumbnail(4533001,"225943","Looking for a Barber","barber_thumb.jpg",130,217,15);thumbnails[5455856]=new thumbnail(5455856,"225943","Matthew St Festival","street_thumb.jpg",130,100,15);var galleries=new Object();galleries[262453]=new gallery(262453,"5455863,4546614,4541222,4511445,4511435,4511428,4511426,3673530","Liverpool Skylines","gallery",[3673530,4511426,4511428,4511435,4511445,4541222,4546614,5455863]);galleries[262171]=new gallery(262171,"4511323","Nature","gallery",[4500800,4511179,4511314,4511323,5455823,5455832,6154463]);galleries[224339]=new gallery(224339,"4511336","Creative","gallery",[3673268,3697194,4511336,4511338,4511343,4511371,4511378,4511382,4511389,4511398,6154422]);galleries[224340]=new gallery(224340,"6154417,6154344,4532950","People","gallery",[3697197,3697202,4532933,4532940,4532950,6154417,4510996,6154344]);galleries[224348]=new gallery(224348,"6154437,6154428,5455820","Architecture","gallery",[3673345,3697185,3697187,3697206,4533010,4533018,4533067,4533071,4533073,4533078,4533080,5455820,6154437,6154428]);galleries[225943]=new gallery(225943,"5455856,4533001","Candid & Street","gallery",[3697189,3697289,4533001,5455856]);var imageSets=new Object();imageSets[1]="6154437,6154428,5455863,5455820,4533067,4533018,4533001,4532950,4511435,4511426,4511378,4511336,4511323,4511314,4511179,4510996,4500800,3697185,3673530,3673268";imageSets[2]="6154437,6154428,6154417,6154344,5455856,5455820,4533001,4532950,4511336,4511323";imageSets[3]="6154437,6154428,6154417,5455863,5455820";imageSets[232039]="6154437,6154428,6154344,5455856,5455832,5455823,5455820,4546614,4533078,4533067,4533018,3697289,3697189";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/lcarus/images";break}switch(a){case 1:b="http://www1.clikpic.com/lcarus/images";break}switch(a){case 2:b="http://admin.clikpic.com/lcarus/images";break}switch(a){case 24:b="http://tpc15/clikpic/lcarus/images";break}switch(a){case 4:b="http://www.clikchurch.com/lcarus/images";break}switch(a){case 5:b="http://www2.clikpic.com/lcarus/images";break}switch(a){case 22:b="http://tpc5/clikpic/lcarus/images";break}switch(a){case 23:b="http://tpc10/clikpic/lcarus/images";break}switch(a){case 25:b="http://tpc16/clikpic/lcarus/images";break}switch(a){case 15:b="http://www3.clikpic.com/lcarus/images";break}switch(a){case 18:b="http://www4.clikpic.com/lcarus/images";break}switch(a){case 19:b="http://www5.clikpic.com/lcarus/images";break}switch(a){case 31:b="http://www7.clikpic.com/lcarus/images";break}switch(a){case 32:b="http://admin2.clikpic.com/lcarus/images";break}switch(a){case 33:b="http://www8.clikpic.com/lcarus/images";break}switch(a){case 34:b="http://www9.clikpic.com/lcarus/images";break}switch(a){case 35:b="http://admin3.clikpic.com/lcarus/images";break}switch(a){case 37:b="http://admin4.clikpic.com/lcarus/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="Lee Carus 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>"}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+'")'})}}};