function setReviewIFrameHeight(a){var b=a+50;if(b<100){b=100;}if(document.getElementById("productReviews")!=null){document.getElementById("productReviews").height=b;
}}$sd(function(){$sd(".btnAddToBasket").attr("disabled",false);createSocialBoomarks();
$sd(".prSnippetNumberOfRatingsText").click(function(){cmCreateConversionEventTag($sd(".prSnippetRatingDecimal").text(),"1",productName,"30");
return true;});$sd("#relatedContent .expandBox").each(function(c){var e=c;var d=this;
$sd(this).click(function(f){sdg.process("start");setTimeout(function(){sdg.process("clear");
var h=$sd(d).children(".boxContent").eq(0);var g=$sd(d).find(".title p:not([class=link])").text().split(" ")[0].toLowerCase().replace(/[^a-zA-Z0-9]+/g,"");
h.attr("id","expandBoxContainer"+e).html('<div class="'+g+'">'+h.html()+"</div>").find("."+g).addClass("commonExpandBox");
tb_show($sd(d).find(".title p:not([class=link])").text(),"#TB_inline?height="+(h.height())+"&width=640&inlineId=expandBoxContainer"+e);
},2000);});});$sd("#productBrand li.more").css("margin-top",$sd("#productBrand li.logo").height()-$sd("#productBrand li.more").height()+"px");
$sd("#productImage .thumbs a").click(function(){currentImage=$sd(this).attr("rel");
roundelexist=$sd(this).attr("roundelexist");roundelpath=$sd(this).attr("roundelpath");
s7changeImage("Littlewoods/"+currentImage);scene7ImageReplace=scene7Image.replace(/%%SCENE7-ID%%/g,currentImage);
$sd("#productMainImage a").attr("href",scene7ImageReplace);if(roundelexist=="true"&&roundelpath!=null&&roundelpath!=""){scene7ImageReplace=scene7Image.replace(/%%SCENE7-ID%%/g,"prodDetailMainT");
scene7ImageReplace=scene7ImageReplace+"&$prod_img="+currentImage+"&$p1_img="+roundelpath;
}$sd("#productMainImage a img").attr("src",scene7ImageReplace);if($sd("#productImage .thumbs").is(".swap")){var c=$sd("#productMainImage").attr("rel");
$sd("#productMainImage").attr("rel",currentImage);$sd("#productMainZoomImage").attr("rel",currentImage);
$sd(this).children("img").attr("src","http://images.littlewoods.com/is/image/Littlewoods/"+c+"?$prodDetailThumb$");
$sd(this).attr("rel",c);}return false;});var b=false;var a=false;$sd("#productImage p a, #productImage .zoom a").click(function(){currentImage=$sd("#productZoomImage").attr("rel");
$sd("#productMainImage").hide();$sd("#productMainZoomImage").show();url=scene7Player.replace("%%VIEWER-MODE%%","0").replace("%%SCENE7-ID%%","/Littlewoods/"+currentImage);
s7changeImage("/Littlewoods/"+currentImage);if(!b){s7loadViewer(url,viewerWidth,viewerHeight,instanceName,"#ffffff","transparent","productMainZoomImage");
b=true;}a="zoom";$sd("#productImage .zoom, #productImage .spin, #productImage .video").hide();
setTimeout(function(){$sd("#productImage .back, #productImage .imageFull").show();
},300);return false;});$sd("#productImage .spin a").click(function(){$sd("#productMainImage").hide();
$sd("#productMainZoomImage").show();url=scene7Player.replace("%%VIEWER-MODE%%","1").replace("%%SCENE7-ID%%","/Littlewoods/"+scene7threesixty);
s7changeSpinSet("/Littlewoods/"+scene7threesixty);if(!b){s7loadViewer(url,viewerWidth,viewerHeight,instanceName,"#ffffff","transparent","productMainImage");
b=true;}a="spin";$sd("#productImage .zoom, #productImage .spin, #productImage .video").hide();
setTimeout(function(){$sd("#productImage .back, #productImage .spinFull").show();
},400);return false;});$sd("#mainContent").find(".productCustomise .colourSwatches ul li label").each(function(){var d=$sd(this).attr("rel");
if($sd("#swatchOption_"+d)){var c=$sd("#swatchOption_"+d).attr("value");var e=$sd("#zoomColourSwatch_"+d).attr("value");
if(e!=null&&e!=""){$sd(this).parent().click(function(){s7changeImage("Littlewoods/"+e);
scene7ImageReplace=scene7Image.replace(/%%SCENE7-ID%%/g,c);$sd("#productMainImage a").attr("href",c);
$sd("#productMainImage a img").attr("src",c);$sd("#productZoomImage a").attr("href",c);
$sd("#productZoomImage").attr("rel",e);});}}});$sd("#productImage .video a").click(function(){if(!b){url=scene7Player.replace("%%VIEWER-MODE%%","2").replace("%%SCENE7-ID%%",scene7VideoLow);
s7loadViewer(url,viewerWidth,viewerHeight,instanceName,"#ffffff","transparent","productMainImage");
b=true;}else{if(a!="video"){s7changeVideo(scene7VideoLow);}}a="video";$sd("#productImage .zoom, #productImage .spin, #productImage .video").hide();
setTimeout(function(){$sd("#productImage .back, #productImage .videoFull").show();
},400);return false;});$sd("#productImage .back a").click(function(){$sd("#productMainZoomImage").hide();
$sd("#productMainImage").show();$sd("#productImage .back, #productImage .videoFull, #productImage .imageFull, #productImage .spinFull").hide();
setTimeout(function(){$sd("#productImage .zoom").show();if(scene7VideoLow!=""){$sd("#productImage .video").show();
}if(scene7threesixty!=""){$sd("#productImage .spin").show();}},300);return false;
});$sd("#productImage .spinFull a").click(function(){tb_show("Full spin view",fullPlayerUrl+"?viewerMode=1&width=360&height=480&imageName=/Littlewoods/"+scene7threesixty+"#TB_iframe?width=360&height=480&tight=1");
return false;});$sd("#productImage .videoFull a").click(function(){tb_show("Full video view",fullPlayerUrl+"?viewerMode=2&width=360&height=480&prod="+prodId+"&imageName="+scene7VideoHigh+"#TB_iframe?width=360&height=480&tight=1");
return false;});$sd("#productImage .imageFull a").click(function(){tb_show("Full image view",fullPlayerUrl+"?viewerMode=0&width=360&height=480&imageName="+currentImage+"#TB_iframe?width=360&height=480&tight=1");
return false;});$sd(".btnAddToBasket").click(function(c){addedProductID=$sd("#catalogueNumber").text();
if(addedProductID){addedProductID=addedProductID;}else{addedProductID="";}addedValue=$sd("#speedTrapPriceValue").val();
if(addedValue){addedValue=addedValue;}else{addedValue="";}addedCurrency=$sd("#currencyValue").val();
if(addedCurrency){addedCurrency=addedCurrency;}else{addedCurrency="";}displayName=$sd("#productHeader h1").text();
if(displayName){displayName=displayName;}else{displayName="";}skuNum=$sd("#catalogueNumber").text();
if(skuNum){skuNum=skuNum;}else{skuNum="";}addedQuantity=$sd("#qty").val();if(addedQuantity){addedQuantity=addedQuantity;
}else{addedQuantity="";}valueIsPerItem=0;if(addedCurrency=="�"){addedCurrency="GBP";
}else{addedCurrency="EUR";}errorMessage=sdg.productOptions.validateSelections($sd(".productCustomise").attr("id"));
if(errorMessage){alert(errorMessage);reportBasketFailedAdd(addedProductID,errorMessage);
$sd(".dropdown").each(function(d,f){if($sd(this).data("errorAction")==true){$sd(this).find("fieldset").slideDown();
$sd(this).data("errorAction",false);}});return false;}if($sd("input[name=/atg/commerce/order/purchase/CartModifierFormHandler.removalCommerceIds]").val()!=""){reportBasketItemRemoved(addedProductID);
}reportBasketAdd(addedProductID,addedValue,addedCurrency,displayName,skuNum,addedQuantity,valueIsPerItem);
if($sd(".stockDeliveryMessage").css("display")!="block"){return false;}sdg.submitChange($sd(".btnAddToBasket"));
return false;});$sd(".productCustomise form").submit(function(c){$sd(".btnAddToBasket").click();
return false;});sdg.productOptions.optionChangeCallback=function(c){stockLevel=sdg.productOptions[c].chosenStockLevel;
if(stockLevel=="Out of stock"||stockLevel==null){$sd(".stockDeliveryMessage").slideUp();
if(stockLevel!=null){sdg.submitAjaxForm({dataType:"json",trigger:$sd(".btnGetTopAlternatives"),error:function(f,d,e){alert("error");
},success:function(d,f){if(!$sd("#carousel2 li").length){var e='<div class="relatedPanel" id="topAlternative"><div id="carousel2Lnk">  </div><div id="carousel2" class="carouselContainer"><div class="header"><h2></h2></div><div class="carousel"><div class="carousel"><ul><li><div><a><img /></a></div><p><a></a></p></li></ul></div></div></div></div>';
$sd("#productDetails").after(e);}if(d.id){sdg.populateTopAlternative({carouselSelector:"#carousel2",productId:d.id,productTitle:d.title,productPriceNow:d.priceNow,productPriceWas:d.priceWas,productPriceSave:d.priceSave,productImageSrc:d.imageSrc});
}else{$sd(".outOfStock p #altLink").hide();}}});}}else{$sd(".stockDeliveryMessage").slideDown();
}return false;};sdg.submitChange=function(c){sdg.process("start",function(){sdg.submitAjaxForm({dataType:"json",trigger:c,error:function(f,d,e){sdg.process("end");
},success:function(e,g){sdg.checkForResponseError(e);$sd("#lastItemRefresh").val(e.lastItemRefresh);
self.parent.$sd("#basketItems").html(e.cartItemCount);self.parent.$sd("#basketPrice").html(e.cartTotalPrice);
sdg.handleOptimost();sdg.handleCoremetricsShop5Tags(e);prodId=$sd(".productCustomise").attr("id");
var d=parent.location.href;if(sdg.productOptions[prodId].initialSku===""&&d.match("basket")==undefined){var f=document.createElement("div");
$sd(f).attr("id","basketResultContainer");$sd("#pageContainer").append($sd(f));$sd(f).append(e.htmlOutput);
if(d.match("basket")!=undefined){$sd("#btnContinueShopping").remove();}$sd("#btnContinueShopping").click(function(){if(window.parent!=window.self){self.parent.tb_remove();
}else{tb_remove();}return false;});$sd("#btnGoToBasket").click(function(){if(window.parent!=window.self){window.parent.location.href=$sd(this).attr("href");
return false;}return true;});sdg.process("end",function(){showConfirmation();});}else{window.parent.location.href=sdg.productOptions[prodId].basketUrl;
}}});});};sdg.handleCoremetricsShop5Tags=function(e){var f=false;if(e.coremetricsParams!=undefined&&e.coremetricsParams.length>0){var c=e.coremetricsParams;
for(var d in c){cmCreateShopAction5Tag(e.coremetricsParams[d].productId,e.coremetricsParams[d].productName,e.coremetricsParams[d].productQuantity,e.coremetricsParams[d].productPrice,e.coremetricsParams[d].categoryID,e.coremetricsParams[d].attributes);
f=true;}}if(f){cmDisplayShop5s();}};sdg.handleOptimost=function(){var f=$sd("#optimostEnabledFlag").val();
if(f==""){f=false;}if(!f){return;}var e=(typeof opcounter=="object")?opcounter:new Object;
e.D=document;e.L=e.D.location;e.T=new Date;e.Q=new Object;e.C=new Object;e.U="http://by.optimost.com/counter/648/-/1/event.js";
e.D_ts=Math.round(e.T.getTime()/1000);e.D_tzo=e.T.getTimezoneOffset();e.D_loc=e.L.protocol+"//"+e.L.hostname+e.L.pathname;
e.D_ckl=e.D.cookie.length;e.D_ref=e.D.referrer;function j(){var r=e.L.search;var u=e.D.cookie;
if(r.length>3){for(var n=r.substring(1).split("&"),q=0,m=n.length;q<m;q++){var t=n[q].indexOf("=");
if(t>0){e.Q[n[q].substring(0,t)]=unescape(n[q].substring(t+1));}}}if(u.length>3){for(var n=u.split(";"),q=0,k=n.length;
q<k;q++){var o=n[q].split("=");while(o[0].substring(0,1)==" "){o[0]=o[0].substring(1,o[0].length);
}if(o.length==2){e.C[o[0]]=unescape(o[1]);}}}}function d(){var l=new Object;for(var m in e){l[m]=e[m];
}l.D=l.L=l.T=l.Q=l.C=l.U=null;var k="";for(var m in l){if(l[m]!=null&&l[m]!=""){k+=(k.length>0?"&":(e.U.indexOf("?")>0?"&":"?"))+m+"="+escape(l[m]);
}}return e.U+k;}j();for(var h in e.Q){if(h.substring(0,2)=="op"){e[h]=e.Q[h];}}for(var h in e.C){if(h.substring(0,2)=="op"){e[h]=e.C[h];
}}var c=document.getElementsByTagName("head")[0];var g=document.createElement("script");
g.type="text/javascript";g.src=d();c.appendChild(g);};$productDesc=$sd("#productDesc");
textDesc=$productDesc.text();htmlDesc=$productDesc.html();if(textDesc.length>400){for(i=200;
i<textDesc.length;i++){if(textDesc.charAt(i)=="."&&textDesc.charAt(i+1)==" "){break;
}}if(i<textDesc.length){$sd("#productDesc").html(textDesc.substr(0,i+2));$sd("#productDescOriginal").html(htmlDesc);
$sd("#productDesc").append('<a href="#">More...</a> <span>'+textDesc.substr(i+1)+"</span>");
}}else{$sd("#productDesc").html(htmlDesc);}$sd("#productDesc a").click(function(){$sd("#productDesc").slideUp();
$sd("#productDescOriginal").slideDown();return false;});sdg.populateTopAlternative=function(c){c=$sd.extend({carouselSelector:"",productId:0,productTitle:"",productPriceNow:0,productPriceWas:0,productPriceSave:0,productImageSrc:""},c||{});
if(c.carouselSelector==""){return false;}$sd(c.carouselSelector+" .carousel .topAlternative").remove();
$sd(c.carouselSelector+" .header h2").text("Alternatives");if(!$sd("#topAlternative").length){$sd(c.carouselSelector+" .carousel ul").css("width",(parseInt($sd(c.carouselSelector+" .carousel ul").css("width"))+255)+"px");
}topAltItem=$sd(c.carouselSelector+" .carousel li:first").clone().css({width:"235px",height:"auto"}).attr("class","topAlternative").prependTo(c.carouselSelector+" .carousel ul");
topAltItem.find("img").attr({src:c.productImageSrc,alt:c.productTitle,width:"124",height:"165"});
if($sd("#topAlternative").length){$sd(c.carouselSelector+" .carousel ul li").each(function(d,f){if(!$sd(this).find("img").attr("src")){$sd(this).remove();
}});}topAltItem.find("div").after("<h4>Top alternative</h4>");topAltItem.find("p a").text(c.productTitle);
topAltItem.find("strong, span, em").remove();topAltItem.find("a").attr({href:"/product/en/product.page?productId="+c.productId});
if(c.productPriceWas){topAltItem.children("p").append("<span>"+c.productPriceWas+"</span>");
}if(c.productPriceNow){topAltItem.children("p").append("<strong>"+c.productPriceNow+"</strong>");
}if(c.productPriceSave){topAltItem.children("p").append("<em>"+c.productPriceSave+"</em>");
}standardHeight=parseInt($sd(c.carouselSelector+" .carousel li:eq(1)").css("height"));
topAltHeight=parseInt($sd(c.carouselSelector+" .carousel li:first").height());if(topAltHeight>standardHeight){$sd(c.carouselSelector+" li").css("height",topAltHeight+"px");
}return true;};if(window.scene7threesixty&&scene7threesixty!=""){$sd(".mediaTools .spin").show();
}if(window.scene7VideoLow&&scene7VideoLow!=""){$sd(".mediaTools .video").show();}$sd(".sizeGuideSection:gt(0)").hide();
$sd("#sizeGuide .standardNav a").click(function(){$sd("#sizeGuide .sizeGuideSection").hide();
$sd($sd(this).attr("href")).show();return false;});});var pressed=0;var qtySelector="";
function showConfirmation(){tb_show("Added to basket","#TB_inline?height=auto&width=490&inlineId=basketResultContainer&destroyOnEnd=1&modal=true");
}function createSocialBoomarks(){var b="N";var d=document.createElement("div");$sd(d).attr("id","bookmarksBox");
var a=document.createElement("ul");bmax=$sd("#maxBookmarks").val();if(bmax==null||bmax==""){$sd(a).addClass("tools");
bmax=1;}else{$sd(a).addClass("toolsbookmarks");b="Y";}$sd(d).append($sd(a));$sd("#bookmarks").append($sd(d));
$sd("#bookmarks > ul > li:gt("+bmax+")").each(function(){$sd(a).append($sd(this));
});var e=document.createElement("li");if(b=="Y"){$sd(e).addClass("specificmore");
}else{$sd(e).addClass("more");}$sd(e).html('<a href="#none">more...</a>');$sd("#bookmarks > ul:eq(0)").append($sd(e));
var c=document.createElement("li");$sd(c).addClass("close");$sd(c).html('<a href="#none">close</a>');
$sd(a).append($sd(c));$sd(d).hide();$sd("#bookmarks .more a, #bookmarks .close a").click(function(){$sd("#bookmarksBox").toggle();
return false;});$sd("#bookmarks .specificmore a, #toolsbookmarks .close a").click(function(){$sd("#bookmarksBox").toggle();
return false;});}function crossSellUpdate(b,a){$sd("#basketItems").html(b);$sd("#basketPrice").html(a);
tb_remove();}function readReviews(){cmCreateConversionEventTag($sd(".prSnippetRatingDecimal").text(),"1",productName,"30");
location.href="#productReviews";}function writeReview(a){cmCreateConversionEventTag("Write a Review","1",productName,"30");
if(window.parent){parent.location.href=a;}else{location.href=a;}}