(function(a){function b(a){return typeof a=="object"?a:{top:a,left:a}}var d=a.scrollTo=function(b,d,e){a(window).scrollTo(b,d,e)};d.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1};d.window=function(){return a(window)._scrollable()};a.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&a.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])==-1)return this;var b=(this.contentWindow||this).document||this.ownerDocument||this;return a.browser.safari||
b.compatMode=="BackCompat"?b.body:b.documentElement})};a.fn.scrollTo=function(c,f,e){typeof f=="object"&&(e=f,f=0);typeof e=="function"&&(e={onAfter:e});c=="max"&&(c=9E9);e=a.extend({},d.defaults,e);f=f||e.speed||e.duration;e.queue=e.queue&&e.axis.length>1;e.queue&&(f/=2);e.offset=b(e.offset);e.over=b(e.over);return this._scrollable().each(function(){function j(a){k.animate(h,f,e.easing,a&&function(){a.call(this,c,e)})}var l=this,k=a(l),g=c,m,h={},n=k.is("html,body");switch(typeof g){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(g)){g=
b(g);break}g=a(g,this);case "object":if(g.is||g.style)m=(g=a(g)).offset()}a.each(e.axis.split(""),function(a,b){var c=b=="x"?"Left":"Top",f=c.toLowerCase(),i="scroll"+c,p=l[i],q=d.max(l,b);m?(h[i]=m[f]+(n?0:p-k.offset()[f]),e.margin&&(h[i]-=parseInt(g.css("margin"+c))||0,h[i]-=parseInt(g.css("border"+c+"Width"))||0),h[i]+=e.offset[f]||0,e.over[f]&&(h[i]+=g[b=="x"?"width":"height"]()*e.over[f])):(c=g[f],h[i]=c.slice&&c.slice(-1)=="%"?parseFloat(c)/100*q:c);/^\d+$/.test(h[i])&&(h[i]=h[i]<=0?0:Math.min(h[i],
q));!a&&e.queue&&(p!=h[i]&&j(e.onAfterFirst),delete h[i])});j(e.onAfter)}).end()};d.max=function(b,d){var e=d=="x"?"Width":"Height",j="scroll"+e;if(!a(b).is("html,body"))return b[j]-a(b)[e.toLowerCase()]();var e="client"+e,l=b.ownerDocument.documentElement,k=b.ownerDocument.body;return Math.max(l[j],k[j])-Math.min(l[e],k[e])}})(jQuery);
$(document).ready(function(){$.template("listingTemplate",listingTemplate);$.template("filtreTemplate-ul",filtreTemplate_ul);$.template("filtreTemplate-ul-color",filtreTemplate_ul_color);$("select").change(function(){document.location.href=$(this).val()});$("#filtre-order a").live("click",function(a){a.preventDefault();ManageAjaxCall(this.href,false);return false});$("ul.PaginationTop li a").live("click",function(a){a.preventDefault();ManageAjaxCall(this.href,false);return false});$("ul.PaginationBottom li a").live("click",
function(a){a.preventDefault();ManageAjaxCall(this.href,false);$("html, body").animate({scrollTop:0},"fast");return false});$("div.LessMoreProducts a").live("click",function(a){a.preventDefault();ManageAjaxCall(this.href,false);return false});$("div .bk_filter dl dd ul li a").live("click",function(a){a.preventDefault();$("#HID_CategortyAT").val()!=""&&xt_click(document,"C",$("#HID_CategortyAT").val(),"Moteur_tri::Clic_dans_moteur_tri","N");ManageAjaxCall(this.href,false);$(this).parent().parent().children(".selected").removeClass("selected");
$(this).parent().addClass("selected");return false});$("ul.bk_preview_product01 li").live("mouseenter",function(){$(this).children("div.coloris").length&&$(this).addClass("highlight");var a=$(this).find("a.img img");typeof a.attr("src-hover")!="undefined"&&a.attr("src-hover")!==""&&a.data("src",a.attr("src")).attr("src",a.attr("src-hover"))}).live("mouseleave",function(){$(this).children("div.coloris").length&&$(this).removeClass("highlight");var a=$(this).find("a.img img");typeof a.attr("src-hover")!=
"undefined"&&a.attr("src-hover")!==""&&a.attr("src",a.data("src"))});var a=0;ManageAjaxCall=function(b,d){a=$("#middle").height();Overlay("OverlayImg","true","false");var c=RegExp("/e-shopping/([^-]*)-([^/]*)/([^-]*)-([^-]*)-([^-]*)-([^-]*)-([^-]*)-([^-]*)-page-([^-]*)-([^/]*)/([^.]*).html"),f=/\/e-shopping\/([^-]*)-([^/]*)\/page-([^-]*)-([^/]*)\/([^.]*).html/,e=/\/e-shopping\/([^-]*)-([^/]*)\/([^.]*).html/,j=$("div.LessMoreProducts a").hasClass("BigSize")?2:1;c.test(b)?(c=c.exec(b),c.length>0&&AjaxCall(c[1],
c[2],c[4],c[6],c[5],c[7],c[9],c[10],c[8],c[2],c[3],c[11],d)):f.test(b)?(c=f.exec(b),c.length>0&&AjaxCall(c[1],c[2],"","","","",c[3],c[4],"",c[2],"",c[5],d)):e.test(b)&&(c=e.exec(b),c.length>0&&AjaxCall(c[1],c[2],"","","","",1,j,"",c[2],"",c[3],d))};AjaxCall=function(b,d,c,f,e,j,l,k,g,m,h,n,r){var o={catalogName:b,categoryName:d,styleName:c,sizeName:f,colorName:e,priceName:j,pageNumber:l,pageSizeName:k,orderBy:g,pageCategory:m,pageType:h,pageLibelle:n};$.ajax({type:"POST",url:wsHost+"Ajax/ListingProductService.asmx/GetListing",
dataType:"json",contentType:"application/json; charset=utf-8",data:$.toJSON(o),error:function(){},success:function(b){b!=null&&TraitementResult(b.d,o,a,r)}})}});function VerifCatalogueBandeauDroit(a){return a=="CamaieuBandeauDroit"}
function TraitementResult(a,b,d,c){var f=RegExp("'","g");$.each(a.Listing,function(a,b){b.LibelleWeb=b.LibelleWeb.replace(f,"\\'");if(b.MatiereList!=null&&b.MatiereList.length>14){for(var c={},a=0;a<14;a++)c[a]=b.MatiereList[a];b.MatiereList=c}});$(".bk_list_product").empty();a.PagerInfos.PageNumber==1&&a.CoupsDeCoeur!=null&&$(".bk_list_product").html($.tmpl("listingTemplate",a,{isCdc:function(){return true},getData:function(){return this.data.CoupsDeCoeur}}));$(".bk_list_product").append($.tmpl("listingTemplate",
a,{isCdc:function(){return false},getData:function(){return this.data.Listing}}));f=RegExp("/","g");$("ul.fil_ariane").children().last().empty().append(a.CategoryDisplayName);a.CategoryBandeauHautVisible&&a.CategoryBandeauHaut.indexOf("<script ")==-1&&$("div.bk_banniere").empty().append(a.CategoryBandeauHaut);a.CategoryTeaserVisible&&a.CategoryTeaser.indexOf("<script ")==-1&&$("#TeaserListing").empty().append(a.CategoryTeaser);$("#ULFiltreType").empty();$.tmpl("filtreTemplate-ul",a.Types).appendTo("#ULFiltreType");
$("#ULFiltreType a").each(function(){if($(this).html()==a.LibSelectedType)return $(this).parent().addClass("selected"),false});$("#ULFiltreStyles").empty();$.tmpl("filtreTemplate-ul",a.Styles).appendTo("#ULFiltreStyles");$("#ULFiltreStyles a").each(function(){if($(this).html()==a.SelectedStyle)return $(this).parent().addClass("selected"),false});$("#ULFiltreCouleurs").empty();$.tmpl("filtreTemplate-ul-color",a,{getData:function(){return this.data.Colors}}).appendTo("#ULFiltreCouleurs");$("#ULFiltreCouleurs a").each(function(){($(this).attr("title")==
a.SelectedColor||$(this).html()==a.SelectedColor)&&!$(this).parent().hasClass("selected")?$(this).parent().addClass("selected"):$(this).removeClass("selected")});$("#ULFiltresTailles").empty();$.tmpl("filtreTemplate-ul",a.Sizes).appendTo("#ULFiltresTailles");$("#ULFiltresTailles a").each(function(){$(this).html()==a.SelectedSize&&!$(this).parent().hasClass("selected")?$(this).parent().addClass("selected"):$(this).removeClass("selected")});$("#ULFiltrePrix").empty();$.tmpl("filtreTemplate-ul",a.Prices).appendTo("#ULFiltrePrix");
$("#ULFiltrePrix a").each(function(){$(this).html()==a.SelectedPrice.replace(">","&gt;")&&!$(this).parent().hasClass("selected")?$(this).parent().addClass("selected"):$(this).removeClass("selected")});d=a.PagerInfos.ItemTotal;a.CategoryBandeauDroitVisible&&a.CategoryBandeauDroit!=""&&(d-=1);a.PagerInfos.ItemTotal>1?$("#NbProduits").html(d+" Produits"):$("#NbProduits").html(d+" Produit");d="";d=a.PagerInfos.PreviousPageUrl!=""?'<li><a href="'+a.PagerInfos.PreviousPageUrl+"\" class='left'>&lt;</a></li>":
'<li><a href="'+a.PagerInfos.PreviousPageUrl+"\" class='left vh'>&lt;</a></li>";d+="<li><span>"+a.PagerInfos.PageNumber+'<span class="NbPages"> / '+a.PagerInfos.PageTotal+"</span></span></li>";d+=a.PagerInfos.NextPageUrl!=""?'<li><a href="'+a.PagerInfos.NextPageUrl+"\" class='right'>&gt;</a></li>":'<li><a href="'+a.PagerInfos.NextPageUrl+"\" class='right vh'>&gt;</a></li>";$(".PaginationBottom").html(d);$(".PaginationTop").html(d);$("div.LessMoreProducts a").attr("href",a.PagerInfos.SizePageUrl);
nbProduitsPageListeMin==""&&(nbProduitsPageListeMin=12);a.PagerInfos.PageSize==nbProduitsPageListeMin?($("div.LessMoreProducts a").html("Afficher <span>+</span> de produits"),$("div.LessMoreProducts a").addClass("BigSize"),$("div.LessMoreProducts a").removeClass("SmallSize")):($("div.LessMoreProducts a").html("Afficher <span>-</span> de produits"),$("div.LessMoreProducts a").addClass("SmallSize"),$("div.LessMoreProducts a").removeClass("BigSize"));pageLoaded=true;closeOverlay();c&&$.scrollTo($("#topliste"),
{speed:0});pageTracker._trackPageview("/eshopping/"+b.categoryName+"/"+a.LibSelectedType+"-"+a.SelectedStyle+"-"+a.SelectedSize+"-"+a.SelectedColor+"-"+a.SelectedPrice+"/"+a.PagerInfos.PageNumber);b="/history/"+b.catalogName+"-"+b.categoryName+"/"+b.pageType+"-"+b.styleName+"-"+b.colorName+"-"+b.sizeName+"-"+b.priceName+"-"+b.orderBy+"-page-"+a.PagerInfos.PageNumber+"-"+b.pageSizeName+"/"+b.pageLibelle;c=$("#HID_HistoryPointInit").val();b.indexOf(c)==-1&&c!="null"&&setHistoryPoint(b)}
function nextPreviewDisplay02(a){$(".BlocListPaginationNext").hide();$(".BlocListPaginationPreview").hide();if($(".BlocListPaginationNext")!=null){var b=$(".BlocListPaginationNext").clone();b.find(".blocnext").html(a.DivNextText);b.css("display",a.DivNextShow);b.hover(function(){$(this).find(".Fleche00").attr("src","http://medias.camaieu.fr/images/fleche00-hover.gif")},function(){$(this).find(".Fleche00").attr("src","http://medias.camaieu.fr/images/fleche00.gif")});b.appendTo($("#content_listingPdts"))}$(".BlocListPaginationPreview")!=
null&&(b=$(".BlocListPaginationPreview").clone(),b.find(".blocpreview").html(a.DivPreviewText),b.css("display",a.DivPreviewShow),b.hover(function(){$(this).find(".Fleche01").attr("src","http://medias.camaieu.fr/images/fleche01-hover.gif")},function(){$(this).find(".Fleche01").attr("src","http://medias.camaieu.fr/images/fleche01.gif")}),b.appendTo($("#content_listingPdts")))}
formatPrice=function(a,b){a=a.toString().replace(".",",");a.indexOf(",")<0&&(a+=",00");var d=a.split(",");return b==0?d[0]:(d[1]+"00").substring(0,2)};formatPriceSimple=function(a){a=a.toString().replace(".",",");a.indexOf(",")<0&&(a+=",00");return a};cleanLibelleWeb=function(a){return a.toString().replace("\\'","'")};function switchStyle(a,b,d,c){a.className="selected";b.className="";d.style.display="block";c.style.display="none"}var isNavigate=true;
function setHistoryPoint(a){isNavigate=false;SWFAddress.getValue().indexOf(a)==-1&&(SWFAddress.setValue(a),SetCookie("CamFiltreActif","true"));isNavigate=true}
var onNavigateHistoryPoint=function(){var a=$("#HID_HistoryPointInit").val();SWFAddress.getValue()!="/"&&isNavigate?ManageAjaxCallHistoryPoint(SWFAddress.getValue(),false):SWFAddress.getValue()=="/"&&GetCookie("CamFiltreActif")=="true"&&a!="null"&&(ManageAjaxCallHistoryPoint(a,false),SetCookie("CamFiltreActif","false"))},ManageAjaxCallHistoryPoint=function(a,b){var d=RegExp("/history/([^-]*)-([^/]*)/([^-]*)-([^-]*)-([^-]*)-([^-]*)-([^-]*)-([^-]*)-page-([^/]*)-([^/]*)/([^.]*)");$("div.LessMoreProducts a").hasClass("BigSize");
d.test(a)&&(Overlay("OverlayImg","true","false"),d=d.exec(a),d.length>0&&AjaxCall(d[1],d[2],d[4],d[6],d[5],d[7],d[9],d[10],d[8],d[2],d[3],d[11],b))};SWFAddress.addEventListener(SWFAddressEvent.CHANGE,onNavigateHistoryPoint);

