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[2974572]=new thumbnail(2974572,"","","bio pic2_thumb.jpg",130,173,18);thumbnails[2976283]=new thumbnail(2976283,"","","sigsmall_thumb.jpg",130,116,18);thumbnails[2977936]=new thumbnail(2977936,"","","flowers0 024_thumb.jpg",130,173,18);thumbnails[2978107]=new thumbnail(2978107,"","","Kirsty&Dave 1_thumb.jpg",130,173,18);thumbnails[2979000]=new thumbnail(2979000,"","","IMG_1510_thumb.jpg",130,87,18);thumbnails[2982003]=new thumbnail(2982003,"","","Cai 012_thumb.jpg",130,173,18);thumbnails[2982403]=new thumbnail(2982403,"","","Parasol 061_thumb.jpg",130,173,18);thumbnails[2985346]=new thumbnail(2985346,"","","leatherbook_thumb.jpg",130,99,18);thumbnails[2997336]=new thumbnail(2997336,"","","P1020013bw_thumb.jpg",130,173,18);thumbnails[3035601]=new thumbnail(3035601,"","","Mermaid 010ws_thumb.jpg",130,98,18);thumbnails[3083364]=new thumbnail(3083364,"","","evie_thumb.jpg",130,173,18);thumbnails[3083365]=new thumbnail(3083365,"","","megan_thumb.jpg",130,173,18);thumbnails[3083367]=new thumbnail(3083367,"","","reuben_thumb.jpg",130,173,18);thumbnails[3127219]=new thumbnail(3127219,"","","IMG_6860_thumb.jpg",130,173,18);thumbnails[3127220]=new thumbnail(3127220,"","","IMG_6975ws_thumb.jpg",130,173,18);thumbnails[3127224]=new thumbnail(3127224,"","","IMG_7030_thumb.jpg",130,173,18);thumbnails[3127318]=new thumbnail(3127318,"","","Montage1ws_thumb.jpg",130,173,18);thumbnails[3083370]=new thumbnail(3083370,"","","megan2_thumb.jpg",130,98,18);thumbnails[3083369]=new thumbnail(3083369,"","","abigail_thumb.jpg",130,98,18);thumbnails[2982023]=new thumbnail(2982023,"181975","","Faeriesnws1_thumb.jpg",130,173,18);thumbnails[2982389]=new thumbnail(2982389,"181975","","Jack Frost_thumb.jpg",130,173,18);thumbnails[2982634]=new thumbnail(2982634,"181975","","jess_thumb.jpg",130,173,18);thumbnails[3108808]=new thumbnail(3108808,"181975","","Eden Fairy ws_thumb.jpg",130,98,18);thumbnails[3005085]=new thumbnail(3005085,"181975","","Wisteria_thumb.jpg",130,98,18);thumbnails[2982021]=new thumbnail(2982021,"181975","","Faeries6nws3_thumb.jpg",130,173,18);thumbnails[2974531]=new thumbnail(2974531,"183247","","15th jan Home 116bw_thumb.jpg",130,173,18);thumbnails[2977937]=new thumbnail(2977937,"183247","","Morgan_thumb. 009.jpg",130,173,18);thumbnails[2982429]=new thumbnail(2982429,"183247","","Claire&Ella_thumb.jpg",130,173,18);thumbnails[2982481]=new thumbnail(2982481,"183247","","Rach&Polly_thumb.jpg",130,173,18);thumbnails[3108809]=new thumbnail(3108809,"183247","","IMG_6718 ws_thumb.jpg",130,173,18);thumbnails[3108865]=new thumbnail(3108865,"183247","","IMG_6337 ws_thumb.jpg",130,173,18);thumbnails[3109047]=new thumbnail(3109047,"183247","","IMG_6353ws_thumb.jpg",130,173,18);thumbnails[3127222]=new thumbnail(3127222,"183247","","IMG_7011_thumb.jpg",130,173,18);thumbnails[3127285]=new thumbnail(3127285,"183247","","IMG_6370_thumb.jpg",130,173,18);thumbnails[3039636]=new thumbnail(3039636,"183247","","IMG_5405ws_thumb.jpg",130,98,18);thumbnails[3039639]=new thumbnail(3039639,"183247","","IMG_5419ws_thumb.jpg",130,98,18);thumbnails[3039641]=new thumbnail(3039641,"183247","","IMG_5391ws_thumb.jpg",130,98,18);thumbnails[3083371]=new thumbnail(3083371,"183247","","IMG_5985_thumb.jpg",130,98,18);thumbnails[2977954]=new thumbnail(2977954,"183416","","Rachel 1_thumb.jpg",130,173,18);thumbnails[2982015]=new thumbnail(2982015,"183416","","applenws2_thumb.jpg",130,173,18);thumbnails[2982672]=new thumbnail(2982672,"183416","","Rachel 01_thumb.jpg",130,173,18);thumbnails[2982677]=new thumbnail(2982677,"183416","","winter 041_thumb.jpg",130,173,18);thumbnails[2982723]=new thumbnail(2982723,"183416","","winter 1 Rachel_thumb.jpg",130,173,18);thumbnails[2989263]=new thumbnail(2989263,"183416","","balloons_thumb.jpg",130,173,18);thumbnails[2989268]=new thumbnail(2989268,"183416","","Clowns 019_thumb.jpg",130,173,18);thumbnails[2997321]=new thumbnail(2997321,"183416","","Gothic Cookery 102_thumb.jpg",130,173,18);thumbnails[2997324]=new thumbnail(2997324,"183416","","IMG_7796_thumb.jpg",130,173,18);thumbnails[2997332]=new thumbnail(2997332,"183416","","IMG_7735_thumb.jpg",130,173,18);thumbnails[2978088]=new thumbnail(2978088,"183420","","The Rushes 18_thumb.jpg",130,173,18);thumbnails[2978161]=new thumbnail(2978161,"183420","","Rosie Jones 014_thumb.jpg",130,173,18);thumbnails[2982173]=new thumbnail(2982173,"183420","","piano_thumb.jpg",130,173,18);thumbnails[2982185]=new thumbnail(2982185,"183420","","GOLDBUG_thumb.jpg",130,173,18);thumbnails[2997353]=new thumbnail(2997353,"183420","","The Fires 2_thumb.jpg",130,173,18);thumbnails[5085579]=new thumbnail(5085579,"183420","","IMG_1545s_thumb.jpg",130,173,18);thumbnails[5085583]=new thumbnail(5085583,"183420","","IMG_1725s_thumb.jpg",130,173,18);thumbnails[5085590]=new thumbnail(5085590,"183420","","IMG_1744s_thumb.jpg",130,173,18);thumbnails[5085601]=new thumbnail(5085601,"183420","","IMG_1470s_thumb.jpg",130,173,18);thumbnails[2977932]=new thumbnail(2977932,"183418","","Attic Studios 10th August 133e_thumb.jpg",130,173,18);thumbnails[2977934]=new thumbnail(2977934,"183418","","Attic Studios 27th july 024e_thumb.jpg",130,173,18);thumbnails[2978154]=new thumbnail(2978154,"183418","","Attic Studios 8th march 083_thumb.jpg",130,173,18);thumbnails[2978681]=new thumbnail(2978681,"183418","","Attic Studios 8 feb 07 135_thumb.jpg",130,173,18);thumbnails[2982162]=new thumbnail(2982162,"183418","","Attic 24 jan 104 as_thumb.jpg",130,173,18);thumbnails[2982164]=new thumbnail(2982164,"183418","","Attic 25 jan 082 as_thumb.jpg",130,173,18);thumbnails[2982208]=new thumbnail(2982208,"183418","","Thursday BHA 2008 139e_thumb.jpg",130,173,18);thumbnails[2982209]=new thumbnail(2982209,"183418","","IMG_9299e_thumb.jpg",130,173,18);thumbnails[2982210]=new thumbnail(2982210,"183418","","Attic Studios BHA 2008 470e_thumb.jpg",130,173,18);thumbnails[2989194]=new thumbnail(2989194,"183418","","Attic Studios 14th march 077e_thumb.jpg",130,173,18);thumbnails[2989195]=new thumbnail(2989195,"183418","","IMG_2017_thumb.jpg",130,173,18);thumbnails[2989258]=new thumbnail(2989258,"183418","","Attic Studios 14th march 151_thumb.jpg",130,173,18);thumbnails[2982153]=new thumbnail(2982153,"183421","","mutha bored_thumb.jpg",130,173,18);thumbnails[2989260]=new thumbnail(2989260,"183421","","jan 11_thumb.jpg",130,173,18);thumbnails[2974538]=new thumbnail(2974538,"183428","","Summer 08 107_thumb.jpg",130,173,18);thumbnails[2981997]=new thumbnail(2981997,"183428","","Cai 002_thumb.jpg",130,173,18);thumbnails[2982516]=new thumbnail(2982516,"183428","","summerborder_thumb.jpg",130,173,18);thumbnails[2989261]=new thumbnail(2989261,"183428","","Endsleigh Hotel 086_thumb.jpg",130,173,18);thumbnails[2989270]=new thumbnail(2989270,"183428","","IMG_2155_thumb.jpg",130,173,18);thumbnails[2981996]=new thumbnail(2981996,"183419","","fern britain_thumb.jpg",130,173,18);thumbnails[2982601]=new thumbnail(2982601,"183419","","Bristol Zoo 0331_thumb.jpg",130,173,18);thumbnails[2982603]=new thumbnail(2982603,"183419","","flowers 064_thumb.jpg",130,173,18);thumbnails[2982606]=new thumbnail(2982606,"183419","","pebbles 007_thumb.jpg",130,173,18);thumbnails[2982610]=new thumbnail(2982610,"183419","","beach 007_thumb.jpg",130,173,18);thumbnails[2982613]=new thumbnail(2982613,"183419","","Hearts WS_thumb.jpg",130,173,18);thumbnails[2989259]=new thumbnail(2989259,"183419","","Bosch_thumb.jpg",130,173,18);thumbnails[2989273]=new thumbnail(2989273,"183419","","jan 17_thumb.jpg",130,173,18);thumbnails[2989275]=new thumbnail(2989275,"183419","","Sunflower WS_thumb.jpg",130,173,18);thumbnails[2997309]=new thumbnail(2997309,"183419","","_MG_6029_thumb.jpg",130,173,18);thumbnails[2997312]=new thumbnail(2997312,"183419","","_MG_6066_thumb.jpg",130,173,18);thumbnails[2997315]=new thumbnail(2997315,"183419","","_MG_6097_thumb.jpg",130,173,18);thumbnails[3035598]=new thumbnail(3035598,"183546","","4pics_thumb.jpg",130,173,18);thumbnails[3127341]=new thumbnail(3127341,"183546","","montage2_thumb.jpg",130,173,18);thumbnails[3035595]=new thumbnail(3035595,"183546","","artistic team staff photo_thumb.jpg",130,56,18);var galleries=new Object();galleries[181975]=new gallery(181975,"2982389","Enchanted","gallery",[2982023,2982389,2982634,3108808,3005085,2982021]);galleries[183247]=new gallery(183247,"3108865,3108809,2982429,2977937","Families, Children & Babies","gallery",[2974531,2977937,2982429,2982481,3108809,3108865,3109047,3127222,3127285,3039636,3039639,3039641,3083371]);galleries[183416]=new gallery(183416,"2982723,2982015,2977954","Creative Portraiture ","gallery",[2977954,2982015,2982672,2982677,2982723,2989263,2989268,2997321,2997324,2997332]);galleries[183420]=new gallery(183420,"2982173","Band Promo Photography","gallery",[2978088,2978161,2982173,2982185,2997353,5085579,5085583,5085590,5085601]);galleries[183418]=new gallery(183418,"2989258,2989195,2989194,2982210,2982208,2982162,2977934,2977932","Attic Studios","gallery",[2977932,2977934,2978154,2978681,2982162,2982164,2982208,2982209,2982210,2989194,2989195,2989258]);galleries[183421]=new gallery(183421,"2989260,2982153","Product & Food ","gallery",[2982153,2989260]);galleries[183428]=new gallery(183428,"2989261,2982516,2981997,2974538","On Location & Lifestyle","gallery",[2974538,2981997,2982516,2989261,2989270]);galleries[183419]=new gallery(183419,"2989259","Elemental ","gallery",[2981996,2982601,2982603,2982606,2982610,2982613,2989259,2989273,2989275,2997309,2997312,2997315]);galleries[183546]=new gallery(183546,"3127341","Collections","gallery",[3035598,3127341,3035595]);var imageSets=new Object();imageSets[1]="2982516,2982389,2981996";imageSets[2]="3127341,3108865,3108809,2989261,2989259,2989258,2989195,2989194,2982723,2982516,2982429,2982389,2982210,2982208,2982173,2982162,2982015,2982003,2981997,2977954,2977937,2977936,2977934,2977932,2974538";imageSets[3]="5085601,5085590,5085583,5085579,3127341,3127318,3127285,3127224,3127222,3127220,3127219,3109047,3108865,3108809,3108808,3083371,3083370,3083369,3083367,3083365,3083364,3039641,3039639,3039636,3035601,3035598,3035595,3005085,2997353,2997336,2997332,2997324,2997321,2997315,2997312,2997309,2989275,2989273,2989270,2989268,2989263,2989261,2989260,2989259,2989258,2989195,2989194,2985346,2982723,2982677";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 34:b="http://www9.clikpic.com/Hannahw/images";break}switch(a){case 1:b="http://www1.clikpic.com/Hannahw/images";break}switch(a){case 2:b="http://admin.clikpic.com/Hannahw/images";break}switch(a){case 4:b="http://www.clikchurch.com/Hannahw/images";break}switch(a){case 5:b="http://www2.clikpic.com/Hannahw/images";break}switch(a){case 15:b="http://www3.clikpic.com/Hannahw/images";break}switch(a){case 21:b="http://www6.clikpic.com/Hannahw/images";break}switch(a){case 18:b="http://www4.clikpic.com/Hannahw/images";break}switch(a){case 19:b="http://www5.clikpic.com/Hannahw/images";break}switch(a){case 22:b="http://tpc5/clikpic/Hannahw/images";break}switch(a){case 23:b="http://tpc10/clikpic/Hannahw/images";break}switch(a){case 24:b="http://tpc15/clikpic/Hannahw/images";break}switch(a){case 25:b="http://tpc16/clikpic/Hannahw/images";break}switch(a){case 31:b="http://www7.clikpic.com/Hannahw/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Hannahw/images";break}switch(a){case 33:b="http://www8.clikpic.com/Hannahw/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="DaisyRockPhotography: "+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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="HANNAHW">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};