var firefox=navigator.userAgent.indexOf("Firefox")!=-1;
var explorer=navigator.userAgent.indexOf("MSIE")!=-1;
var explorer7=navigator.userAgent.indexOf("MSIE 7.0")!=-1;
var explorer8=navigator.userAgent.indexOf("MSIE 8.0")!=-1;
var netscape=navigator.userAgent.indexOf("Netscape")!=-1;
var safari=navigator.userAgent.indexOf("Safari")!=-1;
var opera=navigator.userAgent.indexOf("Opera")!=-1;
var camino=navigator.userAgent.indexOf("Camino")!=-1;
var macintosh=navigator.platform.indexOf("Mac")!=-1;
var image_dir="/store/template/default/images/share";
function add_tool(icon,name,url,meta){document.write('<span class="socialAddButton" id="socialAddButton-'+icon+'"><a id="'+name+'" title="'+name+'"rel="nofollow" href="'+url+'" title="Add to '+name+'" target="_blank"><img src="'+image_dir+"/"+icon+'.jpg" alt="'+name+' icon" /></a></span> ');
}function add_socials(){var title=escape(document.title);
var url=encodeURIComponent(document.URL);
var metaArray=document.getElementsByName("description");
for(var i=0;
i<metaArray.length;
i++){var myMeta=(metaArray[i].content+" ");
}add_tool("ic_facebook","Facebook","http://www.facebook.com/share.php?u="+url+"&amp;t="+title);
add_tool("ic_twitter","Twitter","http://twitter.com/#!/reviveskincare?cm_mmc_o=acbffwyCjCywMbMw%20cw_lbfwCjCywMbMw%20uBBfwyCjCywMbMw%20fcbffwy%205zTw");
}function correctPNG(){for(var i=0;
i<document.images.length;
i++){var img=document.images[i];
var imgName=img.src.toUpperCase();
if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var imgID=(img.id)?"id='"+img.id+"' ":"";
var imgClass=(img.className)?"class='"+img.className+"' ":"";
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' ";
var imgStyle="display:block;"+img.style.cssText;
if(img.align=="left"){imgStyle="float:left;"+imgStyle;
}if(img.align=="right"){imgStyle="float:right;"+imgStyle;
}if(img.parentElement.href){imgStyle="cursor:hand;"+imgStyle;
}var strNewHTML='<span class="pngFix" '+imgID+imgClass+imgTitle+' style="'+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src='"+img.src+"', sizingMethod='scale');\"></span>";
img.outerHTML=strNewHTML;
i=i-1;
}}}if(explorer&&!explorer7){window.attachEvent("onload",correctPNG);
}jQuery.fn.delay=function(time,func){this.each(function(){setTimeout(func,time);
});
return this;
};
var lightboxFix=0;
function openLightbox(whichLightbox,urlIframe){var whichLightbox2;
var myLightbox2;
var lH;
var lW;
if(typeof window.innerWidth!="undefined"){lW=$(document).width();
lH=$(document).height();
}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){lW=$(document).width();
lH=$(document).height();
}}myLightbox=$("#"+whichLightbox);
lightboxParents=myLightbox.parents();
if(lightboxParents.hasClass("wrapper")){if($(".lightboxMask").size()!=1){if(whichLightbox=="log"){$(".wrapper").before('<div class="lightboxMask" id="lightboxMask"></div>');
}else{$(".wrapper").before('<div class="lightboxMask" id="lightboxMask" onclick="closeLightbox()"></div>');
}}theClone=myLightbox.clone();
theClone.addClass("clone");
$(".lightboxMask").before(theClone);
whichLightbox2=whichLightbox;
$(".wrapper "+"#"+whichLightbox2).remove();
myLightbox2=$("#"+whichLightbox2);
}whichLightbox2=whichLightbox;
myLightbox2=$("#"+whichLightbox2);
if(urlIframe!=""){myLightboxIframe=$("#"+whichLightbox2+" iframe");
myLightboxIframe.attr({"src":urlIframe});
}lightboxW=parseInt(myLightbox2.css("width"));
myLeft=(lW-lightboxW)/2;
myLightbox2.css({"left":(myLeft+"px")});
setTimeout(function(){$(".lightboxMask").css({"width":lW});
$(".lightboxMask").css({"height":lH});
$(".lightboxMask").show();
myLightbox2.show();
$("select").hide();
$(".lightbox select").show();
},0);
if(whichLightbox=="news_signUp"){cmCreatePageviewTag("email sign up","my r&eacute;vive");
}return false;
}function closeLightbox(){$(".lightboxMask").hide();
$(".lightbox").hide();
setTabIndex();
}function closeLightboxFromIframe(whichLightbox){$("#"+whichLightbox,top.document).hide();
parent.document.getElementById("lightboxMask").style.display="none";
setTabIndex();
}function checkGiftMessage(inputMsg){if($(inputMsg).val()=="on"){$(inputMsg).val("off");
document.getElementById("t_message").disabled=true;
}else{$(inputMsg).val("on");
document.getElementById("t_message").disabled=false;
}return false;
}function textCounter(field,cntfield,maxlimit){if(field.value.length>maxlimit){field.value=field.value.substring(0,maxlimit);
}else{cntfield.html(maxlimit-field.value.length);
}}function openFAQ(which){faqID=$(which).attr("id");
faqID=faqID.substring(3,5);
contentID=$("#faqContent"+faqID);
$(".faqContent").css({"display":"none"});
$(contentID).slideDown("slow");
return false;
}function checkForm(e){if(firefox){if(e.keyCode==13){openSearch();
}else{return false;
}}else{e=window.event;
if(e.keyCode==13){openSearch();
}else{return false;
}}}function openSearch(){$(".mm").hide();
myValue=$("#topNavSearchForm input").val();
$("#searchOpen").removeClass("outOfTheWay");
$("#blockCustomer").removeClass("outOfTheWay");
$("#blockLaura").removeClass("outOfTheWay");
$("#topNavCustomerServiceItem a").addClass("menuDisabled");
$("#topNavMyLauraMercierItem a").addClass("menuDisabled");
$("#searchOpen .keywords input").val(myValue);
$("#i_search").focus();
}function closeSearch(){$(".mm").hide();
$("#blockCustomer").addClass("outOfTheWay");
$("#blockLaura").addClass("outOfTheWay");
$("#searchOpen").addClass("outOfTheWay");
$("#topNavCustomerServiceItem a").removeClass("menuDisabled");
$("#topNavMyLauraMercierItem a").removeClass("menuDisabled");
}function closeSearch2(){$("#blockCustomer").addClass("outOfTheWay");
$("#blockLaura").addClass("outOfTheWay");
$("#searchOpen").addClass("outOfTheWay");
$("#topNavCustomerServiceItem a").removeClass("menuDisabled");
$("#topNavMyLauraMercierItem a").removeClass("menuDisabled");
}function switchCustomer(){if($("#customerOpen").hasClass("outOfTheWay")){$("#topNavMyLauraMercierItem a").addClass("menuDisabled");
$("#blockLaura").removeClass("outOfTheWay");
$("#customerOpen").removeClass("outOfTheWay");
$("#topNavCustomerServiceItem a").addClass("open");
$("#blockSearch").removeClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","-468px 0");
$("#topNavSearchForm input").attr({"disabled":"disabled"});
$("#topNavSearchForm .bt_goSearch").css("background-position","-675px 0");
}else{$("#customerOpen").addClass("outOfTheWay");
$("#topNavCustomerServiceItem a").removeClass("open");
$("#topNavMyLauraMercierItem a").removeClass("menuDisabled");
$(".btn_block").addClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","0 0");
$("#topNavSearchForm input").attr({"disabled":false});
$("#topNavSearchForm .bt_goSearch").css("background-position","-207px 0");
}$(".mm").hide();
}function closeCustomer(){$("#customerOpen").addClass("outOfTheWay");
$("#topNavCustomerServiceItem a").removeClass("open");
$("#topNavMyLauraMercierItem a").removeClass("menuDisabled");
$(".btn_block").addClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","0 0");
$("#topNavSearchForm input").attr({"disabled":false});
$("#topNavSearchForm .bt_goSearch").css("background-position","-207px 0");
}function switchLaura(){if($("#lauraOpen").hasClass("outOfTheWay")){$("#lauraOpen").removeClass("outOfTheWay");
$("#topNavCustomerServiceItem a").addClass("menuDisabled");
$("#blockCustomer").removeClass("outOfTheWay");
$("#topNavMyLauraMercierItem a").addClass("open");
$("#blockSearch").removeClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","-468px 0");
$("#topNavSearchForm input").attr({"disabled":"disabled"});
$("#topNavSearchForm .bt_goSearch").css("background-position","-675px 0");
}else{$("#lauraOpen").addClass("outOfTheWay");
$("#topNavMyLauraMercierItem a").removeClass("open");
$("#topNavCustomerServiceItem a").removeClass("menuDisabled");
$(".btn_block").addClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","0 0");
$("#topNavSearchForm input").attr({"disabled":false});
$("#topNavSearchForm .bt_goSearch").css("background-position","-207px 0");
}$(".mm").hide();
}function closeLaura(){$("#lauraOpen").addClass("outOfTheWay");
$("#topNavMyLauraMercierItem a").removeClass("open");
$("#topNavCustomerServiceItem a").removeClass("menuDisabled");
$(".btn_block").addClass("outOfTheWay");
$("#topNavSearchForm input").css("background-position","0 0");
$("#topNavSearchForm input").attr({"disabled":false});
$("#topNavSearchForm .bt_goSearch").css("background-position","-207px 0");
}function assignLiListing(){nbCat=$(".lProducts li").size();
nbLeft=nbCat%2;
$(".lProducts li").addClass("middle");
if(nbCat<=2){$(".lProducts li:first").addClass("lastOfLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("lastOfLine top").removeClass("middle");
}else{if(nbCat<=4){$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().next().addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:first").next().next().next().addClass("bottomLine last bottom").removeClass("middle");
}else{if(nbCat<=6){$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
}else{if(nbCat<=8){$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
}else{if(nbCat<=10){$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
}else{if(nbCat<=12){$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:first").next().next().next().next().next().next().next().next().next().next().next().addClass("bottomLine last bottom").removeClass("middle");
}}}}}}$(".lProducts li").addClass("oneProduct");
switch(nbLeft){case 0:$(".lProducts li:last").addClass("bottomLine last bottom").removeClass("middle");
$(".lProducts li:last").prev().addClass("bottomLine last bottom").removeClass("middle");
break;
case 1:$(".lProducts li:last").addClass("bottomLine last bottom").removeClass("middle");
break;
}$(".lProducts li:first").addClass("topLine top").removeClass("middle");
$(".lProducts li:first").next().addClass("topLine top").removeClass("middle");
return false;
}function assignLiMakeup(){nbCat=$(".lCat li").size();
nbLeft=nbCat%3;
if(nbCat<=3){$(".lCat li:first").next().next().addClass("lastOfLine");
}else{if(nbCat<=6){$(".lCat li:first").addClass("topLine");
$(".lCat li:first").next().addClass("topLine");
$(".lCat li:first").next().next().addClass("topLine");
$(".lCat li:first").next().next().addClass("lastOfLine");
$(".lCat li:first").next().next().next().next().next().addClass("lastOfLine");
}else{if(nbCat<=9){$(".lCat li:first").addClass("topLine");
$(".lCat li:first").next().addClass("topLine");
$(".lCat li:first").next().next().addClass("topLine");
$(".lCat li:first").next().next().addClass("lastOfLine");
$(".lCat li:first").next().next().next().next().next().addClass("lastOfLine");
$(".lCat li:first").next().next().next().next().next().next().next().next().addClass("lastOfLine");
}}}switch(nbLeft){case 0:$(".lCat li:last").addClass("bottomLine");
$(".lCat li:last").prev().addClass("bottomLine");
$(".lCat li:last").prev().prev().addClass("bottomLine");
break;
case 1:$(".lCat li:last").addClass("bottomLine");
break;
case 2:$(".lCat li:last").addClass("bottomLine");
$(".lCat li:last").prev().addClass("bottomLine");
break;
}return false;
}function assignLiArtists(){$(".lArtists li:first").addClass("topLine");
$(".lArtists li:first").next().addClass("topLine");
$(".lArtists li:first").next().next().addClass("topLine lastOfLine");
$(".lArtists li:first").next().next().next().next().next().addClass("lastOfLine");
$(".lArtists li:first").next().next().next().next().next().next().next().next().addClass("lastOfLine");
$(".lArtists li:last").addClass("bottomLine");
$(".lArtists li:last").prev().prev().addClass("bottomLine lastOfLine");
$(".lArtists li:last").prev().addClass("bottomLine");
return false;
}function assignLiTips(){$(".lTips li:first").addClass("topLine");
$(".lTips li:first").next().addClass("topLine");
$(".lTips li:first").next().next().addClass("topLine lastOfLine");
$(".lTips li:last").addClass("bottomLine lastOfLine");
$(".lTips li:last").prev().addClass("bottomLine");
$(".lTips li:last").prev().prev().addClass("bottomLine");
return false;
}function calculateBread(){$(".breadcrumbs li a").each(function(){var bLength=$(this).text().length;
if(bLength>20){myLi=$(this).text().substring(0,20);
myLiFinal=myLi+"[...]";
$(this).html(myLiFinal);
}});
$(".breadcrumbs li.last").each(function(){var bLength=$(this).text().length;
if(bLength>20){myLi=$(this).text().substring(0,20);
myLiFinal=myLi+"[...]";
$(this).html(myLiFinal);
}});
}function setMM(){setLeftNav();
var mmArray=$(".mm");
$.each(mmArray,function(i){if($(mmArray[i]).find(".col").size()==0){whichMMEmpty=$(this).attr("id");
$("#"+whichMMEmpty).find(".top").css({"width":0});
$("#"+whichMMEmpty).find(".middle").css({"width":0});
$("#"+whichMMEmpty).find(".bottom").css({"width":0});
return true;
}nbCol=$(this).find(".col").size();
colWidth=parseInt($(this).find(".col:first").css("width"));
colMarginR=parseInt($(this).find(".col:first").css("marginRight"));
liningPaddingL=parseInt($(this).find(".lining").css("paddingLeft"));
liningPaddingR=parseInt($(this).find(".lining").css("paddingRight"));
totalWidth=(colWidth*nbCol)+(colMarginR*nbCol)+liningPaddingL+liningPaddingR;
if($(this).find(".educationalColWithLeftBorder").size()>0){colPaddingL=parseInt($(this).find(".educationalColWithLeftBorder").css("paddingLeft"));
totalWidth=totalWidth+colPaddingL;
}$(this).css({"width":totalWidth});
colHeight=parseInt($(this).find(".lining").height());
liningPaddingB=parseInt($(this).find(".lining").css("paddingBottom"));
totalHeight=colHeight+liningPaddingB+35;
if($(this).find(".wrapPromo").length>0){promoHeight=parseInt($(this).find(".wrapPromo").css("height"));
promoMarginT=parseInt($(this).find(".wrapPromo").css("marginTop"));
promoMarginB=parseInt($(this).find(".wrapPromo").css("marginBottom"));
totalHeight=totalHeight+promoHeight+promoMarginT+promoMarginB+1;
}if(totalHeight>430){totalHeight=430;
}if(totalHeight<430){totalHeight=430;
}$(this).css({"height":totalHeight});
if($(this).find(".educationalColWithLeftBorder").size()>0){$(".educationalColWithLeftBorder").css({"height":(totalHeight-150)});
}});
return false;
}function openMM(whichMM,top){$(".mm").hide();
var myTop=top-92;
myMM="#mm"+whichMM;
$(myMM).css("top",myTop);
$(myMM).show();
return false;
}function closeMM(whichMM){myMM="#mm"+whichMM;
$(".mm").hide();
$(myMM).hide();
return false;
}function setCarousel(looksTabIdx){itemSelected=$(".carousel ul li:first");
for(var ii=2;
ii<=looksTabIdx;
ii++){itemSelected=itemSelected.next();
}itemSelected.addClass("selected");
idSelected=itemSelected.attr("id");
idSelected=idSelected.substring(3,6);
showPanel(idSelected);
if(looksTabIdx>4){moveCarouselR(166*(looksTabIdx-4));
}}function moveCarouselL(value){leftPos=parseInt($(".carousel ul").css("left"));
$(".carousel .btRight").addClass("btActive");
if(leftPos<0){moveLeft=leftPos+value;
$(".carousel ul").animate({left:(moveLeft+"px")},400);
}else{$(".carousel ul").animate({left:(-cTotalWidth+"px")},400);
}return false;
}function moveCarouselR(value){leftPos=parseInt($(".carousel ul").css("left"));
$(".carousel .btLeft").addClass("btActive");
if(leftPos>-cTotalWidth){moveLeft=leftPos-value;
$(".carousel ul").animate({left:(moveLeft+"px")},400);
}else{$(".carousel ul").animate({left:"0px"},400);
}return false;
}function moveCarouselLi(whichLi){$(".carousel ul li").removeClass("selected");
whichLi.addClass("selected");
id=whichLi.attr("id");
id=id.substring(3,6);
showPanel(id);
return false;
}function setTabs(){$(".tabs li:last").addClass("last");
}function showPanel(id){idPanel="#look"+id;
$(".panel").addClass("outOfTheWay");
$(idPanel).removeClass("outOfTheWay");
reset_page();
return false;
}function resetTabs(){$(".tabs").removeClass("tab01Active tab02Active tab03Active tab04Active tab05Active tab06Active");
$(".tabsContent").removeClass("tab01Active tab02Active tab03Active tab04Active tab05Active tab06Active");
reset_page();
}function vScrollDown(whichScroll){nbItems=$("#"+whichScroll+" ul li").size();
nbItemsHidden=$("#"+whichScroll+" ul li.outOfTheWay").size();
itemHeight=parseInt($("#"+whichScroll+" #mask ul li").css("height"));
totalHeight=-((nbItems-nbItemsHidden)*itemHeight)+714;
if(parseInt($("#"+whichScroll+" ul").css("top"))>totalHeight){$("#"+whichScroll+" .bt_down").removeClass("disabled");
value="-="+itemHeight;
$("#"+whichScroll+" ul").animate({"top":value},"slow");
$("#"+whichScroll+" .bt_up").removeClass("disabled");
}else{$("#"+whichScroll+" .bt_down").addClass("disabled");
}return false;
}function vScrollUp(whichScroll){if(parseInt($("#"+whichScroll+" ul").css("top"))<"0"){$("#"+whichScroll+" .bt_up").removeClass("disabled");
value="+="+itemHeight;
$("#"+whichScroll+" ul").animate({"top":value},"slow");
$("#"+whichScroll+" .bt_down").removeClass("disabled");
}else{$("#"+whichScroll+" .bt_up").addClass("disabled");
}return false;
}function assignColor(which,rgb1,rgb2,rgb3,rgb4){$("#"+which+" .color1").css({"background-color":rgb1});
if(rgb2=="#null"){rgb2=rgb1;
rgb3=rgb1;
rgb4=rgb1;
}$("#"+which+" .color2").css({"background-color":rgb2});
$("#"+which+" .color3").css({"background-color":rgb3});
$("#"+which+" .color4").css({"background-color":rgb4});
return false;
}function update_page(whichPart,url){if($(".content").find(".tabsContent").size()!=0){whichTabStr=$("ul.tabsContent").attr("className");
whichTab=whichTabStr.substr(15,2);
whichTab="tabContent"+whichTab;
$("#"+whichTab+" .c").addClass("outOfTheWay");
$("#"+whichTab+" .c_"+whichPart).removeClass("outOfTheWay");
$("#"+whichTab+" .lRelated").css({"top":0});
if($("#"+whichTab+" .c:not('.outOfTheWay')").size()<8){$(".bt_down").addClass("disabled");
}$("#"+whichTab+" .placeholder").append('<img src="'+url+'" />');
$("#"+whichTab+" .placeholder").fadeIn("slow");
}else{$(".c").addClass("outOfTheWay");
$(".c_"+whichPart).removeClass("outOfTheWay");
$(".lRelated").css({"top":0});
if($(".c:not('.outOfTheWay')").size()<8){$(".bt_down").addClass("disabled");
}$(".placeholder").append('<img src="'+url+'" />');
$(".placeholder").fadeIn("slow");
}$(".bt_buyEffect_"+whichPart).removeClass("outOfTheWay");
$(".bt_buyLook").addClass("outOfTheWay");
}function reset_page(){$(".c").removeClass("outOfTheWay");
$(".col2 .c").addClass("outOfTheWay");
$(".col2 .c_intro").removeClass("outOfTheWay");
$(".placeholder").fadeOut("slow");
setTimeout(function(){$(".placeholder img").remove();
},500);
$(".bt_buyLook").removeClass("outOfTheWay");
$(".bt_buyEffect").addClass("outOfTheWay");
$(".bt_down").removeClass("disabled");
}function show_events(index){$(".evts").addClass("outOfTheWay");
$(".evts_"+index).removeClass("outOfTheWay");
}function openTT(){if($(".content .tt").hasClass("outOfTheWay")){$(".content .tt").removeClass("outOfTheWay");
}else{$(".content .tt").addClass("outOfTheWay");
}}function openTTPromo(){var promoTop=$(".mainNav .promo .cta").offset();
promoTop=(promoTop.top-65);
$("#ttPromo").css({"top":promoTop});
if($("#ttPromo").hasClass("outOfTheWay")){$("#ttPromo").removeClass("outOfTheWay");
}else{$("#ttPromo").addClass("outOfTheWay");
}}function setTabIndex(){var tabindex=1;
tabElmntArray=$(".content input, .content select, .content textarea, .content button, .content a");
tabElmntArray.each(function(){$(this).addClass("indexable");
});
elmntArray=$(".indexable");
elmntArray.each(function(){if(this.type!="hidden"){var $input=$(this);
$input.attr("tabindex",tabindex);
tabindex++;
}});
}function tabIndexLightbox(){$(".indexable").attr("tabindex",0);
$(".indexable").removeClass("indexable");
var tabindex=1;
tabElmntLArray=$(".inIframe input, .inIframe select, .inIframe textarea, .inIframe button, .inIframe a");
tabElmntLArray.each(function(){$(this).addClass("indexable");
});
elmntLArray=$(".indexable");
elmntLArray.each(function(){if(this.type!="hidden"){var $input=$(this);
$input.attr("tabindex",tabindex);
tabindex++;
}});
}function selectAllNewsletterCategories(form,input){for(ii=0;
ii<form.elements.length;
ii++){var element=form.elements[ii];
var id=element.id;
if(id.indexOf("-interest-")!=-1){if(input.checked){element.checked=true;
}else{element.checked=false;
}}}}var iFrames=document.getElementsByTagName("iframe");
function iResize(){for(var i=0,j=iFrames.length;
i<j;
i++){iFrames[i].style.height=iFrames[i].contentWindow.document.body.offsetHeight+"px";
}}$("iframe").load(function(){this.style.height=this.contentWindow.document.body.offsetHeight+"px";
});
var iFrames2=parent.document.getElementsByTagName("iframe");
function iResize2(){for(var i=0,j=iFrames2.length;
i<j;
i++){iFrames2[i].style.height=iFrames2[i].contentWindow.document.body.offsetHeight+"px";
}}function changeParentURL(myURL){parent.location.href=myURL;
}function setLeftNav(){return false;
}function checkCC(event){if(event=="show"){$("#billingInfo .inputValue").parent().parent().removeClass("outOfTheWay");
$("#billingInfo input").parent().parent().removeClass("outOfTheWay");
$("#billingInfo select").parent().parent().removeClass("outOfTheWay");
$("#billingInfo .emailInput").parent().parent().removeClass("outOfTheWay");
}else{$("#billingInfo .inputValue").parent().parent().addClass("outOfTheWay");
$("#billingInfo input").parent().parent().addClass("outOfTheWay");
$("#billingInfo select").parent().parent().addClass("outOfTheWay");
$("#billingInfo .emailInput").parent().parent().removeClass("outOfTheWay");
}return false;
}function checkCCValue(){var count=0;
$("#ccInfo input:not(:hidden)").each(function(){if($(this).val()!=""){count=count+1;
}});
$("#ccInfo select:not(:hidden)").each(function(){if($(this).attr("selectedIndex")!=0){count=count+1;
}});
if(count>0){setTimeout("checkCC('show')",500);
}else{setTimeout("checkCC('hide')",500);
}}function showSwatch(which){$(which).children().removeClass("outOfTheWay");
return false;
}function hideSwatch(which){if($(which).hasClass("swatchB")){$(which).addClass("outOfTheWay");
}else{$(which).find(".swatchB").addClass("outOfTheWay");
}return false;
}function readFull(whichOne){var whichDiv=$(whichOne).parents().attr("id");
var pHeightFinal=0;
$(whichOne).prev().find("p").each(function(){pHeight=$(this).height();
pHeightFinal=pHeightFinal+pHeight+10;
});
$(whichOne).prev().find("ul").each(function(){ulHeight=$(this).height();
pHeightFinal=pHeightFinal+ulHeight+10;
});
$("#"+whichDiv+" .maskContent").height(pHeightFinal);
$("#"+whichDiv+" .bt_readFull").addClass("outOfTheWay");
$("#"+whichDiv+" .bt_closeFull").removeClass("outOfTheWay");
return false;
}function closeFull(whichOne){var whichDiv=$(whichOne).parents().attr("id");
$("#"+whichDiv+" .maskContent").height("70px");
$("#"+whichDiv+" .bt_closeFull").addClass("outOfTheWay");
$("#"+whichDiv+" .bt_readFull").removeClass("outOfTheWay");
return false;
}$(function(){$("body").removeClass("noJs");
$("ul.mainNav li a, ul.mainNav li span").bind("mouseover",function(){idMenu=$(this).parent().attr("id");
idMM=idMenu.substring(4,6);
if($("#mm"+idMM).find(".isEmptyMenuItem").text().length==0){if(jQuery(".mm:visible").length){jQuery(".mm").hide();
myMM="#mm"+idMM;
jQuery(myMM).show();
jQuery("#menu"+idMM+":not(.menuoverActive)").attr("className","menuover");
closeSearch2();
closeLaura();
closeCustomer();
}else{myMM="#mm"+idMM;
jQuery(myMM).show();
jQuery("#menu"+idMM+":not(.menuoverActive)").attr("className","menuover");
closeSearch2();
closeLaura();
closeCustomer();
return false;
}}});
$("ul.mainNav li a, ul.mainNav li span, .mm").bind("mouseout",function(event){if($("#mm"+idMM).find(".isEmptyMenuItem").text().length==0){if((event.pageX>=jQuery(".mm:visible").offset().left&&event.pageX<=(jQuery(".mm:visible").offset().left+jQuery(".mm:visible").outerWidth()))&&(event.pageY>=jQuery(".mm:visible").offset().top&&event.pageY<=(jQuery(".mm:visible").offset().top+jQuery(".mm:visible").outerHeight()))){return false;
}else{jQuery(".menuover").attr("className","menuoff");
jQuery(".mm").hide();
}}});
$("#topNavSearchItem input").focus(function(){openSearch();
});
$("#topNavSearchItem input").blur(function(){if(!$(this).val()){$(this).css("background-position","0 0");
}});
$("#signIn #i_signUp").focus(function(){$(this).parent().parent().css("background-image","url(images/leftNav/bg_signInOn.jpg)");
$(this).parent().next().show();
});
$("#signIn #i_signUp").blur(function(){if(!$(this).val()){$(this).parent().parent().css("background-image","url(images/leftNav/bg_signIn.jpg)");
}});
$("#topNavSearchForm .bt_goSearch").click(function(){openSearch();
});
$("#searchOpen").bind("mouseleave",function(){setTimeout(closeSearch,300);
});
$("#topNavMyLauraMercierItem a:first").bind("mouseover",function(){switchLaura();
});
$("#lauraOpen").bind("mouseleave",function(){setTimeout(closeLaura,300);
});
$("#topNavCustomerServiceItem a:first").bind("mouseover",function(){switchCustomer();
});
$("#customerOpen").bind("mouseleave",function(){setTimeout(closeCustomer,300);
});
$(".lightboxMask").click(function(){closeLightbox();
});
$(".bt_share").bind("click",function(){$("#share").removeClass("outOfTheWay");
return false;
});
$("#share").bind("mouseleave",function(){$("#share").addClass("outOfTheWay");
return false;
});
$(".bt_seeColors").click(function(){$("#allColors").removeClass("outOfTheWay");
$("#allColors").slideDown("fast");
return false;
});
$(".bt_continueColors").click(function(){$("#allColors").slideUp("fast");
return false;
});
$(".tabs li a").click(function(){resetTabs();
tabID=$(this).parent().attr("id");
myID=tabID.substring(3,5);
$(this).parent().parent().addClass("tab"+myID+"Active");
$(".tabsContent").addClass("tab"+myID+"Active");
return false;
});
$("#bt_promoCode").click(function(){$("#bt_promoCode").addClass("outOfTheWay");
$("#promoCodeInput").removeClass("outOfTheWay");
return false;
});
$("#promoCodeInput a").click(function(){$("#promoCodeInput").addClass("outOfTheWay");
promoCodeNo=$("#i_promoCode").val();
$("#promoCodeMsg").removeClass("outOfTheWay");
$("#promoCodeMsg #noPromoCode").html(promoCodeNo);
return false;
});
$("#promoCodeMsg a").click(function(){$("#promoCodeMsg").addClass("outOfTheWay");
$(".lColors li a").click(function(){$(".lColors li").removeClass("selected");
colorId=$(this).parent().attr("id");
$(".lColors  #"+colorId).addClass("selected");
$("#allColors .lColors  #"+colorId).addClass("selected");
$("#allColors").slideUp("fast");
return false;
});
$("#promoCodeInput").removeClass("outOfTheWay");
return false;
});
$(".lProducts > li:nth-child(odd)").addClass("even");
$(".vScroll ul").css({"top":"0px"});
$(".vScroll .bt_down").click(function(){scrollID=$(this).parent().attr("id");
vScrollDown(scrollID);
});
$(".vScroll .bt_up").click(function(){scrollID=$(this).parent().attr("id");
vScrollUp(scrollID);
});
$(".widget .bt_product").click(function(){if($(".widget .leftSide").hasClass("inactive")){$(".widget .rightSide").removeClass("active");
$(".widget .rightSide").addClass("inactive");
$(".widget .leftSide").removeClass("inactive");
$(".widget .leftSide").addClass("active");
}else{}return false;
});
$(".widget .bt_effect").click(function(){if($(".widget .rightSide").hasClass("inactive")){$(".widget .leftSide").removeClass("active");
$(".widget .leftSide").addClass("inactive");
$(".widget .rightSide").removeClass("inactive");
$(".widget .rightSide").addClass("active");
}else{}return false;
});
$(".carousel .btRight").click(function(){moveCarouselR(cItemWidth);
});
$(".carousel .btLeft").click(function(){moveCarouselL(cItemWidth);
});
$(".carousel li").click(function(){moveCarouselLi($(this));
});
$(".lFAQ a").click(function(){openFAQ(this);
});
$(".lBt li a").click(function(){$(".lBt li").removeClass("active");
$(this).parent().addClass("active");
btID=$(this).parent().attr("id");
btIDF=btID.substring(2,4);
contentID="#content"+btIDF;
$(".lContentBt li").removeClass("active");
$(contentID).addClass("active");
});
$(".t_tt").bind("mouseenter",function(){openTT();
});
$(".t_tt").bind("mouseleave",function(){openTT();
});
$(".promo .bt_tt").bind("mouseenter",function(){openTTPromo();
});
$(".promo .bt_tt").bind("mouseleave",function(){openTTPromo();
});
$(".bt_close").click(function(){closeLightbox();
});
$(".bt_closeIframe").click(function(){closeLightboxFromIframe("news_signUp");
});
$("#ccInfo input, #ccInfo select").each(function(){$(this).bind("change",function(){checkCCValue();
});
$(this).bind("keyup",function(){checkCCValue();
});
});
$(".oneProduct .bt_seeColors").click(function(){allColorsId=$(this).prev().attr("id");
allColorsId=allColorsId.substring(0,10);
$("#"+allColorsId).slideDown("fast");
$("#"+allColorsId).removeClass("outOfTheWay");
return false;
});
$(".oneProduct .bt_continueColors").click(function(){allColorsId=$(this).prev().parent().attr("id");
allColorsId=allColorsId.substring(0,10);
$("#"+allColorsId).slideUp("fast");
return false;
});
$(".lColors li").mouseover(function(){showSwatch(this);
});
$(".lColors li").bind("mouseleave",function(){hideSwatch(this);
});
$(".lColors li .swatchB").bind("mouseenter",function(){setTimeout(hideSwatch,300,this);
});
$(".bt_readFull").click(function(){readFull(this);
});
$(".bt_closeFull").click(function(){closeFull(this);
});
nbCItems=$(".carousel ul li").size();
cItemWidth=parseInt($(".carousel ul li img").css("width"))+parseInt($(".carousel ul li").css("marginRight"))+2;
cTotalWidth=((nbCItems-4)*cItemWidth);
if($.browser.msie&&$.browser.version<=6){}else{}});

