"+jQuery(this).text()+"
").appendTo(jQueryChokersHolderBox); } return false; }); function hideChokersHolder() { jQueryChokersHolder.animate({"opacity" : "0"}, function() { jQuery(this).hide().remove(); jQueryChokersHolder = null; }); } //necklace item end //product zoom jQuery("#productImage a#centralZoom").click(function() { return false; }); if (jQuery("#productImage img#centralImage").length > 0) { var bZoomDisplaying = false; var lastZoomHref = ""; jQuery("").css("z-index", "1000").prependTo(jQuery("#productImage")).click(function() { if (bZoomDisplaying) { MagicZoom_stopZooms(); jQuery("#productImage a#centralZoom").css("cursor", "default").empty().append(""+txt_ADDED_TO_YOUR_TOUS_BAG+"
"); jQueryproductBoughtInfo.appendTo(jQuerycurProdSlider).show(1); setTimeout(function() { destroyDiv(jQuerycurProdSlider.get(0)); }, 2500); //update tous bag jQuery.ajax({ url: "/basket_reduced.aspx", cache: false, success: function(html) { jQuery("#basketReduced").html(html); jQuery("#basketMenu span").text("TOUS BAG - "+ jQuery("#basketReduced #basketQuantity").html() +" PRODUCTS"); } }); } }); } } }); } //buying product end //wishlist jQuery(".wishListTotalPrice").each(function() { jQuery(this).text((jQuery("#wish_"+this.id.split("_")[1]).val()*jQuery("#wishListItemPrice_"+this.id.split("_")[1]).text()).toFixed(2)); }); if (jQuery("#updateWishList").length > 0) { jQuery("#updateWishList").click(function() { jQuery(".wishListTotalPrice").each(function() { jQuery(this).text((jQuery("#wish_"+this.id.split("_")[1]).val()*jQuery("#wishListItemPrice_"+this.id.split("_")[1]).text()).toFixed(2)); }); updateWishListTotals(); return false; }); } function updateWishListTotals() { if (jQuery("#wishListTotals").length > 0) { var wishListTotals = 0; jQuery(".wishListTotalPrice").each(function() { wishListTotals += parseFloat(jQuery(this).text()); }); jQuery("#wishListTotals").html(wishListTotals.toFixed(2)); } if (jQuery("#wishListTotalsUnits").length > 0) { var wishListTotalsUnits = 0; jQuery(".wishListUnits").each(function() { wishListTotalsUnits += parseFloat(jQuery(this).val()); }); jQuery("#wishListTotalsUnits").html(wishListTotalsUnits); } } updateWishListTotals(); jQuery(".wishListUnits").each(function() { jQuery(".wishListUnits").blur(function() { if(jQuery(this).val() == "") { jQuery(this).val("0"); } }); }); jQuery("#buyWishList").click(function() { jQuery("#updateWishList").trigger("click"); var wishListToBuy = ""; jQuery(".wishListUnits").each(function() { if (jQuery(this).val() > 0) { wishListToBuy += this.id.split("_")[1] + ";" + jQuery(this).val() + "|"; } }); if (wishListToBuy != "") { jQuery.ajax({ url: "/buy_some.aspx", data: "p="+wishListToBuy, cache: false, success: function() { document.location.href = "/basket.aspx"; } }); } return false; }); //wishlist end //search jQuery(".searchSubmitButton").click(function() { if (jQuery(".searchInput input").val().length >= 3) { document.location.href = "/list.aspx?search="+jQuery(".searchInput input").val(); } else { alert(txt_THREE_CHARS); } return false; }); //search end //no product found if (jQuery(".noProduct").length > 0) { if (jQuery("#display").length > 0) { jQuery("#display").append(jQuery(".noProduct").show()); } if (jQuery(".shoppingBagHolder").length > 0) { jQuery(".shoppingBagHolder").append(jQuery(".noProduct").show()); } } //no product found end //place select ShipMethod if (jQuery(".selectShipMethod").length > 0 && jQuery(".orderShipMethodSelect").length > 0) { jQuery(".orderShipMethodSelect").append(jQuery(".selectShipMethod")); } //place select ShipMethod end //online measurement if (jQuery(".onlineMeasureItem").length > 0 && jQuery(".measureControls").length) { var onlineMeasureRatio = 0; var actualRingSize = 4; jQuery(".measureControls .less").click(function() { resizeItem(-1); }); jQuery(".measureControls .more").click(function() { resizeItem(1); }); jQuery(".measureControls .stepLess").click(function() { resizeItem(-7); }); jQuery(".measureControls .stepMore").click(function() { resizeItem(7); }); function resizeItem(step) { curWidth = jQuery(".onlineMeasureItem > img").width(); if (jQuery(".onlineMeasureItem > img").attr("src").indexOf("card.jpg") != -1) { minValue = 250; maxValue = 424; if ((step > 0 && curWidth + step <= maxValue) || (step < 0 && curWidth + step >= minValue)) { nextWidth = curWidth + step; jQuery(".onlineMeasureItem > img").attr("src", jQuery(".onlineMeasureItem > img").attr("src").replace("w="+curWidth, "w="+nextWidth)); } } else if (jQuery(".onlineMeasureItem > img").attr("src").indexOf("ring.jpg") != -1) { newWidth = curWidth; if (step > 0) { if (actualRingSize < ringSizes.length-1) { actualRingSize++; } } else if (step < 0) { if (actualRingSize > 0) { actualRingSize--; } } newWidth = calculateRingWidth(ringSizes[actualRingSize][0]); jQuery(".onlineMeasureItem > img").attr("src", jQuery(".onlineMeasureItem > img").attr("src").replace("w="+curWidth, "w="+newWidth)); jQuery(".onlineMeasureItem > img").tooltip({ bodyHandler: function() { return getOnlineMeasureToolTip(); }, track: true, showURL: false }); } } jQuery(".onlineMeasureHolder .buttonBack").click(function() { document.location.href = "/product.aspx?p=" + jQuery("#onlineMeasureProductCode").text(); return false; }); jQuery(".onlineMeasureHolder .buttonContinue").click(function() { onlineMeasureRatio = 85/jQuery(".onlineMeasureItem > img").width(); jQuery(".onlineMeasureHolder:visible").hide(); jQuery(".onlineMeasureHolder[class*='hidden']").show(); curWidth = jQuery(".onlineMeasureItem > img").width(); newWidth = calculateRingWidth(ringSizes[actualRingSize][0]); jQuery(".onlineMeasureItem > img").attr("src", jQuery(".onlineMeasureItem > img").attr("src").replace("card.jpg", "ring.jpg").replace("w="+curWidth, "w="+newWidth)); jQuery(".onlineMeasureItem > img").css({"margin-left" : 100, "margin-top" : 40}); resizeItem(0); return false; }); jQuery(".onlineMeasureHolder .buttonSave").click(function() { document.location.href = "/product.aspx?p=" + jQuery("#onlineMeasureProductCode").text() + "&om=" + actualRingSize; return false; }); function calculateRingWidth(mm) { pxWidth = mm/onlineMeasureRatio; pxWidth = pxWidth*143/100; return parseInt(pxWidth); } function getOnlineMeasureToolTip() { jQuery(".onlineMeasureToolTip #txtUS").text(ringSizes[actualRingSize][1]); jQuery(".onlineMeasureToolTip #txtEU").text(ringSizes[actualRingSize][2]); jQuery(".onlineMeasureToolTip #txtIN").text(ringSizes[actualRingSize][3]); jQuery(".onlineMeasureToolTip #txtMM").text(ringSizes[actualRingSize][0]); return jQuery(".onlineMeasureToolTip").html(); } } //online measurement end //payment card selection jQuery(".paymentCardSelect select").change(function() { if (jQuery(this).val() == "A") { jQuery(".visaCode").hide(); jQuery(".americanCode").show(); } else { jQuery(".americanCode").hide(); jQuery(".visaCode").show(); } }); //payment card selection end //content buttons jQuery(".input").css("background-color", customBackground); //content buttons end }); //advanced search var bAdvSearchLaunched = false; function launchAdvancedSearch() { if (bAdvSearchLaunched) return false; iWidth = jQuery(".center").width(); iHeight = jQuery(".center").height(); jQueryadvancedSearchHolder = jQuery("").css({"width" : iWidth/2, "top" : iHeight/2 - iHeight/4, "left" : iWidth/2 - iWidth/4}); jQueryadvancedSearchHolder2 = jQuery("").css({"width" : iWidth/2, "top" : iHeight/2 - iHeight/4, "left" : iWidth/2 - iWidth/4}); jQuery.ajax({ url: "/advanced_search.aspx", cache: false, success: function(html) { bAdvSearchLaunched = true; jQueryadvancedSearchHolder.appendTo(jQuery(".center")).css({"opacity" : "0", "z-index" : "10000"}).show().animate({"opacity" : "0.9"}, function() { jQueryadvancedSearchHolder2.append(html).appendTo(jQuery(".center")).css({"opacity" : "0", "z-index" : "10000"}).show().animate({"opacity" : "1"}); jQueryadvancedSearchHolder2.find(".submit .input").click(function() { var searchString = ""; jQuery(".selectSearch select").each(function() { if (jQuery(this).val() != 0) { searchString += "&" + this.id + "=" + jQuery(this).val(); } }); if (searchString != "") { document.location.href = "/adv_search_result.aspx?advs=1" + searchString; } }); jQueryadvancedSearchHolder2.find(".close").click(function() { jQueryadvancedSearchHolder2.animate({"opacity" : "0"}, function() { jQuery(this).hide().remove(); jQueryadvancedSearchHolder.animate({"opacity" : "0"}, function() { jQuery(this).hide().remove(); bAdvSearchLaunched = false; }); }); }); jQuery(".input").css("background-color", customBackground); }); } }); } //advanced search end function openSliderMenuDown(obj, curUrl, func) { jQuerycurSliderDown = jQuery("").css("z-index", "1000").appendTo(jQuery(obj)); jQuery(".footer").css("z-index", "1000"); jQuery(".centerHolder").css("z-index", "0"); if (jQuery("."+curUrl.replace("/", "").replace(".", "")).length > 0) { jQuerycurSliderDown.append(jQuery("."+curUrl.replace("/", "").replace(".", "")).html()).show(); func(); } else { jQuerycurCacheSliderDown = jQuery("").appendTo(jQuery(obj)); jQuery.ajax({ url: curUrl, cache: false, success: function(html) { jQuerycurSliderDown.append(html).show(); jQuerycurCacheSliderDown.append(html); func(); } }); } } function hideSliderMenuDown(obj) { jQuery(obj).find(".sliderMenuDown:visible").hide().remove(); } function isValid(evt, obj) { var charCode; try { charCode = (evt.which) ? evt.which : event.keyCode; } catch(e) { charCode = 0; } if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } function emailCheck(sEmail) { var at = "@"; var dot = "."; var lat = sEmail.indexOf(at); var lstr = sEmail.length; var ldot = sEmail.indexOf(dot); if (sEmail.indexOf(at)==-1) { return false; } if (sEmail.indexOf(at)==-1 || sEmail.indexOf(at)==0 || sEmail.indexOf(at)==lstr) { return false; } if (sEmail.indexOf(dot)==-1 || sEmail.indexOf(dot)==0 || sEmail.indexOf(dot)==lstr) { return false; } if (sEmail.indexOf(at,(lat+1))!=-1) { return false; } if (sEmail.substring(lat-1,lat)==dot || sEmail.substring(lat+1,lat+2)==dot) { return false; } if (sEmail.indexOf(dot,(lat+2))==-1) { return false; } if (sEmail.indexOf(" ")!=-1) { return false; } return true; } function destroyDiv(obj) { jQuery(obj).animate({"opacity" : "0"}, 1000, function() { jQuery(this).remove(); }); } var customBackground; var customPattern; function changeBG(color) { if (color == "") { color = spt_COLOR; } customBackground = color; color = "#"+color; jQuery(document.body).css("background-color", color); jQuery.rule(".input").css("background-color", color); jQuery(".input").css("background-color", color); color = color.toUpperCase(); fontColor = "#"+spt_FCOLOR; if (color == "#636B70" || color == "#7A1C3D") { fontColor = "#FFF"; } jQuery.rule(".copy").css("color", fontColor); jQuery(".copy").css("color", fontColor); jQuery.rule(".input").css("color", fontColor); jQuery(".input").css("color", fontColor); jQuery.rule(".menu1 > a").css("color", fontColor); jQuery(".menu1 > a").css("color", fontColor); jQuery.rule(".menu1 > .menuItem > span").css("color", fontColor); jQuery(".menu1 > .menuItem > span").css("color", fontColor); jQuery.rule(".menu2 > a").css("color", fontColor); jQuery(".menu2 > a").css("color", fontColor); jQuery.rule(".menu2 > .menuItem > span").css("color", fontColor); jQuery(".menu2 > .menuItem > span").css("color", fontColor); } function changePattern(patt) { customPattern = patt; if (patt == "") { jQuery(document.body).css("background-image", "none"); } else { jQuery(document.body).css("background-image", "url(/images/pattern_"+patt+".png)"); } } function showSlider(obj, urlCB, func) { jQuerycurSlider = jQuery("").appendTo(jQuery(obj)); if (jQuery("."+urlCB.replace("/", "").replace(".", "")).length > 0) { jQuerycurSlider.append(jQuery("."+urlCB.replace("/", "").replace(".", "")).html()).show(1); func(); jQuery(".input").css("background-color", customBackground); } else { jQuerycurCacheSlider = jQuery("").appendTo(jQuery(obj)); jQuery.ajax({ url: urlCB, cache: false, success: function(html) { jQuerycurSlider.append(html).show(1); jQuerycurCacheSlider.append(html); func(); jQuery(".input").css("background-color", customBackground); } }); } } function hideSlider(obj) { jQuery(obj).find(".sliderMenu:visible").hide(1, function() { jQuery(this).remove(); }); } var combinedProdDisplayed; var combinedProdDemanded; function generateCombinedProduct(obj) { combinedProdDisplayed = jQuery(obj).attr("code"); jQuerycombinedHolder = jQuery("").css({"opacity" : "0", "z-index" : "1000"}); jQuery("") .append(""+jQuery(obj).siblings(".price").html()+"
") .append(""+jQuery(obj).siblings(".info").html()+"
"+jQuery(obj).siblings(".info").html()+"
");
jQuery(obj).jCarouselLite({
btnNext: ".displayRight",
btnPrev: ".displayLeft",
visible: 1,
circular: false,
speed: 300,
btnGo: externalButtons,
afterEnd: function(a) {
jQuery(".listPagination a").removeClass("selected");
jQuery(".listPagination a:eq("+jQuery(obj).find("li").index(a)+")").addClass("selected");
}
});
jQuery(obj).find(".table .row .cell:empty").remove();
jQuery(obj).find(".table .row .cell:first-child").css({
"border-left" : "1px dotted #7f7f7f"
});
jQuery(obj).find(".table .row:first-child .cell").css({
"border-top" : "1px dotted #7f7f7f"
});
if (totalPages == 1) {
jQuery(".displayRight").addClass("disabled");
}
}
function placeProducts(totalPages, firstItems) {
jQueryitems = jQuery("#list .listItem");
var jQuerytableRow;
curItem = 0;
externalButtons = new Array();
jQueryCarouselHolder = jQuery("
");
jQuery(""+txt_SORT_BY+" "+txt_PRICE+", "+txt_NAME+" "+txt_OR+" "+txt_DATE+"
").prependTo(jQuery(".listPagination")); jQuery("#displayLeft").show(); jQuery("#displayRight").show(); jQuery("#display").jCarouselLite({ btnNext: ".displayRight", btnPrev: ".displayLeft", visible: 1, circular: false, speed: 300, btnGo: externalButtons, afterEnd: function(a) { jQuery(".listPagination a").removeClass("selected"); jQuery(".listPagination a:eq("+jQuery("#display li").index(a)+")").addClass("selected"); } }); jQuery("#display .table .row .cell:empty").remove(); jQuery("#display .table .row .cell:first-child").css({ "border-left" : "1px dotted #7f7f7f" }); jQuery("#display .table .row:first-child .cell").css({ "border-top" : "1px dotted #7f7f7f" }); jQuery(".orderHolder > span > span").each(function(i) { var iOrder = i; jQuery(this).click(function() { document.location.href = jQuery(".orderLinks > a:eq("+iOrder+")").attr("href"); }); }); if (totalPages == 1) { jQuery(".displayRight").addClass("disabled"); } } function placeSearchProducts(totalPages, firstItems) { jQueryitems = jQuery("#searchList .listItem"); var jQuerytableRow; curItem = 0; externalButtons = new Array(); jQueryCarouselHolder = jQuery(""+(curItem+1)+"-"+(totalItems+1)+" "+txt_OF+" "+jQueryitems.length+" "+txt_ITEMS+"
"); for (i=curItem; i
");
jQuery("#displayLeft").show();
jQuery("#displayRight").show();
jQuery("#display").jCarouselLite({
btnNext: ".displayRight",
btnPrev: ".displayLeft",
visible: 1,
circular: false,
speed: 300,
btnGo: externalButtons,
afterEnd: function(a) {
jQuery(".listPagination a").removeClass("selected");
jQuery(".listPagination a:eq("+jQuery("#display li").index(a)+")").addClass("selected");
}
});
jQuery("#display .table .row .cellItem:empty").remove();
jQuery("#display .table .row .cellItem:first-child").css({
"border-left" : "1px dotted #7f7f7f"
});
jQuery("#display .table .row:first-child .cellItem").css({
"border-top" : "1px dotted #7f7f7f"
});
if (totalPages == 1) {
jQuery(".displayRight").addClass("disabled");
}
jQuery(".advSearchSubmitButton").click(function() {
launchAdvancedSearch();
return false;
});
}
jQuery(window).resize(function(){
//Window is resized
});
var isEngraved = false;
var engraveFont = "";
var engraveText = "";
var engravePos = "";
var engraveDir = "";
function loadDefaultEngraveOptions(font, txt, pos, dir) {
engraveFont = font;
engraveText = txt;
engravePos = pos;
engraveDir = dir;
isEngraved = true;
}
function setEngravePosition(pos) {
engravePos = pos;
}
function setEngraveDirection(dir) {
engraveDir = dir;
}
function setEngraveText(font, txt) {
engraveFont = font;
engraveText = txt;
}