
;
function QuickSearch(d,b){QuickSearch.$[d]=this;this.objectName="QuickSearch.$."+d;var c=function(f,e){if(typeof b=="undefined"||typeof b[f]=="undefined"||b[f]===null){return e}return b[f]};this.id=d;this.form=c("form","#"+d+"Form");this.view=c("view","#"+d+"View");this.button=c("button",this.form+" input[type=submit]");this.input=c("input",this.form+" input[name=s]");this.refinement=c("refinement",this.form+" input[name=a]");this.url=c("url","http://search-async.rueducommerce.fr/sengine/SearchCompletionController.php");this.active=c("active",true);this.delay=c("delay",2000);this.timeout=c("timeout",200);this.minLength=c("minLength",2);this.keywordGroup=c("keywordGroup","Mots cl&eacute;s");this.categoryGroup=c("categoryGroup","Cat&eacute;gories");this.productGroup=c("productGroup","Produits");this.position=-1;this.timer=null;this.search="";this.items=[];var a=this;$(this.button).bind("click",function(f){a.submit(-1,f)});$(this.input).bind("keyup",function(){a.keyup()});$(this.input).bind("keydown",function(f){a.keydown(f.keyCode?f.keyCode:f.which,f)});$("body").bind("click",function(){a.hide()})}QuickSearch.$={};QuickSearch.ENTER_KEY=13;QuickSearch.ESCAPE_KEY=27;QuickSearch.ARROW_UP_KEY=38;QuickSearch.ARROW_DOWN_KEY=40;QuickSearch.prototype.xitiTrack=function(a){if(typeof xtTag=="function"){var b=this.id.substr(0,1).toUpperCase()+this.id.substr(1,5);xtTag("Liens"+b,"Search","GoSearch",a,true)}};QuickSearch.prototype.gaTrack=function(c,b,a){if(typeof pageTracker=="object"){pageTracker._trackEvent(c,b,a)}return this};QuickSearch.prototype.submit=function(a,b){if(typeof(a)=="undefined"||a==-1){if($.trim($(this.input).val())==""){return false}this.xitiTrack($(this.input).val());return true}if(a<0||a>this.items.length-1){return false}switch(this.items[a].type){case"keyword":this.gaTrack("Moteur_de_recherche","Autocomplete","Keyword");$(this.input).val(this.items[a].value);$(this.refinement).val("");break;case"category":this.gaTrack("Moteur_de_recherche","Autocomplete","Category");$(this.input).val("");$(this.refinement).val(this.items[a].value);break;case"product":this.gaTrack("Moteur_de_recherche","Autocomplete","Product");this.xitiTrack(this.items[a].label);document.location.href=this.items[a].value;b.preventDefault();b.stopPropagation();return false;default:return false}this.xitiTrack(this.items[a].label);$(this.form).submit();return true};QuickSearch.prototype.keyup=function(){this.send($.trim($(this.input).val()))};QuickSearch.prototype.keydown=function(a,b){switch(a){case QuickSearch.ENTER_KEY:this.submit(this.position,b);break;case QuickSearch.ESCAPE_KEY:this.hide();break;case QuickSearch.ARROW_UP_KEY:this.stepup();break;case QuickSearch.ARROW_DOWN_KEY:this.stepdown();break;default:return}};QuickSearch.prototype.shutdown=function(){this.search="";this.active=false;this.hide();setTimeout(this.objectName+".active = true",this.delay)};QuickSearch.prototype.send=function(a){if(!this.active){return}if(a==""){this.hide()}if(a!=this.search&&a.length>=this.minLength){$.ajax({dataType:"script",cache:true,url:this.url,data:{s:a,callback:this.objectName+".complete"}});if(this.timer!=null){clearTimeout(this.timer)}this.timer=setTimeout(this.objectName+".shutdown()",this.timeout)}this.search=a};QuickSearch.prototype.complete=function(a){if(!this.active){return}if(this.timer!=null){clearTimeout(this.timer)}this.build(a);this.show()};QuickSearch.prototype.show=function(){if(this.items.length!=0){$(this.view).show()}else{this.hide()}};QuickSearch.prototype.hide=function(){$(this.view).hide();this.position=-1};QuickSearch.prototype.formatAutocompleteLabel=function(a){return a.replace(new RegExp("("+this.search+")","gi"),'<span class="h">$1</span>')};QuickSearch.prototype.bindElement=function(b){var a=this;$(b).bind("mouseenter",function(){a.move($("li:not(.head)",a.view).index(this))});$(b).bind("click",function(c){a.submit($("li:not(.head)",a.view).index(this),c)})};QuickSearch.prototype.build=function(c){var b,a;this.items=[];$(this.view).empty();if(c.keywords.length>0){$(this.view).append('<li class="head">'+this.keywordGroup+"</li>");for(b=0;b<c.keywords.length;b++){a=$("<li>"+this.formatAutocompleteLabel(c.keywords[b])+"</li>");this.bindElement(a);$(this.view).append(a);this.items.push({type:"keyword",value:c.keywords[b],label:c.keywords[b]})}}if(c.categories.length>0){$(this.view).append('<li class="head">'+this.categoryGroup+"</li>");for(b=0;b<c.categories.length;b++){a=$("<li>"+this.formatAutocompleteLabel(c.categories[b].name)+"</li>");this.bindElement(a);$(this.view).append(a);this.items.push({type:"category",value:c.categories[b].affin,label:c.categories[b].name})}}if(c.products.length>0){$(this.view).append('<li class="head">'+this.productGroup+"</li>");for(b=0;b<c.products.length;b++){a=$('<li class="p"><table><tr><td class="img"><img src="'+c.products[b].img+'"/></td><td class="txt">'+this.formatAutocompleteLabel(c.products[b].name)+"</td></tr></table></li>");this.bindElement(a);$(this.view).append(a);this.items.push({type:"product",value:c.products[b].url,label:c.products[b].name})}}};QuickSearch.prototype.stepup=function(){this.move(this.position<0?this.items.length-1:this.position-1)};QuickSearch.prototype.stepdown=function(){this.move(this.position>=this.items.length-1?-1:this.position+1)};QuickSearch.prototype.move=function(a){this.position=a;$("li",this.view).removeClass("focus");if(this.position!=-1){$("li:not(.head)",this.view).eq(this.position).addClass("focus")}this.show()};
;
jQuery(function(){var a="20140401";if(typeof(window.resourceProxyUrl)!="undefined"){var c=window.resourceProxyUrl+"/"}else{var c="/"}var d=c+"img/header/sprite_marques_hg.png?version="+a;var b=brandsGridData;if($.cookie("SID")!=5&&self===top){if(typeof(QuickSearch)!="undefined"){new QuickSearch("headerSearch")}}else{if($.cookie("SID")==5){var b=brandsGridDataPro;d=c+"img/header/sprite_marques_hg_pro.png?version="+a}}brandChange(b,d);$("#header .brandLogo .brand").hover(function(){var g=113;var e=$(this).css("backgroundPosition");var h=$(this).css("backgroundPosition").split(" ");var f=parseFloat(h[1])-g;$(this).css({backgroundPosition:h[0]+" "+f+"px"})},function(){var g=113;var e=$(this).css("backgroundPosition");var h=$(this).css("backgroundPosition").split(" ");var f=parseFloat(h[1])+g;$(this).css({backgroundPosition:h[0]+" "+f+"px"})})});if(typeof rc4!="function"){function rc4(a,c,b){a=a.replace(/\[hostrdc\]/g,"www.rueducommerce.fr");a=a.replace(/\[hostavd\]/g,"www.avenidadelcomercio.es");a=a.replace(/\[prot\]/g,"http://");a=a.replace(/\[\|\]/g,"/");a=a.replace(/\[@\]/g,".");a=a.replace(/\[!\]/g,"?");a=a.replace(/\[hostsearch\]/g,"search.rueducommerce.fr");if(c+b!=""){window.open(a,c,b)}else{document.location=a}return true}}if(typeof rdc_click4!="function"){function rdc_click4(a,c,b){a=a.replace(/\[hostrdc\]/g,"www.rueducommerce.fr");a=a.replace(/\[hostavd\]/g,"www.avenidadelcomercio.es");a=a.replace(/\[hostalp\]/g,"www.alapage.com");a=a.replace(/\[prot\]/g,"http://");a=a.replace(/\[\|\]/g,"/");a=a.replace(/\[@\]/g,".");a=a.replace(/\[!\]/g,"?");a=a.replace(/\[hostsearch\]/g,"search.rueducommerce.fr");if(c!=undefined&&b!=undefined&&c+b!=""){window.open(a,c,b)}else{document.location=a}return true}}function brandChange(a,b){$("#header .brandLogo .brand").css({background:"url('"+b+"') no-repeat 0 0"});if(a){$("#header .brandLogo .brand").each(function(c){var d=$(this).attr("data-brand-id");$(this).attr({href:a["brand-"+d]["url"]});$(this).css({"background-position":a["brand-"+d]["backgroundPosition"]})})}}var brandsGridData={"brand-1":{backgroundPosition:"1px -10px",url:"http://www.rueducommerce.fr/~garmin"},"brand-2":{backgroundPosition:"-61px -10px",url:"http://www.rueducommerce.fr/~apple"},"brand-3":{backgroundPosition:"-119px -9px",url:"http://www.rueducommerce.fr/~htc"},"brand-4":{backgroundPosition:"-179px -9px",url:"http://www.rueducommerce.fr/~acer"},"brand-5":{backgroundPosition:"-240px -9px",url:"http://www.rueducommerce.fr/~samsung"},"brand-6":{backgroundPosition:"1px -45px",url:"http://www.rueducommerce.fr/~hp"},"brand-7":{backgroundPosition:"-61px -46px",url:"http://www.rueducommerce.fr/~bosch"},"brand-8":{backgroundPosition:"-119px -47px",url:"http://www.rueducommerce.fr/~whirlpool"},"brand-9":{backgroundPosition:"-180px -47px",url:"http://www.rueducommerce.fr/~dunlopillo"}};var brandsGridDataPro={"brand-1":{backgroundPosition:"1px -10px",url:"http://www.rueducommerce.fr/~apc"},"brand-2":{backgroundPosition:"-61px -10px",url:"http://www.rueducommerce.fr/~lenovo"},"brand-3":{backgroundPosition:"-119px -9px",url:"http://www.rueducommerce.fr/~canon"},"brand-4":{backgroundPosition:"-179px -9px",url:"http://www.rueducommerce.fr/~hp"},"brand-5":{backgroundPosition:"-240px -9px",url:"http://www.rueducommerce.fr/~microsoft"},"brand-6":{backgroundPosition:"1px -45px",url:"http://www.rueducommerce.fr/~acer"},"brand-7":{backgroundPosition:"-61px -46px",url:"http://www.rueducommerce.fr/~xerox"},"brand-8":{backgroundPosition:"-119px -47px",url:"http://www.rueducommerce.fr/~brother"},"brand-9":{backgroundPosition:"-180px -47px",url:"http://www.rueducommerce.fr/~tp-link"}};$("#headerSearchForm input[name=s], #footerSearchForm input[name=s], #pagecolgauche input[name=s]").each(function(){$(this).bind("focus",function(b){if($(this).val()==$(this).attr("placeholder")){$(this).val("")}}).bind("blur",function(b){if($(this).val()==""||$(this).val()==$(this).attr("placeholder")){$(this).val($(this).attr("placeholder"))}}).blur();var a=this;$(this).parents("form").bind("submit",function(b){if($(a).val()==$(a).attr("placeholder")){$(a).val("")}})});
;
function buildHeaderCart(a){jQuery(function(){var f=0;f+=a.count;if(a.account){jQuery("#header .account .accountName").html("Bonjour "+a.account.firstname)}var b=(window.location.protocol=="https:")?"https://static.rueducommerce.fr":"http://s1.static69.com";for(var d=0;d<a.items.length;d++){var e="";if(a.items[d].image){e=b+a.items[d].image}var c='<li><div class="prdt-img"><a href="'+a.items[d].url+'"> <img src="'+e+'" alt="Produit"></a></div><div class="prdt-data"><a href="'+a.items[d].url+'"><h2 class="name">'+a.items[d].name+'</h2><p class="descr"> Quantit&eacute; : '+a.items[d].quantity+'</p><p class="price">'+a.items[d].price+"</p></a></div>";jQuery(".cart-list").prepend(c);$(".account .icn-account").css({"background-position":"0px -186px"})}if(f){if(f>0){jQuery(".quantityMiniCart").html("("+f+")");if(self!==top){return false}$(".topbarUserActions .cart").hover(function(){$(this).addClass("hover");$(".cart-preview-panel",this).addClass("active")},function(){$(this).removeClass("hover");$(".cart-preview-panel",this).removeClass("active")})}}if($(".quantityMiniCart").html().match("[0-9]")=="0"){$(".quantityMiniCart").removeClass("orangePrice");$(".quantityMiniCart").addClass("fBlack")}else{$(".quantityMiniCart").removeClass("fBlack");$(".quantityMiniCart").addClass("orangePrice")}})};
;
(function(b,d){function a(f,e){this._nodes={core:f};this._initialize(e!==d?e:{})}a.prototype={_bindEvents:function(){var e=this;b(this._nodes.closeButton).on("click."+this._namespace,function(g){g.preventDefault();e.close()});b(window).on("resize."+this._namespace,function(){e.place()});var f=[b(window).scrollLeft(),b(window).scrollTop()];b(window).on("scroll."+this._namespace,function(){var h=e._getContainerSize();var g=e._getViewportSize();var k=[b(this).scrollLeft(),b(this).scrollTop()];for(var j=0;j<k.length;j++){if(f[j]!==k[j]){if(h[j]>g[j]){e._placeOverlay()}else{e.place()}f[j]=k[j];return}}});if(this._closeOnEscape){b(window).on("keydown."+this._namespace,function(h){var g=h.keyCode?h.keyCode:h.which;if(g==27){h.preventDefault();e.close()}})}return this},_buildDOMTree:function(){b(this._nodes.core).wrap('<div class="popup-wrapper"></div>');this._nodes.wrapper=this._nodes.core.parentNode;b(this._nodes.wrapper).wrap('<div class="popup-container"></div>');this._nodes.container=this._nodes.wrapper.parentNode;this._nodes.overlay=b('<div class="popup-overlay"></div>').get(0);this._nodes.closeButton=b('<button class="popup-close-button">'+this._closeText+"</button>").get(0);this._nodes.cache=[b('<div class="popup-cache-overlay"></div>').get(0),b('<div class="popup-cache-loader"></div>').get(0)];b(this._nodes.container).before(this._nodes.overlay);b(this._nodes.container).prepend(this._nodes.closeButton);b(this._nodes.wrapper).prepend(this._nodes.cache[1]);b(this._nodes.wrapper).prepend(this._nodes.cache[0]);return this},_buildStyles:function(){var f;b(this._nodes.core).show();b(this._nodes.container).hide();b(this._nodes.overlay).hide();this._paddings={horizontal:b(this._nodes.container).innerWidth()-b(this._nodes.container).width(),vertical:b(this._nodes.container).innerHeight()-b(this._nodes.container).height()};var e=["height","width","max-height","max-width","min-height","min-width"];for(f=0;f<e.length;f++){var g="_"+e[f].replace(/-([a-z])/g,function(i,k){return k.toUpperCase()});if(this[g]>0){var h=this._paddings[(f&1)?"horizontal":"vertical"];b(this._nodes.container).css(e[f],this[g]-h);b(this._nodes.wrapper).css(e[f],this[g]-h)}}var j=this._nodes.cache.concat([this._nodes.overlay,this._nodes.container]);for(f=0;f<j.length;f++){b(j[f]).css("position","absolute")}for(f=0;f<this._nodes.cache.length;f++){b(this._nodes.cache[f]).hide()}this.refreshRatio();return this},_computeByRatio:function(f,e){var g=(f<0?e:f);return g!=0?Math.floor(this._ratio/g):0},_extend:function(f,i){var e={};for(var g in f){if(f.hasOwnProperty(g)){var h=(i!==d&&i[g]!==d)?i[g]:f[g];switch(typeof(f[g])){case"boolean":h=!!h;break;case"number":h=(parseFloat(h)==parseInt(h))?parseInt(h):parseFloat(h);if(isNaN(h)){h=0}break;case"string":h=String(h);break;case"function":if(typeof(h)!=="function"){h=function(){}}break;default:if(f[g]!==null&&typeof(h)!==typeof(f[g])){h=null}}e[g]=h}}return e},_getAutoresizingSize:function(m){var e=this._getContainerSize();var j=[this._width,this._computeByRatio(this._width,-1)];var f=e;if(m[0]<=j[0]||m[1]<=j[1]){var g;var h=[];for(g=0;g<2;g++){h.push([(g&1)?this._computeByRatio(-1,m[g]):m[g],(g&1)?m[g]:this._computeByRatio(m[g],-1)])}var k=0;var l=Number.MAX_VALUE;for(g=0;g<h.length;g++){if(h[g][0]<=m[0]&&h[g][1]<=m[1]){var n=Math.abs(h[g][0]-j[0]);if(n<l){l=n;k=g}}}f=h[k]}return f},_getCenteringOffests:function(e,f){var h=[0,0];for(var g=0;g<2;g++){h[g]=Math.max(0,(e[g]-f[g])>>1)}return[b(window).scrollLeft()+h[0],b(window).scrollTop()+h[1]]},_getContainerSize:function(){return[b(this._nodes.container).innerWidth(),b(this._nodes.container).innerHeight()]},_getViewportSize:function(){return[b(window).innerWidth(),b(window).innerHeight()]},_handle:function(e){if(typeof(this["_"+e])==="function"){return this["_"+e].call(this,this._nodes.core)}return null},_initialize:function(e){var g=this._extend({callOnOpen:false,callOnOpenOnce:false,closeOnEscape:true,destroyOnClose:false,removeContentOnDestroy:false,resizable:false,resizeOnLoad:true,ajax:{},closeText:"Fermer",effectDuration:"fast",height:-1,maxHeight:-1,maxWidth:-1,minHeight:-1,minWidth:-1,width:640,onBuild:null,onCall:null,onClose:null,onDestroy:null,onHide:null,onLoad:null,onPlace:null,onOpen:null,onShow:null,built:null,called:null,closed:null,destroyed:null,hidden:null,loaded:null,placed:null,opened:null,shown:null},e);for(var f in g){if(g.hasOwnProperty(f)){this["_"+f]=g[f]}}this._ajax=this._extend({cache:true,data:null,dataType:null,error:function(){},method:"get",url:"",success:function(){}},this._ajax);this._namespace="popup._";while(this._namespace.length<12){this._namespace+=Math.floor(Math.random()*10)}this._paddings={horizontal:0,vertical:0};this._nodes.cache=[];this._nodes.container=null;this._nodes.overlay=null;this._nodes.closeButton=null;this._nodes.wrapper=null;this._ratio=1;this._isCached=false;this._isBuilt=false;this._isShown=false;return this},_parseDuration:function(e){switch(e){case"slow":return 600;case"normal":return 400;case"fast":return 200;default:return isNaN(parseInt(e))?0:parseInt(e)}},_placeContainer:function(h,j,f,i){var g=this._parseDuration(h);var e=this._getContainerSize();var m;if(this._resizable||i){var l=f!==d?f:this._getAutoresizingSize(j);m=this._getCenteringOffests(j,l);var k={height:e[1]-this._paddings.vertical,width:e[0]-this._paddings.horizontal};b(this._nodes.container).css(k).animate({left:m[0],top:m[1],height:l[1]-this._paddings.vertical,width:l[0]-this._paddings.horizontal},g);b(this._nodes.wrapper).css(k).animate({height:l[1]-this._paddings.vertical,width:l[0]-this._paddings.horizontal},g)}else{m=this._getCenteringOffests(j,e);b(this._nodes.container).animate({left:m[0],top:m[1]},g)}return this},_placeOverlay:function(){b(this._nodes.overlay).css({height:"100%",left:b(window).scrollLeft(),top:b(window).scrollTop(),width:"100%"});return this},_placeCache:function(){for(var e=0;e<this._nodes.cache.length;e++){b(this._nodes.cache[e]).css({height:b(this._nodes.wrapper).innerHeight(),width:b(this._nodes.wrapper).innerWidth()})}return this},_unbindEvents:function(){b(this._nodes.closeButton).off("click."+this._namespace);b(window).off("resize."+this._namespace);b(window).off("scroll."+this._namespace);if(this._closeOnEscape){b(window).off("keydown."+this._namespace)}return this},build:function(){if(!this._isBuilt){this._handle("onBuild");this._buildDOMTree();this._buildStyles();this._isBuilt=true;this._handle("built")}return this},cache:function(e){if(e===d){e=!this._isCached}var f;if(e){this._placeCache();for(f=0;f<this._nodes.cache.length;f++){b(this._nodes.cache[f]).show()}this._isCached=true}else{for(f=0;f<this._nodes.cache.length;f++){b(this._nodes.cache[f]).hide()}this._isCached=false}return this},call:function(h){var f=this._extend(this._ajax,h);if(f.url!==""){this._handle("onCall");var e=this;this.cache(true);var g=function(j){e.cache(false);var i=j();if(i!==d){e.load({node:i})}};b.ajax({async:true,cache:f.cache,data:f.data,dataType:f.dataType,error:function(i,k,j){g(function(){return f.error.call(e,e._nodes.core,i,k,j)})},success:function(j,k,i){g(function(){return f.success.call(e,e._nodes.core,j,i,k)})},type:f.method,url:f.url});this._handle("called")}return this},callAtNextOpen:function(){this._callOnOpenOnce=true;return this},close:function(){if(this._isShown){this._handle("onClose");if(this._destroyOnClose){this.destroy()}else{CartPostAdd=0;this.hide()}this._handle("closed")}return this},destroy:function(){if(this._isBuilt){this._handle("onDestroy");this._unbindEvents();if(this._removeContentOnDestroy){this._nodes.core=null}else{b(this._nodes.core).hide();b(this._nodes.core).insertAfter(this._nodes.overlay)}b(this._nodes.overlay).remove();b(this._nodes.container).remove();this._isBuilt=false;this._handle("destroyed")}return this},hide:function(){if(this._isShown){this._handle("onHide");this._unbindEvents();b(this._nodes.overlay).hide();b(this._nodes.container).hide();this._isShown=false;this._handle("hidden")}return this},isDead:function(){return this._nodes.core===null},load:function(h){var g=this._extend({node:null,width:-1,height:-1,resize:this._resizeOnLoad},h);if(g.node===null){return this}this._handle("onLoad");var e=this._getContainerSize();if(g.resize){var f;if(g.width>0&&g.height>0){f=[g.width,g.height]}else{var i=b(g.node).clone();b(this._nodes.core).prepend(i);b(i).css({left:0,position:"absolute",top:0,visibility:"hidden",width:(g.width>0?g.width:e[0])-this._paddings.horizontal});f=[g.width>0?g.width:b(i).outerWidth()+this._paddings.horizontal,g.height>0?g.height:b(i).outerHeight()+this._paddings.vertical];b(i).remove()}this._placeContainer(this._effectDuration,this._getViewportSize(),f,g.resize);this.refreshRatio({width:f[0],height:f[1]})}b(g.node).hide();b(this._nodes.core).empty();b(this._nodes.core).append(g.node);if(!g.resize){this._placeContainer(0,this._getViewportSize(),e,true)}b(g.node).fadeIn(this._effectDuration);this._handle("loaded");return this},open:function(){this._handle("onOpen");if(!this._isBuilt){this.build()}this.show();if(this._callOnOpen||this._callOnOpenOnce){this._callOnOpenOnce=false;this.call()}this._handle("opened");return this},place:function(e){this._handle("onPlace");this._placeContainer(e,this._getViewportSize());this._placeOverlay();this._placeCache();this._handle("placed");return this},refreshRatio:function(e){var f=this._extend({width:b(this._nodes.container).innerWidth(),height:b(this._nodes.container).innerHeight()},e);this._ratio=f.width*f.height;this._width=f.width;this._height=f.height;return this},show:function(){if(!this._isShown){this._handle("onShow");this.place();this._bindEvents();b(this._nodes.overlay).show();b(this._nodes.container).fadeIn(this._effectDuration);this._isShown=true;this._handle("shown")}return this}};var c={_id_attribute_name:"data-jpppid",_items:{},_generate_unique_id:(function(e){return function(){return(function f(i,g,k,h,j){if(g<i.length){if(h<=0){return k}return f(i.substr(j)+i.substr(0,j),g,k+i[g],h-1,j)}return f(i,g-i.length,k+i[Math.floor(Math.random()*i.length)],h,j)})("h4kli8tzydjwpfxc7voruqm5219e063gnsba",e++,String.fromCharCode(Math.floor(Math.random()*26)+97),9,4)}})(0),_run_garbage_collector:function(){for(var e in this._items){if(this._items.hasOwnProperty(e)){if(this._items[e].isDead()){delete this._items[e]}}}},get:function(f,e){this._run_garbage_collector();var g=b(f).attr(this._id_attribute_name);if(g===d||g===false||this._items[g]===d){g=this._generate_unique_id();b(f).attr(this._id_attribute_name,g);this._items[g]=new a(f,e)}return this._items[g]}};b.fn.popup=function(f,g){var e=c.get(this.get(0),f);if(typeof(f)==="string"){return(function(i,l,k,h){if(typeof(i[l])==="function"&&l[0]!=="_"){var j=i[l](k);return(j!==i)?j:h}console.log("Popup: Call to undefined or private method "+l);return h})(e,f,g,this)}e.open();return this};b.popup=function(e){var f=b("<div></div>");b("body").append(f);return b(f).popup(b.extend({destroyOnClose:true,removeContentOnDestroy:true,height:360},e))}})(jQuery);
;
jQuery(function(){changeColorSearch();$(".no-js").removeClass("js").removeClass("no-js")});function showSite(){}function getSiteId(){var a=$.cookie("SID");if(a==null){a=0}return a}function setSiteId(a){var b=document.location.toString().replace(/http:\/\/(.*?)\/.*/,"$1").replace(/.*?\.([^.]+\.[^.]+)$/,"$1");return $.cookie("SID",parseInt(a),{domain:"."+b,expires:$.now()*60*60*24*365,path:"/"})}function setCookieSitePro(){return setSiteId(5)}function confirmPopup(b){var a=getSiteId();if(confirm("Cette action va supprimer les articles de votre panier ! souhaitez-vous continuer ?")){clearCartCookie();if(b==5){$.cookie("SID",5,{domain:".rueducommerce.fr",path:"/"});top.location.href="http://pro.rueducommerce.fr/pro/"}else{if(a==5){$.cookie("SID",0,{domain:".rueducommerce.fr",path:"/"});top.location.href="http://www.rueducommerce.fr/"}}}}function clearCartCookie(){var a=document.location.toString().replace(/http:\/\/(.*?)\/.*/,"$1").replace(/.*?\.([^.]+\.[^.]+)$/,"$1");$.cookie("cart",null,{domain:"."+a,path:"/"})}function setCookieSiteParticulier(){return setSiteId(0)}function gotoSitePro(){confirmPopup(5)}function gotoSiteParticulier(){confirmPopup(0)}function setDisclaimerCookie(){$.cookie("disclaimer","accepter",{domain:".rueducommerce.fr",expires:$.now()*60*60*24*365,path:"/"})}function changeColorSearch(){$(".global-search-field").keyup(function(){if($(this).val().length!=0){$(this).removeClass("placeholder");$(this).addClass("placeholderNi")}else{$(this).addClass("placeholder");$(this).removeClass("placeholderNi")}})}function refresh(){if($.cookie("gender2")==="Man"){}if($.cookie("gender2")==="Woman"){}$("#navongl").removeClass("tohide");$("#affixNav").removeClass("tohide");try{if(!((typeof(tc_vars)!="undefined"&&typeof(tc_vars.template)!="undefined"&&tc_vars.template.mkt0=="PRODUCT-PAGE")||typeof(tpp)!="undefined")){$("#changeGenderBtn").removeClass("tohide");$("#pageInterdite").removeClass("tohide");$("#changeTheme").removeClass("tohide")}}catch(a){console.log(a)}$("#goToForbiddenPageAuth").removeClass("tohide");try{$("#changeTheme").css("left",$("#page").offset().left-$("#changeTheme").outerWidth()-17)}catch(a){}$header_menu.adjust()}$("document").ready(function(){var g=(document.location.protocol=="http:"?"http://s3.static69.com":"https://static.rueducommerce.fr");var h={Man:"homme",Woman:"femme"};var f={Man:{rdctheme1:"noel",rdctheme2:"auto",rdctheme3:"style",rdctheme4:"hero",rdctheme5:"sexy"},Woman:{rdctheme1:"theboss",rdctheme2:"Girls",rdctheme3:"noel",rdctheme4:"Chat",rdctheme5:"Sexy"}};$.ajax({dataType:"script",cache:true,url:g+"/eros/js/lib/confidentialite_header.js"});$("head").append('<link href="'+g+"/styles/shop"+getSiteId()+'.css" rel="stylesheet" type="text/css">');var c=function(){if($("#page").length!=0){$("#affixNav").css("left",$("#page").offset().left+$("#page").width()+10)}};$(window).resize(function(){c()});c();$(".blcScrollTo").each(function(){$("#affixNav [data-scroll-to="+$(this).attr("data-scroll-to")+"]").show();$("#affixNav").show()});$("#affixNav .linkScrollTo").click(function(){$("html, body").animate({scrollTop:$(".blcScrollTo[data-scroll-to="+$(this).attr("data-scroll-to")+"]:first").offset().top},500)});$("#affixNav").removeClass("tohide");$("#navongl").removeClass("tohide");$("#navongl .headerMenuTab").removeClass("tohide");var d={};d.choose=function(k){$.cookie("gender2",k,{expires:365,path:"/",domain:"rueducommerce.fr"});d.apply(k);refresh();j("rdctheme"+(k=="Man"?1:3))};d.other=function(k){return k==="Man"?"Woman":"Man"};d.pluralize=function(k){return k==="Man"?"Men":"Women"};d.apply=function(k){if(k==="Man"||k==="Woman"){$("body").removeClass("IMAMan");$("body").removeClass("IMAWoman");$("body").addClass("IMA"+k);$("._only4Men").removeClass("_only4Men").addClass("only4Men");$("._only4Women").removeClass("_only4Women").addClass("only4Women");$(".only4"+d.pluralize(k)).removeClass("only4"+d.pluralize(k)).addClass("_only4"+d.pluralize(k))}};if($.cookie("gender2")==="Man"||$.cookie("gender2")==="Woman"){d.apply($.cookie("gender2"));refresh()}else{d.choose("Man")}function a(){if($.cookie("rdctheme")==null){j("rdctheme"+Math.floor((Math.random()*1)+1))}$("body")[0].className=$("body")[0].className.replace(/rdctheme\d/g,"");if(!$("body").hasClass($.cookie("rdctheme"))){$("body").addClass($.cookie("rdctheme"))}if(!$("body").hasClass("rdcthemebackground")){$("body").addClass("rdcthemebackground")}}function j(k){$.cookie("rdctheme",k,{path:"/",domain:".rueducommerce.fr"});a()}if(window.location.hostname.indexOf("client")==-1&&window.location.hostname.indexOf("customer")==-1&&window.location.hostname.indexOf("cart")==-1&&window.location.hash.indexOf("moid")==-1&&window.location.pathname.indexOf("selection")==-1&&window.location.hostname.indexOf("search")==-1&&window.location.pathname.indexOf("/index/")==-1&&window.location.pathname.indexOf("/home/index.cfm/page_hello_bank_090514.html")==-1&&$("meta[content*=':product']").length!==1){a()}if($.cookie("gender2")==="Man"){$("#changeGenderBtn .woman").removeClass("tohide");$("#changeGenderBtn .men").addClass("tohide")}if($.cookie("gender2")==="Woman"){$("#changeGenderBtn .men").removeClass("tohide");$("#changeGenderBtn .woman").addClass("tohide")}$("#changeGenderBtn li[data-gender]").click(function(){if($(this).attr("data-gender")=="Man"){try{$("body").append('<img width="1" height="1" alt="" src="http://logc138.xiti.com/hit.xiti?s=501648&s2=&p=ope_homme_femme::pop-in::bouton_homme&clic=N&type=click" >')}catch(k){}$("#changeGenderBtn .woman").removeClass("tohide");$("#changeGenderBtn .men").addClass("tohide")}if($(this).attr("data-gender")=="Woman"){try{$("body").append('<img width="1" height="1" alt="" src="http://logc138.xiti.com/hit.xiti?s=501648&s2=&p=ope_homme_femme::pop-in::bouton_femme&clic=N&type=click" >')}catch(k){}$("#changeGenderBtn .men").removeClass("tohide");$("#changeGenderBtn .woman").addClass("tohide")}d.choose($(this).attr("data-gender"))});var b=function(){try{$("#changeGenderBtn").css("left",$("#page").offset().left+$("#page").width()+10);$("#pageInterdite").css("left",$("#page").offset().left+$("#page").width()+10)}catch(k){}};$(window).resize(function(){b()});$(window).resize(function(){$("#goToForbiddenPageAuth").css("left",($(window).width()-$("#goToForbiddenPageAuth").width())/2);$("#goToForbiddenPageAuth").css("top",($(window).height()-$("#goToForbiddenPageAuth").height())/2)});b();$("#changeGenderBtn").show();$("#changeTheme li").click(function(){if($(this).attr("data-theme")){try{$("body").append('<img width="1" height="1" alt="" src="http://logc138.xiti.com/hit.xiti?s=501648&s2=&p=ope_homme_femme::choix_theme_'+h[$.cookie("gender2")]+"::"+f[$.cookie("gender2")]["rdctheme"+($(this).attr("data-theme"))]+'&clic=N&type=click" >')}catch(k){}j("rdctheme"+($(this).attr("data-theme")));a()}});var i=function(){try{$("#changeTheme").css("left",$("#page").offset().left-$("#changeTheme").outerWidth()-17)}catch(k){}};$(window).resize(function(){i()});i();if(window.location.hostname.indexOf("client")==-1&&window.location.hostname.indexOf("customer")==-1&&window.location.hostname.indexOf("cart")==-1&&window.location.hash.indexOf("moid")==-1&&window.location.pathname.indexOf("selection")==-1&&window.location.hostname.indexOf("search")==-1&&window.location.pathname.indexOf("/index/")==-1&&window.location.pathname.indexOf("/home/index.cfm/page_hello_bank_090514.html")==-1){$("#changeTheme").show()}else{$("body").removeClass("rdcthemebackground");$("#changeTheme").hide();$("#changeGenderBtn").hide();$("#pageInterdite").hide()}var e=function(){$("#goToForbiddenPageAuth form input[name=gender]").val(($.cookie("gender2")?$.cookie("gender2"):"man").toLowerCase());$("#goToForbiddenPageAuth").removeClass("tohide");$("#goToForbiddenPageAuth").show();$("#goToForbiddenPageAuth").css("left",($(window).width()-$("#goToForbiddenPageAuth").width()-100)/2);$("#goToForbiddenPageAuth").css("top",($(window).height()-$("#goToForbiddenPageAuth").height()-100)/2);$("#goToForbiddenPageAuth  form input[name=password]").focus();$("body").append('<div class="opacityContainerCode"></div>');$(".opacityContainerCode").click(function(){$("#goToForbiddenPageAuth").hide();$(".opacityContainerCode").remove()});$("#goToForbiddenPageAuth .btnFemer").click(function(){$("#goToForbiddenPageAuth").hide();$(".opacityContainerCode").remove()})};if(typeof(_forceShowForbiddenForm)!="undefined"&&_forceShowForbiddenForm===true){e()}$("#pageInterdite li[data-gender]").click(function(){try{$("body").append('<img width="1" height="1" alt="" src="http://logc138.xiti.com/hit.xiti?s=501648&s2=&p=ope_homme_femme::telecommande::page_interdite_'+h[$.cookie("gender2")]+'&clic=N&type=click" >')}catch(k){}if($.cookie("forbiddenPageToken")){$.ajax({type:"POST",dataType:"json",url:$("#goToForbiddenPageAuth form").attr("action"),data:{token:$.cookie("forbiddenPageToken"),gender:($.cookie("gender2")?$.cookie("gender2"):"man").toLowerCase()},success:function(l){document.location.href=l.url},error:function(l){e()}})}else{e()}});$("#goToForbiddenPageAuth form").submit(function(){$.ajax({type:"POST",dataType:"json",url:$("#goToForbiddenPageAuth form").attr("action"),data:{password:$("#goToForbiddenPageAuth form input[name=password]").val(),gender:$("#goToForbiddenPageAuth form input[name=gender]").val()},success:function(k){$.cookie("forbiddenPageToken",k.token,{path:"/",domain:"rueducommerce.fr"});document.location.href=k.url},error:function(k){alert("bad password")}});return false})});
;
var crtg_nid="3491";var crtg_cookiename="crtg_rta";var crtg_varname="crtg_content";function crtg_getCookie(c){var d,a,e,b=document.cookie.split(";");for(d=0;d<b.length;d++){a=b[d].substr(0,b[d].indexOf("="));e=b[d].substr(b[d].indexOf("=")+1);a=a.replace(/^\s+|\s+$/g,"");if(a==c){return unescape(e)}}return""}var crtg_content=crtg_getCookie(crtg_cookiename);var crtg_rnd=Math.floor(Math.random()*99999999999);(function(){var a="https://rtax.criteo.com/delivery/rta/rta.js?netId="+escape(crtg_nid);a+="&cookieName="+escape(crtg_cookiename);a+="&rnd="+crtg_rnd;a+="&varName="+escape(crtg_varname);var b=document.createElement("script");b.type="text/javascript";b.src=a;b.async=true;if(document.getElementsByTagName("head").length>0){document.getElementsByTagName("head")[0].appendChild(b)}else{if(document.getElementsByTagName("body").length>0){document.getElementsByTagName("body")[0].appendChild(b)}}})();
;
$header_menu={_second_level_loaded:false,_second_level_listeners:[],add_second_level_listener:function(a){if(typeof a=="function"){if(this._second_level_loaded){a()}else{this._second_level_listeners.push(a)}}return this},adjust:function(){$("#menunav .headerMenuTab").removeClass("visible");$("#menunav .headerMenuTab").each(function(){if($(this).css("display")=="block"){$(this).addClass("visible")}});$("#navongl > ul > li:not(#tabhome)").css("width","auto");var c=jQuery("#menunav").width();var b=0;var a=[];var f=0;var d=0;$("#menunav .headerMenuTab.visible").each(function(g){f++;if(g==f-1){var h=jQuery(this).outerWidth()}else{var h=jQuery(this).outerWidth()-1}h=h+1;a.push(h);b+=h});if(b!=c){var e=Math.ceil((c-b)/f);$("#menunav .headerMenuTab.visible").each(function(h){var g=jQuery(this).outerWidth();if(h==f-1){jQuery(this).width(((c-b)-(h*e)+g))}else{jQuery(this).width(g+e)}})}return this},load_second_level:function(){$.ajax({cache:true,url:this._static_resource("/eros/service/HeaderMenu/getSecondLevel?execute=$header_menu._load_second_level"),dataType:"script",method:"GET"});return this},_add_trackers:function(){$("#menunav").children("li").each(function(f,g){var e=a($(g).children("a").text()),d={nouveautes:"Nouveaute",flash:"VenteFlash",top_ventes:"TopVente",refund:"ODR","private":"VentePrivee",bargain:"BonnesAffaires"},h;b($(g).children("a")[0],"MainLink",e);$(g).find(".sousMenu .content .column > ul").each(function(k,i){$(i).find("li.group a").each(function(l,m){b(m,"SubLink",e.concat("::"+a($(m).text())))});for(var j in d){$(i).find("li."+j+" a").each(function(l,m){b(m,d[j]+"_Flag",e.concat("::"+a($(m).text())))});h=$(i).find("li."+j);while(h.next().hasClass("link")===true){h=h.next();b(h.find("a"),d[j]+"_Lien",e.concat("::"+a(h.find("a").text())))}}$(i).find("li.anico_html a").each(function(l,m){b(m,"Banniere1",e.concat("::BANNIERE1"))})});$(g).find("div.tab_link a").each(function(i,j){b(j,"Voir_tout_lunivers",e.concat("::UNIVERS"))})});return this;function b(f,e,d){return $(f).addClass("HeaderLink").attr("data-tracktype",e).attr("data-trackname",d)}function a(f){var d="ÀÂÄÇÉÈÊËÎÏÔÖÙÛÜ";var g="AAACEEEEIIOOUUU";return f.replace(/[-&_,"'\/]/g,"").toUpperCase().replace(new RegExp("["+d+"]","g"),e);function e(h){return g.charAt(d.indexOf(h[0]))}}function c(d){return a($(d).find("img").attr("src").replace(/^.*?(?:\d+x\d+_?)?([^\/]+)\.[a-z]+$/i,"$1"))}},_bind_events:function(){var c=null,h=false,f=null,e=null;$("#menunav").children("li").each(function(){$(this).bind("mouseenter",d).bind("mouseleave",g)});return this;function d(){c=$(this).attr("id");if(h){a()}else{if(f===null){f=setTimeout(a,250)}}}function g(){c=null;if(e===null){e=setTimeout(b,150)}}function a(){f=null;if(c!=null&&$("#"+c).find("div.sousMenuContainer").length!=0){h=true;$("div.sousMenuContainer").hide();var j=[];$("#"+c).find("div.sousMenuContainer").show();$("#"+c).find("div.column").each(function(){j.push($(this).height())});var i=Math.max.apply(null,j);$("#"+c).find("div.column").each(function(){$(this).css("height",i)})}}function b(){e=null;if(c==null){$("div.sousMenuContainer").hide();h=false}}},_load_second_level:function(f){if(typeof f.menu=="object"){for(var g=0;g<f.menu.length;g++){var a=f.menu[g],m="#tab".concat(a.id);if($(m).length>0){$(m).children(".sousMenuContainer").remove();if(!$(m).hasClass("nosubmenu")){$(m).append('<div class="sousMenuContainer"><div class="sousMenu"><div class="content"></div></div></div>');for(var e=0;e<a.columns.length;e++){var b=$('<div class="column'+((e==4&&a.columns[e].links.length>0)?" last":"")+'"><ul></ul></div>');for(var d=0;d<a.columns[e].links.length;d++){var h=a.columns[e].links[d];var l=$('<li class="'+(typeof h.css_class!="undefined"?h.css_class:"")+'"></li>');if(h.css_class.indexOf("group")>-1){$(l).append('<div class="img_group"> </div>')}else{if(h.css_class.indexOf("brand")>-1){$(l).append('<div class="img_brand"> </div>')}}$(l).append('<a href="'+h.url+'"'+(h.noFollow=="1"?' rel="nofollow"':"")+(h.url==""?' class="link_disabled"':"")+">"+h.label+"</a>");if(h.css_class.indexOf("nouveautes")>-1||h.css_class.indexOf("top_ventes")>-1||h.css_class.indexOf("flash")>-1||h.css_class.indexOf("refund")>-1){$(l).append('<div class="img_special"> </div>')}$(b).children("ul").append(l)}$(m).find(".content").append(b);if(e==4){$(b).children("ul").append('<li class="anico_html">'+a.anico_html_block+"</li>")}}}}if(!$(m).hasClass("nosubmenu")){$(m).find(".content").append('<div class="tab_link"><div class="img_tab_link"> </div><a href="'+a.url+'"'+(a.nofollow=="1"?' rel="nofollow"':"")+">ACCEDER A L'UNIVERS "+a.label.toUpperCase()+"</a></div>")}$(m).find(".content").append('<div class="clear"></div>')}}if(typeof f.destockage=="string"){var c="#tab12";$(c).children("div").remove();$(c).append($(f.destockage))}this._bind_events();this._add_trackers();this._trigger_second_level_loaded();return this},_static_resource:function(b){var a=window.location.hostname;if(window.location.hostname.match(/^\w+\.rueducommerce\.fr/i)){a=window.location.protocol=="https:"?"static.rueducommerce.fr":"s1.static69.com"}else{a=a.replace(/^[^.]+\./,"www.")}return window.location.protocol+"//"+a+"/"+b.replace(/^\/+/,"")},_trigger_second_level_loaded:function(){this._second_level_loaded=true;for(var a=0;a<this._second_level_listeners.length;a++){this._second_level_listeners[a]()}return this}};$(document).ready(function(){$header_menu.adjust();if(window.loadHeaderMenuSecondLevel){$header_menu.load_second_level()}});
;
(function(){try{var a=[$.cookie("cart"),$.cookie("token")].map(function(c){return c?encodeURIComponent(c):""}).join("");if(a.length>0){$.ajax({cache:true,url:window.location.protocol+"//"+window.location.host.replace(/^\w+/,"cart").concat("/Cart/Summary.jsonp"),dataType:"script",data:{limit:3,callback:"buildHeaderCart",ts:a}})}}catch(b){}})();
;
function Proxy(a,b){this.url=a;this.urlResource=b}Proxy.prototype.proxifyJquery=function(){var a=this.url;jQuery.originalAjax=jQuery.ajax;jQuery.erosAjax=function(b){if(b.url.match(/^\//)){b.url=a+b.url}jQuery.originalAjax(b)}};Proxy.prototype.proxifyCSS=function(b){if(!b){var b=/url\("\//}var a=this.urlResource;jQuery(document.styleSheets).each(function(c,d){try{jQuery(d.cssRules).each(function(e,g){if(g.style.backgroundImage.match(b)){g.style.backgroundImage=g.style.backgroundImage.replace(b,'url("'+a+"/")}})}catch(f){}})};Proxy.prototype.proxifyBackgroundImage=function(b){if(!b){var b=/^url\("\//}var a=this.urlResource;jQuery('*[proxified!="true"]').each(function(){this.setAttribute("proxified","true");var c=jQuery(this).css("background-image");if(c!="none"){if(c.match(b)){this.style.backgroundImage=c.replace(b,'url("'+a+"$1")}}})};Proxy.prototype.proxifyJavascript=function(b){var a=this.urlResource;if(!b){var b=/^\//}jQuery('script[proxified!="true"]').each(function(){var c=this.getAttribute("src");this.setAttribute("proxified","true");if(c.match(b)){this.setAttribute("src",c.replace(b,""+a+"$1"))}})};Proxy.prototype.proxifyImages=function(b){var a=this.urlResource;if(!b){var b=/^(\/)/}jQuery('img[proxified!="true"]').each(function(){var c=this.getAttribute("src");this.setAttribute("proxified","true");if(c.match(b)){this.setAttribute("src",c.replace(b,""+a+"$1"))}})};Proxy.prototype.live=function(){var a=this;$(document).bind("DOMSubtreeModified",function(){a.proxifyImages(/^(\/img\/)/)})};jQuery(function(){jQuery("script").each(function(){var d=this.getAttribute("src");if(d){if(d.match(/class\/Proxy\.js/)){var c=d.replace(/.*?class\/Proxy\.js(.*?)(;|$)/g,"$1");var b=c.split("#");jQuery(b).each(function(e,f){if(f){var g=f.split("=");if(typeof(window[g[0]])=="undefined"&&g[1]){window[g[0]]=g[1]}}})}}});if(typeof(window.resourceProxyUrl)=="undefined"){window.resourceProxyUrl="/eros"}if(typeof(window.serviceProxyUrl)=="undefined"){window.serviceProxyUrl="/eros"}var a=new Proxy(window.serviceProxyUrl,window.resourceProxyUrl);a.proxifyJquery();a.proxifyImages(/^(\/img)/)});