$(function(){banner();masks();rels();watermark();buyDetails();excludeProduct();navMenu();tooltips();defaultCarousel();easyPurchase();productGallery();modals();tabs();addThisShareProduct();textareaLimiter();accordions();productComment();combinedPurchase();departmentNav();newsRegister();alreadyRegistered();firstAccess();firstAccess2();myProfile();buyDelivery();paymentMethods();myOrders();tellMe();siteMap();easyTrade();Chat();MailFriend();excludeLookItem();albumDetail();lookNav();shoppingCart()});var isOpera=navigator.userAgent.toLowerCase().indexOf("opera")>0,isKonqueror=navigator.userAgent.toLowerCase().indexOf("konqueror")>0,isIE=!isOpera&&navigator.userAgent.toLowerCase().indexOf("msie")>0,isMozilla=!isOpera&&!isKonqueror&&!isIE,checkRequestDynamicFilter=0,controlCF=0,controlCFK=0,checkIsLook=0,vetProLook=[],vetProOutLook=[],totalPriceLook=0,parCreditCartLook=0,parRennerCartLook=0,pt,compraFacil=0,compraDetail=0,isCleanClick=1,isMobileDevice=0,PreLoadImgs=[],LoadersImgs=[],PreLoadListPointer=0;jQuery.createXMLDocument=function(b){var c=navigator.appName,a;if(c=="Microsoft Internet Explorer"){a=new ActiveXObject("Microsoft.XMLDOM");a.async="false";a.loadXML(b)}else a=(new DOMParser).parseFromString(b,"text/xml");return a};function banner(){$("#mainHighlightHome").hover(function(){$(this).find(".mainAbsoluteHome").height(367)},function(){$(this).find(".mainAbsoluteHome").height(367)});$("#mainHighlight").hover(function(){$(this).find(".mainAbsolute").height(382)},function(){$(this).find(".mainAbsolute").height(232)})}function masks(){$("input:text").setMask();$(".number").onlyNumber();$(".letter").onlyLetter()}function rels(){$("a[rel*=external]").attr("target","_blank");$("a[rel*=print]").click(function(){print();return false})}function watermark(){$(".watermark").focus(function(){$(this).val()==$(this).attr("title")&&$(this).val("")}).blur(function(){$(this).val()==""&&$(this).val(this.title)}).each(function(){$(this).attr("title",$(this).val())})}function tooltips(){$("a.tooltip").each(function(){$(this).tooltip({top:-84,left:0,extraClass:"fancy",fade:true,showURL:false,track:true,extraClass:"left",opacity:100})});$(".productColors a.tooltipCombo").click(function(a){controlCF=1;a.preventDefault();doChangeColorCombo($(this))});$(".productColors .kit a.tooltip").click(function(a){controlCFK=1;a.preventDefault();doChangeColorKit($(this))});$(".frontTooltip").click(function(a){controlCF=1;a.preventDefault();doChangeColor($(this))});$(".frontTooltipKit").click(function(a){controlCFK=1;a.preventDefault();doChangeColorKit($(this))});$(".productColors a.tooltip").click(function(a){if(controlCF==1)controlCF=0;else if(controlCFK==1)controlCFK=0;else{a.preventDefault();doChangeColor($(this))}})}function defaultCarousel(){$(".carouselContainer .carousel").jCarouselLite({btnNext:".carouselContainer .next",btnPrev:".carouselContainer .prev",circular:false,speed:400,scroll:1,visible:6});$(".carouselContainer .carousel").touchwipe({wipeLeft:function(){$(".carouselContainer .next").trigger("click")},wipeRight:function(){$(".carouselContainer .prev").trigger("click")}})}function easyPurchase(){var a=$(".productsContainer li, .combinations ul li");a.hover(function(){$(".easyPurchase",a).stop(1,1);$(this).find(".easyPurchase").fadeIn(250)},function(){$(".easyPurchase",a).stop(1,1);$(this).find(".easyPurchase").fadeOut(250)});$(".modalEasyPurchase .rightCol .productColors a").click(function(){$(".modalEasyPurchase .rightCol .productColors a.active").removeClass("active");$(this).addClass("active");return false});$(".modalEasyPurchase form").submit(function(){if(validityEasyPurchase()){$(".modalEasyPurchase .product").addClass("hide");$(".modalEasyPurchase .bagResume").removeClass("hide")}else $(".modalEasyPurchase .product .info").fadeIn();return false});$(".modalEasyPurchase .addToMyCart").click(function(c){c.preventDefault();if(validityEasyPurchase2($(this))){$(this).removeClass("addToMyCart");$(this).addClass("addToMyCartCarregando");if(compraFacil==0){compraFacil=1;var a=$(this).attr("id").replace("buy",""),b=$.trim($("#product"+a+" #buyParams"+a).text()),d=explodeAnchor(b);SetOmniSProduct(d.pid);trackOmniLink("CompraFacil","Checkout","event19");addToCartOmniCall();doAdd2Cart($(this))}}else $(".modalEasyPurchase .product .info").fadeIn();return false});$('a[id="buy"]').click(function(){if(validityEasyPurchase2($(this))){$(this).removeClass("buy");$(this).addClass("addToMyCartCarregandoDetail");doDetailAdd2Cart($(this))}else $(".info").fadeIn();return false});$('a[id="sendme"]').click(function(){if(validityEasyPurchase3($(this))){var a=$("select[class^='size']").val();a=a.split("&");$("#sizeSendMe").html(a[4].replace("size=",""));$("#rennerCodeSendMe").html(a[1].replace("sku=",""));$("#variantSendMe").html(a[2].replace("vid=",""));$(".modalDontFind").trigger("click")}return false});$('a[id="buyLook"]').click(function(){doLookAdd2Cart();return false});$(".modalEasyPurchase .close").live("click",function(){closeCF();checkHipercardRadioButton()});$(".modalEasyPurchase select[id^='qty']").change(function(){doChangeQtyEasyPurchase($(this))})}function closeCF(){$.fancybox.close();$(".modalEasyPurchase .product").removeClass("hide");$(".modalEasyPurchase .bagResume").addClass("hide");$(".modalEasyPurchase .product .info").hide()}function validityEasyPurchase(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".modalEasyPurchase select").require();var a=$.validity.end();return a.valid}function validityEasyPurchase2(c){var b=c.attr("id").replace("buy","");$.validity.start();$.validity.setup({outputMode:"summary"});$("#product"+b+" select[id^='size']").require();var a=$.validity.end();return a.valid}function validityEasyPurchase3(c){var b=c.attr("id").replace("sendme","");$.validity.start();$.validity.setup({outputMode:"summary"});$("#product"+b+" select[id^='size']").require();var a=$.validity.end();return a.valid}function closeBuyDetails(){$(".controlPanel .myCart").slideUp(500).removeClass("active")}function buyDetails(){var a;$(".controlPanel .userPanel li.cart a.myBuy, .controlPanel .myCart").mouseenter(function(){if($(".controlPanel .excludeItem").length>0){clearTimeout(a);var b=$(this);b.addClass("active");$(".controlPanel .myCart").addClass("active").slideDown()}});$(".controlPanel .userPanel li.cart").mouseleave(function(){var b=$(this);b.removeClass("active");a=setTimeout(function(){closeBuyDetails()},1500)})}function excludeProduct(){var a;$(".controlPanel .excludeItem").click(function(){$(this).parent().fadeTo(400,0,function(){$(".controlPanel .excludeItem").length==1&&closeBuyDetails();$(this).slideUp(400,function(){$(this).remove()})});removeItemFromMinicart($(this));return false})}function excludeLookItem(){var a;$(".separator:visible:last").hide();$(".appearList").click(function(){$(".ColorsAndPrices li").fadeTo(400,0,function(){$(".excludeLookItem, .ColorsAndPrices li, .separator").fadeIn("fast")});$(".ColorsAndPrices li").fadeTo(400,1);$(".separator:visible:last").hide()});$(".excludeLookItem").click(function(){$(this).parent().fadeTo(400,0,function(){$(".excludeLookItem:visible").length==2&&$(".excludeLookItem").fadeOut("fast");$(this).slideUp(400,function(){$(".excludeLookItem:visible:last").parent().find(".separator ").slideUp(80)})});var b=$(this).parent().attr("id");b=b.split("_");vetProOutLook.push(b[1]);var c=$('select[id="size'+b[1]+'"]').val();c=c.split("&");var a=c[3].replace("price=","");a=a.replace(",",".");a=parseFloat(a);totalPriceLook=totalPriceLook-a;totalPriceLook=totalPriceLook.toFixed(2);var g=document.getElementById("RennerMinInstallments").innerHTML,f=document.getElementById("CreditMinInstallments").innerHTML,d=numberParc(totalPriceLook.toString().replace(".",","),parseFloat(g)),e=valParc(totalPriceLook.toString().replace(".",","),parseFloat(g));$("#nroParRennerCart").html(d);$("#parRennerCart").html(e);d=numberParc(totalPriceLook.toString().replace(".",","),parseFloat(f));e=valParc(totalPriceLook.toString().replace(".",","),parseFloat(f));$("#nroParCreditCart").html(d);$("#parCreditCart").html(e);$("#totalPrice").html(totalPriceLook.toString().replace(".",","));return false})}function navMenu(){var a=$("#nav .menu li.containSubMenu");a.each(function(g){var b=$(this).find("ul.subMenu"),f=$(this).find("a.hasSubMenu"),c=$("a.hasSubMenu",a).index(f),d=97,e=975;b.addClass("width"+b.find("li").length);g>1&&b.width()>e-c*d&&b.css("right",0)});a.mouseenter(function(){var b=$(this);$(".myCart:visible")&&closeBuyDetails();if(b.find("ul.subMenu").length){b.find(".hasSubMenu").addClass("active");$("ul.subMenu",a).stop(1,1);b.find("ul.subMenu").fadeIn(250)}}).mouseleave(function(){var b=$(this);$("ul.subMenu",a).stop(1,1);b.find("ul.subMenu").fadeOut(250);$("#nav .menu li a.active").removeClass("active")});$(".menuHome h3").click(function(){$(this).attr("rel")!="undefined"&&window.open($(this).attr("rel"),"_self")})}function productGallery(){$(".productGallery .carouselGallery .carousel li a").click(function(){var a=$(this),c=a.attr("rel"),b=a.parents(".productGallery").find(".photoInside"),d=a.parents(".productGallery").find(".loader");a.parents(".carousel").find("a.active").removeClass("active");a.addClass("active");$(".active",b).removeClass("active").fadeOut(250,function(){d.fadeOut(250);$("."+c,b).fadeIn(250).addClass("active");$("."+c,b).attr("class");$(".overlay").fadeOut()});return false});$(".selectMedia a#morePhotos").live("click",function(){var a=$(this);a.parents(".selectMedia").find("a.active").removeClass("active");a.addClass("active");$(".productVideo").addClass("hide");toggleCarousel(1,a.parents(".galleryItems").find(".carouselGallery"));return false});$(".selectMedia a#watchVideo").live("click",function(){var a=$(this);if($(".productVideo").find("input.youtubeId").length){var d=$(".productVideo").find("input.youtubeId").val(),b={allowScriptAccess:"always"},c={id:"productVideoYouTube"};swfobject.embedSWF("http://www.youtube.com/v/LxvTRgcvRJo?enablejsapi=1&playerapiid=ytplayer","productVideoYouTube","475","498","8",null,null,b,c);$(".productVideo input.youtubeId").remove()}a.parents(".selectMedia").find("a.active").removeClass("active");a.addClass("active");$(".productVideo").removeClass("hide");return false});var a;$(".carouselGallery").mouseenter(function(){var b=$(this);clearTimeout(a);toggleCarousel(1,b)}).mouseleave(function(){var b=$(this);a=setTimeout(function(){toggleCarousel(0,b)},300)});$(".productGallery .carouselGallery .carousel").jCarouselLite({btnNext:".productGallery .carouselGallery .next",btnPrev:".productGallery .carouselGallery .prev",circular:false,speed:400,scroll:1,visible:3});$(".kit a.selectColor").not(".colorUnavailable").click(function(){controlCFK=1;var a=$(this);$("a.selectColor.active").removeClass("active");a.addClass("active");$(".productVideo").addClass("hide");$(".selectMedia a#watchVideo").removeClass("active");if(a.attr("href").length>0){$(".galleryItems:visible").addClass("hide");var b=a.attr("href");b=b.split("_");$(b[0]).removeClass("hide")}doChangeColorDetailKit(a);return false});$("a.selectColor .colorUnavailable, a.selectColor .imgColorUnavailable").click(function(l){var m=$("#"+$(this).attr("ref"));l.preventDefault();var k="images/variant/large/";srcImgActive=$(this).attr("carr").split("_");var c=srcImgActive[0],h=srcImgActive[1],i=srcImgActive[2];if(h>0){var j=searchString(LoadersImgs,c);if(!j){$(".loader").fadeIn("fast");LoadersImgs.push(c)}var e=[],d=[],b="";PreLoadImgs=[];for(var a=1;a<=h;a++){b=k+c+"_z_"+a+".jpg";PreLoadImgs.push(b);e.push('<div id="productGallery'+i+a.toString()+'" class="itemPhoto item'+a.toString()+" "+(a==1?"active":"")+'"> <a href="'+b+'" class="jqzoom"><img src="'+b+'" alt="." class="imgGallery" /></a></div>');d.push('<li><a href="#'+b+'" rel="item'+a.toString()+'" id="linkItem'+a.toString()+'" onclick="ClickProductDetailCarouselItem(event,this);" ><img width="120" height="140" src="'+b+'" alt="." /></a></li>')}$.preloadImages(PreLoadImgs);$("#GalleryZoomImages").empty();for(var f=e.length-1;f>=0;f--)$("#GalleryZoomImages").append(e[f]);$("#detailCarousel").empty();for(var g=0;g<d.length;g++)$("#detailCarousel").append(d[g]);$(".productGallery .carouselGallery .carousel").jCarouselLite({btnNext:".productGallery .carouselGallery .next",btnPrev:".productGallery .carouselGallery .prev",circular:false,speed:400,scroll:1,visible:3});$(".jqzoom").jqzoom({zoomWidth:430,zoomHeight:430,xOffset:10,showEffect:"show",hideEffect:"fadeout",fadeoutSpeed:"fast"});$(".imgGallery").load(function(){$(".loader").fadeOut("slow")})}doChangeColorUnavailableDetail(m);return false});$("a.selectColor").not(".colorUnavailable").click(function(l){if(checkIsLook==1){var m=$(this);doChangeColorLook(m)}else if(controlCFK==1)controlCFK=0;else{l.preventDefault();var k="images/variant/large/";srcImgActive=$(this).attr("carr").split("_");var c=srcImgActive[0],h=srcImgActive[1],i=srcImgActive[2];if(h>0){var j=searchString(LoadersImgs,c);if(!j){$(".loader").fadeIn("fast");LoadersImgs.push(c)}var e=[],d=[],b="";PreLoadImgs=[];for(var a=1;a<=h;a++){b=k+c+"_z_"+a+".jpg";PreLoadImgs.push(b);e.push('<div id="productGallery'+i+a.toString()+'" class="itemPhoto item'+a.toString()+" "+(a==1?"active":"")+'"> <a href="'+b+'" class="jqzoom"><img src="'+b+'" alt="." class="imgGallery" /></a></div>');d.push('<li><a href="#'+b+'" rel="item'+a.toString()+'" id="linkItem'+a.toString()+'" onclick="ClickProductDetailCarouselItem(event,this);" ><img width="120" height="140" src="'+b+'" alt="." /></a></li>')}$.preloadImages(PreLoadImgs);$("#GalleryZoomImages").empty();for(var f=e.length-1;f>=0;f--)$("#GalleryZoomImages").append(e[f]);$("#detailCarousel").empty();for(var g=0;g<d.length;g++)$("#detailCarousel").append(d[g]);$(".productGallery .carouselGallery .carousel").jCarouselLite({btnNext:".productGallery .carouselGallery .next",btnPrev:".productGallery .carouselGallery .prev",circular:false,speed:400,scroll:1,visible:3});$(".jqzoom").jqzoom({zoomWidth:430,zoomHeight:430,xOffset:10,showEffect:"show",hideEffect:"fadeout",fadeoutSpeed:"fast"});$(".imgGallery").load(function(){$(".loader").fadeOut("slow")})}doChangeColorDetail($(this))}return false});$(".jqzoom").jqzoom({zoomWidth:430,zoomHeight:430,xOffset:10,showEffect:"show",hideEffect:"fadeout",fadeoutSpeed:"fast"})}function sleep(b){for(var c=(new Date).getTime(),a=0;a<1e7;a++)if((new Date).getTime()-c>b)break}function ClickProductDetailCarouselItem(f,e){!isIE&&f.preventDefault();var a=$("#"+e.id),c=a.attr("rel"),b=a.parents(".productGallery").find(".photoInside"),d=a.parents(".productGallery").find(".loader");a.parents(".carousel").find("a.active").removeClass("active");a.addClass("active");$(".active",b).removeClass("active").fadeOut(250,function(){d.fadeOut(250);$("."+c,b).fadeIn(250).addClass("active");$("."+c,b).attr("class");$(".overlay").fadeOut()});return false}function toggleCarousel(b,a){if(b==1){a.stop().animate({bottom:0},250);!$.browser.msie&&a.parent().find(".overlay").fadeIn()}else{if($.browser.msie&&$.browser.version.substr(0,1)<7)a.stop().animate({bottom:-154},250);else a.stop().animate({bottom:-150},250);!$.browser.msie&&a.parent().find(".overlay").fadeOut()}}function modals(){$("a.modalEasyPurchase, a.modalCombinedPurchase, a.modalSizeChart, a.modalForgotPassword, a.modalSecurityCode, a.modalHipercard, a.modalMail, a.modalDontFind, a.modalTradeForm").fancybox({showCloseButton:true,transitionIn:"elastic",transitionOut:"fade"});$(".modalSizeChart .close, .modalForgotPassword .close, .modalSecurityCode .close, .modalMail .close, .modalDontFind .close, .modalTradeForm .close").live("click",function(){$.fancybox.close()})}function tabs(){$(".productInformations").tabs({fxShow:{height:"show",opacity:"show"}})}function addThisShareProduct(){if($("#productName").length){var c=document.location,b="lojasrenner",a=escape($("#productName").html());$("#addFacebook").attr("href","http://www.addthis.com/bookmark.php?pub="+b+"&v=250&source=tbx-250&tt=0&s=facebook&content=&lng=en&url="+c+"&title="+a);$("#addOrkut").attr("href","http://www.addthis.com/bookmark.php?pub="+b+"&v=250&source=tbx-250&tt=0&s=orkut&content=&lng=en&url="+c+"&title="+a);$("#addTwitter").attr("href","http://www.addthis.com/bookmark.php?pub="+b+"&v=250&source=tbx-250&tt=0&s=twitter&content=&lng=en&url="+c+"&title="+a+"&template=%7B%7Btitle%7D%7D%20%7B%7Burl%7D%7D%20via%20%40Lojas_Renner")}}function textareaLimiter(){$(".textareaLimiter").textareaLimit({count:".charLeft",limiter:140})}function accordions(){$("dl.faqs dd").each(function(){getHeight=$(this).height();$(this).css("height",getHeight)});$(".faqs").accordionItems()}function productComment(){$("#fragment-3 .closeAlert").live("click",function(){$("#fragment-3").unblock();$("#fragment-3 form input, #fragment-3 form textarea, #fragment-3 form select").val("");$("#product .productInformations .form").addClass("hide");$("#product .productInformations .comments").removeClass("hide")});$("#product .productInformations .comments .commentButton").click(function(){$("#product .productInformations .comments").addClass("hide");$("#product .productInformations .form").removeClass("hide");return false});$("#product .productInformations .form .back").click(function(){$("#product .productInformations .form").addClass("hide");$("#product .productInformations .comments").removeClass("hide");return false});$.validity.setup({outputMode:"summary"});$("#product .productInformations .form .send").click(function(){if(!validityProductComment())$("#product .productInformations .form .info").html("Por favor, corrija os campos em destaque.").css("color","#BD0000");else{$("#fragment-3").block({message:'<span class="waitSmall hide-text">Enviando...</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9}});doSendComment($(this))}return false})}function validityProductComment(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".productInformations #commentName").require();$(".productInformations #commentEmail").require().match("email");$(".productInformations #commentState").require();$(".productInformations #commentText").require();var a=$.validity.end();return a.valid}function productTellUs(){$(".tellUs a").click(function(){$(".tellUs .tellUsFormContainer").stop(1,1).slideToggle(200);return false});$(".tellUs .closeAlert").live("click",function(){$(".tellUs .tellUsFormContainer").stop(1,1).slideToggle(200).unblock()});$(".tellUs .tellUsFormContainer .send").click(function(){if(!validityTellUs())$(".tellUs .tellUsFormContainer .info").html("Por favor, corrija os campos em destaque.").css("color","#BD0000");else{$(".tellUs .tellUsFormContainer").block({message:'<span class="waitSmall hide-text">Enviando...</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9}});doSendTellUs($(this))}return false})}function validityTellUs(){$.validity.start();$.validity.setup({outputMode:"summary"});$("#commentEmail").require().match("email");var a=$.validity.end();return a.valid}function assertWaterMark(a){return a.value!=a.title}function combinedPurchase(){$(".modalCombinedPurchase .productColors a").click(function(){$(this).parent().find("a.active").removeClass("active");$(this).addClass("active");return false});$(".modalCombinedPurchase form").submit(function(){if(validityCombinedPurchase()){$(".modalCombinedPurchase .product").addClass("hide");$(".modalCombinedPurchase .bagResume").removeClass("hide")}else $(".modalCombinedPurchase .product .info").fadeIn();return false});$(".modalCombinedPurchase .close").live("click",function(){$.fancybox.close();$(".modalCombinedPurchase .product").removeClass("hide");$(".modalCombinedPurchase .bagResume").addClass("hide");$(".modalCombinedPurchase .product .info").hide()})}function validityCombinedPurchase(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".modalCombinedPurchase form select").require();var a=$.validity.end();return a.valid}function departmentNav(){$("#department .menuDepartment h5.title a").not(".clean").click(function(){var a=$(this);a.toggleClass("active");$(this).parents(".filterLinks").find("ul").stop(1,1).slideToggle(200);return false});$("#department .menuDepartment .filterLinks ul.canOverflow").each(function(){var a=$(this);a.height()>88&&a.addClass("overflow")});$("#department .menuDepartment .filterLinks ul a").not(".disabled").click(function(){if($("#menuSecId").html()=="11"){window.open($(this).attr("href"),"_self");return true}else if(checkRequestDynamicFilter==0){checkRequestDynamicFilter=1;var a=$(this),b=true;document.getElementById("pgselected").innerHTML="1";if($(this).is(".active")){a.removeClass("active");b=false;if(a.attr("rel")!=""){$("."+a.attr("rel")).slideUp();$("."+a.attr("rel")).find("a.active").removeClass("active")}}else{a.addClass("active");a.attr("rel")!=""&&$("."+a.attr("rel")).slideDown()}reloadItemsByFilter($(this),b)}return false});$("#department .menuDepartment .filterLinks a.disabled").unbind("click").bind("click",function(){return false});$("#department .menuDepartment .filterLinks a.clean").click(function(){var a=$(this);a.parents("h5").next("ul").find("a.active").removeClass("active");a.fadeOut();isCleanClick=1;loadProducts("clean");$("#department .menuDepartment .filterLinks ul a.active").length==0&&$("#department .menuDepartment h2 a.clean").fadeOut();return false});$("#department .menuDepartment h2 a.clean").click(function(){checkRequestDynamicFilter=1;isCleanClick=1;$("#department .menuDepartment .filterLinks ul a.active").removeClass("active");$("#department .menuDepartment .filterLinks a.clean").fadeOut();$(this).fadeOut();loadProducts("clean");return false});$("#department .menuDepartment .originalBrands ul").height()<45&&$("#department .menuDepartment .originalBrands ul").height(45)}function lookNav(){$("#lookContainer .menuDepartment h5.title a").not(".clean").click(function(){var a=$(this);a.toggleClass("active");$(this).parents(".filterLinks").find("ul").stop(1,1).slideToggle(200);return false});$("#lookContainer .menuDepartment .filterLinks ul.canOverflow").each(function(){var a=$(this);a.height()>88&&a.addClass("overflow")});$("#lookContainer .menuDepartment .filterLinks ul a").click(function(){if(checkRequestDynamicFilter==0){checkRequestDynamicFilter=1;var a=$(this),b=true;if($(this).is(".active")){a.removeClass("active");b=false;if(a.attr("rel")!=""){$("."+a.attr("rel")).slideUp();$("."+a.attr("rel")).find("a.active").removeClass("active")}}else{a.addClass("active");a.attr("rel")!=""&&$("."+a.attr("rel")).slideDown()}loadProductsLook()}return false});$("#lookContainer .menuDepartment .filterLinks a.disabled").unbind("click").bind("click",function(){return false});$("#lookContainer .menuDepartment .filterLinks a.clean").click(function(){var a=$(this);a.parents("h5").next("ul").find("a.active").removeClass("active");a.fadeOut();$("#lookContainer .menuDepartment .filterLinks ul a.active").length==0&&$("#lookContainer .menuDepartment h2 a.clean").fadeOut();return false});$("#lookContainer .menuDepartment h2 a.clean").click(function(){checkRequestDynamicFilter=1;$("#lookContainer .menuDepartment .filterLinks ul a.active").removeClass("active");$("#lookContainer .menuDepartment .filterLinks a.clean").fadeOut();$(this).fadeOut();return false});$("#lookContainer .menuDepartment .originalBrands ul").height()<45&&$("#lookContainer .menuDepartment .originalBrands ul").height(45)}function reloadItemsByFilter(c){var a=c.attr("href"),b=c.parents("ul"),d=b.find("li a.active").length;a=a.split("&");loadProducts(a.length>2?a[3].replace("c=",""):a[1].replace("c=",""));if(d>0){b.prev("h5").find("a.clean").fadeIn();$("#department .menuDepartment h2 a.clean").fadeIn()}else{b.prev("h5").find("a.clean").fadeOut();$("#department .menuDepartment .filterLinks ul a.active").length==0&&$("#department .menuDepartment h2 a.clean").fadeOut()}}function pagSend(b){var a=b.href;a=a.split("#");document.getElementById("pgselected").innerHTML=a[1];if(checkRequestDynamicFilter==0){checkRequestDynamicFilter=1;loadProducts("")}return false}function pagOrd(a){var b=a.value;document.getElementById("ordenation").innerHTML=b;document.getElementById("pgselected").innerHTML=1;if(checkRequestDynamicFilter==0){checkRequestDynamicFilter=1;loadProducts("")}return false}function pagNumpp(a){var b=a.value;document.getElementById("numpp").innerHTML=b;document.getElementById("pgselected").innerHTML=1;if(checkRequestDynamicFilter==0){checkRequestDynamicFilter=1;loadProducts("")}return false}function upper(a){a.value=a.value.toUpperCase()}function QueryString(a){qs=[];variaveis=location.search.replace(/\x3F/,"").replace(/\x2B/g," ").split("&");if(variaveis!="")for(i=0;i<variaveis.length;i++){nvar=variaveis[i].split("=");qs[nvar[0]]=unescape(nvar[1])}return qs[a]}function changeBreadCrumb(d,b){var f=[],g="";if(b=="manufacOwn"||b=="manufacOthers")b="man";var a={};isProductList=0;isFirst=1;try{a.sec=document.getElementById("menuSecId").innerHTML}catch(h){isProductList=1}a.filterOrigem="";$('.menuDepartment .filterLinks ul a[filter="'+b+'"]').not(".disabled").each(function(){var b=$(this).attr("href");b=b.split("&");if(b.length==2){var c=b[0].replace("#eid=",""),g=b[1].replace("c=","");if(a.filterOrigem=="")a.filterOrigem+=c;else a.filterOrigem+="|"+c}else{var d=b[0].replace("#v1=",""),e=b[1].replace("v2=",""),f=b[2].replace("e=",""),g=b[3].replace("c=","");if(a.filterOrigem=="")a.filterOrigem+=d+e;else a.filterOrigem+="|"+d+e}});a.pgnum=document.getElementById("pgselected").innerHTML;a.ord=document.getElementById("ordenation").innerHTML;a.numpp=document.getElementById("numpp").innerHTML;a.spec=document.getElementById("special").innerHTML;a.origem=b;a.requestURL=getHost().split("#")[0];a.plid=QueryString("prodlistid");a.offersoutlink=QueryString("offersoutlink");var c="",e=Array();a.seclist="";if(QueryString("promotion")==1)a.promotion=1;$(d).each(function(){var b=$(this).attr("href");b=b.split("&");if(isProductList==1&&isFirst==1){a.sec=$(this).attr("section");a.seclist=document.getElementById("sectionlist").innerHTML;isFirst=0}if(b.length==2){var e=b[0].replace("#eid=",""),d=b[1].replace("c=","");if(c==""||c!=d)a[d]=e;else a[d]+=","+e}else{var g=b[0].replace("#v1=",""),h=b[1].replace("v2=",""),f=b[2].replace("e=",""),d=b[3].replace("c=","");if(c==""||c!=d)a[d]=g+";"+h+";"+f;else a[d]+="-"+g+";"+h+";"+f}c=d});$.ajax({type:"POST",url:"showajaxfilterproducts.aspx",dataType:"html",data:$.param(a),success:function(e){var c=e.split("|#|");$(".productsContainer").html(c[0]);origemCliner=1;$(".menuDepartment .filterLinks ul a.active").each(function(){if($(this).attr("filter")==b)origemCliner=0});if(b!=""){var d=$.createXMLDocument(c[1]);$(".menuDepartment .filterLinks ul a").each(function(){if($(this).attr("section")==a.sec){var c=$(this).attr("href");c=c.split("&");if(c.length==2){var f=c[0].replace("#eid=",""),e=c[1].replace("c=","");if(e=="manufacOwn"||e=="manufacOthers")e="man"}else if(c.length>2){var g=c[0].replace("#v1=",""),h=c[1].replace("v2=",""),i=c[2].replace("e=",""),e=c[3].replace("c=","");f=g+h}else var f=0,e=0;if($(d).find("item[entitytype='"+e+"'][entityid='"+f+"']").length>0)($(this).is(".disabled")&&e!=b||isCleanClick==1&&e==b||origemCliner==1&&e==b)&&$(this).removeClass("disabled");else e!=b&&e!=0&&$(this).addClass("disabled")}});isCleanClick=0}$.getScript("js/functions.min.js");$.getScript("js/functions2.min.js");setTimeout("openAjaxRequest()",100)},error:failedAjax})}function disableMenu(b){var a=$.createXMLDocument(b);$(".menuDepartment .filterLinks ul a").each(function(){var b=$(this).attr("href");b=b.split("&");if(b.length==2){var d=b[0].replace("#eid=",""),c=b[1].replace("c=","");if(c=="manufacOwn"||c=="manufacOthers")c="man"}else if(b.length>2){var e=b[0].replace("#v1=",""),f=b[1].replace("v2=",""),g=b[2].replace("e=",""),c=b[3].replace("c=","");d=e+f}else var d=0,c=0;if($(a).find("item[entitytype='"+c+"'][entityid='"+d+"']").length>0)$(this).removeClass("disabled");else $(this).addClass("disabled")})}function changeBreadCrumbLook(c){var d=[],e="",a={};a.sec=getQueryVariable("sectionid");var b="";$(c).each(function(){var c=$(this).attr("href");c=c.split("&");if(c.length==2){var e=c[0].replace("#eid=",""),d=c[1].replace("c=","");if(b==""||b!=d)a[d]=e;else a[d]+=","+e}else{var g=c[0].replace("#v1=",""),h=c[1].replace("v2=",""),f=c[2].replace("e=",""),d=c[3].replace("c=","");if(b==""||b!=d)a[d]=g+";"+h+";"+f;else a[d]+="-"+g+";"+h+";"+f}b=d});$(".productList").unblock();openAjaxRequest();$.ajax({type:"POST",url:"showajaxfilterlook.aspx",dataType:"html",data:$.param(a),success:function(a){$(".albumContainer").html(a);$.getScript("js/functions2.js");setTimeout("openAjaxRequest()",100)},error:failedAjax})}function openAjaxRequest(){checkRequestDynamicFilter=0}function loadProductsLook(){$("html, body").animate({scrollTop:0},1e3);var a=[];$("#lookContainer .menuDepartment .filterLinks ul a.active").each(function(){a.push($(this))});$(".productList").block({message:'<span class="waitMedium hide-text">Carregando...</span>',css:{border:"none",width:"auto",top:"100px",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9},centerY:false});changeBreadCrumbLook(a)}function loadProducts(b){$("html, body").animate({scrollTop:0},1e3);var a=[];$("#department .menuDepartment .filterLinks ul a.active").each(function(){a.push($(this))});if(a.length>0){if(QueryString("prodlistid")==undefined)document.getElementById("flashHighlightDvID").style.display="none"}else if(isMobileDevice!=1)document.getElementById("flashHighlightDvID").style.display="block";changeBreadCrumb(a,b);$(".productsContainer").block({message:'<span class="waitMedium hide-text">Carregando...</span>',css:{border:"none",width:"auto",top:"100px",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9},centerY:false})}function newsRegister(){$("form#newsletterOptInForm input.submit").click(function(){if(validityNews()){$(".newsletterOptIn .container").block({message:'<span class="waitSmallGray hide-text">Enviando...</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#EEE",opacity:.9}});setTimeout(function(){$(".newsletterOptIn .container").block({message:'<span class="success">Seu email foi enviado com sucesso!<br />Em instantes voc\u00ea receber\u00e1 um e-mail para conclus\u00e3o do cadastro.</span><a href="javascript:void(0)" class="closeAlert">Fechar</a>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#EEE",opacity:.9}})},3e3)}else $(".newsletterOptIn .alert").fadeIn();return false});$(".newsletterOptIn .container .closeAlert").live("click",function(){$(".newsletterOptIn .container").unblock();$(".newsletterOptIn .alert").fadeOut();$(".newsletterOptIn input:text").each(function(){$(this).val($(this).attr("title"))})})}function validityNews(){$.validity.start();$.validity.setup({outputMode:"summary"});$("#nameNews").require().assert(assertWaterMark,"");$("#emailNews").require().match("email");var a=$.validity.end();return a.valid}function cpfCheck(a){if(a.charAt(3)==".")a=a.substr(0,3)+a.substr(4);if(a.charAt(6)==".")a=a.substr(0,6)+a.substr(7);if(a.charAt(9)=="-")a=a.substr(0,9)+a.substr(10);if(a.length!=11||a=="00000000000"||a=="11111111111"||a=="22222222222"||a=="33333333333"||a=="44444444444"||a=="55555555555"||a=="66666666666"||a=="77777777777"||a=="88888888888"||a=="99999999999")return false;soma=0;for(i=0;i<9;i++)soma+=parseInt(a.charAt(i))*(10-i);resto=11-soma%11;if(resto==10||resto==11)resto=0;if(resto!=parseInt(a.charAt(9)))return false;soma=0;for(i=0;i<10;i++)soma+=parseInt(a.charAt(i))*(11-i);resto=11-soma%11;if(resto==10||resto==11)resto=0;return resto!=parseInt(a.charAt(10))?false:true}function validityCpfCheck(a){return cpfCheck(a.value)?true:false}function alreadyRegistered(){$("#myPurchase.login .form .contLeft input.button").click(function(){if(!validityAlreadyRegistered())return false});$("#forgotPassword .button").unbind("click").bind("click",function(){if(validityForgotPassword())sendMailForgotPassword();else{$(".modalForgotPassword .content .info").fadeIn();return false}});$(".modalforgotpassword .content .closealert").live("click",function(){$(".modalforgotpassword .content").unblock();$.fancybox.close()})}function validityAlreadyRegistered(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".emailRegistered").require().match("email");$(".passwordRegistered").require();var a=$.validity.end();return a.valid}function validityForgotPassword(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".cpfPassword").require().assert(validityCpfCheck,"");var a=$.validity.end();return a.valid}function firstAccess(){$("#myPurchase.login .form .contRight input.button").click(function(){if(!validityFirstAccess()){$("#myPurchase.login .form .contRight .info span").fadeIn();return false}})}function firstAccess2(){$("#login .form .contRight input.button").click(function(){if(!validityFirstAccess()){$("#login .form .contRight .info span").fadeIn();return false}})}function validityFirstAccess(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".emailFirstAccess").require().match("email");$(".cpfFirstAccess").require().assert(validityCpfCheck,"");var a=$.validity.end();return a.valid}function validityPhoneCheck(b){var a=$(b).parent().find("input[type=text]:first").val();if(a.length>0||b.value.length>0)if(a==""||a.length<2||b.value.length<8)return false;return true}function validityCepCheck(b){var a=$(b).parent().find("input[type=text]:first").val();if(a.length>0||b.value.length>0)if(a==""||a.length<5||b.value.length<3)return false;return true}function myProfile(){$("#myPurchase.myProfile input.button").click(function(){if(!validityMyProfile()){$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parent().addClass("error");$("label.error").parent().find("small, a").hide();$("html, body").animate({scrollTop:$("label.error:first").offset().top},1e3);$("label.error:first").focus()}});$("#myPurchase.myProfile .myProfileContainer .rennerCard").click(function(){$(this).toggleClass("active");$("#myPurchase.myProfile .myProfileContainer .cardInformation").stop(1,1).slideToggle(250);return false});$("#myPurchase.myProfile .myProfileContainer .cardInformation input.submit").click(function(){if(validityImportRenner()){$("#myPurchase.myProfile .myProfileContainer .importProfile").block({message:'<span class="waitSmallGray hide-text">Enviando...</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#EEE",opacity:.9}});setTimeout(function(){$("#myPurchase.myProfile .myProfileContainer .importProfile").block({message:'<span class="success_3">Verifique se o n\u00famero e a senha do seu Cart\u00e3o Renner est\u00e3o digitados corretamente.</span><a href="javascript:void(0)" class="closeAlert">Clique aqui para corrigir.</a>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#EEE",opacity:.9}})},3e3);setTimeout(function(){$("#myPurchase.myProfile .myProfileContainer .importProfile").block({message:'<span class="success_3">Informa\u00e7\u00f5es importadas com sucesso.</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#EEE",opacity:.9}})},3e3)}return false});$("#myPurchase.myProfile .myProfileContainer .importProfile .closeAlert").live("click",function(){$("#myPurchase.myProfile .myProfileContainer .importProfile").unblock()});verifyZipCode()}function validityMyProfile(){$.validity.setup({outputMode:"label"});$.validity.start();$("#firstName").require("Primeiro nome \u00e9 obrigat\u00f3rio.");$("#surname").require("Sobrenome \u00e9 obrigat\u00f3rio.");$("#cpf").require("Por favor, preencha com um CPF v\u00e1lido.").assert(validityCpfCheck,"CPF Inv\u00e1lido.");$("#rg").require("RG \u00e9 obrigat\u00f3rio.");$("#birthDay").require("Data de nascimento \u00e9 obrigat\u00f3ria.").match("date","Data inv\u00e1lida.");$("#gender").require("Informe seu sexo.");$("#email").require("E-mail \u00e9 obrigat\u00f3rio.").match("email","E-mail inv\u00e1lido.");$("#confirmEmail").require("Confirmar o e-mail \u00e9 obrigat\u00f3rio.").match("email","E-mail inv\u00e1lido.");$("#email, #confirmEmail").equal("A confirma\u00e7\u00e3o de e-mail n\u00e3o confere.");$("#password").require("Senha \u00e9 obrigat\u00f3ria.").range(6,20,"Senha deve conter no m\u00ednimo 6 caracteres.");$("#confirmPassword").require("Confirma\u00e7\u00e3o de senha \u00e9 obrigat\u00f3ria.");$("#password, #confirmPassword").equal("A confirma\u00e7\u00e3o de senha n\u00e3o confere.");$("#cellPhone").require("Telefone Celular \u00e9 obrigat\u00f3rio.").assert(validityPhoneCheck,"Formato de telefone inv\u00e1lido.");$("#homePhone").assert(validityPhoneCheck,"Formato de telefone inv\u00e1lido.");$("#businessPhone").assert(validityPhoneCheck,"Formato de telefone inv\u00e1lido.");$("#addressType").require("Tipo de endere\u00e7o \u00e9 obrigat\u00f3rio.");$("#cep2").require("CEP \u00e9 obrigat\u00f3rio.").assert(validityCepCheck,"Formato de CEP inv\u00e1lido.");$("#address").require("Endere\u00e7o \u00e9 obrigat\u00f3rio.");$("#number").require("N\u00famero \u00e9 obrigat\u00f3rio.");$("#district").require("Bairro \u00e9 obrigat\u00f3rio.");$("#city").require("Cidade \u00e9 obrigat\u00f3ria.");$("#state").require("Estado \u00e9 obrigat\u00f3rio.");var a=$.validity.end();return a.valid}function easyTrade(){$(".buttonEasyTradeForm").click(function(){if(validityEasyTrade())$("li.error").each(function(){$(this).find("label.error").length==0&&$(this).removeClass("error");$(".tradeFeedback").show()});else{$("label.error").parents("li").addClass("error");return false}})}function validityEasyTrade(){$.validity.setup({outputMode:"label"});$.validity.start();$("#firstName").require("Campo obrigat\u00f3rio.");$("#surname").require("Campo obrigat\u00f3rio.");$("#cpf").require("CPF inv\u00e1lido.").assert(validityCpfCheck,"CPF Inv\u00e1lido.");$("#birthDay").require("Campo obrigat\u00f3rio.").match("date","Data inv\u00e1lida.");$("#mail").require("Campo obrigat\u00f3rio.").match("email","E-mail inv\u00e1lido.");$("#emailConfirm").require("Confirme o e-mail.").match("email","E-mail inv\u00e1lido.");$("#mail, #emailConfirm").equal("A confirma\u00e7\u00e3o de e-mail n\u00e3o confere.");$("#phone").require("Campo obrigat\u00f3rio.").assert(validityPhoneCheck,"Telefone inv\u00e1lido.");$("#productCode").require("Campo obrigat\u00f3rio.");$("#orderNumber").require("Campo obrigat\u00f3rio.");$("#reason").require("Campo obrigat\u00f3rio.");$("#reasonTxt").require("Campo obrigat\u00f3rio.");var a=$.validity.end();return a.valid}function validityChat(){$.validity.setup({outputMode:"label"});$.validity.start();$("#name").require("Mensagem de erro.");$("#cpf").require("Mensagem de erro.").assert(validityCpfCheck,"CPF Inv\u00e1lido.");$("#email").require("E-mail \u00e9 obrigat\u00f3rio.").match("email","E-mail inv\u00e1lido.");$("#subject").require("Assunto \u00e9 obrigat\u00f3rio.");var a=$.validity.end();return a.valid}function validitySendMailFriend(){$.validity.setup({outputMode:"label"});$.validity.start();$("#friendsName").require("Nome do Amigo \u00e9 obrigat\u00f3rio.");$("#friendsMail").require("E-mail do Amigo \u00e9 obrigat\u00f3rio.");$("#yourName").require("Seu Nome \u00e9 obrigat\u00f3rio.");$("#yourMail").require("Seu E-mail \u00e9 obrigat\u00f3rio.");var a=$.validity.end();return a.valid}function Chat(){$(".enviaChat").click(function(){if(!validityChat()){$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parent().addClass("error")}})}function MailFriend(){$(".enviaFriend").click(function(){if(validitySendMailFriend())sendMailFriend();else{$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parent().addClass("error")}})}function validityImportRenner(){$.validity.start();$.validity.setup({outputMode:"summary"});$("#importCardNumber").require();$("#rennerCardPassword").require();var a=$.validity.end();return a.valid}function verifyZipCode(){var a=$("#cep1"),b=$("#cep2");$(".cep1").keyup(function(){$(this).val().length==5&&$(".cep2").focus()});$("#cep1, #cep2").blur(function(){a.val().length==a.attr("maxlength")&&b.val().length==b.attr("maxlength")&&alert("Fun\u00e7\u00e3o que busca os dados da pessoa")})}function buyDelivery(){$("#myPurchase.delivery ul.list li.disabled input:radio").live("click",function(){$("#myPurchase.delivery ul.list li.active").removeClass("active").addClass("disabled");$(this).parents(".disabled").removeClass("disabled").addClass("active");$("#myPurchase.delivery .newAddress").addClass("disabled")});$("#myPurchase.delivery ul.list li.active input.submit").live("click",function(){});$("#myPurchase.delivery ul.list li.disabled input.submit").live("click",function(){return false});$("#myPurchase.delivery .newAddress .title input:radio").click(function(){$("#myPurchase.delivery ul.list li.active").removeClass("active");$("#myPurchase.delivery ul.list li").addClass("disabled");$(this).parents(".newAddress").removeClass("disabled");$("html, body").animate({scrollTop:$(".newAddress .title").offset().top},1e3)});$("#myPurchase.delivery ul.options .exclude").click(function(){$(this).parents("li.addressItem").block({message:'<span class="exludeConfirmation">Voc\u00ea deseja apagar esse endere\u00e7o?</span><a href="javascript:void(0)" class="confirm">Sim</a> ou <a href="javascript:void(0)" class="reject">N\u00e3o</a>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9},centerY:false});return false});$("#myPurchase.delivery ul.options .edit").click(function(){$("html, body").animate({scrollTop:$(".newAddress .title").offset().top},1e3);$(".newAddress .title label").html($(this).attr("title"));$(".newAddress li.error").removeClass("error");$("label.error").remove();$("#myPurchase.delivery .newAddress").block({message:'<span class="waitSmall hide-text">Carregando...</span>',css:{border:"none",width:"auto",background:"none",cursor:"default"},overlayCSS:{backgroundColor:"#FFF",opacity:.9},centerY:false});setTimeout(function(){$("#myPurchase.delivery .newAddress").unblock().removeClass("disabled");$("#myPurchase.delivery .newAddress").find(".back").fadeIn()},3e3);return false});$("#myPurchase.delivery .newAddress .back").click(function(){$("#myPurchase.delivery .newAddress ul.address").find("input:text, select").val("");$("#myPurchase.delivery .newAddress").addClass("disabled");$(this).fadeOut();$(".newAddress .title label").html("Entregar em novo endere\u00e7o");$("html, body").animate({scrollTop:$("#myPurchase.delivery .addressSelect").offset().top},1e3);return false});$("#myPurchase.delivery .disabled input.submit").live("click",function(){return false});$("#myPurchase.delivery .newAddress input.submit").live("click",function(){if(!validityNewAddress()){$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parent().addClass("error");$("label.error").parent().find("small, a").hide();$("html, body").animate({scrollTop:$("label.error:first").offset().top},1e3);$("label.error:first").focus()}});$("#myPurchase.delivery .confirm").live("click",function(){$(this).parents("li.addressItem").fadeOut(200)});$("#myPurchase.delivery .reject").live("click",function(){$(this).parents("li.addressItem").unblock()})}function validityNewAddress(){$.validity.setup({outputMode:"label"});$.validity.start();$("#addressType").require("Tipo de endere\u00e7o \u00e9 obrigat\u00f3rio.");$("#cep2").require("CEP \u00e9 obrigat\u00f3rio.").assert(validityCepCheck,"Formato de CEP inv\u00e1lido.");$("#address").require("Endere\u00e7o \u00e9 obrigat\u00f3rio.");$("#number").require("N\u00famero \u00e9 obrigat\u00f3rio.");$("#district").require("Bairro \u00e9 obrigat\u00f3rio.");$("#city").require("Cidade \u00e9 obrigat\u00f3ria.");$("#state").require("Estado \u00e9 obrigat\u00f3rio.");var a=$.validity.end();return a.valid}function paymentMethods(){var a=$("#myPurchase.paymentMethods .myPurchaseContainer");$(".cardOption a",a).click(function(){var a=$(this).attr("rel");a!=""&&$("html, body").animate({scrollTop:$("."+a).offset().top},1e3);return false});$("input[name=paymentMethod]",a).click(function(){activePaymentMethod($(this))});$("input:text, input:password",a).keypress(function(){var b=$(this),a=b.parents(".paymentMethod");if(!a.is(".active")){activePaymentMethod(b);!a.is(".creditCard")&&a.find("input[name=paymentMethod]:first").click()}});$("input:radio",a).click(function(){var b=$(this),a=b.parents(".paymentMethod");if(!a.is(".active")){activePaymentMethod(b);!a.is(".creditCard")&&a.find("input[name=paymentMethod]:first").click()}});$("input.inputRennerCard",a).click(function(){if(!validityRennerCard()||$("input[name=rennerCardSubdivision]").is(":checked")==false||$("input[name=rennerCardFirstPayment]").is(":checked")==false){$("html, body").animate({scrollTop:$(this).parents(".paymentMethod").offset().top},1e3);$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parent().addClass("error");if($("input[name=rennerCardFirstPayment]").is(":checked")==false||$("input[name=rennerCardSubdivision]").is(":checked")==false)$(this).parents(".rightCol").find("span.error").fadeIn();else $(this).parents(".rightCol").find("span.error").fadeOut();return false}});$("input.inputRennerCreditCard",a).click(function(){if(!validityRennerCreditCard()||$("input[name=rennerCreditCardSubdivision]").is(":checked")==false||$("input[name=rennerCreditCardFirstPayment]").is(":checked")==false){$("html, body").animate({scrollTop:$(this).parents(".paymentMethod").offset().top},1e3);$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parents("li").addClass("error");if($("input[name=rennerCreditCardFirstPayment]").is(":checked")==false||$("input[name=rennerCreditCardSubdivision]").is(":checked")==false)$(this).parents(".rightCol").find("span.error").fadeIn();else $(this).parents(".rightCol").find("span.error").fadeOut();return false}});$("input.inputCreditCard",a).click(function(){if(!validityCreditCard()||$("input[name=creditCardSubdivision]").is(":checked")==false||$("input[name=paymentMethod]").is(":checked")==false){$("html, body").animate({scrollTop:$(this).parents(".paymentMethod").offset().top},1e3);$("li.error").each(function(){if($(this).find("label.error").length==0){$(this).removeClass("error");$(this).find("small, a").show()}});$("label.error").parents("li").addClass("error");if($("input[name=paymentMethod]").is(":checked")==false){$("span.info",a).fadeIn();$("span.info",a).parents("li").addClass("error")}else $("span.info",a).fadeOut();if($("input[name=creditCardSubdivision]").is(":checked")==false)$(this).parents(".rightCol").find("span.error").fadeIn();else $(this).parents(".rightCol").find("span.error").fadeOut();return false}else alert(1)})}function activePaymentMethod(b){var a=$("#myPurchase.paymentMethods .myPurchaseContainer .paymentMethod");a.removeClass("active");b.parents(".paymentMethod").addClass("active");a.each(function(){!$(this).is(".active")&&$(this).find("input:radio").attr("checked",false)})}function verifyCheckboxUnreadable(a){return $(a).next("span").find("input:checkbox").attr("checked")||$(a).val()!=""?true:false}function validityPrevSelect(a){var b=$(a).prev("select").val();return b==""||a.value==""?false:true}function validityRennerCard(){$.validity.setup({outputMode:"label"});$.validity.start();$("#rennerCardNumber").require("N\u00famero do cart\u00e3o \u00e9 obrigat\u00f3rio.").minLength(9,"Nove d\u00edgitos do cart\u00e3o.");$("#rennerCardPassword").require("Senha \u00e9 obrigat\u00f3ria.");var a=$.validity.end();return a.valid}function validityRennerCreditCard(){$.validity.setup({outputMode:"label"});$.validity.start();$("#rennerCreditCardNumber").require("N\u00famero do cart\u00e3o \u00e9 obrigat\u00f3rio.");$("#rennerCreditCardName").require("Nome \u00e9 obrigat\u00f3rio.");$("#rennerCreditCardSecurityCode").assert(verifyCheckboxUnreadable,"C\u00f3digo de seguran\u00e7a \u00e9 obrigat\u00f3rio.");$("#rennerCreditCardYear").assert(validityPrevSelect,"Data de validade \u00e9 obrigat\u00f3ria.");validityPrevSelect;var a=$.validity.end();return a.valid}function validityCreditCard(){$.validity.setup({outputMode:"label"});$.validity.start();$("#creditCardNumber").require("N\u00famero do cart\u00e3o \u00e9 obrigat\u00f3rio.");$("#creditCardName").require("Nome \u00e9 obrigat\u00f3rio.");$("#creditCardSecurityCode").assert(verifyCheckboxUnreadable,"C\u00f3digo de seguran\u00e7a \u00e9 obrigat\u00f3rio.");$("#creditCardYear").assert(validityPrevSelect,"Data de validade \u00e9 obrigat\u00f3ria.");validityPrevSelect;var a=$.validity.end();return a.valid}function myOrders(){$("#order .orderContainer input.submit").click(function(){$("#order .orderContainer span.error").hide();if($("input[name=filterSelect]:checked").attr("class")=="period"){var a=$("input[name=filterSelect].period").parents("li"),b=true;a.find("input:text").each(function(){if($(this).val()==""||$(this).val().length<10)b=false});if(!b){a.find("span.error").show();return false}}else if($("input[name=filterSelect]:checked").attr("class")=="number"){var a=$("input[name=filterSelect].number").parents("li");if(a.find("input:text").val()==""){a.find("span.error").show();return false}}})}function validityTellMe(){$.validity.start();$.validity.setup({outputMode:"summary"});$(".modalDontFind #commentName").require();$(".modalDontFind #commentEmail").require().match("email");var a=$.validity.end();return a.valid}function tellMe(){$(".sendDontFind").click(function(){if(!validityTellMe())$(".modalDontFind .info").html("Por favor, corrija os campos em destaque.").css("color","#BD0000");else $(".warningMe").fadeOut("slow",function(){sendWarningMe()})})}function albumDetail(){$("a.selectCombineColor").not(".colorUnavailable").click(function(){var a=$(this);a.parents(".colors").find(".active").removeClass("active");a.addClass("active");$(".productVideo").addClass("hide");$(".selectMedia a#watchVideo").removeClass("active");if($(a.attr("href")).length>0){$(".galleryItems:visible").addClass("hide");$(a.attr("href")).removeClass("hide")}return false});$("#albumDetail .colors a").click(function(){if(checkIsLook!=1){$imgName=$(this).attr("id");$imgSrc="../../../imgs/temp/";$(this).parents(".colors").parents("li").find(".productThumb a").fadeOut(function(){$(this).find("img").attr("src",$imgSrc+$imgName);$(this).fadeIn("slow")})}})}function siteMap(){$("#siteMap a.anchor").click(function(){$("html, body").animate({scrollTop:$("#wrapper").offset().top},1e3);return false});$("#siteMap .items").each(function(){var a=0;$(this).find("ul.item-section").each(function(){var b=$(this);if(a<b.height())a=b.height()}).height(a)})}function shoppingCart(){$(".ddlGift").change(function(){ActiveCustomerSelectedGift($(this).val())});$(".rbGift").click(function(){ActiveCustomerSelectedGift($(this).attr("ref"))})}function subMenuActivity(){$(".menuDepartment .filterLinks ul a.active").each(function(){$("."+$(this).attr("rel")).slideDown()})}$(window).load(function(){$("#product .photoInside").each(function(){$(this).find(".itemPhoto").addClass("hide");$(this).find(".item1").removeClass("hide")});$("#product .galleryItems, #albumDetail .galleryItems").not(":first").addClass("hide");$("#product .loader, #albumDetail .loader, .leftCol .galleryContainer .loader").fadeOut(500);var a=$("#product .facebookLike");a.html('<iframe src="http://www.facebook.com/plugins/like.php?href='+a.find("input:hidden").val()+'&layout=button_count&show_faces=true&width=100&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>')});jQuery.preloadImages=function(){var a=arguments[0];if(a.length>1)PreLoadListPointer=1;else PreLoadListPointer=0;for(var b=0;b<a.length;b++)jQuery("<img>").attr("src",a[b])}
