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[1651427]=new thumbnail(1651427,"","","SJ-TAYLOR-MAIN-CARD_HOME_thumb.jpg",130,81,1);thumbnails[4976261]=new thumbnail(4976261,"282768","","leaf-1_thumb.jpg",130,130,1);thumbnails[4976262]=new thumbnail(4976262,"282768","","leaf-2_thumb.jpg",130,130,1);thumbnails[4976265]=new thumbnail(4976265,"282768","","leaf-4_thumb.jpg",130,130,1);thumbnails[4976266]=new thumbnail(4976266,"282768","","leaf-5_thumb.jpg",130,130,1);thumbnails[1651414]=new thumbnail(1651414,"111584","","blenhiem_palace_1_thumb.jpg",130,130,1);thumbnails[1651415]=new thumbnail(1651415,"111584","","blenhiem_palace_2_thumb.jpg",130,130,1);thumbnails[1651416]=new thumbnail(1651416,"111584","","blenhiem_palace_3_thumb.jpg",130,130,1);thumbnails[1651419]=new thumbnail(1651419,"111584","","blenheim_palace_4_thumb.jpg",130,130,1);thumbnails[1651420]=new thumbnail(1651420,"111584","","round_bale_burford_thumb.jpg",130,130,1);thumbnails[1651422]=new thumbnail(1651422,"111584","","Frosty_bridel_path_thumb.jpg",130,130,1);thumbnails[1651565]=new thumbnail(1651565,"111584","","oxfordshire_round_bales_thumb.jpg",130,130,1);thumbnails[1651646]=new thumbnail(1651646,"111584","","boat_in_min3head_harbour_thumb.jpg",130,130,1);thumbnails[1651421]=new thumbnail(1651421,"111584","","countryside_with_cows_thumb.jpg",130,130,1);thumbnails[3945184]=new thumbnail(3945184,"111585","","NEW-PIGGY1_thumb.jpg",130,130,1);thumbnails[3945166]=new thumbnail(3945166,"111585","","NEW-DUCKS_thumb.jpg",130,130,1);thumbnails[3945169]=new thumbnail(3945169,"111585","","TAILS-AND-TROTTERS_thumb.jpg",130,130,1);thumbnails[3945167]=new thumbnail(3945167,"111585","","PILE-OF-PIGS_thumb.jpg",130,130,1);thumbnails[3945168]=new thumbnail(3945168,"111585","","SLEEPING-PIG_thumb.jpg",130,130,1);thumbnails[1651393]=new thumbnail(1651393,"111585","","indian_runner_duck_thumb.jpg",130,130,1);thumbnails[1651370]=new thumbnail(1651370,"111585","","robin_thumb.jpg",130,130,1);thumbnails[1652280]=new thumbnail(1652280,"111585","","old_spot_pig_thumb.jpg",130,130,1);thumbnails[1651389]=new thumbnail(1651389,"111585","","sleeping-pigs_thumb.jpg",130,130,1);thumbnails[1651400]=new thumbnail(1651400,"111585","","garden_frog_thumb.jpg",130,130,1);thumbnails[1967234]=new thumbnail(1967234,"111585","","brown-cow_thumb.jpg",130,130,1);thumbnails[1967237]=new thumbnail(1967237,"111585","","new-lamb_thumb.jpg",130,130,1);thumbnails[3945233]=new thumbnail(3945233,"111585","","2-DUCKS_thumb.jpg",130,130,1);thumbnails[3945235]=new thumbnail(3945235,"111585","","SLEEPY-PIG_thumb.jpg",130,130,1);thumbnails[3945234]=new thumbnail(3945234,"111585","","one-duck_thumb.jpg",130,130,1);thumbnails[3945236]=new thumbnail(3945236,"111585","","SLEEPY-RAM_thumb.jpg",130,130,1);thumbnails[1651396]=new thumbnail(1651396,"111585","","pig_asleep2_thumb.jpg",130,130,1);thumbnails[1651397]=new thumbnail(1651397,"111585","","two_little_pigs_thumb.jpg",130,130,1);thumbnails[1651412]=new thumbnail(1651412,"111585","","gated_sheep2_thumb.jpg",130,130,1);thumbnails[1651398]=new thumbnail(1651398,"111585","","cow_and_bull1_thumb.jpg",130,130,1);thumbnails[1967214]=new thumbnail(1967214,"111585","","old-spot-pig2_thumb.jpg",130,130,1);thumbnails[1967227]=new thumbnail(1967227,"111585","","Lambing-Sheep_thumb.jpg",130,130,1);thumbnails[1967419]=new thumbnail(1967419,"111585","","donkeys_thumb.jpg",130,130,1);thumbnails[1967480]=new thumbnail(1967480,"111585","","misty-sheep_thumb.jpg",130,130,1);thumbnails[1973126]=new thumbnail(1973126,"111585","","new-lambs_thumb.jpg",130,130,1);thumbnails[1651423]=new thumbnail(1651423,"111585","","sheep_white_horse_hill_thumb.jpg",130,130,1);thumbnails[1651546]=new thumbnail(1651546,"111648","","frosted_teasels_thumb.jpg",130,130,1);thumbnails[1652049]=new thumbnail(1652049,"111648","","dandelion_clock_thumb.jpg",130,130,1);thumbnails[1652056]=new thumbnail(1652056,"111648","","daffodil_thumb.jpg",130,130,1);thumbnails[1652062]=new thumbnail(1652062,"111648","","red_flower_thumb.jpg",130,130,1);thumbnails[2033050]=new thumbnail(2033050,"111648","","green_leaves_thumb.jpg",130,130,1);thumbnails[2033051]=new thumbnail(2033051,"111648","","red_leaf1_thumb.jpg",130,130,1);thumbnails[1651541]=new thumbnail(1651541,"111648","","frosted_leaves_thumb.jpg",130,130,1);thumbnails[1651424]=new thumbnail(1651424,"111590","","park_bench_bourton_thumb.jpg",130,130,1);thumbnails[1651430]=new thumbnail(1651430,"111590","","oxford_punts_thumb.jpg",130,130,1);thumbnails[1651434]=new thumbnail(1651434,"111590","","church_spire_burford_thumb.jpg",130,130,1);thumbnails[1651483]=new thumbnail(1651483,"111590","","cotswold_sheep_thumb.jpg",130,130,1);thumbnails[1651437]=new thumbnail(1651437,"111590","","seaside_pier_torquay_thumb.jpg",130,130,1);thumbnails[1651481]=new thumbnail(1651481,"111590","","oxford_bicycle_thumb.jpg",130,130,1);thumbnails[1651548]=new thumbnail(1651548,"111590","","cob_web_in_dew_thumb.jpg",130,130,1);thumbnails[1967175]=new thumbnail(1967175,"111590","","boat_thumb.jpg",130,130,1);thumbnails[1967195]=new thumbnail(1967195,"111590","","sheep-and-bath_thumb.jpg",130,130,1);thumbnails[1967179]=new thumbnail(1967179,"111590","","Bicycle-with-Flowers_thumb.jpg",130,130,1);thumbnails[2054086]=new thumbnail(2054086,"111590","","beach_post_thumb.jpg",130,130,1);thumbnails[1651633]=new thumbnail(1651633,"111601","","daisy_the_foal_1_thumb.jpg",130,130,1);thumbnails[1651643]=new thumbnail(1651643,"111601","","daisy_in_field_thumb.jpg",130,130,1);thumbnails[1651653]=new thumbnail(1651653,"111601","","daisy_with_mum1_thumb.jpg",130,130,1);thumbnails[1651654]=new thumbnail(1651654,"111601","","horse_profile1_thumb.jpg",130,130,1);thumbnails[1651641]=new thumbnail(1651641,"111601","","daisy_with_a_daisy_thumb.jpg",130,130,1);thumbnails[1651589]=new thumbnail(1651589,"111601","","horse_profile_thumb.jpg",130,130,1);thumbnails[1994442]=new thumbnail(1994442,"111601","","horse_profile2_thumb.jpg",130,130,1);thumbnails[1651528]=new thumbnail(1651528,"111658","","vw_camper_studland_beach_thumb.jpg",130,130,1);thumbnails[1652255]=new thumbnail(1652255,"111658","","pebbles_on_the_beach_thumb.jpg",130,130,1);thumbnails[1652266]=new thumbnail(1652266,"111658","","beach_breakers_thumb.jpg",130,130,1);thumbnails[2031762]=new thumbnail(2031762,"111659","","minster_1_thumb.jpg",130,130,1);thumbnails[2844474]=new thumbnail(2844474,"111658","","beach-huts_thumb.jpg",130,130,1);thumbnails[2031764]=new thumbnail(2031764,"111659","","minster_3_thumb.jpg",130,130,1);thumbnails[2844475]=new thumbnail(2844475,"111658","","breakers_thumb.jpg",130,130,1);thumbnails[2031765]=new thumbnail(2031765,"111659","","minster_4_thumb.jpg",130,130,1);thumbnails[2844476]=new thumbnail(2844476,"111658","","surfers_thumb.jpg",130,130,1);thumbnails[2031763]=new thumbnail(2031763,"111659","","minster_2_thumb.jpg",130,130,1);thumbnails[2844477]=new thumbnail(2844477,"111658","","vw-bug_thumb.jpg",130,130,1);thumbnails[2031766]=new thumbnail(2031766,"111659","","minster_5_thumb.jpg",130,130,1);thumbnails[1652289]=new thumbnail(1652289,"111659","","arlington_row_bibury_thumb.jpg",130,130,1);thumbnails[1686549]=new thumbnail(1686549,"113624","","horse-chestnut-1_thumb.jpg",130,130,1);thumbnails[1686597]=new thumbnail(1686597,"113624","","horse-chestnut-2_thumb.jpg",130,130,1);thumbnails[1994080]=new thumbnail(1994080,"133855","","postcardset1_thumb.jpg",130,130,1);thumbnails[1994081]=new thumbnail(1994081,"133855","","postcardset2_thumb.jpg",130,130,1);thumbnails[4038013]=new thumbnail(4038013,"243338","","maisie-web_thumb.gif",130,130,1);thumbnails[4038223]=new thumbnail(4038223,"243338","","mini_thumb.gif",130,130,1);thumbnails[4038228]=new thumbnail(4038228,"243338","","horse_thumb.gif",130,130,1);thumbnails[4038232]=new thumbnail(4038232,"243338","","toby_thumb.gif",130,130,1);thumbnails[4038237]=new thumbnail(4038237,"243338","","tess_thumb.gif",130,130,1);thumbnails[4038238]=new thumbnail(4038238,"243338","","poppy_thumb.gif",130,130,1);var galleries=new Object();galleries[282768]=new gallery(282768,"4976266","autumn","gallery",[4976261,4976262,4976265,4976266]);galleries[111584]=new gallery(111584,"1651414","landscapes","gallery",[1651414,1651415,1651416,1651419,1651420,1651422,1651565,1651646,1651421]);galleries[111585]=new gallery(111585,"1651389","wildlife and animals","gallery",[3945184,3945166,3945169,3945167,3945168,1651393,1651370,1652280,1651389,1651400,1967234,1967237,3945233,3945235,3945234,3945236,1651396,1651397,1651412,1651398,1967214,1967227,1967419,1967480,1973126,1651423]);galleries[111648]=new gallery(111648,"2033051,2033050,1652062,1652056,1652049,1651546,1651541","flowers and fauna","gallery",[1651546,1652049,1652056,1652062,2033050,2033051,1651541]);galleries[111590]=new gallery(111590,"1651430","black and white","gallery",[1651424,1651430,1651434,1651483,1651437,1651481,1651548,1967175,1967195,1967179,2054086]);galleries[111601]=new gallery(111601,"1651589","equestrian","gallery",[1651633,1651643,1651653,1651654,1651641,1651589,1994442]);galleries[111658]=new gallery(111658,"2844477,2844476,2844475,2844474,1652266,1652255,1651528","coastal","gallery",[1651528,1652255,1652266,2844474,2844475,2844476,2844477]);galleries[111659]=new gallery(111659,"2031762","the cotswolds","gallery",[2031762,2031764,2031765,2031763,2031766,1652289]);galleries[113624]=new gallery(113624,"1686549","close up","gallery",[1686549,1686597]);galleries[133855]=new gallery(133855,"1994081,1994080","postcards","gallery",[1994080,1994081]);galleries[243338]=new gallery(243338,"4038238,4038237,4038232,4038228,4038223,4038013","pet portraits","section295607",[4038013,4038223,4038228,4038232,4038237,4038238]);var imageSets=new Object();imageSets[1]="1651427";imageSets[2]="4976266,2031762,1686549,1651589,1651430,1651414,1651389";imageSets[3]="4976266,4976265,4976262,4976261,4038238,4038237,4038232,4038228,4038223,4038013,3945236,3945235,3945234,3945233,3945184,3945169,3945168,3945167,3945166,2844477,2844476,2844475,2844474,2054086,2033051,2033050,2031766,2031765,2031764,2031763,2031762,1994442,1994081,1994080,1973126,1967480,1967419,1967237,1967234,1967227,1967214,1967195,1967179,1967175,1686597,1686549,1652289,1652280,1652266,1652255";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/simontaylor/images";break}switch(a){case 1:b="http://www1.clikpic.com/simontaylor/images";break}switch(a){case 2:b="http://admin.clikpic.com/simontaylor/images";break}switch(a){case 24:b="http://tpc15/clikpic/simontaylor/images";break}switch(a){case 4:b="http://www.clikchurch.com/simontaylor/images";break}switch(a){case 5:b="http://www2.clikpic.com/simontaylor/images";break}switch(a){case 22:b="http://tpc5/clikpic/simontaylor/images";break}switch(a){case 23:b="http://tpc10/clikpic/simontaylor/images";break}switch(a){case 25:b="http://tpc16/clikpic/simontaylor/images";break}switch(a){case 15:b="http://www3.clikpic.com/simontaylor/images";break}switch(a){case 18:b="http://www4.clikpic.com/simontaylor/images";break}switch(a){case 19:b="http://www5.clikpic.com/simontaylor/images";break}switch(a){case 31:b="http://www7.clikpic.com/simontaylor/images";break}switch(a){case 32:b="http://admin2.clikpic.com/simontaylor/images";break}switch(a){case 33:b="http://www8.clikpic.com/simontaylor/images";break}switch(a){case 34:b="http://www9.clikpic.com/simontaylor/images";break}switch(a){case 35:b="http://admin3.clikpic.com/simontaylor/images";break}switch(a){case 37:b="http://admin4.clikpic.com/simontaylor/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="SIMON J TAYLOR 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>"}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="simon@lionhall.co.uk">';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="simon@lionhall.co.uk">';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+'")'})}}};