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[688917]=new thumbnail(688917,"","Jude Goodman","469_6907_thumb.JPG",130,103,15);thumbnails[688919]=new thumbnail(688919,"","Vicky Kilby and Jude Goodman","465_6541_thumb.JPG",130,87,15);thumbnails[690816]=new thumbnail(690816,"52727","Christina and Liam sit dock","IMG_4972_thumb.JPG",130,104,15);thumbnails[690818]=new thumbnail(690818,"52727","Hybrid","IMG_5092_thumb.JPG",130,104,15);thumbnails[690809]=new thumbnail(690809,"52727","Head down group exit","579_7938_thumb.JPG",130,195,15);thumbnails[690811]=new thumbnail(690811,"52727","Head down group","579_7905_thumb.JPG",130,87,15);thumbnails[690805]=new thumbnail(690805,"52727","Atmonauti","551_5173_thumb.JPG",130,149,15);thumbnails[690677]=new thumbnail(690677,"52727","Group exit","549_4990_thumb.JPG",130,87,15);thumbnails[690678]=new thumbnail(690678,"52727","Group jump","550_5004_thumb.JPG",130,87,15);thumbnails[690666]=new thumbnail(690666,"52727","Exit","540_4015_thumb.JPG",130,87,15);thumbnails[690667]=new thumbnail(690667,"52727","Chase the streamer!","540_4025_thumb.JPG",130,195,15);thumbnails[690668]=new thumbnail(690668,"52727","Head down and sit","540_4079_thumb.JPG",130,195,15);thumbnails[690670]=new thumbnail(690670,"52727","Exit","540_4095_thumb.JPG",130,87,15);thumbnails[690674]=new thumbnail(690674,"52727","Sit","542_4208_thumb.JPG",130,195,15);thumbnails[690676]=new thumbnail(690676,"52727","Sit dock","548_4892_thumb.JPG",130,195,15);thumbnails[690672]=new thumbnail(690672,"52727","Canopies in the sun","541_4187_thumb.jpg2.jpg",130,195,15);thumbnails[690640]=new thumbnail(690640,"52727","Dean's exit","535_3595_thumb.jpg2.jpg",130,87,15);thumbnails[690637]=new thumbnail(690637,"52727","Tracking with streamer","535_3540_thumb.JPG",130,195,15);thumbnails[690634]=new thumbnail(690634,"52727","Exit","531_3185_thumb.JPG",130,195,15);thumbnails[690633]=new thumbnail(690633,"52727","Stuart, Nimmo and Fred","525_2561_thumb.JPG",130,87,15);thumbnails[690622]=new thumbnail(690622,"52727","Wingsuiting over the dropzone!","517_1748_thumb.JPG",130,87,15);thumbnails[690631]=new thumbnail(690631,"52727","Sunset Canopy","517_1756_thumb.JPG",130,87,15);thumbnails[690606]=new thumbnail(690606,"52727","Tracking exit","514_1445_thumb.JPG",130,195,15);thumbnails[690610]=new thumbnail(690610,"52727","Tracking","514_1451_thumb.JPG",130,195,15);thumbnails[690620]=new thumbnail(690620,"52727","Olly and Daniel exit","509_0985_thumb.JPG",130,87,15);thumbnails[690618]=new thumbnail(690618,"52727","Mike tracking away","473_7379_thumb.JPG",130,87,15);thumbnails[688931]=new thumbnail(688931,"52727","Jude Goodman and Elliot Clarke","469_6909_thumb.JPG",130,101,15);thumbnails[688937]=new thumbnail(688937,"52727","Tracking dive exit.","469_6924_thumb.JPG",130,195,15);thumbnails[688943]=new thumbnail(688943,"52727","Tracking","469_6927_thumb.JPG",130,92,15);thumbnails[688949]=new thumbnail(688949,"52727","Andy, Jude and Stuart","471_7165_thumb.JPG",130,109,15);thumbnails[688922]=new thumbnail(688922,"52727","Albie","467_6794_thumb.JPG",130,106,15);thumbnails[688927]=new thumbnail(688927,"52727","Olly Denham and Andy Gregory","465_6572_thumb.JPG",130,89,15);thumbnails[690573]=new thumbnail(690573,"52727","Fred from Babylon","105_0515_thumb.JPG",130,195,15);thumbnails[690575]=new thumbnail(690575,"52727","Fred from Babylon","105_0516_thumb.JPG",130,195,15);thumbnails[690807]=new thumbnail(690807,"52727","Wingsuit","564_6458_thumb.JPG",130,87,15);thumbnails[1255015]=new thumbnail(1255015,"52727","Jude Macdonald","552_5259 copy_thumb.jpg",130,86,15);thumbnails[1255017]=new thumbnail(1255017,"52727","Team Flytrix","552_5287 copy_thumb.jpg",130,195,15);thumbnails[1255018]=new thumbnail(1255018,"52727","Team Flytrix","552_5294 copy_thumb.jpg",130,86,15);thumbnails[1255019]=new thumbnail(1255019,"52727","Team Flytrix","552_5296 copy_thumb.jpg",130,195,15);thumbnails[1255020]=new thumbnail(1255020,"52727","Team Flytrix","Copy of IMG_8760 copy_thumb.jpg",130,195,15);thumbnails[1255021]=new thumbnail(1255021,"52727","Team Flytrix","IMG_5947 copy_thumb.jpg",130,87,15);thumbnails[1255022]=new thumbnail(1255022,"52727","Team Flytrix","IMG_7291 copy_thumb.jpg",130,87,15);thumbnails[1255023]=new thumbnail(1255023,"52727","Team Flytrix","IMG_7301 copy_thumb.jpg",130,195,15);thumbnails[1255024]=new thumbnail(1255024,"52727","Jude Macdonald","IMG_7384 copy_thumb.jpg",130,87,15);thumbnails[1255025]=new thumbnail(1255025,"52727","Vicky Finch","IMG_9625 copy_thumb.jpg",130,87,15);thumbnails[912039]=new thumbnail(912039,"52727","Easter Exits 14","Easter Exits 14_thumb.jpg",130,87,15);thumbnails[912042]=new thumbnail(912042,"52727","Easter Exits 16","Easter Exits 16_thumb.jpg",130,87,15);thumbnails[688966]=new thumbnail(688966,"52728","Leaving the plane!","sam2_thumb.26-9-04.jpg",130,87,15);thumbnails[688965]=new thumbnail(688965,"52728","Tandem landing","debbie4_thumb.jpg",130,188,15);thumbnails[688956]=new thumbnail(688956,"52728","Skimming the cloud!","blair2_thumb.8-8.jpg",130,87,15);thumbnails[688962]=new thumbnail(688962,"52728","Throwing the drogue!","keely1_thumb.jpg",130,94,15);thumbnails[688963]=new thumbnail(688963,"52728","Tandem Skydive","keely3_thumb.jpg",130,85,15);thumbnails[688959]=new thumbnail(688959,"52728","Landing","bryan3_thumb.6-7.jpg",130,183,15);thumbnails[688958]=new thumbnail(688958,"52728","View over Peterborough","bryan2_thumb.6-7.jpg",130,176,15);thumbnails[688952]=new thumbnail(688952,"52728","Alex filming tandem exit.","alex exit_thumb.jpg",130,127,15);thumbnails[688953]=new thumbnail(688953,"52728","Mark Harris with tandem student Andrew.","andrew2_thumb.17-7.jpg",130,72,15);thumbnails[688955]=new thumbnail(688955,"52728","Tandem landing","andrew3_thumb.17-7.jpg",130,123,15);thumbnails[688961]=new thumbnail(688961,"52728","Enjoying the skydive!","jo_thumb.jpg",130,90,15);var galleries=new Object();galleries[52727]=new gallery(52727,"1255025,1255023,1255020,1255019,690818,690666,688937","Fun Jumps","gallery",[690816,690818,690809,690811,690805,690677,690678,690666,690667,690668,690670,690674,690676,690672,690640,690637,690634,690633,690622,690631,690606,690610,690620,690618,688931,688937,688943,688949,688922,688927,690573,690575,690807,1255015,1255017,1255018,1255019,1255020,1255021,1255022,1255023,1255024,1255025,912039,912042]);galleries[52728]=new gallery(52728,"688963","Tandem","gallery",[688966,688965,688956,688962,688963,688959,688958,688952,688953,688955,688961]);var imageSets=new Object();imageSets[1]="1255025,1255023,1255020,1255019,690818,690816,690811,690809,690678,690677,690676,690674,690670,690668,690667,690666,690637,690633,690631,690620,690606,690575,688963,688958,688952,688943,688937,688922,688917";imageSets[2]="1255025,1255023,1255020,1255019,690818,690666,688963,688937,688919,688917";imageSets[3]="1255025,1255024,1255023,1255022,1255021,1255020,1255019,1255018,1255017,1255015,912042,912039,690818,690816,690811,690809,690807,690805,690678,690677,690676,690674,690672,690670,690668,690667,690666,690640,690637,690634,690633,690631,690622,690620,690618,690610,690606,690575,690573,688966,688965,688963,688962,688961,688959,688958,688956,688955,688953,688952";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/sarahhall/images";break}switch(a){case 1:b="http://www1.clikpic.com/sarahhall/images";break}switch(a){case 2:b="http://admin.clikpic.com/sarahhall/images";break}switch(a){case 24:b="http://tpc15/clikpic/sarahhall/images";break}switch(a){case 4:b="http://www.clikchurch.com/sarahhall/images";break}switch(a){case 5:b="http://www2.clikpic.com/sarahhall/images";break}switch(a){case 22:b="http://tpc5/clikpic/sarahhall/images";break}switch(a){case 23:b="http://tpc10/clikpic/sarahhall/images";break}switch(a){case 25:b="http://tpc16/clikpic/sarahhall/images";break}switch(a){case 15:b="http://www3.clikpic.com/sarahhall/images";break}switch(a){case 18:b="http://www4.clikpic.com/sarahhall/images";break}switch(a){case 19:b="http://www5.clikpic.com/sarahhall/images";break}switch(a){case 31:b="http://www7.clikpic.com/sarahhall/images";break}switch(a){case 32:b="http://admin2.clikpic.com/sarahhall/images";break}switch(a){case 33:b="http://www8.clikpic.com/sarahhall/images";break}switch(a){case 34:b="http://www9.clikpic.com/sarahhall/images";break}switch(a){case 35:b="http://admin3.clikpic.com/sarahhall/images";break}switch(a){case 37:b="http://admin4.clikpic.com/sarahhall/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="Skydive Images: "+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="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="skydiveimages@mac.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="skydiveimages@mac.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+'")'})}}};