function tagsShowHide() { if (MMM && MMM.Departments.Women) { var d = MMM.mouseX; var c = MMM.mouseY; var a = $("#MixMatchMe_Women_Tag_Manager"); var b = $("#mmm_blackbox"); if (((d > b.offset().left) && ((d - b.offset().left) < b.width())) && ((c > b.offset().top) && ((c - b.offset().top) < b.height()))) { MMM.Departments.Women.showModelTags() } else { MMM.Departments.Women.hideModelTags() } } } var constSmallModelTO = 10000; var smallModelLoadTime = 0; var StopFinalizeSmallModels = true; var SmallModelToArray = []; function HidePlaceHolder(a) { $("#f_placeholderO" + a.toString()).css("opacity", 0); $("#f_placeholderO" + a.toString()).css("visibility", "hidden"); $("#f_placeholderO" + a.toString()).css("z-index", 2) } function ShowPlaceHolder(a) { var b = 1; for (b = 1; b <= a; b++) { $("#f_placeholderO" + b.toString()).css("opacity", 1); $("#f_placeholderO" + b.toString()).css("visibility", "visible"); $("#f_placeholderO" + b.toString()).css("z-index", 2) } } function Log(a) { try { Samples.AspNet.Logger.ItemsOn(readCookie("MixMatchMeGUID_user"), readCookie("MixMatchMeGUID_session"), a, _brandId, _marketId) } catch (b) { } } function GetOutfitItems() { return MMM.Departments.Women.getModelDetail("id") } function AddClothes_f(f, a, b, l, e, j, d, r, q, g, c, m, p, h, k, o) { if (MMM.Departments.Women.modelReady) { if (document.getElementById("iTagSave").src != siteimagebase + "saveto.png") { document.getElementById("iTagSave").src = siteimagebase + "saveto.png" } if (readCookie("MixMatchMe_admin") == "True") { } else { } var n = new mmmGarmentDetail(); n.setDetails(f, a, b, l, e, j, d, r, q, g, c, m, p, h, k, o); ResetAddOutfit(); MMM.Departments.Women.addGarment(n) } } function ShowModel(a) { if (a == "Women") { ready = 1; Bob = 4; hiddenBob = 3; PreloadReset_f() } else { Bob = 2; hiddenBob = 1 } } function mmmBeginRequest(c, b) { StopFinalizeSmallModels = true; if (c._postBackSettings.sourceElement.id != "UpdatePanelSave" && c._postBackSettings.sourceElement.id != "ibsignup") { if (_topPage == 0) { _subpage = 0; loadingtimout = window.setTimeout("if (_subpage == 0){ document.getElementById('imgProducts_Loading').style.visibility = 'visible';}", 500); var a = $(window).scrollTop(); if (a != 0) { if (a < 70) { document.getElementById("imgProducts_Loading").style.top = "290px" } else { document.getElementById("imgProducts_Loading").style.top = (290 - 70 + a) + "px" } } else { document.getElementById("imgProducts_Loading").style.top = "290px" } document.getElementById("divProducts_Loading").style.zIndex = "15"; $("#divProducts_Loading").fadeTo("fast", 0.5) } } } function EntryHeightSEO() { var a = $("#divProducts_Loading").height(); if (a > 787) { document.getElementById("img_pgHeight").style.height = (a - 825) + 175 + "px"; document.getElementById("imgSignupLoad").style.top = (a - 825) + 933 + "px" } else { document.getElementById("img_pgHeight").style.height = "76px"; document.getElementById("imgSignupLoad").style.top = "840px" } } function mmmEndRequest(c, b) { ClearTimeoutForWebservice(); var a = $("#divProducts_Loading").height(); if (a > 787) { document.getElementById("img_pgHeight").style.height = (a - 825) + 175 + "px"; document.getElementById("imgSignupLoad").style.top = (a - 825) + 933 + "px" } else { document.getElementById("img_pgHeight").style.height = "76px"; document.getElementById("imgSignupLoad").style.top = "840px" } if (_topPage == 0) { _subpage = 1; window.clearTimeout("loadingtimout"); $("#divProducts_Loading").css("opacity", 0); document.getElementById("imgProducts_Loading").style.top = "0px"; if (_subpage == 1) { document.getElementById("divProducts_Loading").style.zIndex = "-1"; document.getElementById("imgProducts_Loading").style.visibility = "hidden" } else { } } } function ClearTimeoutForWebservice() { window.clearTimeout(loadingtimout1); $("#divProducts_Loading").css("opacity", 0); document.getElementById("divProducts_Loading").style.zIndex = "-1"; document.getElementById("imgProducts_Loading").style.visibility = "hidden" } function ClearSmallOutfits(b) { smallModelLoadTime = 0; StopFinalizeSmallModels = false; CheckFilter(); if ((document.getElementById("f_OutfitO1").style.visibility == "visible") || ($("#f_placeholderO1").css("opacity") == 1)) { var c = 1; for (c = 1; c <= 12; c++) { try { window.clearTimeout(SmallModelToArray[c]); document.getElementById("f_OutfitO" + c.toString()).style.visibility = "hidden"; if ((b == 1) && ($("#f_placeholderO" + c).css("opacity") == 1)) { HidePlaceHolder(c) } window["f_DressesLoadedO" + c] = 1; window["f_SkinLoadedO" + c] = 1; window["f_JewellryLoadedO" + c] = 1; window["f_JewellryArmLoadedO" + c] = 1; window["f_JewellryEarLoadedO" + c] = 1; window["f_SunglassesLoadedO" + c] = 1; window["f_ShoesLoadedO" + c] = 1; window["f_TightsLoadedO" + c] = 1; window["f_JeansLoadedO" + c] = 1; window["f_TopsLoadedO" + c] = 1; window["f_KnitwearLoadedO" + c] = 1; window["f_ShortsLoadedO" + c] = 1; window["f_SkirtsLoadedO" + c] = 1; window["f_JacketsCoatsLoadedO" + c] = 1; window["f_JacketsCoatsBackLoadedO" + c] = 1; window["f_BagsLoadedO" + c] = 1; window["f_BeltsLoadedO" + c] = 1; window["f_SwimwearBottomLoadedO" + c] = 1; window["f_SwimwearTopLoadedO" + c] = 1; window["f_SwimwearFullLoadedO" + c] = 1; window["f_ShirtsLoadedO" + c] = 1; window["f_ShirtsCollarLoadedO" + c] = 1; window["f_ScarvesLoadedO" + c] = 1; window["f_JumpsuitsLoadedO" + c] = 1; window["f_WalletLoadedO" + c] = 1; window["f_WatchLoadedO" + c] = 1; window["f_SocksLoadedO" + c] = 1; window["f_RingLoadedO" + c] = 1; window["f_HatLoadedO" + c] = 1; document.getElementById("f_DressesO" + c.toString()).src = ""; document.getElementById("f_JewellryO" + c.toString()).src = ""; document.getElementById("f_JewellryArmO" + c.toString()).src = ""; document.getElementById("f_JewellryEarO" + c.toString()).src = ""; document.getElementById("f_SunglassesO" + c.toString()).src = ""; document.getElementById("f_ShoesO" + c.toString()).src = ""; document.getElementById("f_TightsO" + c.toString()).src = ""; document.getElementById("f_JeansO" + c.toString()).src = ""; document.getElementById("f_TopsO" + c.toString()).src = ""; document.getElementById("f_KnitwearO" + c.toString()).src = ""; document.getElementById("f_ShortsO" + c.toString()).src = ""; document.getElementById("f_SkirtsO" + c.toString()).src = ""; document.getElementById("f_JacketsCoatsO" + c.toString()).src = ""; document.getElementById("f_JacketsCoatsBackO" + c.toString()).src = ""; document.getElementById("f_BagsO" + c.toString()).src = ""; document.getElementById("f_BeltsO" + c.toString()).src = ""; document.getElementById("f_SwimwearBottomO" + c.toString()).src = ""; document.getElementById("f_SwimwearTopO" + c.toString()).src = ""; document.getElementById("f_SwimwearFullO" + c.toString()).src = ""; document.getElementById("f_ShirtsO" + c.toString()).src = ""; document.getElementById("f_ShirtsCollarO" + c.toString()).src = ""; document.getElementById("f_ScarvesO" + c.toString()).src = ""; document.getElementById("f_RingO" + c.toString()).src = ""; document.getElementById("f_WalletO" + c.toString()).src = ""; document.getElementById("f_WatchO" + c.toString()).src = ""; document.getElementById("f_SocksO" + c.toString()).src = ""; document.getElementById("f_HatO" + c.toString()).src = ""; document.getElementById("f_JumpsuitsO" + c.toString()).src = ""; document.getElementById("f_SkinO" + c.toString()).src = ""; document.getElementById("f_DressesO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JewellryO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JewellryArmO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JewellryEarO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SunglassesO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_ShoesO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_TightsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JeansO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_TopsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_KnitwearO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_ShortsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SkirtsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JacketsCoatsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JacketsCoatsBackO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_BagsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_BeltsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SwimwearBottomO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SwimwearTopO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SwimwearFullO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_ShirtsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_ShirtsCollarO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_ScarvesO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_RingO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_WalletO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_WatchO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SocksO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_HatO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_JumpsuitsO" + c.toString()).src = sitebase + "spacer.gif"; document.getElementById("f_SkinO" + c.toString()).src = sitebase + "spacer.gif" } catch (a) { alert("ip:" + c + "err:" + a) } } } } function FinalizeSmall_f(a) { try { if (window["f_DressesLoaded" + a] == 1 && window["f_JewellryLoaded" + a] == 1 && window["f_JewellryArmLoaded" + a] == 1 && window["f_JewellryEarLoaded" + a] == 1 && window["f_SunglassesLoaded" + a] == 1 && window["f_ShoesLoaded" + a] == 1 && window["f_TightsLoaded" + a] == 1 && window["f_JeansLoaded" + a] == 1 && window["f_TopsLoaded" + a] == 1 && window["f_KnitwearLoaded" + a] == 1 && window["f_ShortsLoaded" + a] == 1 && window["f_SkirtsLoaded" + a] == 1 && window["f_JacketsCoatsLoaded" + a] == 1 && window["f_JacketsCoatsBackLoaded" + a] == 1 && window["f_BagsLoaded" + a] == 1 && window["f_BeltsLoaded" + a] == 1 && window["f_SwimwearBottomLoaded" + a] == 1 && window["f_SwimwearTopLoaded" + a] == 1 && window["f_SwimwearFullLoaded" + a] == 1 && window["f_ShirtsLoaded" + a] == 1 && window["f_ShirtsCollarLoaded" + a] == 1 && window["f_ScarvesLoaded" + a] == 1 && window["f_JumpsuitsLoaded" + a] == 1 && window["f_WalletLoaded" + a] == 1 && window["f_WatchLoaded" + a] == 1 && window["f_SocksLoaded" + a] == 1 && window["f_HatLoaded" + a] == 1 && window["f_RingLoaded" + a] == 1 && window["f_SkinLoaded" + a] == 1) { document.getElementById("f_Outfit" + a).style.visibility = "visible"; $("#f_placeholder" + a).fadeTo("fast", 0, function() { $("#f_placeholder" + a).css("visibility", "hidden") }) } else { SmallModelToArray[parseInt(a.replace("O", ""))] = window.setTimeout("FinalizeSmall_f('" + a + "');", 50) } } catch (b) { alert(b) } } function reset() { var a; ResetAddOutfit(); MMM.Departments.Women.loadOutfit(null) } function mmmLog() { } function mmmLogStr(a) { } function ClearSplash() { StopFinalizeSmallModels = true; if (_topPage == 1) { $("#divStart").fadeTo("slow", 0.5, function() { if (_topPage == 1) { document.getElementById("imgMainSpin").style.visibility = "visible" } }) } } function ClearSplash_do() { var a = false; if (MMM) { if (MMM.Departments.Women.modelReady) { if (_topPage == 1) { _topPage = 0; document.getElementById("divStart").style.visibility = "hidden"; document.getElementById("imgMainSpin").style.visibility = "hidden"; document.getElementById("imgSignupLoad").style.top = "934px"; document.getElementById("pgHeight").innerHTML = "<img height='680px' width='1px' src='spacer.gif' />"; document.getElementById("bob3").style.visibility = "visible" } } else { a = true } } else { a = true } if (a) { a = false; window.setTimeout("ClearSplash_do();", 50) } } function f_CalculateTotal() { try { if (MMM) { var b = MMM.Departments.Women.getTotal(); var c = document.getElementById("btnBag1"); c.style.visibility = "hidden"; c.innerHTML = "ADD OUTFIT TO BAG: £" + b.toFixed(0); c.style.visibility = "visible" } } catch (a) { alert("CalculateTotal:" + a) } } function pageLoad() { _loadCount += 1; if (_loadCount > 1) { pageTracker._trackPageview() } if (_loadCount == 1) { $.cookie("Navigate", "No"); $("#imgOutfitLoading5").css("opacity", 0); PreLoadImage("saved") } else { if (_loadCount == 2) { $.cookie("Navigate", "Yes") } } if (MMM) { MMM.Departments.Women.linkTagsToDOM(); MMM.Departments.Women.tagsVisible = false; tagsShowHide(); MMM.modelPosManager.tags = document.getElementById("MixMatchMe_Women_Tag_Manager"); MMM.modelPosManager.setTagsPosition(); MMM.Departments.Women.setSize() } } function f_UpdateSponsoredLinks() { if (MMM) { MMM.Departments.Women.linkTagsToDOM(); MMM.Departments.Women.setModelTags(); f_CalculateTotal() } } function SetDetailId(a) { if (MMM) { MMM.Departments.Women.setClickedID(a); document.getElementById(_DetailProductId).value = a } } function TagSetDetailId(a) { if (MMM) { MMM.Departments.Women.setClickedID(MMM.Departments.Women.garments[a].id); document.getElementById(_DetailProductId).value = MMM.Departments.Women.garments[a].id } } function ItemLoaded_f(c, a) { if (MMM) { MMM.Departments.Women.ImageLoaded(c, a) } if (c + a == c + hiddenBob) { if (document.getElementById(c + a).src != sitebase + "spacerR.png") { try { switch (c) { case "Dresses": f_DressesLoaded = 1; break; case "Jewellry": f_JewellryLoaded = 1; break; case "JewellryArm": f_JewellryArmLoaded = 1; break; case "JewellryEar": f_JewellryEarLoaded = 1; break; case "Ring": f_RingLoaded = 1; break; case "Hat": f_HatLoaded = 1; break; case "Sunglasses": f_SunglassesLoaded = 1; break; case "Shoes": f_ShoesLoaded = 1; break; case "Tights": f_TightsLoaded = 1; break; case "Jeans": f_JeansLoaded = 1; break; case "Tops": f_TopsLoaded = 1; break; case "Knitwear": f_KnitwearLoaded = 1; break; case "Shorts": f_ShortsLoaded = 1; break; case "Skirts": f_SkirtsLoaded = 1; break; case "JacketsCoats": f_JacketsCoatsLoaded = 1; break; case "JacketsCoatsBack": f_JacketsCoatsBackLoaded = 1; break; case "Bags": f_BagsLoaded = 1; break; case "Belts": f_BeltsLoaded = 1; break; case "SwimwearBottom": f_SwimwearBottomLoaded = 1; break; case "SwimwearTop": f_SwimwearTopLoaded = 1; break; case "SwimwearFull": f_SwimwearFullLoaded = 1; break; case "Shirts": f_ShirtsLoaded = 1; break; case "ShirtsCollar": f_ShirtsCollarLoaded = 1; break; case "Scarves": f_ScarvesLoaded = 1; break; case "Jumpsuits": f_JumpsuitsLoaded = 1; break; case "Skin": f_SkinLoaded = 1; break; default: } } catch (b) { alert("ItemLoaded:" + b) } } } } function LoadOutfit_f(d, e, a) { if (!MMM || !MMM.Departments.Women) { return } var b = {}; for (i = 0; i < d.length; i++) { var c = new mmmGarmentDetail(); c.setDetails(d[i][0], d[i][1], d[i][2], d[i][3], d[i][4], d[i][5], d[i][6], d[i][7], d[i][8], d[i][9], d[i][10], d[i][11], d[i][12], d[i][13], false, d[i][15]); b[c.category] = c } MMM.Departments.Women.loadOutfit(b, a) } function f_ShowSponsoredLinks() { } function f_HideSponsoredLinks() { } function ShowSponsoredLinks() { if (!MMM || !MMM.Departments.Women) { return } f_ShowSponsoredLinks() } function getCurrentModelIndex(a) { if (!MMM || !MMM.Departments.Women) { return "" } return MMM.Departments.Women.getModel().layers[a].getModelIndex() } function RemoveItem_f(b, a) { if (readCookie("MixMatchMe_admin") == "True") { } else { } ResetAddOutfit(); MMM.Departments.Women.removeGarment(b) } function DressModelWithOutfitSmall_f(f, e, b, a, c, g, d) { var h = ""; switch (f) { case "Dresses": window["f_DressesLoaded" + c] = 0; window["f_SkinLoaded" + c] = 0; document.getElementById("f_Skin" + c).src = pathbaseOutfit + "0.png"; break; case "Jewellry": window["f_JewellryLoaded" + c] = 0; h = "_1"; break; case "JewellryArm": window["f_JewellryArmLoaded" + c] = 0; break; case "JewellryEar": window["f_JewellryEarLoaded" + c] = 0; h = "_1"; break; case "Ring": window["f_RingLoaded" + c] = 0; break; case "Hat": window["f_HatLoaded" + c] = 0; h = "_1"; break; case "Sunglasses": window["f_SunglassesLoaded" + c] = 0; h = "_1"; break; case "Shoes": window["f_ShoesLoaded" + c] = 0; break; case "Socks": window["f_SocksLoaded" + c] = 0; break; case "Tights": window["f_TightsLoaded" + c] = 0; break; case "Jeans": window["f_JeansLoaded" + c] = 0; break; case "Tops": window["f_TopsLoaded" + c] = 0; window["f_SkinLoaded" + c] = 0; document.getElementById("f_Skin" + c).src = pathbaseOutfit + "0.png"; break; case "Knitwear": window["f_KnitwearLoaded" + c] = 0; h = "_1"; break; case "Shorts": window["f_ShortsLoaded" + c] = 0; break; case "Skirts": window["f_SkirtsLoaded" + c] = 0; break; case "JacketsCoats": window["f_JacketsCoatsLoaded" + c] = 0; h = "_1"; break; case "JacketsCoatsBack": window["f_JacketsCoatsBackLoaded" + c] = 0; break; case "Bags": window["f_BagsLoaded" + c] = 0; break; case "Belts": window["f_BeltsLoaded" + c] = 0; break; case "Wallet": window["f_WalletLoaded" + c] = 0; break; case "Watch": window["f_WatchLoaded" + c] = 0; break; case "SwimwearBottom": window["f_SwimwearBottomLoaded" + c] = 0; break; case "SwimwearTop": window["f_SwimwearTopLoaded" + c] = 0; break; case "SwimwearFull": window["f_SwimwearFullLoaded" + c] = 0; break; case "Shirts": window["f_ShirtsLoaded" + c] = 0; window["f_ShirtsCollarLoaded" + c] = 0; document.getElementById("f_" + e + "Collar" + c).src = pathbaseOutfit + a + "-c.png"; break; case "ShirtsCollar": window["f_ShirtsCollarLoaded" + c] = 0; break; case "Scarves": window["f_ScarvesLoaded" + c] = 0; h = "_1"; break; case "Jumpsuits": window["f_JumpsuitsLoaded" + c] = 0; break } h = getCurrentModelIndex(f); if (d != "") { document.getElementById("f_" + e + c).style.zIndex = d } if (b != "") { document.getElementById("f_" + e + c).src = pathbaseOutfit + a + h + b + ".png" } else { document.getElementById("f_" + e + c).src = pathbaseOutfit + a + h + ".png" } } function mmmModelPosManager(j, e, a, k, g, c, b) { var d, h, f; this.state = "top"; this.middle = j; this.blackbox = e; this.models = a; this.tags = k; this.dep = g; this.header = c; this.absoluteLeft = 740; this.fixedLeft = 951.5; this.widthOfApp = 1000; this.footerHeight = 90; this.sizesAvailable = [50, 75, 100]; this.percOfModelCovered = 0; this.zoom = 100; h = $(this.blackbox); this.absoluteLeft = parseFloat(h.css("left")); this.headerHeight = h.offset().top - parseFloat(h.css("marginTop").replace(/auto/, 0)); this.absoluteTop = parseFloat(h.css("top")); this.blackboxDefaultDims = { width: h.width(), height: h.height() }; d = $(this.models); this.modelsDefaultDims = { width: d.width(), height: d.height() }; this.marginTop = parseFloat(d.css("top")); this.marginBottom = 30; mmmInitObject(this, b); this.tags.style.position = "absolute"; this.header.style.position = "absolute"; this.header.style.visibility = "visible"; if (!($.browser.msie && ($.browser.version < 7))) { this.adjustAllToWindowResize(window); this.adjustToWindowScroll(window) } else { this.setTagsPosition() } } mmmModelPosManager.prototype.adjustToWindowScroll = function(c) { var d = $(window); var a; var b = d.scrollTop(); this.setFixedLeft(); if (b < this.headerHeight) { if (b === 0) { this.setState("top") } else { this.setState("top") } } else { _divFooterTop = $("#divFooter").offset().top; a = $(this.blackbox); if ((_divFooterTop - b) < a.height()) { this.setState("bottom") } else { this.setState("middle") } } this.setPositionLeft() }; mmmModelPosManager.prototype.adjustPositionToWindowResize = function(a) { this.setFixedLeft(); this.setPositionLeft() }; mmmModelPosManager.prototype.adjustAllToWindowResize = function(b) { var c = $(window); this.setFixedLeft(); this.setPositionLeft(); var a = (((c.height() * 100) + 1) / this.blackboxDefaultDims.height); a += this.percOfModelCovered; this.setSize(a) }; mmmModelPosManager.prototype.setPositionLeft = function() { var b = $(this.blackbox); var a = $(this.tags); var c = $(this.header); if (this.fixedLeft < 0) { this.fixedLeft = this.absoluteLeft } if (b.css("position") == "fixed") { b.css("left", this.fixedLeft); a.css("left", this.fixedLeft + ((b.width() - a.width()) / 2)); c.css("left", this.fixedLeft) } }; mmmModelPosManager.prototype.setFixedLeft = function() { var d = $(window); var b = d.scrollLeft(); var a = d.width(); var c = $(this.middle); this.fixedLeft = ((a - this.widthOfApp) / 2) + this.absoluteLeft - b }; mmmModelPosManager.prototype.setState = function(e) { var b = $(this.blackbox); var a = $(this.tags); var c = $(this.header); if (this.state != e) { switch (e) { case "top": b.css({ position: "absolute", top: this.absoluteTop, left: this.absoluteLeft }); this.header.style.position = "absolute"; c.css({ top: this.absoluteTop, left: this.absoluteLeft }); break; case "middle": b.css({ position: "fixed", top: 0, left: this.fixedLeft }); this.header.style.position = "fixed"; c.css({ top: 0, left: this.fixedLeft }); break; case "bottom": var d = $("#divFooter").offset().top - b.height(); b.css({ position: "absolute", top: d, left: this.absoluteLeft }); this.header.style.position = "absolute"; c.css({ top: d, left: this.absoluteLeft }); break; default: break } this.state = e; this.setTagsPosition() } }; mmmModelPosManager.prototype.setTagsPosition = function(e) { var c = $(this.blackbox); var b = $(this.tags); var g = ((c.height() - b.height()) / 2) - 35; var a = (c.width() - b.width()) / 2; var f; f = $("#Content").height(); $("#leftH").height(f); $("#rightH").height(f); switch (this.state) { case "top": this.tags.style.position = "absolute"; b.css({ top: (this.absoluteTop + g), left: (this.absoluteLeft + a) }); break; case "middle": this.tags.style.position = "fixed"; b.css({ top: g, left: (this.fixedLeft + a) }); break; case "bottom": var d = $("#divFooter").offset().top - c.height() - this.headerHeight; this.tags.style.position = "absolute"; b.css("left", (this.absoluteLeft + a)); b.css("top", (d + g)); break; default: break } b.height(f + 22) }; mmmModelPosManager.prototype.handlerDepModelLoaded = function(k) { var b, f, g, c, h, j; var d, a; var e; c = $(this.models); h = $(this.blackbox); e = $(this.dep.getModel(false).modelDiv); b = (this.modelsDefaultDims.width * k) / 100; f = (this.modelsDefaultDims.height * k) / 100; g = (this.blackboxDefaultDims.width - b) / 2; if (this.zoom == 75) { b = 194 } e.css({ width: b, height: f, left: g }); e.find("img").css({ width: b, height: f }); switch (this.zoom) { case 50: h.height($("#mmm_header").height() + f); break; case 75: h.height($("#mmm_header").height() + f); break; case 100: h.height($("#mmm_header").height() + f); break } j = $("#divDressMeUp"); d = ((f - j.height()) / 2) - 50; a = ((this.modelsDefaultDims.width - j.width()) / 2) + 5; j.css({ top: d, left: a }); this.adjustToWindowScroll(window); this.adjustAllToWindowResize(window) }; mmmModelPosManager.prototype.setSize = function(c) { var a; if ((c < 0)) { return false } a = this.sizesAvailable[0]; for (var b = 1; b < this.sizesAvailable.length; b++) { if (c < this.sizesAvailable[b]) { a = this.sizesAvailable[b - 1]; break } else { if (c >= this.sizesAvailable[b]) { a = this.sizesAvailable[b] } } } this.zoom = a; this.dep.setZoom(a) }; function mmmGarmentDetail() { this.category = ""; this.src = ""; this.url = ""; this.price = ""; this.sale = ""; this.brand = ""; this.id = ""; this.imgid = ""; this.top_l_s = ""; this.param2 = ""; this.param3 = ""; this.prodCode = ""; this.prodColour = ""; this.tagName = ""; this.toggle = false; this.flag = false; this.seasonName = "" } mmmGarmentDetail.prototype.setDetails = function(f, a, b, l, e, j, d, q, p, g, c, m, o, h, k, n) { this.category = f; this.src = a; this.url = b; this.price = l; this.sale = e; this.brand = j; this.id = d; this.imgid = q; this.top_l_s = p; this.param2 = g; this.param3 = c; this.prodCode = m; this.prodColour = o; this.tagName = h; this.toggle = k; this.flag = false; this.seasonName = n }; function isModelLoaded(b) { var c = MMM.Departments[b]; if (!c) { return } var a = c.getModel(false); if (a.isLoaded()) { c.timeoutLoad = 0; c.onModelLoaded(); c.switchModels(); c.setModelTags(true); f_CalculateTotal(); c.modelLoading = false; $("#imgOutfitLoading2").css("visibility", "hidden"); if (c.dressUpCountDown > 0) { c.dressUpCountDown-- } if (c.dressUpCountDown == 0) { if ($("#divImgOutfitLoading").css("visibility") == "visible") { window.setTimeout("$('#divImgOutfitLoading').css('visibility', 'hidden'); $('#imgOutfitLoading').css('visibility', 'hidden');", 1000) } } } else { if (c.timeoutLoad < 10000) { c.timeoutLoad += 50; window.setTimeout("isModelLoaded('" + c.name + "');", 50) } else { c.timeoutLoad = 0; c.timeoutModel() } } } function showLoadingImage(a) { var b = MMM.Departments[a]; if (!b) { return } if (b.modelLoading) { $("#imgOutfitLoading2").css("visibility", "visible") } } function doCloneModels(a) { var b = MMM.Departments[a]; if (!b) { return } b.cloneModels() } function mmmDepartment(d, b, c, a) { if ((d == "")) { throw "mmmModel_InvalidDepName" } else { this.name = d; this.size = 1; this.isActive = false; this.modelReady = true; this.modelLoading = false; this.tagsVisible = false; this.tagsShowOnLoad = false; this.modelIndex = 1; this.clickedID = ""; this.timeoutLoad = 0; this.currency = ""; this.zoom = 100; this.clearDressMeUp = false; this.isWhiteLabel = false; this.onModelLoaded = function() { }; this.onSetModelTags = function() { }; this.onActivateModel = function() { }; this.tagsEnabled = false; this.dressUpCountDown = 2; this.mouseMoveOnTagTimer = null; this.mouseEnteredTags = false; this.mouseLeftTags = false; if (a == "default") { this.defaultCreate(c) } else { if (a == "auto") { this.autoCreate() } } this.garments = {}; this.tags = {}; this.models.bob3.bringToFront(); this.models.bob4.sendToBack(); this.models.bob3.show(); this.models.bob4.hide(); this.models.bob3.isActive = true; this.models.bob4.isActive = false; this.modelTagsDisable(); this.deactivate(); this.activate() } } mmmDepartment.prototype.defaultCreate = function(d) { var b; var a; this.models = {}; for (var c = 3; c <= 4; c++) { a = "Bob" + c; b = addModel(a, c); b.defaultCreateLayers(d) } }; mmmDepartment.prototype.autoCreate = function() { var b; var a; if (typeof this.models == "undefined") { this.models = {} } for (var c = 3; c <= 4; c++) { a = "bob" + c; b = this.addModel(a, c); b.autoCreateLayers() } }; mmmDepartment.prototype.modelMouseEnter = function() { this.showModelTags() }; mmmDepartment.prototype.modelMouseLeave = function() { this.hideModelTags() }; mmmDepartment.prototype.addModel = function(a, c) { var b; b = new mmmModel(a, c, a); this.models[a] = b; return this.models[a] }; mmmDepartment.prototype.getModel = function(c) { var b; var d; var a; for (a in this.models) { if (this.models.hasOwnProperty(a)) { if (a != "") { b = this.models[a]; if ((c === undefined) || (b.isActive == c)) { d = b; break } } } } if (!d) { d = b } return d }; mmmDepartment.prototype.getModelByActive = function(c) { var b; var d; var a; for (a in this.models) { if (this.models.hasOwnProperty(a)) { if (a != "") { b = this.models[a]; if ((c === undefined) || (b.isActive == c)) { d = b } } } } if (!d) { d = b } return d }; mmmDepartment.prototype.timeoutModel = function() { this.modelLoading = false; $("#imgOutfitLoading2").css("visibility", "hidden"); if ($("#divImgOutfitLoading").css("visibility") == "visible") { $("#divImgOutfitLoading").css("visibility", "hidden"); $("#imgOutfitLoading").css("visibility", "hidden") } this.modelReady = true }; mmmDepartment.prototype.switchModels = function() { var c, b, a, d; for (c in this.models) { if (this.models.hasOwnProperty(c)) { if (c != "") { b = this.models[c]; if (!b.isActive) { a = b } else { if (b.isActive) { d = b } } } } } d.isActive = false; a.isActive = true; if (a) { a.show() } if (d) { $(d.modelDiv).fadeTo("fast", 0, function() { MMM.Departments.Women.cloneModels(); MMM.Departments.Women.modelReady = true; if (MMM.Departments.Women.tagsShowOnLoad) { MMM.Departments.Women.showModelTags() } }) } }; mmmDepartment.prototype.onLog = function(a, b) { this.onLog(a, b) }; mmmDepartment.prototype.toDebugString = function() { var b; var c; var a; c = "mmmDepartment: Name=" + this.name + "\n"; for (a in this.models) { if (this.models.hasOwnProperty(a)) { b = this.model[a]; if ((b !== null)) { c += "\t" + b.toDebugString() + "\n" } } } return c }; mmmDepartment.prototype.ImageLoaded = function(c, b) { var a = this.getModel(false); if (a && a.layers.hasOwnProperty(c)) { a.layers[c].imageLoaded() } }; mmmDepartment.prototype.cleanGarmentList = function(b) { var a; var c; if (!b) { return } for (a in this.garments) { if (this.garments.hasOwnProperty(a)) { c = this.garments[a]; c.flag = false; if (b.layers.hasOwnProperty(c.category)) { if (b.layers[c.category].isClear) { delete this.garments[c.category] } } } } }; mmmDepartment.prototype.loadOutfit = function(d, a) { var e; var c; this.garments = {}; var b = this.getModel(false); if (!this.modelReady) { return } if (!a) { if (this.clearDressMeUp && ($("#divDressMeUp").css("visibility") == "visible")) { $("#divDressMeUp").css("visibility", "hidden"); $("#imgDressMeUp").css("visibility", "hidden"); this.modelTagsEnable() } } b.clearLayers(); if (d !== null) { this.garments = d; for (c in d) { if (d.hasOwnProperty(c)) { e = d[c]; this.garments[e.category] = e; this.addGarmentToModel(e.category, e.src, e.url, e.price, e.sale, e.brand, e.id, e.imgid, e.top_l_s, e.param2, e.param3, e.prodCode, e.prodColour, e.tagName, e.seasonName) } } } else { this.hideModelTags(); this.garments = {} } this.activateModel(b) }; mmmDepartment.prototype.addGarment = function(b) { var d; var c; var a; a = this.getModel(false); if (b.hasOwnProperty("category")) { if (this.clearDressMeUp && ($("#divDressMeUp").css("visibility") == "visible")) { $("#divDressMeUp").css("visibility", "hidden"); $("#imgDressMeUp").css("visibility", "hidden"); this.modelTagsEnable() } if (this.garments.hasOwnProperty(b.category) && b.toggle && (this.garments[b.category].imgid == b.imgid)) { this.removeGarment(b.category) } else { this.garments[b.category] = new mmmGarmentDetail(); d = this.garments[b.category]; for (c in d) { if (d.hasOwnProperty(c)) { d[c] = b[c] || "" } } Log(d.id); this.addGarmentToModel(d.category, d.src, d.url, d.price, d.sale, d.brand, d.id, d.imgid, d.top_l_s, d.param2, d.param3, d.prodCode, d.prodColour, d.tagName, d.seasonName); this.cleanGarmentList(a); this.activateModel(a) } } else { return } }; mmmDepartment.prototype.removeGarment = function(c) { var d; var a; if (!this.garments.hasOwnProperty(c)) { return } this.deletingGarment = true; delete this.garments[c]; if (this.getGarmentCount() == 0) { this.hideModelTags() } model = this.getModel(false); model.clearLayers(); for (a in this.garments) { if (this.garments.hasOwnProperty(a)) { var b = this.garments[a]; this.addGarmentToModel(b.category, b.src, b.url, b.price, b.sale, b.brand, b.id, b.imgid, b.top_l_s, b.param2, b.param3, b.prodCode, b.prodColour, b.tagName, b.seasonName) } } this.activateModel(model) }; mmmDepartment.prototype.activateModel = function(a) { this.onActivateModel(); this.getModel(false).sendToBack(); this.getModel(true).bringToFront(); this.timeoutLoad = 0; a.activate(); this.modelReady = false; this.modelLoading = true; this.waitLoad = window.setTimeout("showLoadingImage('" + this.name + "');", 500); this.waitLoad = window.setTimeout("isModelLoaded('" + this.name + "');", 50) }; mmmDepartment.prototype.addGarmentToModel = function(l, u, f, G, J, X, M, U, m, R, P, af, d, t, j) { function aj() { switch (m) { case "s": return "Short"; case "l": return "Long"; default: return "Default" } } function ai() { var ak = "Default"; if ((ac.length == "Short") || (z.length == "Short")) { ak = "Short" } if ((ac.length == "Long") || (z.length == "Long")) { ak = "Long" } return ak } function Y() { if (v.activeOption == "Default") { return s.activeOption } else { return v.activeOption } } function S() { if (A.activeOption != "Default") { return A.activeOption } if (H.activeOption != "Default") { return H.activeOption } if (ag.activeOption != "Default") { return ag.activeOption } if (y.activeOption != "Default") { return y.activeOption } } function a(ak) { if (ak == "s") { return "Skinny" } else { return "Default" } } function I(al) { var ak = (al.indexOf("s") != -1) ? "Short" : "Default"; return ak } function ae(ak) { if (ak == "s") { return "Shoe" } else { return "Boot" } } function e() { var ak; if ((s.params.mustTuckIn) || (v.params.mustTuckIn)) { ak = true } else { if ((s.params.mustTuckOut) || (v.params.mustTuckOut)) { ak = false } else { ak = (H.params.tuckIn) || (F.params.tuckIn) || (ag.params.tuckIn) } } return ak } function K(ak) { if (C.isActive) { if (ac.isActive) { ak.setActiveOption("BeltIn") } else { ak.setActiveOption("Belt") } ak.setZIndex("5") } else { if (ac.isActive || (z.length != "Default")) { ak.setActiveOption("In") } else { if (e()) { if (F.isActive || H.isActive || ag.isActive) { ak.setActiveOption("BeltIn") } else { ak.setActiveOption("Default") } } else { ak.setActiveOption("Default") } } if (e()) { ak.setZIndex("3") } else { ak.setZIndex("5") } } } function B(ak) { if ((ac.isActive || z.isActive)) { if (C.isActive) { ak.setActiveOption("Long") } else { ak.setActiveOption(h) } } else { if (C.isActive) { ak.setActiveOption("LongBelt") } else { ak.setActiveOption("Default") } } } function W() { A.clear(); if (A.params.hasCollar) { T.clear() } } var n = {}; n.price = G; n.id = M; n.prodCode = af; n.sale = J; n.prodColour = d; n.tagName = t; n.seasonName = j; var k = document.getElementById(l + hiddenBob); var x = MMM.Departments.Women.getModel(false); var L = x.layers; var Q = L[l]; var Z = false; var h = "Default"; var V = L.Body; var O = L.Skin; var s = L.Tops; var v = L.Shirts; var T = L.ShirtsCollar; var H = L.Skirts; var ag = L.Shorts; var C = L.Belts; var F = L.Jeans; var A = L.Dresses; var ac = L.Knitwear; var o = L.KnitwearHood; var z = L.JacketsCoats; var b = L.JacketsCoatsBack; var ab = L.JacketsCoatsCollar; var aa = L.SwimwearFull; var ah = L.SwimwearTop; var q = L.SwimwearBottom; var y = L.Jumpsuits; var N = L.Shoes; var p = L.Wallet; var ad = L.Watch; var g = L.Hat; var E = L.HatWhite; var w = L.Bags; var c = L.Tights; Q.setProduct(U, n); Q.length = aj(); switch (l) { case "Dresses": A.params.topStyle = I(P); A.params.hasCollar = (R == "c"); A.params.mustSwapWithJeans = (P.indexOf("o") != -1); A.params.mustLeaveOnWithShortsSkirts = (P.indexOf("l") != -1); break; case "Jumpsuits": y.params.topStyle = I(P); break; case "Jeans": F.params.tuckIn = (R == "i"); F.params.isSkinny = (P == "s"); break; case "Tights": c.params.isWide = (R == "w"); break; case "Skirts": H.params.tuckIn = (R == "i"); break; case "Shorts": ag.params.tuckIn = (R == "i"); break; case "Tops": s.params.mustTuckIn = (R == "i"); s.params.mustTuckOut = (R == "o"); s.params.topStyle = I(P); break; case "Shirts": v.params.mustTuckIn = (R == "i"); v.params.mustTuckOut = (R == "o"); v.params.topStyle = I(P); break; case "Knitwear": ac.params.hasHood = (R == "h"); ac.params.hasPollarNeck = (P == "p"); break; case "JacketsCoats": z.params.hasBack = (R != ""); z.params.hasCollar = (P == "c"); break; case "Shoes": N.params.style = ae(R); break; case "Bags": w.params.isShoulder = (R == "s"); break; case "Belts": break; case "SwimwearBottom": break; case "SwimwearTop": break; case "SwimwearFull": break; default: } switch (l) { case "Dresses": s.clear(); y.clear(); v.clear(); T.clear(); if (!A.params.mustLeaveOnWithShortsSkirts) { H.clear(); ag.clear() } if (A.params.mustSwapWithJeans) { F.clear() } break; case "Jumpsuits": W(); s.clear(); v.clear(); T.clear(); H.clear(); F.clear(); ag.clear(); F.clear(); break; case "SwimwearBottom": aa.clear(); break; case "SwimwearTop": aa.clear(); break; case "SwimwearFull": ah.clear(); q.clear(); break; case "Jeans": ag.clear(); y.clear(); H.clear(); if (A.params.mustSwapWithJeans) { W() } if (c.params.isWide) { c.clear() } break; case "Tights": if (c.params.isWide) { F.clear() } break; case "Tops": W(); v.clear(); T.clear(); y.clear(); break; case "Shirts": W(); y.clear(); s.clear(); break; case "Shorts": if (!A.params.mustLeaveOnWithShortsSkirts) { W() } F.clear(); H.clear(); y.clear(); break; case "Skirts": if (!A.params.mustLeaveOnWithShortsSkirts) { W() } F.clear(); ag.clear(); y.clear(); break; case "Knitwear": break; case "JacketsCoats": break; case "Belts": break; case "Shoes": break; default: } h = ai(); var r = (s.params.mustTuckIn) || (v.params.mustTuckIn); var D = (H.params.tuckIn) || (F.params.tuckIn) || (ag.params.tuckIn); V.setProduct("Body_f", { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: "2010_Spring" }); if (A.isActive) { B(A) } if (y.isActive) { B(y) } if (s.isActive) { K(s) } if (v.isActive) { K(v); T.setProduct(v.imgID, { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }); if (ac.params.hasPollarNeck) { T.setZIndex("-1") } else { T.setZIndex("8") } } if (A.isActive && A.params.hasCollar) { T.setProduct(A.imgID, { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }); if (ac.params.hasPollarNeck) { T.setZIndex("-1") } else { T.setZIndex("8") } } if (ac.isActive) { if (z.isClear && ac.params.hasHood) { o.setProduct(ac.imgID, { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }) } else { o.clear() } } if (q.isActive) { if (ac.isActive || v.isActive || H.isActive || s.isActive || A.isActive || ag.isActive || F.isActive) { q.setActiveOption("In") } else { q.setActiveOption("Default") } } if (ad.isActive) { if ((s.isActive && (s.params.topStyle == "Short")) || (v.isActive && (v.params.topStyle == "Short")) || (A.isActive && (A.params.topStyle == "Short"))) { ad.setZIndex("5") } else { ad.setZIndex("3") } } if (z.isActive) { if (z.params.hasCollar) { ab.setProduct(z.imgID, { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }); ab.setActiveOption("Default") } else { ab.clear() } if (z.params.hasBack) { b.setProduct(z.imgID, { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }); b.setActiveOption("Default") } else { b.clear() } } if (!ag.isClear) { if (C.isActive || (h == "Long")) { ag.setActiveOption("Long") } else { ag.setActiveOption("Default") } } if (H.isActive) { if (C.isActive || (h == "Long")) { H.setActiveOption("Long") } else { H.setActiveOption("Default") } } if (N.isActive) { if (F.params.isSkinny && (N.params.style == "Boot")) { N.setZIndex("3") } else { N.setZIndex("2") } } if (c.isActive) { if (c.params.isWide && (N.params.style == "Shoe")) { c.setZIndex("3") } else { c.setZIndex("1") } } if (A.isActive || y.isActive || s.isActive) { O.setProduct("0", { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: j }) } else { O.clear() } }; mmmDepartment.prototype.createTags = function() { var c; var a; var b; c = this.getModel().layers; for (b in c) { if (c.hasOwnProperty(b)) { if (c[b].hasTag) { try { a = new mmmModelTagItem(b) } catch (d) { a = null; mmmLog("[TAG][ERROR] %s - %s", b, d) } if (a) { this.tags[b] = a } } else { } } } this.clearModelTags() }; mmmDepartment.prototype.setModelTags = function(d) { var b = this.getModel(true); var a; for (var c in b.layers) { if (b.layers.hasOwnProperty(c)) { a = b.layers[c]; if (this.tags[c]) { if (a.isStatic || a.isClear) { this.tags[c].clearDetails() } else { this.tags[c].setDetails(a.productDetails) } } } } if (this.onSetModelTags) { this.onSetModelTags(d) } }; mmmDepartment.prototype.clearModelTags = function() { var a = this.getModel(); for (var b in a.layers) { if (a.layers.hasOwnProperty(b)) { if (this.tags[b]) { this.tags[b].clearDetails() } } } }; mmmDepartment.prototype.setSize = function(a) { if (a) { this.size = a } }; mmmDepartment.prototype.modelTagsEnable = function() { this.modelTagsEnabled = true; this.tagsEnabled = true }; mmmDepartment.prototype.modelTagsDisable = function() { this.modelTagsEnabled = false; this.tagsEnabled = false }; mmmDepartment.prototype.showModelTags = function() { if (!this.modelReady) { if (!this.tagsShowOnLoad) { this.tagsShowOnLoad = true } } else { this.tagsShowOnLoad = false; if (!this.tagsVisible && (this.getGarmentCount() > 0)) { this.tagsVisible = true; if (this.tagsEnabled) { var a = $("#MixMatchMe_Women_Tag_Manager"); a.css("visibility", "visible") } } } }; mmmDepartment.prototype.hideModelTags = function() { if (this.tagsShowOnLoad) { this.tagsShowOnLoad = false } if (!this.modelReady) { return } if (this.tagsVisible) { this.tagsVisible = false; var a = $("#MixMatchMe_Women_Tag_Manager"); a.css("visibility", "hidden") } }; mmmDepartment.prototype.linkTagsToDOM = function() { for (var a in this.tags) { if (this.tags.hasOwnProperty(a)) { if (this.tags[a]) { this.tags[a].linkToDOM() } } } }; mmmDepartment.prototype.setModelIndex = function(b) { var c; var d; this.modelIndex = b; var a = this.getModel(true); for (c in a.layers) { if (a.layers.hasOwnProperty(c)) { d = a.layers[c]; if (d) { d.setModelIndex(b) } } } a = this.getModel(false); for (c in a.layers) { if (a.layers.hasOwnProperty(c)) { d = a.layers[c]; if (d) { d.setModelIndex(b) } } } }; mmmDepartment.prototype.setClickedID = function(a) { this.clickedID = a }; mmmDepartment.prototype.getTotal = function() { var c = 0; for (var a in this.garments) { if (this.garments.hasOwnProperty(a)) { var b = this.garments[a]; c += parseFloat(b.price) } } return c }; mmmDepartment.prototype.activate = function() { this.getModel(true).show(); this.getModel(false).hide(); this.models.bob3.modelDiv.style.visibility = "visible"; this.models.bob4.modelDiv.style.visibility = "visible"; this.isActive = true }; mmmDepartment.prototype.deactivate = function() { this.models.bob3.modelDiv.style.visibility = "hidden"; this.models.bob4.modelDiv.style.visibility = "hidden"; this.isActive = false }; mmmDepartment.prototype.getGarments = function() { return this.garments }; mmmDepartment.prototype.getGarmentDetail = function(c) { var b = ""; var a; for (a in this.garments) { if (this.garments.hasOwnProperty(a)) { if (this.garments[a].hasOwnProperty(c)) { if (b != "") { b = b + "," } b = b + this.garments[a][c] } } } return b }; mmmDepartment.prototype.getModelDetail = function(f) { var e = ""; var d; var b; var a = false; var c = this.getModel(true).layers; for (d in c) { if (c.hasOwnProperty(d)) { b = c[d]; if (b.isActive && b.hasTag) { if (a) { e = e + "," } else { a = true } switch (f) { case "version": e = e + b.getVersion(); break; case "zIndex": e = e + b.getZIndex(); break; case "id": e = e + b.productDetails.id; break; case "category": e = e + b.name; break } } } } return e }; mmmDepartment.prototype.getModelDetailOrdered = function() { var f = ""; var d; var b; var a = false; var c = this.getModel(true).layers; for (var e = 0; e < 20; e++) { for (d in c) { if (c.hasOwnProperty(d)) { b = c[d]; if (b.isActive && b.hasTag) { if (b.getZIndex() == e.toString()) { if (a) { f += "," } else { a = true } f += b.imgID + b.options[b.activeOption] } } } } } return f }; mmmDepartment.prototype.cloneModels = function() { this.getModel(false).clone(this.getModel(true)) }; mmmDepartment.prototype.getGarmentCount = function() { var b, d, a, c; a = this.getModel(true); c = 0; for (b in this.garments) { if (this.garments.hasOwnProperty(b)) { d = this.garments[b]; d.flag = false; if (a.layers.hasOwnProperty(d.category)) { if (!a.layers[d.category].isClear) { c++ } } } } return c }; mmmDepartment.prototype.setZoom = function(c) { var b; var a = this.getModel(false); if (this.zoom == c) { return } this.zoom = c; if (c == 100) { b = "Standard" } else { b = c.toString() } a.imageFolder = b; this.activateModel(a) }; mmmDepartment.prototype.getZoom = function(a) { return this.zoom }; mmmDepartment.prototype.setWhiteLabel = function(c) { var b; var a; this.isWhiteLabel = c; for (a in this.models) { if (this.models.hasOwnProperty(a)) { if (a != "") { this.models[a].isWhiteLabel = c } } } }; function mmmGetArrayAsDelimitedString(e, d, a) { if (!(a instanceof Array)) { throw "mmmGetArrayAsDelimitedString: Param 'arrayItems' is not a valid array" } var c = ""; var b; for (b = 0; b < a.length; b++) { if (b > 0) { c += e } c += d + a[b] } return c } function mmmFormatProductCodes(c, b, e, a) { var d = c + mmmGetArrayAsDelimitedString(e, b, a); return d } function mmmInitObject(c, a) { if (!c || !a) { return } for (var b in a) { if (a.hasOwnProperty(b) && c.hasOwnProperty(b)) { c[b] = a[b] } } } function outfitLayer(c, b, a) { this.defaultSrc = ""; if ((a == "") || (!c)) { throw "outfitLayer_InvalidImageID" } this.img = document.getElementById(a); if ((this.img !== null)) { this.parentModel = c; this.name = b; this.basePath = ""; this.imgExt = ".png"; this.imgBlank = "spacer"; this.useModelIndex = false; this.useModelIndexOnWL = false; this.ignoreModelIndexOne = false; this.modelIndex = ""; this.productDetails = { price: 0, id: 0, prodCode: 0, sale: 0, prodColour: 0, tagName: 0, seasonName: "" }; this.options = { Default: "" }; this.loaded = false; this.neverClear = false; this.onGetImageFolder = function() { }; this.isStatic = false; this.hasTag = true; this.isClear = true; this.imgID = ""; this.isActive = false; this.activeOption = "Default"; this.length = "Default"; this.style = ""; this.style2 = ""; this.fadeState = "none"; this.params = {}; this.posStart = $(this.img).offset(); this.dom = this.img } else { return null } } outfitLayer.prototype.imageLoaded = function() { if (this.img.src == sitebase + "spacerR.png") { return } this.loaded = true }; outfitLayer.prototype.addOption = function(a, b) { this.options[a] = b }; outfitLayer.prototype.deleteOption = function(a) { if (this.options.hasOwnProperty(a)) { delete this.options[a] } }; outfitLayer.prototype.clearOptions = function() { for (var a in this.options) { if (a != "Default") { delete this.options[a] } } }; outfitLayer.prototype.setProduct = function(c, b) { if ((c == "") || (!b)) { throw "outfitLayer.prototype.setProduct_InvalidProdID" } this.imgID = c; this.isActive = true; this.isClear = false; this.activeOption = "Default"; for (var a in b) { if (this.productDetails.hasOwnProperty(a)) { this.productDetails[a] = b[a] } } }; outfitLayer.prototype.setActiveOption = function(a) { if (this.options.hasOwnProperty(a)) { this.activeOption = a } else { throw "outfitLayer_useOption_UnregisteredProperty" } }; outfitLayer.prototype.clear = function() { if (!this.neverClear && (this.imgID != "")) { this.imgID = ""; this.isActive = false; this.isClear = true; this.length = "Default"; this.setActiveOption("Default"); this.style = ""; for (var a in this.productDetails) { if (this.productDetails.hasOwnProperty(a)) { this.productDetails[a] = "" } } for (var b in this.params) { if (this.params.hasOwnProperty(b)) { if ((b == "topStyle") || (b == "style")) { this.params[b] = "" } else { this.params[b] = false } } } } }; outfitLayer.prototype.activate = function() { var a = this.ImageSrc(); if (a.indexOf("spacer.png") >= 0) { this.img.style.visibility = "hidden" } else { this.img.style.visibility = "visible" } if (!this.isStatic && (this.img.src != a)) { this.img.src = ""; this.loaded = false; this.img.src = ""; this.img.src = a } else { this.loaded = true } }; outfitLayer.prototype.ImageSrc = function() { var b; var a = this.productDetails.seasonName; if (this.imgID) { b = this.basePath + ((a == "") ? "" : (a + "/")) + this.parentModel.getImageFolder() + this.imgID + this.options[this.activeOption] + this.getModelIndex() + this.imgExt } else { b = this.basePath + "Standard/" + this.imgBlank + this.imgExt } return b }; outfitLayer.prototype.toDebugString = function() { return "outfitLayer: Name=" + this.name + " Img=" + this.img.id }; outfitLayer.prototype.Show = function() { this.img.style.visibility = "visible" }; outfitLayer.prototype.Hide = function() { this.img.style.visibility = "hidden" }; outfitLayer.prototype.onLoad = function(a) { this.onLoad(this) }; outfitLayer.prototype.onLog = function(a, b) { this.onLog(a, b) }; outfitLayer.prototype.asStateString = function(a) { return "Layer: " + this.name + "\t Img=" + this.basePath + this.imgID + this.options[this.activeOption] + this.imgExt + "\t isActive: " + this.isActive + "\t activeOption: " + this.activeOption }; outfitLayer.prototype.isLoaded = function() { return this.loaded || this.isStatic }; outfitLayer.prototype.clone = function(b) { var c; var a; if ((this.name != b.name) || this.isStatic) { return } this.basePath = b.basePath; if (!b.isClear) { this.setProduct(b.imgID, b.productDetails); this.activeOption = b.activeOption; this.length = b.length; this.style = b.style; this.style2 = b.style2; this.img.style.zIndex = b.img.style.zIndex; a = b.params; for (c in a) { if (a.hasOwnProperty(c)) { this.params[c] = a[c] } } } else { this.clear() } this.activate() }; outfitLayer.prototype.setZIndex = function(a) { this.img.style.zIndex = a }; outfitLayer.prototype.getZIndex = function() { return this.img.style.zIndex }; outfitLayer.prototype.getVersion = function() { return this.options[this.activeOption] }; outfitLayer.prototype.setModelIndex = function(a) { this.modelIndex = a }; outfitLayer.prototype.getModelIndex = function() { if ((this.useModelIndex) && (this.modelIndex != "")) { if ((this.ignoreModelIndexOne && (this.modelIndex == 1)) || (this.parentModel.isWhiteLabel && !this.useModelIndexOnWL)) { return "" } else { return "_" + this.modelIndex } } else { return "" } }; function mmmModel(a, c, b) { if (b == "") { throw "mmmModel_InvalidDivID" } this.modelDiv = document.getElementById(b); if (this.modelDiv !== null) { this._this = this; this.name = a; this.index = c; this.layers = {}; this.isActive = false; this.isCurrent = false; this.imageFolder = "Standard"; this.isWhiteLabel = false; this.posStart = $(this.modelDiv).offset(); this.dom = this.modelDiv } else { throw "mmmModel_NotFound" } } mmmModel.prototype.handlerGetImageFolder = function() { return this.imageFolder }; mmmModel.prototype.defaultCreateLayers = function(b) { if ((!b) || (b.length <= 0)) { throw "mmmModel.createLayers_InvalidCatLayer" } else { for (var a = 0; a < b.length; a++) { this.addLayer(b[a], b[a] + this.id) } } }; mmmModel.prototype.autoCreateLayers = function() { var d; var e; var c; var b = ""; var a; c = this.modelDiv.childNodes.length; if (c == 0) { throw "mmmModel.prototype.autoCreateLayers - No Child Nodes" } for (d = 0; d < c; d++) { e = this.modelDiv.childNodes[d]; b = new String(e.id); a = b.search(this.index); if (a < 1) { continue } else { this.addLayer(b.substring(0, a), b) } } }; mmmModel.prototype.addLayer = function(c, a) { var b = new outfitLayer(this, c, a); b.onGetImageFolder = this.handlerGetImageFolder; this.layers[c] = b }; mmmModel.prototype.hideAllLayers = function() { var a; var b; for (a in this.layers) { if (this.layers.hasOwnProperty(a)) { b = this.layers[a]; if (b !== null) { b.Hide() } } } }; mmmModel.prototype.show = function() { $(this.modelDiv).css("opacity", 1) }; mmmModel.prototype.hide = function() { $(this.modelDiv).css("opacity", 0) }; mmmModel.prototype.onAllLayersLoaded = function(a) { this.onAllLayersLoaded(this) }; mmmModel.prototype.onLog = function(a, b) { this.onLog(a, b) }; mmmModel.prototype.toDebugString = function() { var a; var b; var c; c = "mmmModel: Name=" + this.name + " Div=" + this.modelDiv.id + "\n"; for (a in this.layers) { if (this.layers.hasOwnProperty(a)) { b = this.layers[a]; if ((b !== null)) { c += "\t" + b.toDebugString() + "\n" } } } }; mmmModel.prototype.asStateString = function(b) { var c; c = "Model: " + this.name; for (var a in this.layers) { if (this.layers.hasOwnProperty(a)) { c = b + c + "\n\t" + b + this.layers[a].asStateString(b + "\t") } } return c }; mmmModel.prototype.activate = function() { for (var a in this.layers) { if (this.layers.hasOwnProperty(a)) { this.layers[a].activate() } } }; mmmModel.prototype.isLoaded = function() { for (var a in this.layers) { if (this.layers.hasOwnProperty(a)) { if (!this.layers[a].isLoaded()) { return false } } } return true }; mmmModel.prototype.clone = function(a) { if (this === a) { alert("the same") } var c = $(a.modelDiv); $(this.modelDiv).css({ width: c.width(), height: c.height(), left: c.position().left }); this.imageFolder = a.imageFolder; for (var b in this.layers) { if (this.layers.hasOwnProperty(b)) { this.layers[b].clone(a.layers[b]) } } }; mmmModel.prototype.clearLayers = function() { for (var a in this.layers) { if (this.layers.hasOwnProperty(a)) { this.layers[a].clear() } } }; mmmModel.prototype.sendToBack = function() { this.modelDiv.style.zIndex = "5" }; mmmModel.prototype.bringToFront = function() { this.modelDiv.style.zIndex = "7" }; mmmModel.prototype.getImageFolder = function() { if (this.imageFolder != "") { return this.imageFolder + "/" } else { return "" } }; var MMM; function CreateMMM() { var a; var c; var e; var d; var f; MMM = {}; MMM.mouseX = 0; MMM.mouseY = 0; MMM.Departments = {}; MMM.Departments.Women = new mmmDepartment("Women", "PlaceHolder", null, "auto"); if (MMM && MMM.Departments.Women) { var b = MMM.Departments.Women; for (a in b.models) { if (b.models.hasOwnProperty(a)) { c = b.models[a]; for (e in c.layers) { if (c.layers.hasOwnProperty(e)) { d = c.layers[e]; d.basePath = pathbase; d.clearOptions(); d.clear() } } f = c.layers; f.Body.neverClear = true; f.Body.hasTag = false; f.Skin.hasTag = false; f.HatWhite.hasTag = false; f.ShirtsCollar.hasTag = false; f.KnitwearHood.hasTag = false; f.JacketsCoatsBack.hasTag = false; f.JacketsCoatsCollar.hasTag = false; f.Body.useModelIndex = true; f.Body.useModelIndexOnWL = true; f.Body.ignoreModelIndexOne = true; f.Knitwear.useModelIndex = true; f.Hat.useModelIndex = true; f.HatWhite.useModelIndex = true; f.Scarves.useModelIndex = true; f.JewellryEar.useModelIndex = true; f.JacketsCoats.useModelIndex = true; f.JacketsCoatsCollar.useModelIndex = true; f.Sunglasses.useModelIndex = true; f.Dresses.params.topStyle = ""; f.Jumpsuits.params.topStyle = ""; f.Knitwear.params.hasHood = false; f.Knitwear.params.hasPollarNeck = false; f.JacketsCoats.params.hasCollar = false; f.JacketsCoats.params.hasBack = false; f.Jeans.params.isSkinny = false; f.Jeans.params.tuckIn = false; f.Bags.params.isShoulder = false; f.Skirts.params.tuckIn = false; f.Skirts.params.useLongVersion = false; f.Tops.params.mustTuckIn = false; f.Tops.params.topStyle = ""; f.Shirts.params.topStyle = ""; f.Shirts.params.mustTuckIn = false; f.Shoes.params.style = ""; f.Dresses.addOption("Short", "-s"); f.Dresses.addOption("Long", "-l"); f.Dresses.addOption("Belt", "-b"); f.Dresses.addOption("ShortBelt", "-sb"); f.Dresses.addOption("LongBelt", "-lb"); f.Jumpsuits.addOption("Short", "-s"); f.Jumpsuits.addOption("Long", "-l"); f.Jumpsuits.addOption("Belt", "-b"); f.Jumpsuits.addOption("ShortBelt", "-sb"); f.Jumpsuits.addOption("LongBelt", "-lb"); f.Jeans.addOption("In", "-i"); f.Shirts.addOption("In", "-i"); f.Shirts.addOption("Belt", "-b"); f.Shirts.addOption("BeltIn", "-bi"); f.ShirtsCollar.addOption("Default", "-c"); f.Shorts.addOption("In", "-i"); f.Shorts.addOption("Long", "-l"); f.Shorts.addOption("One", "-1"); f.Skirts.addOption("Long", "-l"); f.Knitwear.addOption("Belt", "-b"); f.Knitwear.addOption("Belt_In", "-bi"); f.KnitwearHood.addOption("Default", "-h"); f.SwimwearBottom.addOption("In", "-i"); f.Tops.addOption("In", "-i"); f.Tops.addOption("Belt", "-b"); f.Tops.addOption("BeltIn", "-bi"); f.JacketsCoatsBack.addOption("Default", "-b"); f.JacketsCoatsCollar.addOption("Default", "-c"); f.HatWhite.addOption("Default", "_w") } } b.createTags(); b.setModelIndex("1") } } function mmmShoppingBag(a) { this.items = {}; if (a && (a != "")) { this.cookieName = a } else { this.cookieName = "" } this.useCookie = (this.cookieName != ""); this.loading = true; this.loadFromCookie(); this.loading = false } mmmShoppingBag.prototype.loadFromCookie = function() { var a; if (this.useCookie == "") { return } this.removeAllItems(); a = $.cookie(this.cookieName); if (a && (a != "")) { this.addItems(a) } }; mmmShoppingBag.prototype.saveToCookie = function() { if (this.useCookie) { $.cookie(this.cookieName, this.getItems(), { expires: 1 }) } }; mmmShoppingBag.prototype.getItemCount = function() { var b = 0; var a = ""; for (a in this.items) { if (this.items.hasOwnProperty(a)) { b++ } } return b }; mmmShoppingBag.prototype.addItems = function(a) { if (a && (a != "")) { var d = a.split(","); for (var b = 0; b < d.length; b++) { var c = $.trim(d[b]); this.addItem(c) } } }; mmmShoppingBag.prototype.addItem = function(a) { if (a == "") { return } if (!this.items.hasOwnProperty(a)) { this.items[a] = a; if (!this.loading) { this.saveChange() } } }; mmmShoppingBag.prototype.removeItem = function(a) { if (this.items.hasOwnProperty(a)) { delete this.items[a]; this.saveChange() } }; mmmShoppingBag.prototype.removeAllItems = function() { for (var a in this.items) { if (this.items.hasOwnProperty(a)) { this.removeItem(a) } } }; mmmShoppingBag.prototype.getItems = function() { var b = ""; var a; for (a in this.items) { if (this.items.hasOwnProperty(a)) { if (b != "") { b = b + "," } b = b + this.items[a] } } return b }; mmmShoppingBag.prototype.containsItem = function(b) { var a = false; a = this.items.hasOwnProperty(b); return a }; mmmShoppingBag.prototype.saveChange = function() { this.saveToCookie(); this.onChange() }; mmmShoppingBag.prototype.onChange = function() { }; var scroll_top; var mmm_blackbox; var mmm_flag = false; var mmm_resize_timeout = 0; var mmm_loadoutfit = true; function disp_each() { } $(document).ready(function() { $("#Content div").css("width", 166); if (!($.browser.msie)) { document.getElementById("pgHeight").innerHTML = "<img height='483px' width='1px' src='spacer.gif' />" } else { if (!(parseFloat($.browser.version) < 8)) { document.getElementById("pgHeight").innerHTML = "<img height='483px' width='1px' src='spacer.gif' />" } else { } } _ShopBag = new mmmShoppingBag("mmmBag"); UpdateShopItems(); var a = new Array("MME/MixMatchMe/Images/tag/b_close.png", "MME/MixMatchMe/Images/tag/l_b_close.png", "MME/MixMatchMe/Images/tag/b_info.png", "MME/FCUK/Images/tag/info.png", "MME/FCUK/Images/tag/b_right.png", "MME/FCUK/Images/tag/b_info.png", "MME/MixMatchMe/Images/tag/b_slice.png", "MME/MixMatchMe/Images/Body_f_ph.gif"); var d = new Array(); for (var b = 0; b < a.length; b++) { d[b] = new Image(); d[b].src = sitebase + a[b] } CreateMMM(); MMM.Departments.Women.setWhiteLabel(false); var c = $.cookie("outfit"); if ((!c) || (c == "")) { MMM.Departments.Women.dressUpCountDown = 1 } ShowModel("Women"); if (mmm_loadoutfit) { mmm_loadoutfit = false; LoadOutfit_f(outfit0, 0, true) } else { $("#divImgOutfitLoading").css("visibility", "hidden"); $("#imgOutfitLoading").css("visibility", "hidden") } MMM.Departments.Women.clearDressMeUp = true; MMM.modelPosManager = new mmmModelPosManager(document.getElementById("middle"), document.getElementById("mmm_blackbox"), document.getElementById("mmm_models"), document.getElementById("MixMatchMe_Women_Tag_Manager"), MMM.Departments.Women, document.getElementById("mmm_header"), { widthOfApp: 1000, percOfModelCovered: 0 }); if (!($.browser.msie && ($.browser.version < 7))) { $(window).scroll(function(e) { MMM.modelPosManager.adjustToWindowScroll() }); $(window).resize(function(e) { clearTimeout(mmm_resize_timeout); if (MMM.Departments.Women.modelReady) { mmm_resize_timeout = setTimeout("MMM.modelPosManager.adjustAllToWindowResize(); clearTimeout(mmm_resize_timeout);", 250) } MMM.modelPosManager.adjustPositionToWindowResize() }) } if (_nosplash == 1) { ClearSplash_do() } MMM.Departments.Women.onSetModelTags = function(f) { try { MMM.modelPosManager.setTagsPosition(f) } catch (e) { } }; if (!($.browser.msie && ($.browser.version < 7))) { MMM.Departments.Women.onModelLoaded = function() { try { MMM.modelPosManager.handlerDepModelLoaded(MMM.Departments.Women.zoom) } catch (e) { } } } $().mousemove(function(f) { MMM.mouseX = f.pageX; MMM.mouseY = f.pageY; tagsShowHide() }) }); function mmmModelTagItem(c) { var b, a = 0; if ((c == "")) { throw "mmmModel_InvalidDepName" } this.name = c; this.tag = null; this.link = null; this.price = null; this.linkToDOM(); if (this.tag) { } else { throw "mmmTag: tag invalid" } } mmmModelTagItem.prototype.linkToDOM = function() { var a = 0; this.tag = document.getElementById("MixMatchMe_Women_Tags_Item_" + this.name); this.link = document.getElementById("tagLink_" + this.name); this.price = document.getElementById("tagPrice_" + this.name); if (!this.tag || !this.link || !this.price) { throw String.format("Unable to link '{0}' tag to DOM" + this.name) } }; mmmModelTagItem.prototype.setDetails = function(b) { var a; if (b.price == 0) { this.clearDetails() } else { $(this.link).html(b.tagName); if (b.sale != "Y") { $(this.price).html("£" + b.price) } else { $(this.price).html("<font color=red>£" + b.price + "</font>") } $(this.tag).show() } }; mmmModelTagItem.prototype.clearDetails = function() { $(this.tag).hide(); this.link.innerHTML = ""; this.price.innerHTML = "" };