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[4567704]=new thumbnail(4567704,"","Rebecca","_MG_5705antiqbwrebecca1_thumb.jpg",130,87,15);thumbnails[3964814]=new thumbnail(3964814,"239611","Guardian Angel","GuardianAngel2_thumb.jpg",130,130,15);thumbnails[4008740]=new thumbnail(4008740,"239611","Hubble Bubble","_MG_2548fxHubbleBubble_thumb.jpg",130,130,15);thumbnails[3965131]=new thumbnail(3965131,"239611","Meander out to Sea","MeanderOutToSea5_thumb.jpg",130,130,15);thumbnails[4008603]=new thumbnail(4008603,"239611","Big Rock","_MG_2639fx_thumb.jpg",130,130,15);thumbnails[3962430]=new thumbnail(3962430,"239611","Ebb and Flow","EbbandFlow1_thumb.jpg",130,130,15);thumbnails[3962432]=new thumbnail(3962432,"239611","Sands of Time","SandsofTime2_thumb.jpg",130,130,15);thumbnails[3965319]=new thumbnail(3965319,"239611","Mists of Time","7791lit-Editstandalone_thumb.jpg",130,130,15);thumbnails[3965089]=new thumbnail(3965089,"239611","Little Soldiers","LittleSoldiers2_thumb.jpg",130,130,15);thumbnails[3965248]=new thumbnail(3965248,"239611","Standing Alone","Standingalonelit_thumb.jpg",130,130,15);thumbnails[4008606]=new thumbnail(4008606,"239611","3 step","_MG_2645fx_thumb.jpg",130,130,15);thumbnails[3964823]=new thumbnail(3964823,"239611","White Lines","WhiteLines2_thumb.jpg",130,130,15);thumbnails[3962444]=new thumbnail(3962444,"239611","Storm Clouds","StormClouds1_thumb.jpg",130,130,15);thumbnails[3964957]=new thumbnail(3964957,"239611","Independence","Independence4_thumb.jpg",130,130,15);thumbnails[3965969]=new thumbnail(3965969,"239611","Rocky Face","_MG_9836rockslit_thumb.jpg",130,130,15);thumbnails[3971085]=new thumbnail(3971085,"239611","Simple Pleasures","4302barney_thumb.jpg",130,130,15);thumbnails[3971257]=new thumbnail(3971257,"239611","Passage to the Sea","passagetosea5793lit_thumb.jpg",130,130,15);thumbnails[3965857]=new thumbnail(3965857,"239611","Four Post","_MG_7735fourpost1lit_thumb.jpg",130,130,15);thumbnails[3965842]=new thumbnail(3965842,"239611","Lone Shed","IMG_5574lone-shedfxlit_thumb.jpg",130,130,15);thumbnails[4008644]=new thumbnail(4008644,"239611","Erosion","_MG_2618fx_thumb.jpg",130,130,15);thumbnails[3965791]=new thumbnail(3965791,"239611","Lighthouse","IMG_4371lighthouse-1_thumb.jpg",130,130,15);thumbnails[3965365]=new thumbnail(3965365,"239611","Ripples and Reflections","ripplesandreflections98272_thumb.jpg",130,87,15);thumbnails[3965346]=new thumbnail(3965346,"239611","Distant Solitude","_MG_8118distantsolitude_thumb.jpg",130,87,15);thumbnails[4270275]=new thumbnail(4270275,"239611","Barren","IMG_5582redfx300_thumb.jpg",130,87,15);thumbnails[4276467]=new thumbnail(4276467,"239611","Brighton Pier","_MG_8278brightonpier300-L_thumb.jpg",130,87,15);thumbnails[4275887]=new thumbnail(4275887,"239611","8 Ball","8ball-300_50581_thumb.jpg",130,87,15);thumbnails[4362151]=new thumbnail(4362151,"239611","Pebble queue","_MG_4513-2pebblegroin_thumb.jpg",130,87,15);thumbnails[3965698]=new thumbnail(3965698,"239612","Old Farm Days","OldFarmDays1_thumb.jpg",130,87,15);thumbnails[3970660]=new thumbnail(3970660,"239612","Hazy Glade","0320hazyglade_thumb.jpg",130,87,15);thumbnails[3962416]=new thumbnail(3962416,"239612","Droplets","Droplets2_thumb.jpg",130,87,15);thumbnails[4273625]=new thumbnail(4273625,"239612","Domes","IMG_2138-2dome300_thumb.jpg",130,87,15);thumbnails[3962424]=new thumbnail(3962424,"239612","Rainy Day","RainyDay1_thumb.jpg",130,130,15);thumbnails[3982182]=new thumbnail(3982182,"239612","Top of the Hill","windmill1631_thumb.jpg",130,130,15);thumbnails[4567732]=new thumbnail(4567732,"239612","Haybales","_MG_5470big_thumb.jpg",130,68,15);thumbnails[4625748]=new thumbnail(4625748,"239612","Lazy Summer Afternoons","_MG_5627fx2web1_thumb.jpg",130,87,15);thumbnails[4270186]=new thumbnail(4270186,"252435","Red Dawn","_MG_4193redsunrise_thumb.jpg",130,87,15);thumbnails[5472406]=new thumbnail(5472406,"309675","","_MG_9204-2_thumb.jpg",130,130,15);thumbnails[4270200]=new thumbnail(4270200,"252435","Steel Grey","_MG_4165pettgreyyell300s_thumb.jpg",130,87,15);thumbnails[5472410]=new thumbnail(5472410,"309675","","_MG_9307_thumb.jpg",130,87,15);thumbnails[4270202]=new thumbnail(4270202,"252435","Splash","_MG_3002splash300s_thumb.jpg",130,87,15);thumbnails[5472414]=new thumbnail(5472414,"309675","","_MG_9344_thumb.jpg",130,87,15);thumbnails[4270695]=new thumbnail(4270695,"252435","Poppies and Bee","_MG_3741poppies300sdesat_thumb.jpg",130,87,15);thumbnails[4270214]=new thumbnail(4270214,"252435","Stormy Shelter","IMG_5574lone-shed300_thumb.jpg",130,87,15);thumbnails[5472416]=new thumbnail(5472416,"309675","","_MG_9354_thumb.jpg",130,195,15);thumbnails[5505716]=new thumbnail(5505716,"309675","","_MG_9360_thumb.jpg",130,87,15);thumbnails[4273790]=new thumbnail(4273790,"252435","Cuckmere Valley","Cuckmere300_thumb.jpg",130,87,15);thumbnails[5472424]=new thumbnail(5472424,"309675","","IMG_3954_thumb.jpg",130,130,15);thumbnails[5472428]=new thumbnail(5472428,"309675","","IMG_Mo-Howdee4016a2_thumb.jpg",130,130,15);thumbnails[4362106]=new thumbnail(4362106,"252435","Warm Glow","_MG_2982biglog_thumb.jpg",130,87,15);thumbnails[5472432]=new thumbnail(5472432,"309675","","IMG_4574-Edit_thumb.jpg",130,87,15);thumbnails[4567630]=new thumbnail(4567630,"252435","The Lighthouse","_MG_5634lighthouse1_thumb.jpg",130,87,15);thumbnails[5473406]=new thumbnail(5473406,"309675","","_MG_9265bw_thumb.jpg",130,87,15);thumbnails[5499422]=new thumbnail(5499422,"309675","","IMG_4479_thumb.jpg",130,87,15);thumbnails[5504722]=new thumbnail(5504722,"309675","","_MG_9202-3_thumb.jpg",130,87,15);thumbnails[5504969]=new thumbnail(5504969,"309675","","_MG_9218_thumb.jpg",130,87,15);thumbnails[4567791]=new thumbnail(4567791,"252435","Harbour Arm","_MG_4821-1lite5_thumb.jpg",130,87,15);thumbnails[4567828]=new thumbnail(4567828,"252435","Sunset over Hastings","e2422sunset4_thumb.jpg",130,87,15);thumbnails[4567931]=new thumbnail(4567931,"252435","Bulverhythe","_MG_4239-3_thumb.jpg",130,87,15);thumbnails[4568044]=new thumbnail(4568044,"252435","Harvest","_MG_5627-5_thumb.jpg",130,87,15);thumbnails[5472699]=new thumbnail(5472699,"309703","The Bicycle Shed","_MG_5393_thumb.jpg",130,87,15);thumbnails[5472703]=new thumbnail(5472703,"309703","End of a Hard Day","_MG_5342_thumb.jpg",130,87,15);thumbnails[5472708]=new thumbnail(5472708,"309703","Furrows","_MG_5420_thumb.jpg",130,87,15);thumbnails[5472712]=new thumbnail(5472712,"309703","Tractor","_MG_5458hpfx_thumb.jpg",130,87,15);thumbnails[5472751]=new thumbnail(5472751,"309703","Milk Urns","_MG_6384_thumb.jpg",130,195,15);thumbnails[5472758]=new thumbnail(5472758,"309703","The Haybarn","_MG_5379fxr_thumb.jpg",130,195,15);thumbnails[5472763]=new thumbnail(5472763,"309703","Take Flight","_MG_5620_thumb.jpg",130,195,15);thumbnails[5472772]=new thumbnail(5472772,"309703","Off Tuppin'","_MG_6461fxpull_thumb.jpg",130,195,15);thumbnails[5472720]=new thumbnail(5472720,"309703","Old War Track","_MG_5645_thumb.jpg",130,87,15);thumbnails[5472726]=new thumbnail(5472726,"309703","Three Trees","_MG_5650chnls_thumb.jpg",130,87,15);thumbnails[5472729]=new thumbnail(5472729,"309703","Gnarled","_MG_5682_thumb.jpg",130,87,15);thumbnails[5472743]=new thumbnail(5472743,"309703","One of the Herd","_MG_7055_thumb.jpg",130,87,15);thumbnails[5599382]=new thumbnail(5599382,"309703","coppicing","_MG_9500_thumb.jpg",130,87,15);thumbnails[5599383]=new thumbnail(5599383,"309703","Friendly Nudge","_MG_0409_thumb.jpg",130,87,15);thumbnails[5599387]=new thumbnail(5599387,"309703","warm breath","_MG_9844-1_thumb.jpg",130,87,15);thumbnails[5599398]=new thumbnail(5599398,"309703","The Bull","_MG_7709_thumb.jpg",130,87,15);thumbnails[5599554]=new thumbnail(5599554,"309703","Helping hand","_MG_6422_thumb.jpg",130,87,15);thumbnails[5599550]=new thumbnail(5599550,"309703","Follow me","_MG_0344_thumb.jpg",130,195,15);thumbnails[5599552]=new thumbnail(5599552,"309703","Potato crop","_MG_6361-2_thumb.jpg",130,183,15);thumbnails[5599555]=new thumbnail(5599555,"309703","Rounding up the flock","_MG_6270a_thumb.jpg",130,81,15);thumbnails[5610466]=new thumbnail(5610466,"309703","Hello ","_MG_0386-Edit_thumb.jpg",130,87,15);thumbnails[5610467]=new thumbnail(5610467,"309703","Faithful Friend","_MG_0521_thumb.jpg",130,87,15);thumbnails[5610469]=new thumbnail(5610469,"309703","peek-a-boo","_MG_0411-1_thumb.jpg",130,87,15);thumbnails[5610471]=new thumbnail(5610471,"309703","Lunchtime","_MG_0349_thumb.jpg",130,87,15);var galleries=new Object();galleries[239611]=new gallery(239611,"3965319","Coastal Monochrome","gallery",[3964814,4008740,3965131,4008603,3962430,3962432,3965319,3965089,3965248,4008606,3964823,3962444,3964957,3965969,3971085,3971257,3965857,3965842,4008644,3965791,3965365,3965346,4270275,4276467,4275887,4362151]);galleries[239612]=new gallery(239612,"3982182","Various","gallery",[3965698,3970660,3962416,4273625,3962424,3982182,4567732,4625748]);galleries[252435]=new gallery(252435,"4270186","Colour","gallery",[4270186,4270200,4270202,4270695,4270214,4273790,4362106,4567630,4567791,4567828,4567931,4568044]);galleries[309675]=new gallery(309675,"5505716,5504969,5504722,5499422,5473406,5472432,5472428,5472424,5472416,5472414","Portraits","gallery",[5472406,5472410,5472414,5472416,5505716,5472424,5472428,5472432,5473406,5499422,5504722,5504969]);galleries[309703]=new gallery(309703,"5610471,5610469,5610467,5610466,5599555,5599554,5599552,5599550,5599398,5599387","Farm","gallery",[5472699,5472703,5472708,5472712,5472751,5472758,5472763,5472772,5472720,5472726,5472729,5472743,5599382,5599383,5599387,5599398,5599554,5599550,5599552,5599555,5610466,5610467,5610469,5610471]);var imageSets=new Object();imageSets[1]="3965248";imageSets[2]="4270186,3982182,3965319";imageSets[3]="5610471,5610469,5610467,5610466,5599555,5599554,5599552,5599550,5599398,5599387,5599383,5599382,5505716,5504969,5504722,5499422,5473406,5472772,5472763,5472758,5472751,5472743,5472729,5472726,5472720,5472712,5472708,5472703,5472699,5472432,5472428,5472424,5472416,5472414,5472410,5472406,4625748,4568044,4567931,4567828,4567791,4567732,4567704,4567630,4362151,4362106,4276467,4275887,4273790,4273625";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/karenr/images";break}switch(a){case 1:b="http://www1.clikpic.com/karenr/images";break}switch(a){case 2:b="http://admin.clikpic.com/karenr/images";break}switch(a){case 24:b="http://tpc15/clikpic/karenr/images";break}switch(a){case 4:b="http://www.clikchurch.com/karenr/images";break}switch(a){case 5:b="http://www2.clikpic.com/karenr/images";break}switch(a){case 22:b="http://tpc5/clikpic/karenr/images";break}switch(a){case 23:b="http://tpc10/clikpic/karenr/images";break}switch(a){case 25:b="http://tpc16/clikpic/karenr/images";break}switch(a){case 15:b="http://www3.clikpic.com/karenr/images";break}switch(a){case 18:b="http://www4.clikpic.com/karenr/images";break}switch(a){case 19:b="http://www5.clikpic.com/karenr/images";break}switch(a){case 31:b="http://www7.clikpic.com/karenr/images";break}switch(a){case 32:b="http://admin2.clikpic.com/karenr/images";break}switch(a){case 33:b="http://www8.clikpic.com/karenr/images";break}switch(a){case 34:b="http://www9.clikpic.com/karenr/images";break}switch(a){case 35:b="http://admin3.clikpic.com/karenr/images";break}switch(a){case 37:b="http://admin4.clikpic.com/karenr/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="Karen Rooney LRPS 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+'")'})}}};