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[1600886]=new thumbnail(1600886,"","circus circus","poster2_thumb.jpg",130,89,1);thumbnails[1602356]=new thumbnail(1602356,"","","face2_thumb.jpg",130,174,1);thumbnails[1608322]=new thumbnail(1608322,"","","missrice5_thumb.jpg",130,122,1);thumbnails[1656174]=new thumbnail(1656174,"","","comi1_thumb.jpg",130,126,1);thumbnails[1656181]=new thumbnail(1656181,"","","comic2_thumb.jpg",130,126,1);thumbnails[1656185]=new thumbnail(1656185,"","","comi3_thumb.jpg",130,126,1);thumbnails[1658028]=new thumbnail(1658028,"","","harry_thumb.jpg",130,98,1);thumbnails[1658030]=new thumbnail(1658030,"","free willy","barry_thumb.jpg",130,98,1);thumbnails[1678520]=new thumbnail(1678520,"","","thaistyle_thumb.jpg",130,77,1);thumbnails[1678547]=new thumbnail(1678547,"","","happybunny_thumb.jpg",130,88,1);thumbnails[1678550]=new thumbnail(1678550,"","","thaistyleHAND_thumb.jpg",130,97,1);thumbnails[1913819]=new thumbnail(1913819,"","","opinion_thumb.jpg",130,133,1);thumbnails[2035174]=new thumbnail(2035174,"109187","change","change1_thumb.jpg",80,100,1);thumbnails[2035175]=new thumbnail(2035175,"109187","i love","iloveblack1_thumb.jpg",100,90,1);thumbnails[2035176]=new thumbnail(2035176,"109187","despair","despair3_thumb.gif",99,100,1);thumbnails[2035177]=new thumbnail(2035177,"109187","man vs woman","gayvrslebian1_thumb.jpg",55,100,1);thumbnails[2035181]=new thumbnail(2035181,"109187","ann"," ann_thumb.jpg",100,89,2);thumbnails[2035182]=new thumbnail(2035182,"109187","A breast of the time","bigbreast1_thumb.jpg",98,100,1);thumbnails[2035183]=new thumbnail(2035183,"109187","cry","cry1_thumb.jpg",98,100,1);thumbnails[2035184]=new thumbnail(2035184,"109187","music lover","music21_thumb.jpg",100,100,1);thumbnails[2039797]=new thumbnail(2039797,"109187","love problem","love problem_thumb.jpg",100,63,1);thumbnails[2039952]=new thumbnail(2039952,"109187","new year toilet","newyear_thumb.jpg",71,100,1);thumbnails[2040027]=new thumbnail(2040027,"109187","travel beauty","travel beauty1_thumb.jpg",100,100,1);thumbnails[2040029]=new thumbnail(2040029,"109187","bedside table","bedsidetable_thumb.jpg",100,100,1);thumbnails[2254159]=new thumbnail(2254159,"109187","illness","ill_thumb.jpg",100,100,1);thumbnails[2254177]=new thumbnail(2254177,"109187","losing","loserlotte_thumb.jpg",100,100,1);thumbnails[2254263]=new thumbnail(2254263,"109187","Camp Attack","camp_attack_thumb.jpg",100,100,1);thumbnails[2725519]=new thumbnail(2725519,"109187","","wedding_disaster_thumb.jpg",100,67,1);thumbnails[2725552]=new thumbnail(2725552,"109187","","badproduce1_thumb.jpg",100,100,1);thumbnails[3523571]=new thumbnail(3523571,"109187","Number 7","number7_thumb.jpg",67,100,1);thumbnails[3523574]=new thumbnail(3523574,"109187","Purple Hair","purple_thumb.jpg",100,100,1);thumbnails[3523584]=new thumbnail(3523584,"109187","Shoes","shoes_thumb.jpg",100,100,1);thumbnails[4418589]=new thumbnail(4418589,"109187","price is right","lotte_may_thumb.jpg",90,100,1);thumbnails[4418591]=new thumbnail(4418591,"109187","gay at work","gayatwork_thumb.jpg",100,100,1);thumbnails[4418592]=new thumbnail(4418592,"109187","problem breast","proble_jan_thumb.jpg",100,59,1);thumbnails[4418595]=new thumbnail(4418595,"109187","jodie harsh bitch","jodie_harsh_thumb.jpg",100,67,1);thumbnails[4418596]=new thumbnail(4418596,"109187","breakup girls 2","divamain_small2_thumb.jpg",82,100,1);thumbnails[4418597]=new thumbnail(4418597,"109187","job interview","jobinterview_thumb.jpg",100,57,1);thumbnails[4418598]=new thumbnail(4418598,"109187","breakup girls 3","diva_main_small11_thumb.jpg",100,77,1);thumbnails[4418599]=new thumbnail(4418599,"109187","secrets","donna_august_thumb.jpg",100,75,1);thumbnails[2464193]=new thumbnail(2464193,"109268","","Floridaweb_thumb.jpg",79,100,1);thumbnails[4423411]=new thumbnail(4423411,"109268","paris van","parisvan_thumb.jpg",73,100,1);thumbnails[4423834]=new thumbnail(4423834,"109268","old skier","olskier_thumb.jpg",100,96,2);thumbnails[4423842]=new thumbnail(4423842,"109268","un mec","guy_thumb.jpg",100,99,2);thumbnails[4424246]=new thumbnail(4424246,"109268","maggie","maggie_thumb.jpg",64,100,2);thumbnails[4424249]=new thumbnail(4424249,"109268","derek","mrhappy_thumb.jpg",76,100,2);thumbnails[4424254]=new thumbnail(4424254,"109268","pauline","pauline_thumb.jpg",74,100,2);thumbnails[4438612]=new thumbnail(4438612,"109268","old indian woman","oldindianwoman_thumb.jpg",100,100,2);var galleries=new Object();galleries[109187]=new gallery(109187,"4418599,4418598,4418597,4418596,4418595,4418592,4418591,4418589,3523584,3523574","portfolio","gallery",[2035174,2035175,2035176,2035177,2035181,2035182,2035183,2035184,2039797,2039952,2040027,2040029,2254159,2254177,2254263,2725519,2725552,3523571,3523574,3523584,4418589,4418591,4418592,4418595,4418596,4418597,4418598,4418599]);galleries[109268]=new gallery(109268,"4438612,4424254,4424249,4424246,4423842,4423834,4423411,2464193","sketchbook","gallery",[2464193,4423411,4423834,4423842,4424246,4424249,4424254,4438612]);var imageSets=new Object();imageSets[1]="1608322";imageSets[2]="1658030,1600886";imageSets[3]="4438612,4424254,4424249,4424246,4423842,4423834,4423411,4418599,4418598,4418597,4418596,4418595,4418592,4418591,4418589,3523584,3523574,3523571,2725552,2725519,2464193,2254263,2254177,2254159,2040029,2040027,2039952,2039797,2035184,2035183,2035182,2035181,2035177,2035176,2035175,2035174,1913819,1678550,1678547,1678520,1658030,1658028,1656185,1656181,1656174,1608322,1602356,1600886";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 1:b="http://www1.clikpic.com/Rebeccarice/images";break}switch(a){case 2:b="http://admin.clikpic.com/Rebeccarice/images";break}switch(a){case 4:b="http://www.clikchurch.com/Rebeccarice/images";break}switch(a){case 5:b="http://www2.clikpic.com/Rebeccarice/images";break}switch(a){case 15:b="http://www3.clikpic.com/Rebeccarice/images";break}switch(a){case 21:b="http://www6.clikpic.com/Rebeccarice/images";break}switch(a){case 18:b="http://www4.clikpic.com/Rebeccarice/images";break}switch(a){case 19:b="http://www5.clikpic.com/Rebeccarice/images";break}switch(a){case 22:b="http://tpc5/clikpic/Rebeccarice/images";break}switch(a){case 23:b="http://tpc10/clikpic/Rebeccarice/images";break}switch(a){case 24:b="http://tpc15/clikpic/Rebeccarice/images";break}switch(a){case 25:b="http://tpc16/clikpic/Rebeccarice/images";break}switch(a){case 31:b="http://www7.clikpic.com/Rebeccarice/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Rebeccarice/images";break}switch(a){case 33:b="http://www8.clikpic.com/Rebeccarice/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="missrice.co.uk: "+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").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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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<100){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+'")'})}}};