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[2633426]=new thumbnail(2633426,"39679","","Wedding~2001_thumb.jpg",130,87,1);thumbnails[2633428]=new thumbnail(2633428,"39679","","Wedding~2002_thumb.JPG",130,87,1);thumbnails[2633430]=new thumbnail(2633430,"39679","","Wedding~2003_thumb.jpg",130,87,1);thumbnails[2633432]=new thumbnail(2633432,"39679","","Wedding~2004_thumb.jpg",130,87,1);thumbnails[2633433]=new thumbnail(2633433,"39679","","Wedding~2005_thumb.jpg",130,87,1);thumbnails[2633435]=new thumbnail(2633435,"39679","","Wedding~2006_thumb.JPG",130,98,1);thumbnails[2633436]=new thumbnail(2633436,"39679","","Wedding~2007_thumb.JPG",130,87,1);thumbnails[2633437]=new thumbnail(2633437,"39679","","Wedding~2008_thumb.jpg",130,104,1);thumbnails[2633439]=new thumbnail(2633439,"39679","","Wedding~2009_thumb.JPG",130,87,1);thumbnails[2633440]=new thumbnail(2633440,"39679","","Wedding~2010_thumb.JPG",130,87,1);thumbnails[2633441]=new thumbnail(2633441,"39679","","Wedding~2011_thumb.JPG",130,87,1);thumbnails[511780]=new thumbnail(511780,"39679","","CS-470081_thumb.JPG",130,87,1);thumbnails[754963]=new thumbnail(754963,"39679","","CS Sample~1000JPG_thumb.jpg",130,87,1);thumbnails[754973]=new thumbnail(754973,"39679","","CS Sample~1007JPG_thumb.jpg",130,87,1);thumbnails[511782]=new thumbnail(511782,"39679","","DSCF6196_thumb.JPG",130,87,1);thumbnails[754981]=new thumbnail(754981,"39679","","CS Sample~1012JPG_thumb.jpg",130,194,1);thumbnails[755000]=new thumbnail(755000,"39679","","CS Sample~1021JPG_thumb.jpg",130,195,1);thumbnails[511781]=new thumbnail(511781,"39679","","CS 47 - 1059_thumb.JPG",130,182,1);thumbnails[755002]=new thumbnail(755002,"39679","","CS Sample~1022JPG_thumb.jpg",130,195,1);thumbnails[755007]=new thumbnail(755007,"39679","","CS Sample~1024JPG_thumb.jpg",130,195,1);thumbnails[755008]=new thumbnail(755008,"39679","","CS Sample~1025JPG_thumb.jpg",130,189,1);thumbnails[511766]=new thumbnail(511766,"39679","Mine Forever","_DSF4483_thumb.JPG",130,182,1);thumbnails[3523972]=new thumbnail(3523972,"39681","","CS2011_thumb.jpg",130,163,1);thumbnails[511827]=new thumbnail(511827,"39681","","LH~0748bw_thumb.jpg",130,87,1);thumbnails[754945]=new thumbnail(754945,"39681","","LH~1721_thumb.jpg",130,194,1);thumbnails[511830]=new thumbnail(511830,"39681","","LH~1344_thumb.jpg",130,194,1);thumbnails[2633456]=new thumbnail(2633456,"39681","","Studio~1005_thumb.jpg",130,182,1);thumbnails[511832]=new thumbnail(511832,"39681","","LH~2190_thumb.jpg",130,195,1);thumbnails[511826]=new thumbnail(511826,"39681","","LH~0607bw_thumb.jpg",130,161,1);thumbnails[754934]=new thumbnail(754934,"39681","","LH~0750bw_thumb.jpg",130,195,1);thumbnails[3523963]=new thumbnail(3523963,"39681","","CS2001_thumb.jpg",130,163,1);thumbnails[3523964]=new thumbnail(3523964,"39681","","CS2002_thumb.jpg",130,90,1);thumbnails[3523966]=new thumbnail(3523966,"39681","","CS2003_thumb.jpg",130,93,1);thumbnails[3523967]=new thumbnail(3523967,"39681","","CS2004_thumb.jpg",130,195,1);thumbnails[3523968]=new thumbnail(3523968,"39681","","CS2006_thumb.jpg",130,163,1);thumbnails[3523969]=new thumbnail(3523969,"39681","","CS2009_thumb.jpg",130,163,1);thumbnails[3523971]=new thumbnail(3523971,"39681","","CS2010_thumb.jpg",130,195,1);thumbnails[3523974]=new thumbnail(3523974,"39681","","CS2012_thumb.jpg",130,163,1);thumbnails[3523975]=new thumbnail(3523975,"39681","","CS2013_thumb.jpg",130,195,1);thumbnails[3523982]=new thumbnail(3523982,"39681","","CS2014_thumb.jpg",130,195,1);thumbnails[3523985]=new thumbnail(3523985,"39681","","CS2016_thumb.jpg",130,195,1);thumbnails[511835]=new thumbnail(511835,"39683","","Christy-31010_thumb.JPG",130,173,1);thumbnails[511840]=new thumbnail(511840,"39683","","CS045~4526_thumb.JPG",130,195,1);thumbnails[511846]=new thumbnail(511846,"39683","","D-H4~43006-Nicole_thumb.JPG",130,173,1);thumbnails[511847]=new thumbnail(511847,"39683","","Skye~2019_thumb.jpg",130,191,1);thumbnails[511849]=new thumbnail(511849,"39683","","Skye~2198_thumb.jpg",130,177,1);thumbnails[511850]=new thumbnail(511850,"39683","","Tara06~0068_thumb.JPG",130,87,1);thumbnails[754946]=new thumbnail(754946,"39664","","PFA~KJ~2101JPG_thumb.jpg",130,43,1);thumbnails[754947]=new thumbnail(754947,"39664","","PFA~KJ~2102JPG_thumb.jpg",130,43,1);thumbnails[754948]=new thumbnail(754948,"39664","","PP~KJ~1100JPG_thumb.jpg",130,43,1);thumbnails[754949]=new thumbnail(754949,"39664","","PP~KJ~1103JPG_thumb.jpg",130,43,1);thumbnails[754955]=new thumbnail(754955,"39664","","DSCF6280JPG_thumb.jpg",130,87,1);thumbnails[754956]=new thumbnail(754956,"39664","","SFA~KJ~4103JPG_thumb.jpg",130,87,1);thumbnails[754957]=new thumbnail(754957,"39664","","SP~KJ~3101JPG_thumb.jpg",130,87,1);thumbnails[754958]=new thumbnail(754958,"39664","","SP~KJ~3104JPG_thumb.jpg",130,104,1);thumbnails[754959]=new thumbnail(754959,"39664","","TP~KJ~5108JPG_thumb.jpg",130,87,1);thumbnails[754960]=new thumbnail(754960,"39664","","Trails 16x20JPG_thumb.jpg",130,163,1);var galleries=new Object();galleries[39679]=new gallery(39679,"2633441,2633440,2633439,2633437,2633436,2633435,2633433,2633432,2633430,2633428,2633426,755008,755007,755002,755000,754981,754973,754963,511782,511781,511780,511766","Weddings","gallery",[2633426,2633428,2633430,2633432,2633433,2633435,2633436,2633437,2633439,2633440,2633441,511780,754963,754973,511782,754981,755000,511781,755002,755007,755008,511766]);galleries[39681]=new gallery(39681,"2633456,754945,754934,511832,511830,511827,511826","Studio","gallery",[3523972,511827,754945,511830,2633456,511832,511826,754934,3523963,3523964,3523966,3523967,3523968,3523969,3523971,3523974,3523975,3523982,3523985]);galleries[39683]=new gallery(39683,"511850,511849,511847,511846,511840,511835","Model","gallery",[511835,511840,511846,511847,511849,511850]);galleries[39664]=new gallery(39664,"754957,754956,754955,754949,754947,754946","Stock Photos","gallery",[754946,754947,754948,754949,754955,754956,754957,754958,754959,754960]);var imageSets=new Object();imageSets[1]="3523974,3523972,3523966,2633439,2633437,2633436,2633432,2633430,2633428,2633426,755000,754963,511782,511766";imageSets[2]="2633456,2633441,2633440,2633439,2633437,2633436,2633435,2633433,2633432,2633430,2633428,2633426,755008,755007,755002,755000,754981,754973,754963,754957,754956,754955,754949,754947,754946,754945,754934,511850,511849,511847,511846,511840,511835,511832,511830,511827,511826,511782,511781,511780,511766";imageSets[3]="3523985,3523982,3523975,3523974,3523972,3523971,3523969,3523968,3523967,3523966,3523964,3523963,2633456,2633441,2633440,2633439,2633437,2633436,2633435,2633433,2633432,2633430,2633428,2633426,755008,755007,755002,755000,754981,754973,754963,754960,754959,754958,754957,754956,754955,754949,754948,754947,754946,754945,754934,511850,511849,511847,511846,511840,511835,511832";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/kevlea/images";break}switch(a){case 1:b="http://www1.clikpic.com/kevlea/images";break}switch(a){case 2:b="http://admin.clikpic.com/kevlea/images";break}switch(a){case 24:b="http://tpc15/clikpic/kevlea/images";break}switch(a){case 4:b="http://www.clikchurch.com/kevlea/images";break}switch(a){case 5:b="http://www2.clikpic.com/kevlea/images";break}switch(a){case 22:b="http://tpc5/clikpic/kevlea/images";break}switch(a){case 23:b="http://tpc10/clikpic/kevlea/images";break}switch(a){case 25:b="http://tpc16/clikpic/kevlea/images";break}switch(a){case 15:b="http://www3.clikpic.com/kevlea/images";break}switch(a){case 18:b="http://www4.clikpic.com/kevlea/images";break}switch(a){case 19:b="http://www5.clikpic.com/kevlea/images";break}switch(a){case 31:b="http://www7.clikpic.com/kevlea/images";break}switch(a){case 32:b="http://admin2.clikpic.com/kevlea/images";break}switch(a){case 33:b="http://www8.clikpic.com/kevlea/images";break}switch(a){case 34:b="http://www9.clikpic.com/kevlea/images";break}switch(a){case 35:b="http://admin3.clikpic.com/kevlea/images";break}switch(a){case 37:b="http://admin4.clikpic.com/kevlea/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="Central Studios: "+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> 				AU$"+(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="leanne@itspuzzling.com.au">';b=b+'<input type="hidden" name="currency_code" value="AUD">';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="leanne@itspuzzling.com.au">';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+'")'})}}};