function setReviewIFrameHeight(a){var b=a+(a/100*20);if(b<100){b=100;}if(document.getElementById("productReviews")!=null){document.getElementById("productReviews").height=b+"px;";
}}$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=540&height=640&imageName=/Littlewoods/"+scene7threesixty+"#TB_iframe?width=540&height=640&tight=1");
return false;});$sd("#productImage .videoFull a").click(function(){tb_show("Full video view",fullPlayerUrl+"?viewerMode=2&width=540&height=640&prod="+prodId+"&imageName="+scene7VideoHigh+"#TB_iframe?width=540&height=640&tight=1");
return false;});$sd("#productImage .imageFull a").click(function(){tb_show("Full image view",fullPlayerUrl+"?viewerMode=0&width=540&height=640&imageName="+currentImage+"#TB_iframe?width=540&height=640&tight=1");
return false;});$sd(".btnAddToBasket").click(function(c){errorMessage=sdg.productOptions.validateSelections($sd(".productCustomise").attr("id"));
if(errorMessage){alert(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(".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(g,j){sdg.checkForResponseError(g);$sd("#lastItemRefresh").val(g.lastItemRefresh);
self.parent.$sd("#basketItems").html(g.cartItemCount);self.parent.$sd("#basketPrice").html(g.cartTotalPrice);
if(g.coremetricsParams!=undefined&&g.coremetricsParams.length>0){var e=g.coremetricsParams;
for(var f in e){cmCreateShopAction5Tag(g.coremetricsParams[f].productId,g.coremetricsParams[f].productName,g.coremetricsParams[f].productQuantity,g.coremetricsParams[f].productPrice,g.coremetricsParams[f].categoryID,g.coremetricsParams[f].attributes);
cmDisplayShop5s();}}prodId=$sd(".productCustomise").attr("id");var d=parent.location.href;
if(sdg.productOptions[prodId].initialSku===""&&d.match("basket")==undefined){var h=document.createElement("div");
$sd(h).attr("id","basketResultContainer");$sd("#pageContainer").append($sd(h));$sd(h).append(g.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=basketUrl;
}}});});};$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="+$sd("#basketResultContainer").height()+"&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;}}