

/** jquery.js */

/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector)}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector)}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num]},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")"}}return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])}})});return ret},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem)})),"find",selector)}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return}var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data)}}i++})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1})),"filter",selector)},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur}cur=cur.parentNode;closer++}})},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector)}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return !!selector&&this.is("."+selector)},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value}values.push(value)}}return values}return(elem.value||"").replace(/\r/g,"")}return undefined}if(typeof value==="number"){value+=""}return this.each(function(){if(this.nodeType!=1){return}if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length;i<l;i++){callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment)}}if(scripts){jQuery.each(scripts,evalScript)}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy==="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy}}}}}return target};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(obj){return toString.call(obj)==="[object Function]"},isArray:function(obj){return toString.call(obj)==="[object Array]"},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument)},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data))}else{script.text=data}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length===undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return}jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0}})}if(elem.offsetWidth!==0){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,Math.round(val))}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name)}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft}}}}return ret},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])]}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+=""}if(!elem){return}if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}elem=jQuery.makeArray(div.childNodes)}if(elem.nodeType){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i])}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))))}fragment.appendChild(ret[i])}}return scripts}return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined}return elem[name]}if(!jQuery.support.style&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null){if(elem.nodeType!=8){first[pos++]=elem}}}else{while((elem=second[i++])!=null){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret),name,selector)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems)}return this.pushStack(ret,name,selector)}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames)}jQuery.className[state?"add":"remove"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){jQuery.discardElement(this)}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},discardElement:function(element){var jqGCID="jqGarbageCollector";var jqGC=document.getElementById(jqGCID);if(!jqGC){jqGC=document.createElement("div");jqGC.id=jqGCID;jqGC.style.display="none";document.body.appendChild(jqGC)}jqGC.appendChild(element);jqGC.innerHTML=""},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data))}else{if(data){q.push(data)}}}return q},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0]}if(fn!==undefined){fn.call(elem)}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx"}if(data===undefined){return jQuery.queue(this[0],type)}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this)}})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift()}set=posProcess(selector,set)}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}Expr.relative[cur](checkSet,pop,isXML(context))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])}}}}}else{makeArray(checkSet,results)}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1)}}}}}return results};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[]}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break}}}}if(!set){set=context.getElementsByTagName("*")}return{set:set,expr:expr}};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[]}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true}else{curLoop[i]=false}}else{if(pass){result.push(item);anyFound=true}}}}}if(found!==undefined){if(!inplace){curLoop=result}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[]}break}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr}else{break}}old=expr}return curLoop};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase()}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part}}if(isPartStr){Sizzle.filter(part,checkSet,true)}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[]}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])}}return ret.length===0?null:ret}},TAG:function(match,context){return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)}}else{if(inplace){curLoop[i]=false}}}}return false},ID:function(match){return match[1].replace(/\\/g,"")},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true}}return match},POS:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true},parent:function(elem){return !!elem.firstChild},empty:function(elem){return !elem.firstChild},has:function(elem,i,match){return !!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)}},setFilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0==i},eq:function(elem,i,match){return match[3]-0==i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false}}return true}}}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case"only":case"first":while(node=node.previousSibling){if(node.nodeType===1){return false}}if(type=="first"){return true}node=elem;case"last":while(node=node.nextSibling){if(node.nodeType===1){return false}}return true;case"nth":var first=match[2],last=match[3];if(first==1&&last==0){return true}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count}}parent.sizcache=doneName}var diff=elem.nodeIndex-last;if(first==0){return diff==0}else{return(diff%first==0&&diff/first>=0)}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array)}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results}return array};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i])}}else{for(var i=0;array[i];i++){ret.push(array[i])}}}return ret}}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true}return ret}}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true}return ret}}else{if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true}return ret}}}}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match}}root.removeChild(form)})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i])}}results=tmp}return results}}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)}catch(e){}}return oldSizzle(query,context,extra,seed)};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0){return}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return}Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])}}})()}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i}if(elem.nodeName===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i}if(typeof cur!=="string"){if(elem===cur){match=true;break}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}}}elem=elem[dir]}checkSet[i]=match}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument)};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"")}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet)}return Sizzle.filter(later,tmpSet)};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")"}return Sizzle.matches(expr,elems)};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r};return;window.Sizzle=Sizzle})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return}if(elem.setInterval&&elem!=window){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces)}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid]}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle]}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces)}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem)}})}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event)}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data)}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true)}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation()}}if(event.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments)};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler)},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler)}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src)}if(src&&src.type){this.originalEvent=src;this.type=src.type}else{this.type=src}this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return}if(e.preventDefault){e.preventDefault()}e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return}if(e.stopPropagation){e.stopPropagation()}e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode}catch(e){parent=this}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix)},teardown:function(){jQuery.event.remove(this,orig,withinElement)}}});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(fn)}return this},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem){elems.push({elem:elem,fn:fn})}}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false){return(stop=false)}});return stop}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return}readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(jQuery.isReady){return}try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}jQuery.ready()})()}}}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,"+"change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});jQuery(window).bind("unload",function(){for(var id in jQuery.cache){if(id!=1&&jQuery.cache[id].handle){jQuery.event.remove(jQuery.cache[id].handle.elem)}}});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return}jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display="none"})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string"){return this._load(url)}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params==="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}if(callback){self.each(callback,[res.responseText,status,res])}}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(isTimeout){xhr.abort()}if(s.async){xhr=null}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout")}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]}catch(e){}return false},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=window["eval"]("("+data+")")}}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type});return obj}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName]}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block"}elem.remove();elemdisplay[tagName]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback)}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]()}):this.animate(genFx("toggle",3),fn,fn2)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback)}});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){jQuery(this.elem).hide()}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit}else{fx.elem[fx.prop]=fx.now}}}});if(document.documentElement["getBoundingClientRect"]){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}}}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0])}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0}prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft)}return{top:top,left:left}}}jQuery.offset={initialize:function(){if(this.initialized){return}var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop]}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0}return{top:top,left:left}}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px")}})})();

/** remoteBasketManager.js */

var initDone=false;function initAJAX(){jsonrpc=new JSONRpcClient("/refonte/coffre/componentsCoffre/refonteRemoteBasketManager.jsp?ajax-call=true");initDone=true}function addFromListRPC(listName){if(initDone==false){initAJAX()}jsonrpc.refonteRemoteBasketManager.addFromListRPC(treatAddFromListRPC,listName)}function treatAddFromListRPC(result,exception){if(onAddFromListRPCException!=null&&exception!=null){onAddFromListRPCException(exception)}if(onAddFromListRPCSuccess!=null&&result!=null){onAddFromListRPCSuccess(result)}}function onAddFromListRPCException(exception){exceptionTreatement(exception)}function onAddFromListRPCSuccess(result){if(result!=null){var map=result.map;if(map.status=="NOK"&&map.reason=="unavailableProducts"){var unavailableList="";if(map.unavailableProductsList!=null&&map.unavailableProductsList.list!=null){var list=map.unavailableProductsList.list;for(var i=0;i<list.length;i++){unavailableList+=list[i]+"@@"}}var unreferencedList="";if(map.unreferencedProductsList!=null&&map.unreferencedProductsList.list!=null){var list=map.unreferencedProductsList.list;for(var i=0;i<list.length;i++){unreferencedList+=list[i]+"@@"}}var listName=escape(map.listName);var form=document.createElement("form");form.style.display="none";form.method="post";form.action="/index.jsp?niveau=magasin&pageMagasin=unavailableProducts&type=list&listName="+listName;var unavailable=document.createElement("input");unavailable.name="unavailable";unavailable.value=unavailableList;form.appendChild(unavailable);var unreferenced=document.createElement("input");unreferenced.name="unreferenced";unreferenced.value=unreferencedList;form.appendChild(unreferenced);document.body.appendChild(form);form.submit()}else{window.location.reload()}}}function addFromOrderRPC(orderNumber){if(initDone==false){initAJAX()}jsonrpc.refonteRemoteBasketManager.addFromOrderRPC(treatAddFromOrderRPC,orderNumber)}function treatAddFromOrderRPC(result,exception){if(onAddFromOrderRPCException!=null&&exception!=null){onAddFromOrderRPCException(exception)}if(onAddFromOrderRPCSuccess!=null&&result!=null){onAddFromOrderRPCSuccess(result)}}function onAddFromOrderRPCException(exception){exceptionTreatement(exception)}function onAddFromOrderRPCSuccess(result){if(result!=null){var map=result.map;if(map.status=="NOK"&&map.reason=="unavailableProducts"){var unavailableList="";if(map.unavailableProductsList!=null&&map.unavailableProductsList.list!=null){var list=map.unavailableProductsList.list;for(var i=0;i<list.length;i++){unavailableList+=list[i]+"@@"}}var unreferencedList="";if(map.unreferencedProductsList!=null&&map.unreferencedProductsList.list!=null){var list=map.unreferencedProductsList.list;for(var i=0;i<list.length;i++){unreferencedList+=list[i]+"@@"}}var form=document.createElement("form");form.style.display="none";form.method="post";form.action="/index.jsp?niveau=magasin&pageMagasin=unavailableProducts&type=order&orderNumber="+map.orderNumber;var unavailable=document.createElement("input");unavailable.name="unavailable";unavailable.value=unavailableList;form.appendChild(unavailable);var unreferenced=document.createElement("input");unreferenced.name="unreferenced";unreferenced.value=unreferencedList;form.appendChild(unreferenced);document.body.appendChild(form);form.submit()}if(graphicBasket){graphicBasket.forceBasketDrawing=true;graphicBasket.drawBasket()}window.location.reload()}}function removeAllItemsRPC(){if(initDone==false){initAJAX()}jsonrpc.refonteRemoteBasketManager.removeAllItemsRPC(treatRemoveAllItemsRPC)}function treatRemoveAllItemsRPC(result,exception){if(onRemoveAllItemsRPCException!=null&&exception!=null){onRemoveAllItemsRPCException(exception)}if(onRemoveAllItemsRPCSuccess!=null){onRemoveAllItemsRPCSuccess(result)}}function onRemoveAllItemsRPCException(exception){exceptionTreatement(exception)}function onRemoveAllItemsRPCSuccess(result){basket.shoppingCart=new Array();basket._draw()}function saveAsListRPC(control,listName){if(initDone==false){initAJAX()}jsonrpc.refonteRemoteBasketManager.saveAsListRPC(treatSaveAsListRPC,control,listName)}function treatSaveAsListRPC(result,exception){if(onSaveAsListRPCException!=null&&exception!=null){onSaveAsListRPCException(exception)}if(onSaveAsListRPCSuccess!=null&&result!=null){onSaveAsListRPCSuccess(result)}}function onSaveAsListRPCException(exception){exceptionTreatement(exception)}function onSaveAsListRPCSuccess(result){if(result!=null){if(result.map.status=="NOK"&&result.map.reason=="listNameExist"){if(confirm(remoteBasket_confirmFusionList)){var listName=result.map.listName;remoteCall.saveAsList("MERGE",listName)}}else{if(result.map.status=="OK"){window.location.reload()}}}}function setProductQuantityRPC(cagnotte,cug,purchasePageData,quantity){if(initDone==false){initAJAX()}jsonrpc.refonteRemoteBasketManager.setProductQuantityRPC(treatSetProductQuantityRPC,cagnotte,cug,purchasePageData,quantity)}function treatSetProductQuantityRPC(result,exception){if(onSetProductQuantityRPCException!=null&&exception!=null){onSetProductQuantityRPCException(exception)}if(onSetProductQuantityRPCSuccess!=null){onSetProductQuantityRPCSuccess(result)}}function onSetProductQuantityRPCException(exception){exceptionTreatement(exception)}function onSetProductQuantityRPCSuccess(result){basket.addProductSuccess()}function RPCcall(){try{initAJAX()}catch(e){}this.setProductQuantity=function(cagnotte,cug,purchasePageData,quantity){try{setProductQuantityRPC(cagnotte,cug,purchasePageData,quantity)}catch(e){var controlForm=document.getElementById("remoteBasketManagerForm");controlForm.remoteMethod.value="setProductQuantityRPC";controlForm.cug.value=cug;controlForm.cagnotte.value=cagnotte;controlForm.purchasePageData.value=purchasePageData;controlForm.quantity.value=quantity;controlForm.submit()}};this.removeAllItems=function(){try{removeAllItemsRPC()}catch(e){var controlForm=document.getElementById("remoteBasketManagerForm");controlForm.remoteMethod.value="removeAllItemsRPC";controlForm.submit()}};this.addFromList=function(listName){try{addFromListRPC(listName)}catch(e){var controlForm=document.getElementById("remoteBasketManagerForm");controlForm.remoteMethod.value="addFromListRPC";controlForm.listName.value=listName;controlForm.submit()}};this.addFromOrder=function(orderNumber){try{addFromOrderRPC(orderNumber)}catch(e){var controlForm=document.getElementById("remoteBasketManagerForm");controlForm.remoteMethod.value="addFromOrderRPC";controlForm.orderNumber.value=orderNumber;controlForm.submit()}};this.saveAsList=function(control,listName){try{saveAsListRPC(control,listName)}catch(e){var controlForm=document.getElementById("remoteBasketManagerForm");controlForm.remoteMethod.value="saveAsListRPC";controlForm.control.value=control;controlForm.listName.value=listName;controlForm.submit()}}}function exceptionTreatement(exception){if(exception){if(exception.code==550){window.location="/index.jsp"}}};

/** basket.js */

function ShoppingCartItem(cug,title,totalQty,packQty,price,maxAllowed,cagnottage,promo,purchasePageData,cssClass,typereload,updateServerInfo,type){this.getTotalQty=function(){return this.totalQty};this.setTotalQty=function(totalQty){this.totalQty=parseInt(totalQty,10);if(updateServerInfo){remoteCall.setProductQuantity(this.cagnottage*100,this.cug,this.purchasePageData,this.totalQty)}updateServerInfo=true};this.getTotalPrice=function(){if(this.type=="product"){if(isNaN(this.price)){return(0)}else{return(this.price*this.totalQty)}}else{if(this.type=="promo"){if(isNaN(this.lvdremise)){return(0)}else{if(this.lvdtype!="cagnottage"){return(-this.lvdremise)}else{return(0)}}}}};this.getFormattedTotalPrice=function(){var totalPrice=this.getTotalPrice();var integerPart=Math.floor(totalPrice);var decimalPart=Math.round(totalPrice*100-integerPart*100);if(decimalPart>=100){integerPart+=decimalPart/100;decimalPart%=100}var string=String(integerPart)+",";if(decimalPart<10){string+="0"}string+=String(decimalPart);return string};this.isMaxQuantity=function(){return(this.totalQty==this.maxAllowed)};this.cug=cug;if(title){this.title=title.replace(/&acute;/g,"'").replace(/&quot;/g,'"')}this.totalQty=0;this.packQty=packQty;this.price=price;this.maxAllowed=parseInt(maxAllowed,10);this.purchasePageData=purchasePageData;this.cagnottage=cagnottage;this.promo=promo;this.setTotalQty(totalQty);this.type=type;if(cssClass){this.cssClass=cssClass}else{this.cssClass=""}this.typereload=typereload;this.lvdcomplet;this.lvdid;this.nbprodrestant;this.lvdnbproducts;this.lvdvalue;this.lvdtype;this.lvdlabel;this.lvdremise;this.updateRemises=function(){if(this.type=="promo"){if(this.lvdtype=="cagnottage"){this.cagnottage=this.lvdremise}else{this.cagnottage=0}}}}function Basket(){this.siteId;this.shopId;this.isPopupRegistrationTeaserShown=false;this.isLogged=false;this.isIdentified=false;this.lastEvent;this.draw=true;this.goCheckoutUrl;this.articleDetailUrl;this.lvDetailUrl;this.initialisationUrl;this.initialisationDone=false;this.addProductSuccessMethode="";this.refreshOnly=false;this.setRefreshOnly=function(){this.refreshOnly=true;this.addProductSuccessMethode="basket.reload()"};this.flashOk=false;this.shoppingCart=new Array();this._searchProductIndex=function(cug){var index;for(var index=0;index<this.shoppingCart.length;index++){if(this.shoppingCart[index].cug==cug){return index}}return(-1)};this.initFlashCart=function(){this.flashOk=true;this._draw()};this.reload=function(){var date=new Date();initShoppingCart(this.initialisationUrl+"?time="+date.getTime(),false)};this.addProductSuccess=function(){if(this.addProductSuccessMethode!=""){eval(this.addProductSuccessMethode);this.addProductSuccessMethode=""}};this.initialize=function(cug,title,totalQty,packQty,price,maxAllowed,cagnottage,promo,purchasePageData,cssClass,typereload){totalQty=parseInt(totalQty,10);if(totalQty>0){var length=this.shoppingCart.length;this.shoppingCart[length]=new ShoppingCartItem(cug,title,totalQty,packQty,price,maxAllowed,cagnottage,promo,purchasePageData,cssClass,typereload,false,"product")}};this.initializePromo=function(id,lvdtype,lvdvalue,lvdlabel,lvdnbproducts,lvdcomplet,nbprodrestant,lvdremise,cssClass){var length=this.shoppingCart.length;var new_spc_item=new ShoppingCartItem(id,"",1,0,0,0,0,0,"",cssClass,false,false,"promo");new_spc_item.lvdcomplet=lvdcomplet;new_spc_item.lvdid=id;new_spc_item.nbprodrestant=nbprodrestant;new_spc_item.lvdnbproducts=lvdnbproducts;new_spc_item.lvdvalue=lvdvalue;new_spc_item.lvdtype=lvdtype;new_spc_item.lvdlabel=lvdlabel;new_spc_item.lvdremise=lvdremise;new_spc_item.updateRemises();this.shoppingCart[length]=new_spc_item};this.addProductInShoppingCart=function(cug,title,qty,packQty,price,maxAllowed,cagnottage,promo,purchasePageData,refreshCart){qty=parseInt(qty,10);packQty=parseInt(packQty,10);addedTotalQty=qty*packQty;var itemIndex=this._searchProductIndex(cug);if(refreshCart){this.setRefreshOnly()}if(itemIndex!=-1){spcItem=this.shoppingCart[itemIndex];addedTotalQty+=spcItem.getTotalQty();addedTotalQty=this._setShoppingCartQuantity(itemIndex,addedTotalQty);if(addedTotalQty>0){spcItem.purchasePageData=purchasePageData}modifQteFlash(spcItem.cug,spcItem.getTotalQty(),spcItem.maxAllowed)}else{while(addedTotalQty>maxAllowed){--qty;addedTotalQty=qty*packQty}if(qty>0){if(this._getTotalAmountAfterItemAddition(price,addedTotalQty)<=basket_maxAmount){var length=this.shoppingCart.length;this.shoppingCart[length]=new ShoppingCartItem(cug,title,addedTotalQty,packQty,price,maxAllowed,cagnottage,promo,purchasePageData,"",refreshCart,true,"product");modifQteFlash(this.shoppingCart[length].cug,this.shoppingCart[length].getTotalQty(),this.shoppingCart[length].maxAllowed);if(itemIndex!=-1){this._drawLine(itemIndex)}else{this._draw()}}else{alert(basket_maxAmountAlert)}}}this._showPopupRegistration();try{window.focus()}catch(e){}try{if(pageTracker){pageTracker._trackEvent("Panier","Ajout de produit",analyticsContext)}}catch(e){}};this.removeProductFromShoppingCart=function(basketIndex){var basketItem=this.shoppingCart[basketIndex];var tmpSpc=new Array();var i=0;var j=0;while(i<this.shoppingCart.length){if(i!=basketIndex){tmpSpc[j]=this.shoppingCart[i];++j}++i}this.shoppingCart=tmpSpc;basketItem.setTotalQty(0);if(basketItem.typereload){this.setRefreshOnly()}return basketItem};this.removeProductsFromShoppingCart=function(cugList){for(var index=0;index<cugList.length;index++){var cug=cugList[index];this.removeProductFromShoppingCart(this._searchProductIndex(cug))}};this._setShoppingCartQuantity=function(index,totalQty){var spcItem=this.shoppingCart[index];var max=parseInt(spcItem.maxAllowed,10);var packQty=parseInt(spcItem.packQty,10);totalQty=parseInt(totalQty,10);if(spcItem.typereload){this.setRefreshOnly()}if(totalQty>0){while(totalQty>max){totalQty-=packQty}if(totalQty>spcItem.getTotalQty()){if(this._getTotalAmountAfterItemAddition(spcItem.price,(totalQty-spcItem.getTotalQty()))<=basket_maxAmount){spcItem.setTotalQty(totalQty);this._drawLine(index)}else{alert(basket_maxAmountAlert);totalQty=0}}else{spcItem.setTotalQty(totalQty);this._drawLine(index)}}else{if(confirm(basket_alertItemRemoval)){this.removeProductFromShoppingCart(index);this._draw()}}return totalQty};this._getTotalAmountAfterItemAddition=function(price,quantity){var amount=this.getTotalAmount();amount+=price*quantity;return amount};this.decrementProduct=function(index){var spcItem=this.shoppingCart[index];this._setShoppingCartQuantity(index,spcItem.getTotalQty()-spcItem.packQty);modifQteFlash(spcItem.cug,spcItem.getTotalQty(),spcItem.maxAllowed);this._showPopupRegistration()};this.incrementProduct=function(index){var spcItem=this.shoppingCart[index];this._setShoppingCartQuantity(index,spcItem.getTotalQty()+spcItem.packQty);modifQteFlash(spcItem.cug,spcItem.getTotalQty(),spcItem.maxAllowed);this._showPopupRegistration()};this.getTotalAmount=function(){var amount=0;for(var i=0;i<this.shoppingCart.length;i++){amount+=this.shoppingCart[i].getTotalPrice()}return amount};this.getTotalCagnottage=function(){var total=0;for(var i=0;i<this.shoppingCart.length;i++){total+=this.shoppingCart[i].getTotalQty()*this.shoppingCart[i].cagnottage}return total};this.displayProduct=function(cug){var index=this._searchProductIndex(cug);var spcItem=this.shoppingCart[index];loadFicheArticle("cug="+spcItem.cug+"&"+spcItem.purchasePageData)};this.removeAllItems=function(){if(this.shoppingCart.length!=0){if(confirm(basket_alertRemoveAllItems)){remoteCall.removeAllItems();try{document.getElementById("panier-vide").style.display="block";document.getElementById("panier").style.display="none";document.getElementById("nb_products_selected").innerHTML="0"}catch(e){}$("#liste_articles .deja_panier").html("");$("#liste_articles .add_cart_liste").removeClass("added");$(".listGalleryV2 .add_cart_liste>img").attr("src","/refonte/static/images/bt-gallerie-ajoutpanier-ie.gif");try{if(top.Contenu.pageTracker){pageTracker._trackEvent("Panier","vider le panier")}}catch(e){}return true}}return false};this.initSaveAsList=function(){if(this.initialisationDone){if(this.shoppingCart.length>0){this.saveAsList()}}else{setTimeout("basket.initSaveAsList()",500)}};this.saveAsList=function(){if(this.shoppingCart.length==0){alert(basket_alertBasketEmptyBeforeSaveAsList)}else{switchShop("fromCart")}};this.saveAsNamedList=function(){var name=document.getElementById("listName").value;name=name.replace(/'/g," ");name=name.replace(/"/g," ");document.getElementById("listName").value=name;name=name.replace(/^\s*/,"");name=name.replace(/\s*$/,"");if(name.length==0){document.getElementById("listName").focus();alert(basket_insertListName)}else{remoteCall.saveAsList("CREATE",name);try{if(pageTracker){pageTracker._trackEvent("Liste","Création de liste")}}catch(e){}}};this.addFromList=function(listName){remoteCall.addFromList(listName)};this.addFromOrder=function(orderNumber){remoteCall.addFromOrder(orderNumber)};this.goCheckout=function(){if(this.shoppingCart.length==0){alert(basket_alertBasketEmptyBeforeCheckout)}else{if(this.getTotalAmount()<=basket_minAmount){alert(basket_minAmountAlert)}else{if(this.isLogged){window.location=this.goCheckoutUrl}else{var a;var b;tb_show(a,this.goCheckoutUrl,b)}}}};this._showPopupRegistration=function(){if(!this.isPopupRegistrationTeaserShown&&this.shoppingCart.length>=3){this.isPopupRegistrationTeaserShown=true;tb_remove();tb_show("","/refonte/customer/loginform/home/?height=280&width=603&layername=layer04")}};this._draw=function(){if(this.draw){if(!this.refreshOnly){graphicBasket.drawBasket()}else{this.refreshOnly=false}}};this._drawLine=function(itemIndex){if(this.draw){if(!this.refreshOnly){graphicBasket.drawLine(itemIndex)}else{this.refreshOnly=false}}};this.displayToolTip=function(index){switch(index){case 1:break;case 2:doTooltip(this.lastEvent,messNoIden);break}};this.displayProduct=function(productID){var lienProd=graphicBasket._getDetailUrl(this.shoppingCart[productID].cug);tb_show("",lienProd)};this.infoProduit=function(){};this.getNbItem=function(){return this.shoppingCart.length}}function GraphicBasket(){this.forceBasketDrawing=false;this._updateItemQty=function(itemId,qty,totalPrice){if(basket.flashOk){thisMovie("panierFlash").updateFlashItemQty(itemId,qty,totalPrice)}};this._updateTotalAmount=function(){var text=this._amountToString(basket.getTotalAmount());if(basket.flashOk){thisMovie("panierFlash").updateFlashTotalAmount(text)}else{var amountDiv=document.getElementById("coffreJsMontantPanier");if(amountDiv!=null){amountDiv.innerHTML=": "+text+" &euro;"}}};this._updateNbItem=function(){var nbItemViv=document.getElementById("coffreJsNbItem");var totalProducts=0;for(var i=0;i<basket.shoppingCart.length;i++){if(basket.shoppingCart[i].type=="product"){totalProducts+=basket.shoppingCart[i].getTotalQty()}}if(nbItemViv!=null){nbItemViv.innerHTML=totalProducts+""}};this._updateCagnottage=function(){var text=this._amountToString(basket.getTotalCagnottage());if(basket.flashOk){thisMovie("panierFlash").updateFlashCagnottage(text)}else{var amountDiv=document.getElementById("coffreJsCagnottageMontant");if(amountDiv!=null){amountDiv.innerHTML=text+" &euro;"}}};this.drawLine=function(itemId){if(basket.flashOk){totalQty=basket.shoppingCart[itemId].getTotalQty();totalPrice=basket.shoppingCart[itemId].getFormattedTotalPrice();this._updateItemQty(itemId,totalQty,totalPrice);this._updateTotalAmount();this._updateCagnottage();this._updateNbItem();tb_init("a.thickbox, area.thickbox, input.thickbox")}else{this.drawBasket()}};this.drawBasket=function(){if(basket.flashOk){thisMovie("panierFlash").updateFlashCart(basket.shoppingCart)}else{var basketTable=document.getElementById("panier");var tbody=document.createElement("tbody");var tr,td,img,text,a,span,p,strong,input;var basketItem;for(var i=basket.shoppingCart.length-1;i>=0;i--){basketItem=basket.shoppingCart[i];if(basketItem.type=="product"){tr=document.createElement("tr");tr.setAttribute("id","panierItem_"+i);$(tr).addClass(basketItem.cssClass);td=document.createElement("td");$(td).addClass("var");a=document.createElement("a");a.setAttribute("href","javascript:basket.incrementProduct("+i+");");$(a).addClass("plus");td.appendChild(a);a=document.createElement("a");a.setAttribute("href","javascript:basket.decrementProduct("+i+");");$(a).addClass("moins");td.appendChild(a);tr.appendChild(td);td=document.createElement("td");$(td).addClass("qte").append(basketItem.getTotalQty());tr.appendChild(td);td=document.createElement("td");$(td).addClass("desc");a=document.createElement("a");$(a).addClass("p1");$(a).addClass("thickbox").append(basketItem.title);var link=this._getDetailUrl(basketItem.cug);a.setAttribute("href",link);td.appendChild(a);tr.appendChild(td);td=document.createElement("td");$(td).addClass("px").append(this._amountToString(basketItem.getTotalPrice()));tr.appendChild(td);tbody.appendChild(tr);if(basketItem.getTotalQty()>(basketItem.maxAllowed-basketItem.packQty)){tr=document.createElement("tr");if(basketItem.cssClass.indexOf("promo02")!=-1){tr.className="erreur promo02"}else{tr.className="erreur"}td=document.createElement("td");td.className="var";tr.appendChild(td);td=document.createElement("td");tr.appendChild(td);td=document.createElement("td");td.setAttribute("colspan",2);td.className="px2";text=document.createTextNode(" "+basket_maximumQuantity);td.appendChild(text);tr.appendChild(td);tbody.appendChild(tr)}}else{tr=document.createElement("tr");$(tr).addClass(basketItem.cssClass);if(!basketItem.lvdcomplet){td=document.createElement("td");td.setAttribute("colspan","4");var textnb=""+basketItem.lvdvalue;textnb=textnb.replace(".",",");strong=document.createElement("strong");var typeremise="profitez de "+textnb;var linkpromoClass="link_promo02";if(basketItem.lvdtype=="cagnottage"){typeremise="CAGNOTTEZ "+textnb;linkpromoClass="link_promo03"}if(basketItem.lvdtype=="montant"){typeremise+=" €"}else{typeremise+=" %"}if(basketItem.lvdtype!="cagnottage"){typeremise+=" de REMISE"}text=document.createTextNode("Ajoutez "+basketItem.nbprodrestant+" autre(s) "+basketItem.lvdlabel+" au choix dans la sélection et "+typeremise);strong.appendChild(text);td.appendChild(strong);a=document.createElement("a");$(a).addClass("thickbox "+linkpromoClass);a.setAttribute("href",basket.layerLVDUrl.replace("__LVD_ID__",basketItem.lvdid));text=document.createTextNode("Voir la sélection");a.appendChild(text);td.appendChild(a);tr.appendChild(td)}else{td=document.createElement("td");strong=document.createElement("strong");var typeremise;var linkpromoClass="link_promo02";$(td).addClass("remise");strong=document.createElement("strong");if(basketItem.lvdtype=="cagnottage"){td.setAttribute("colspan","4");var textnb=""+basketItem.lvdremise;textnb=textnb.replace(".",",");typeremise="Vous CAGNOTTEZ "+textnb+" €";linkpromoClass="link_promo03"}else{td.setAttribute("colspan","3");typeremise="Votre REMISE"}text=document.createTextNode(typeremise);strong.appendChild(text);td.appendChild(strong);var textnb1=""+basketItem.lvdvalue;textnb1=textnb1.replace(".",",");typeremise="profitez à nouveau de "+textnb1;var linkpromoClass="link_promo02";if(basketItem.lvdtype=="cagnottage"){typeremise="CAGNOTTEZ "+textnb1;linkpromoClass="link_promo03"}if(basketItem.lvdtype=="montant"){typeremise+=" €"}else{typeremise+=" %"}if(basketItem.lvdtype!="cagnottage"){typeremise+=" de REMISE"}input=document.createElement("input");$(input).addClass("infos");input.setAttribute("value","Ajoutez "+basketItem.nbprodrestant+" autre(s) "+basketItem.lvdlabel+" et "+typeremise);input.setAttribute("type","hidden");td.appendChild(input);a=document.createElement("a");$(a).addClass("picto_info");a.setAttribute("href","javascript:void(0);");td.appendChild(a);tr.appendChild(td);if(basketItem.lvdtype!="cagnottage"){td=document.createElement("td");$(td).addClass("px promo");var textnb=""+basketItem.lvdremise;textnb=textnb.replace(".",",");text=document.createTextNode("-"+textnb+" €");td.appendChild(text);tr.appendChild(td)}}tbody.appendChild(tr)}}if(document.getElementById("panier_tbody")){basketTable.replaceChild(tbody,document.getElementById("panier_tbody"))}else{basketTable.appendChild(tbody)}tbody.setAttribute("id","panier_tbody")}this._updateTotalAmount();this._updateCagnottage();this._updateNbItem();if(documentFullLoaded){tb_init("a.thickbox, area.thickbox, input.thickbox")}if(basket.flashOk==false){if(basket.shoppingCart.length>0){document.getElementById("panier-vide").style.display="none";document.getElementById("panier").style.display="block"}else{document.getElementById("panier-vide").style.display="block";document.getElementById("panier").style.display="none"}}initInfosPanierBull()};this._getDetailUrl=function(cug){var link;if(cug.match("^LV*")){link=basket.lvDetailUrl.replace("__CUG__",cug)}else{link=basket.articleDetailUrl.replace("__CUG__",cug)}return link};this._amountToString=function(amount){var integerPart=Math.floor(amount);var decimalPart=Math.round(amount*100-integerPart*100);if(decimalPart>=100){integerPart+=decimalPart/100;decimalPart%=100}var string=String(integerPart)+",";if(decimalPart<10){string+="0"}string+=String(decimalPart);return string}}Panier=function(){this.basket=basket};function thisMovie(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName]}else{return document[movieName]}}var basket_minAmount=1;var basket_maxAmount=5000;var basket=new Basket();var panier=new Panier();var graphicBasket=new GraphicBasket();var remoteCall=new RPCcall();

/** variables.js */

window.CONST_PATH_IMG="/refonte/static/images/";var typePage=0;var ssMenuWidth=0;var maxArticleModeNormal=300;var is_IE=$.browser.msie;var timerScrollfollow;var navUserAgent=navigator.userAgent.toLowerCase();var bgImgPreloaded=false;var resolMinScrollCart=768;var isHome=false;var isResolMinScrollCart=false;var isBannerException=false;var isBannerFacebook=false;var DOM_template=null;var DOM_tiroir=null;var DOM_middle=null;var DOM_middleMain=null;var DOM_middleRight=null;var DOM_middleTop=null;var DOM_middleLeft=null;var DOM_top3=null;var DOM_top4=null;var DOM_bannerIE8=null;var maxTimeLoader=30;var stampStartLoader=0;var stampEndLoader=0;var elapsedTimeLoader=0;var statusHomeCd=0;var statusHomeDidac=0;if(is_IE){var reg=new RegExp("MSIE 8.0","ig");var is_IE8=reg.test(navUserAgent);if(is_IE8==true){$.browser.version="8"}}var is_MacXFF=(navUserAgent.indexOf("mac")!=-1&&navUserAgent.indexOf("firefox")!=-1);var is_IE7=(is_IE&&$.browser.version.substr(0,1)==7);var lt_IE8=(is_IE&&$.browser.version.substr(0,1)<8);var bt_IE7=(is_IE&&$.browser.version.substr(0,1)>7);var lt_IE7=(is_IE&&$.browser.version.substr(0,1)<7);var isMiddleMain=false;var timerBannerIE8=null;var isLoading=true;var isScrolling=true;var titlePage=document.title;var fixeTiroir=0;var timerShowRayon;var timerHideRayon;var timerHideZoom=null;var requiredMajorVersion=9;var requiredMinorVersion=0;var requiredRevision=16;var flashVersion=-1;var flashCompatible=true;var activateCartEffect=false;var urlsToPreload=new Array("img-fruits.jpg","txt-fruits.gif","bg-menu-pdt.gif","puce01a.gif","flashtop2.jpg","picto-nouveautes.gif","picto-promo.gif","picto-produits.gif","picto-hard-discount.gif","pastille-grise.png","pastille-marron.png","pastille-rose.png","pastille-jaune.png","pastille-rouge.png","pastille-deja-achete.png","pastille-rouge2.png","pastille-notDispo.png","pastille-rouge2.png","pastille-rougeOver.png","bg-panier-top.png","bg-selection-outil-on.png","picto-selection-outils.png","bg-selection-outil-off.png","picto-selection-all.png","bt-aller-caisse3.png","picto-chronoplus-panier.png","bg-panier-bottom.png","bg-panier-middle.png","bg-autocomplete-indicator.gif");if(lt_IE7){urlsToPreload.push("bgG-menu-cat-pdt-ie.gif","bgM-menu-cat-pdt-ie.gif","bgD-menu-cat-pdt-ie.gif","bgT-menu2-ombre-ie.gif","bgB-menu2-ombre-ie.gif","bg-menu-v2-cat-pdt-ie.gif","bgB-menu-v2-ombre-ie.gif","layer00-B.gif","layer00-M.gif","layer00-T.gif","layer01-B.gif","layer01-M.gif","layer01-T.gif","layer02-B.gif","layer02-M.gif","layer02-T.gif","layer03-B.gif","layer03-M.gif","layer03-T.gif","layer03-B_don.gif","layer04-B.gif","layer04-M.gif","layer04-T.gif","layer04-T-to-M.gif","layer05-B.gif","layer05-M.gif","layer05-T.gif","layer06-B.gif","layer06-M.gif","layer06-T.gif","layer07-B.gif","layer07-M.gif","layer07-T.gif","layer08-B.gif","layer08-M.gif","layer08-T.gif","bgB-infobulle1-ie.gif","bgB-infobulle1G-ie.gif","bgM-infobulle1-ie.gif","bgT-infobulle1-ie.gif","bgB-infobulle1_T-ie.gif","bgT-infobulle1_T-ie.gif","bgB-infobulle2-ie.gif","bgB-infobulle2G-ie.gif","bgM-infobulle2-ie.gif","bgT-infobulle2-ie.gif","bgB-infobulle4-ie.gif","bgM-infobulle4-ie.gif","bgT-infobulle4-ie.gif","bgB-infobulle5-ie.gif","bgM-infobulle5-ie.gif","bgT-infobulle5-ie.gif","bgB-infobulle6-ie.gif","bgM-infobulle6-ie.gif","bgT-infobulle6-ie.gif","bgB-infobulle7-ie.gif","bgM-infobulle7-ie.gif","bgT-infobulle7-ie.gif","bgB-infobulle8-ie.gif","bgM-infobulle8-ie.gif","bgT-infobulle8-ie.gif","bgB-infobulle9-ie.gif","bgB-infobulle9b-ie.gif","bgM-infobulle9-ie.gif","bgM-infobulle9b-ie.gif","bgT-infobulle9-ie.gif","bgT-infobulle9b-ie.gif")}else{urlsToPreload.push("bgG-menu-cat-pdt.png","bgM-menu-cat-pdt.png","bgD-menu-cat-pdt.png","bgT-menu2-ombre.png","bgB-menu2-ombre.png","bg-menu-v2-cat-pdt.png","bgB-menu-v2-ombre.png","layer00-B.png","layer00-M.png","layer00-T.png","layer01-B.png","layer01-M.png","layer01-T.png","layer02-B.png","layer02-M.png","layer02-T.png","layer03-B.png","layer03-M.png","layer03-T.png","layer03-B_don.png","layer04-B.png","layer04-M.png","layer04-T.png","layer04-T-to-M.png","layer05-B.png","layer05-M.png","layer05-T.png","layer06-B.png","layer06-M.png","layer06-T.png","layer07-B.png","layer07-M.png","layer07-T.png","layer08-B.png","layer08-M.png","layer08-T.png","bgB-infobulle1.png","bgB-infobulle1G.png","bgM-infobulle1.png","bgT-infobulle1.png","bgB-infobulle1_T.png","bgT-infobulle1_T.png","bgB-infobulle2.png","bgB-infobulle2G.png","bgM-infobulle2.png","bgT-infobulle2.png","bgB-infobulle4.png","bgM-infobulle4.png","bgT-infobulle4.png","bgB-infobulle5.png","bgM-infobulle5.png","bgT-infobulle5.png","bgB-infobulle6.png","bgM-infobulle6.png","bgT-infobulle6.png","bgB-infobulle7.png","bgM-infobulle7.png","bgT-infobulle7.png","bgB-infobulle8.png","bgM-infobulle8.png","bgT-infobulle8.png","bgB-infobulle9.png","bgB-infobulle9b.png","bgM-infobulle9.png","bgM-infobulle9b.png","bgT-infobulle9.png","bgT-infobulle9b.png")};

/** swfobject.js */

if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1)}if(id){this.setAttribute("id",id)}if(w){this.setAttribute("width",w)}if(h){this.setAttribute("height",h)}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(c){this.addParam("bgcolor",c)}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9)}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true)},setAttribute:function(_e,_f){this.attributes[_e]=_f},getAttribute:function(_10){return this.attributes[_10]},addParam:function(_11,_12){this.params[_11]=_12},getParams:function(){return this.params},addVariable:function(_13,_14){this.variables[_13]=_14},getVariable:function(_15){return this.variables[_15]},getVariables:function(){return this.variables},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key]}return _16},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}_19='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';_19+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var _1a=this.getParams();for(var key in _1a){_19+=[key]+'="'+_1a[key]+'" '}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+='flashvars="'+_1c+'"'}_19+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}_19='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';_19+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var _1d=this.getParams();for(var key in _1d){_19+='<param name="'+key+'" value="'+_1d[key]+'" />'}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+='<param name="flashvars" value="'+_1f+'" />'}_19+="</object>"}return _19},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0])}catch(e){axo=null}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(_23.major==6){return _23}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}}return _23};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}if(this.major>fv.major){return true}if(this.minor<fv.minor){return false}if(this.minor>fv.minor){return true}if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/** jquery.history.js */

jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyIframeSrc:undefined,historyNeedIframe:lt_IE8,historyFirstHash:undefined,historyInit:function(callback,hash){jQuery.historyCallback=callback;var current_hash=location.hash.replace(/\?.*$/,"");if(hash.length>0){jQuery.historyFirstHash="#"+hash;location.hash=jQuery.historyFirstHash;current_hash=jQuery.historyFirstHash}jQuery.historyCurrentHash=current_hash;if(jQuery.historyNeedIframe){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"'+' src="javascript:false;"></iframe>');var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=current_hash}else{if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.lastHistoryLength=history.length;jQuery.isFirst=true}}jQuery.historyCallback(current_hash.replace(/^#/,""));setInterval(jQuery.historyCheck,100)},historyAddHistory:function(hash){jQuery.historyBackStack.push(hash);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.historyNeedIframe){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentDocument||ihistory.contentWindow.document;var current_hash=iframe.location.hash.replace(/\?.*$/,"");if(current_hash!=jQuery.historyCurrentHash){location.hash=current_hash;jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,""))}document.title=titlePage}else{if(jQuery.browser.safari){if(jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength){jQuery.historyBackStack.shift()}if(!jQuery.dontCheck){var historyDelta=history.length-jQuery.historyBackStack.length;jQuery.lastHistoryLength=history.length;if(historyDelta){jQuery.isFirst=false;if(historyDelta<0){for(var i=0;i<Math.abs(historyDelta);i++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var i=0;i<historyDelta;i++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var cachedHash=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(cachedHash!=undefined){jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,"");jQuery.historyCallback(cachedHash)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(location.hash){var current_hash=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,""))}else{var current_hash="";jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var current_hash=location.hash.replace(/\?.*$/,"");if(current_hash!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,""))}if(is_IE){document.title=titlePage}}}},historyLoad:function(hash){var newhash;hash=decodeURIComponent(hash.replace(/\?.*$/,""));if(jQuery.browser.safari){newhash=hash}else{newhash="#"+hash;location.hash=newhash}jQuery.historyCurrentHash=newhash;if(jQuery.historyNeedIframe){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=newhash;jQuery.lastHistoryLength=history.length;jQuery.historyCallback(hash)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(hash);var fn=function(){jQuery.dontCheck=false};window.setTimeout(fn,200);jQuery.historyCallback(hash);location.hash=newhash}else{jQuery.historyCallback(hash)}}}});

/** thickbox2.js */

var BOX_width=null;var BOX_height=null;var BOX_autoHeight=null;var BOX_innerWidth=null;var BOX_innerHeight=null;var BOX_class=null;var BOX_top=null;var BOX_skin=null;var BOX_params=new Array();var DOM_window=null;var DOM_body=null;var DOM_tbWindow=null;var DOM_tbOverlay=null;var DOM_tbHtml=null;var DOM_tbInnerHtml=null;var timerShowBulle=null;$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox")});function tb_init(domChunk){$(domChunk).unbind("click").bind("click",function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;this.blur();tb_show(t,a,g);return false})}function tb_initDOM(){DOM_window=$(window);DOM_body=$("body");if(lt_IE7){DOM_tbIframe=$("#TB_HideSelect")}DOM_tbOverlay=$("#TB_overlay");DOM_tbLoad=$("#TB_load");DOM_tbWindow=$("#TB_window");DOM_tbHtml=$("#TB_html");DOM_tbInnerHtml=document.getElementById("TB_innerHtml");DOM_tbContent=$("#TB_ajaxContent");DOM_tbClose=$("#TB_closeWindowButton")}function tb_show(caption,url,imageGroup){var queryString=url.replace(/^[^\?]+\??/,"");if(DOM_tbWindow==null){tb_initDOM()}BOX_params=tb_parseQuery(queryString);BOX_close=(BOX_params["close"]==false)?false:true;BOX_autoHeight=(BOX_params["height"]=="auto");BOX_width=(BOX_params["width"]*1)+30||630;BOX_height=(BOX_params["height"]*1)+40||null;BOX_innerWidth=BOX_width-30;BOX_innerHeight=(BOX_height!=null)?BOX_height:"auto";BOX_class=(is_MacXFF)?"TB_overlayMacFFBGHack":"TB_overlayBG";BOX_top=parseInt(DOM_window.height()/2)-parseInt(BOX_height/2)+DOM_window.scrollTop()+"px";BOX_skin=(BOX_params["layername"]!=undefined)?BOX_params["layername"]:"layer00";if(BOX_params["layername"]=="layerLotVirtueldynamique"){BOX_skin="layer01 layerLotVirtueldynamique"}if(BOX_params["layername"]=="layerCagnottage"){BOX_skin="layer01 layerCagnottage"}DOM_tbInnerHtml.innerHTML="";DOM_tbContent.attr("class",BOX_skin+" block_float").width(BOX_innerWidth).height(BOX_innerHeight);if("function"==typeof(maskBulle)){maskBulle()}if(lt_IE7){DOM_tbIframe.css({"position":"absolute","top":"0","height":$(document).height()+"px"}).addClass("db")}DOM_tbOverlay.height(DOM_window.height()).width("100%").addClass(BOX_class+" db");DOM_tbWindow.addClass("db");DOM_tbLoad.addClass("db");tb_position();url+="&random="+(new Date().getTime());$.get(url,{},function success(data){DOM_tbLoad.removeClass("db");$(DOM_tbInnerHtml).html(data);BOX_height=DOM_tbContent.height();setTimeout(tb_adjustBottom,150);setTimeout(tb_initContent,200)});$(window).bind("resize",tb_resize);$(document).unbind("keyup").bind("keyup",function(e){var keycode=(e==null)?event.keyCode:e.which;if(keycode==27){tb_remove()}return false});return false}function tb_initContent(){if(DOM_tbWindow!=null){DOM_tbClose.unbind("click").bind("click",tb_remove);DOM_tbOverlay.unbind("click, mousemove, mouseout").bind("click",tb_remove).bind("mousemove",function(event){displayBulle(event)}).bind("mouseout",function(event){hideBulle(event)});initBulles("#TB_html");initPng("#TB_html");tb_init("#TB_html a.thickbox");if(BOX_params["lot_virtuel"]=="1"||BOX_params["sub"]=="1"){var DOM_btRetour=(BOX_params["sub"])?$("#bt_retour_sub"):$("#bt_retour");var isLotVirtuel=(BOX_params["lot_virtuel"]==1)?true:false;DOM_btRetour.removeClass("dn").addClass("db");if(isLotVirtuel==false){$("#pdt_cs").css("display","none")}}else{if(BOX_params["layer_recette"]=="1"){$("#bt_retour2").removeClass("dn").addClass("db")}else{if(BOX_params["return"]=="1"){$("#bt_retour").show()}else{if(BOX_params["returnCompte"]=="1"){$("#bt_retour_compte").show()}}}}if(BOX_params["asso"]!=""){var $tabs=$("#tabsProd").tabs();$tabs.tabs("select",parseInt(BOX_params["asso"])-1);$("#id-asso").val(BOX_params["asso"])}if(BOX_params["onglet"]!=""&&$("#mes_infos").length>0){var DOM_onglet=$("#tabsProd");if(DOM_onglet.length>0){var $tabs=DOM_onglet.tabs();$tabs.tabs("select",parseInt(BOX_params["onglet"]));if(BOX_params["onglet"]==3){removeEvents();initHoverLine("chrono_plus");initLinksPagination("chrono_plus");setTimeout(initPagination,300);tb_init("#TB_html #chrono_plus a.thickbox")}}}}}function tb_remove(){$(window).unbind("resize",tb_resize);if($(".layer_facebook").length!=0){var date_exp=new Date();date_exp.setTime(date_exp.getTime()+(7*24*3600*1000));var cookie_val=GetCookie("facebookLayer");if(cookie_val==1||cookie_val==null){SetCookie("facebookLayer",2,date_exp)}else{SetCookie("facebookLayer",3,date_exp)}}if(DOM_tbWindow!=null){DOM_tbWindow.removeClass("db");DOM_tbOverlay.removeClass("db noclick");if(lt_IE7){DOM_tbIframe.removeClass("db")}var DOM_returnHomeUrl=$("#TB_html input#returnHomeURL");var v_returnHomeUrl=(DOM_returnHomeUrl.length>0)?DOM_returnHomeUrl.attr("value"):"";var DOM_returnCompteUrl=$("#TB_html input#returnCompteURL");var v_returnCompteURL=(DOM_returnCompteUrl.length>0)?DOM_returnCompteUrl.attr("value"):"";DOM_tbInnerHtml.innerHTML="";if(v_returnHomeUrl!=""){var baseURL=window.location.href.split("/");if(v_returnHomeUrl.search("http")!=-1){baseURL=v_returnHomeUrl}else{baseURL=window.location.href.split("/");baseURL=baseURL[0]+"//"+baseURL[2]+"/"+v_returnHomeUrl}document.location.href=baseURL}else{if(v_returnCompteURL!=""&&BOX_params["returnCompte"]>=0&&BOX_params["returnCompte"]<=5){var baseURL=window.location.href.split("/");baseURL=baseURL[0]+"//"+baseURL[2]+"/"+v_returnCompteURL;tb_show(null,baseURL)}}}return false}function tb_resize(){if(DOM_tbWindow!=null&&DOM_tbOverlay!=null){DOM_tbOverlay.height(DOM_window.height()).width(DOM_window.width());tb_position()}}function tb_adjustBottom(){if(DOM_tbWindow!=null&&(BOX_top+BOX_height)>DOM_template.height()&&typeof(FixBottom)=="undefined"){var margeTop=((BOX_top+BOX_height)-DOM_template.height());var DOM_bottom=$("#bottom2");DOM_bottom.css("margin-top",parseInt(DOM_bottom.css("margin-top"))+margeTop+"px")}}function tb_position(){if(DOM_tbWindow!=null){var scrollTop=DOM_window.scrollTop();BOX_top=scrollTop;if(!BOX_autoHeight){BOX_top=parseInt(DOM_window.height()/2)-parseInt(BOX_height/2)+scrollTop}DOM_tbWindow.css({"left":"50%","marginLeft":"-"+parseInt((BOX_width/2),10)+"px","width":BOX_width+"px","top":BOX_top+"px"})}}function tb_parseQuery(query){var Params={};if(!query){return Params}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split("=");if(!KeyVal||KeyVal.length!=2){continue}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g," ");Params[key]=val}return Params};

/** fonctions2-yui2.js */

var Speed,Debugging=false;function SpeedTrace(mode,string){if(Debugging){if(Speed==undefined){Speed=new Array();Speed["DIV"]=document.createElement("div");$("body").append(Speed["DIV"])}switch(mode){case"start":Speed[string]=new Date().getTime();break;case"stop":Speed[string]=(new Date().getTime()-Speed[string]);$(Speed["DIV"]).html($(Speed["DIV"]).html()+"<br/>"+string+" :: "+Speed[string]+"ms");break}}}$("document").ready(function(){if(lt_IE8&&isBannerException==false&&isBannerFacebook==false){initBannerIE8()}updatePosFixedDOM(false);resol_1024();var DOM_listeArticle=(isHome)?null:$("#liste_articles");var nbArticle=(isHome)?0:DOM_listeArticle.length;var isMiddleMain=(DOM_middleMain.length>0);if(typePage!=1&&typePage!="demo"){initMenu();initMenuRayonV2();refreshMenu();initBulles();if((!is_IE)||(bt_IE7)||(lt_IE8&&nbArticle<=maxArticleModeNormal)){if(typePage!="panier"&&typePage!="checkout"){if(lt_IE7){if(isResolMinScrollCart!=true){$(window).bind("scroll",initPosFixedIE6)}}else{if(isResolMinScrollCart!=true){$(window).bind("scroll",initPosFixed)}}}}navHover()}switch(typePage){case"panier":initPanierForm();break}if($("#mycarousel").length!=0){$("#mycarousel").jcarousel({wrap:"last",animation:"slow",scroll:3})}if(navigator.appVersion.indexOf("Mac")!=-1){if($.browser.safari){$("head").append('<link type="text/css" rel="stylesheet" href="/refonte/static/css/style_mac.css" />')}else{if($.browser.mozilla){$("head").append('<link type="text/css" rel="stylesheet" href="/refonte/static/css/style_mac_ff.css" />');$("head").append('<style>*{font-family:Helvetica, "Trebuchet MS", Sans-serif; letter-spacing: -0.01em;}</style>')}}}if(DOM_listeArticle!=null){if(DOM_listeArticle.length>0&&DOM_listeArticle.hasClass("full_loading")){initListeArticleFullLoad(true,false,"all")}}initPng("")});$.ajaxSetup({scriptCharset:"utf-8",contentType:"application/x-www-form-urlencoded; charset=utf-8"});function initPreload(){$.preload(urlsToPreload,{threshold:1,base:window.CONST_PATH_IMG,onFinish:function(data){bgImgPreloaded=true}})}function history_callback(hash){if(hash.length==0){hash=jQuery.historyFirstHash.replace(/^#/,"")}if(hash.length>0){var params=hash.split(/[+]/);var paramsListe=$("#params-liste");$.each(params,function(i,valeur){switch(i){case 0:$(paramsListe).children("#is-loading").val(valeur);isLoading=(valeur=="1")?true:false;break;case 1:$(paramsListe).children("#is-scrolling").val(valeur);isScrolling=(valeur=="1")?true:false;break;case 2:$(paramsListe).children("#callbymenu").val(valeur);break;case 3:$(paramsListe).children("#order_field").val(valeur);break;case 4:$(paramsListe).children("#order").val(valeur);break;case 5:$(paramsListe).children("#rayon").val(valeur);break;case 6:$(paramsListe).children("#category").val(valeur);break;case 7:$(paramsListe).children("#reference").val(valeur);break;case 8:$(paramsListe).children("#param-page").val(valeur);break}});initListeArticleFullLoad(isLoading,isScrolling)}}function parseQuery(query){var Params={};if(!query){return Params}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split("=");if(!KeyVal||KeyVal.length!=2){continue}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g," ");Params[key]=val}return Params}function initLinksThickboxOnLayer(){$("#TB_html a.thickbox").unbind("click").bind("click",function(event){event.preventDefault();event.returnValue=false;tb_remove();tb_show(this.title,this.href);return false})}getWidth=function(){if(this.webkit419){return this.innerWidth}if(this.opera){return document.body.clientWidth}return document.documentElement.clientWidth};function resol_1024(){SpeedTrace("start","resol_1024");if(screen.height<resolMinScrollCart){isResolMinScrollCart=true;DOM_middleRight.css({"right":"0px","margin-right":"10px"});DOM_template.css({"left":"0px","margin-left":"-22px"})}else{if(getWidth()<1010){DOM_template.css({"width":"1000px","margin":"0 0 0 -501px","background":"#fff","overflow":"hidden"});DOM_global.css({"width":"1000px","margin":"0","background":"#fff"});DOM_top4.addClass("top4_1024");DOM_tiroir.css({"width":"998px"})}}SpeedTrace("stop","resol_1024")}jQuery.fn.extend({findPos:function(){obj=$(this).get(0);var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop}return{x:curleft,y:curtop}}});function initInfoBulleMenu(){var lis=$("#affineListe > li");for(var i=0;i<lis.length;i++){$(lis[i]).attr("class","sfhover")}}function initPng(parent){SpeedTrace("start","initPng");if(lt_IE7){var exp=new RegExp("^http://.+","gi"),src="";$(parent+" img.png").each(function(){src=this.src;this.src=window.CONST_PATH_IMG+"bg-blank.gif";this.style.background="none";this.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+(exp.test(src)!=-1?src:"/"+src)+'",sizingMethod="crop")'})}SpeedTrace("stop","initPng")}navHover=function(){SpeedTrace("start","navHover");if(lt_IE7){if(document.getElementById("choix-jour")!=null){$("#choix-jour>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("chronomenu")!=null){$("#chronomenu>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("hdmenu")!=null){$("#hdmenu>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("menu-traiteur")!=null){$("#menu-traiteur>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("biomenu")!=null){$("#biomenu>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("cemenu")!=null){$("#cemenu>li.item").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}if(document.getElementById("suggestion")!=null){$("#suggestion").bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})}}if(DOM_tiroir.length>0){DOM_tiroir.bind("click",function(){window.scrollTo(0,0);return false})}if(document.getElementById("home_nieme")!=null){$(".case_pdt li").each(function(){$(this).bind("mouseover",function(){$(this).addClass("sfhover")}).bind("mouseout",function(){$(this).removeClass("sfhover")})})}initPastille();if(document.getElementById("suggestion")!=null){$("#suggestion").bind("click",function(){tb_show("Suggestions",$(this).find(".cliquer").attr("href"))})}var panierV2=document.getElementById("panier-v2");if(panierV2!=null){$(panierV2).find("tr:not(.erreur)").bind("mouseover",function(){$(this).addClass("over")}).bind("mouseout",function(){$(this).removeClass("over")})}SpeedTrace("stop","navHover")};var etatFixe=0;var home=0;function initPastille(){SpeedTrace("start","initPastille");var affineListe=$("#affineListe");if(fixePastille==1){if(affineListe!=null){$(affineListe).addClass("changeClick");var espace=(lt_IE7)?10:25;$("#content div.zone_tri").css("margin-top","0");if($(".ct_pastille").length!=0){$("#content").css("padding-top",($("#affineListe .active .ct_pastille").height()+espace)+"px")}$(affineListe).children("li").each(function(){$(this).unbind("click").bind("click",function(){$("#affineListe>li.active").removeClass("active");$(this).addClass("active");$("#content div.zone_tri").css("margin-top","0");if($(".ct_pastille").length!=0){$("#content").css("padding-top",($("#affineListe .active .ct_pastille").height()+espace)+"px")}else{var height=$("#affineListe li.active div#MOD_Gellule").innerHeight();height+=($(".cat_pdt").length!=0)?$(".cat_pdt").innerHeight():0;$("div#middle_top").css({height:height+"px"})}})})}}else{$(affineListe).addClass("changeOver");if(lt_IE7&&affineListe!=null){$(affineListe).children("li").each(function(){$(this).unbind("mouseover, mouseout").bind("mouseover",function(){$(this).addClass("active")}).bind("mouseout",function(){$(this).removeClass("active")})})}}SpeedTrace("stop","initPastille")}function updatePosFixedDOM(update){SpeedTrace("start","updatePosFixedDOM");if(update!=true){DOM_global=$("#global");DOM_template=$("#template");DOM_tiroir=$("#backToTop");DOM_middle=$("#middle");DOM_middleMain=$("#middle_main");DOM_middleRight=$("#middle_right");DOM_top3=$("#top3");DOM_top4=$("#top4_2");DOM_bannerIE8=(lt_IE8)?$("#banner-ie8"):null}DOM_middleTop=$("#middle_top");DOM_middleLeft=$("#middle_left");SpeedTrace("stop","updatePosFixedDOM")}function initPosFixed(){if(isResolMinScrollCart!=true){if(etatFixe!=1&&$(window).scrollTop()>limiteScroll){DOM_tiroir.addClass("db");if($(".didac_infobulle").length!=0){tb_didacbulle_open=$(".didac_infobulle").attr("id");$(".didac_infobulle").remove()}DOM_top3.addClass("top3_none");DOM_top4.addClass("top4_fixed");DOM_middle.addClass("middle_fixed");DOM_middleTop.addClass("middle_top_fixed");DOM_middleLeft.css("margin-top","0px");DOM_middleRight.addClass("middle_right_fixed");etatFixe=1}else{if(etatFixe==1&&$(window).scrollTop()<limiteScroll){DOM_tiroir.removeClass("db");if(typeof(tb_didacbulle_open)!="undefined"){showDidacBulle(tb_didacbulle_open.substring(6))}DOM_top3.removeClass("top3_none");DOM_top4.removeClass("top4_fixed");DOM_middle.removeClass("middle_fixed");DOM_middleLeft.css("margin-top","0px");DOM_middleTop.removeClass("middle_top_fixed");DOM_middleRight.removeClass("middle_right_fixed");etatFixe=0}}}}function initPosFixedIE6(){if($(window).scrollTop()>limiteScroll){DOM_middleRight.addClass("middle_right_fixed");DOM_tiroir.addClass("db")}else{DOM_middleRight.removeClass("middle_right_fixed");DOM_tiroir.removeClass("db")}fixeMenuIE6()}function showBannerIE8_IE6(show){if(show==false){if(DOM_bannerIE8.length>0){DOM_bannerIE8.css("display","none")}}else{if(DOM_bannerIE8.length>0){DOM_bannerIE8.css({"top":($(window).height()+$(window).scrollTop()-38)+"px","display":"block"})}}}function fixeMenuIE6(){posMenu=DOM_middleRight.offset();templateHeight=DOM_template.height();if((posMenu.top+DOM_middleRight.height())>templateHeight){DOM_middleRight.css({height:(templateHeight-posMenu.top)+"px",overflow:"hidden"})}else{DOM_middleRight.css("height","auto")}}function refreshMenu(){SpeedTrace("start","refreshMenu");$("ul.choix_select").each(function(){$("#"+($(this).attr("id")).toString()+" > li > a").unbind("click").bind("click",refreshMenu2)});SpeedTrace("stop","refreshMenu")}function refreshMenu2(evt){var target=evt.target;var parents=$(target).parents(".select");var replace_link=$("#"+$(parents[0]).attr("id").toString()+" .txt_select");var link=$(replace_link).parent("a");if(typeof(target_link)!="undefined"){link=target_link;replace_link=$("#"+$(link).attr("id").toString()+" .txt_select")}$(replace_link).html($(target).text());$(replace_link).parent(".select_menu").removeClass("cat_active");$("#choix_select_"+$(link).attr("id").toString()).removeClass("db");$("#choix_select_"+$(link).attr("id").toString()).addClass("dn");$("#choix_select_"+$(link).attr("id").toString()).parent(".ss_menu").children("img").css("display","none")}function initMenu(){SpeedTrace("start","initMenu");$("a.select_menu").unbind("click").bind("click",affSousMenu);SpeedTrace("stop","initMenu")}function affSousMenu(evt){SpeedTrace("start","affSousMenu");var target_link=$(evt.target).parents("a:first");var ss_menu_img=target_link.next(".ss_menu").children("img");var ss_liste=$("#choix_select_"+target_link.attr("id"));var ss_links=ss_liste.find("a");if(ss_liste.hasClass("db")){ss_liste.removeClass("db").addClass("dn");ss_menu_img.css("display","none");target_link.removeClass("cat_active")}else{if(ss_liste.hasClass("dn")){ss_liste.removeClass("dn").addClass("db");if(target_link.attr("id")!="recherche"||target_link.attr("id")!="recherche_footer"){var w1=parseInt(target_link.width())+20;var w2=0;ss_liste.children("li").each(function(){w2=(parseInt($(this).outerWidth())>w2)?parseInt($(this).outerWidth()):w2});if(ssMenuWidth==0){ssMenuWidth=w2;ssMenuWidth=(ssMenuWidth<160)?160:ssMenuWidth}if(w1>=ssMenuWidth){ss_liste.width(w1+"px")}else{ss_liste.width(ssMenuWidth+"px")}}ss_menu_img.css("display","block");target_link.addClass("cat_active")}}ss_links.bind("click",function(){ss_links.removeClass("actif");$(this).addClass("actif")});SpeedTrace("stop","affSousMenu")}function getPos(evt){var tabPos=new Array();if(!evt){evt=window.event}x=evt.pageX;y=evt.pageY;tabPos[0]=x;tabPos[1]=y;return tabPos}myTitle="";function initBulles(parent){SpeedTrace("start","initBulles");$(parent?parent.toString()+" a.infobulle":"a.infobulle").unbind("mouseover, mouseout").bind("mouseover",displayBulle).bind("mouseout",maskBulle);SpeedTrace("stop","initBulles")}function maskBulle(){if($("#ct_infobulle")){$("#ct_infobulle").remove();$(this).attr("title",myTitle)}else{return}if($("#iframe_mask")){$("#iframe_mask").remove()}else{return}}function hideBulle(){var ctInfoBulle=$("#ct_infobulle");if(ctInfoBulle.length){ctInfoBulle.css("visibility","hidden")}return}function displayBulle(evt){SpeedTrace("start","displayBulle");var T;var M;var B;var target=(lt_IE7)?evt.srcElement:evt.target;var parents=$(target).parents("a");var DOM_ctInfobulle=$("#ct_infobulle");if(DOM_ctInfobulle.length>0&&$(target).hasClass("infobulle4")){var position=getPos(evt);var decalTop=(lt_IE8)?40:20;DOM_ctInfobulle.css({"top":(position[1]+decalTop)+"px","left":(position[0]-30)+"px","visibility":"visible"});return}else{maskBulle()}if(!($(target).attr("class").match("infobulle"))&&$(parents).size()>0){target=parents[0]}var heightTarget=$(target).height();var widthTarget=$(target).width();pos=$(target).findPos();var scrollHeight=(document.documentElement&&document.documentElement.scrollLeft)||(window.pageXOffset||self.pageXOffset||document.body.scrollLeft)||(document.documentElement&&document.documentElement.scrollTop)||(window.pageYOffset||self.pageYOffset||document.body.scrollTop);var newDiv=document.createElement("div");$(newDiv).attr({"id":"ct_infobulle","class":"ct_infobulle"});myTitle=$(target).attr("title");if($(target).hasClass("infobulle1_T")){T="T_T";M="M";B="B_T"}else{if($(target).hasClass("infobulle2")){T="T2";M="M2";B="B2"}else{if($(target).hasClass("infobulle3")){T="T";M="M3";B="B"}else{if($(target).hasClass("infobulle4")){T="T4";M="M4";B="B4"}else{if($(target).hasClass("infobulle5")){T="T5";M="M5";B="B5"}else{if($(target).hasClass("infobulle6")){T="T6";M="M6";B="B6"}else{if($(target).hasClass("infobulle7")){T="T7";M="M7";B="B7"}else{if($(target).hasClass("infobulle9")){clearTimeout(timerHideZoom);var art=$(target).closest(".line_article");var isSub=$(art).parent().hasClass("art_sub");var isLot=$(art).parent().hasClass("art_lot");var urlLoader=window.CONST_PATH_IMG+"bg-autocomplete-indicator.gif";var urlFiche=$(art).find(".infobulle9").attr("href");var picto=$(art).find(".picto-lot");var typeZoom="normal";var urlsZoom=$(art).find(".urlZoom").val().split(/:/);var screenWidth=browserWidth();if(screenWidth>=1280){typeZoom="large";T="T9b";M="M9b zoom";B="B9b";var urlZoom=urlsZoom[1]}else{T="T9";M="M9 zoom";B="B9";var urlZoom=urlsZoom[0]}myTitle='<img class="loading" src="'+urlLoader+'" alt="" />'}else{T="T";M="M";B="B"}}}}}}}}if($(target).hasClass("infobulle4")){myTitle="<strong>Cliquez ici</strong> pour retourner à la page précédente"}$(newDiv).append('<div class="'+T+'"></div><div class="'+M+'">'+myTitle+'</div><div class="'+B+'"></div>');$(target).attr("title","");$(newDiv).css({"position":"absolute","top":"15000px","display":"block",zIndex:"3005"});$("body").append($(newDiv));var h=$(newDiv).height();var posTop=((pos.y-heightTarget)<0)?0:pos.y+scrollHeight-h;$(newDiv).css({"height":h+"px","top":posTop+"px"});if(pos.x>($("body").width()-120)){if($(target).hasClass("infobulle7")){$(newDiv).css("left",$("body").width()-($(newDiv).width()+32-230)+"px")}else{$(newDiv).css("left",$("body").width()-($(newDiv).width()+32)+"px")}$("#"+$(newDiv).attr("id").toString()+" .B").addClass("B_g")}else{if($(target).hasClass("infobulle7")){newDiv.style.left=pos.x-230+"px"}else{newDiv.style.left=pos.x+"px"}}var posLeft=$(newDiv).css("left").replace("px","");if($(target).attr("id").toString()=="mag_change"){$(newDiv).css("left",posLeft-10+"px")}if($(target).hasClass("infobulle3")){if(lt_IE8&&$(target).closest("tr").hasClass("product")){posTop+=20}if(is_IE8&&$("#panier-detail").length!=0){posTop+=20}if($(target).text()=="Supprimer"){$(newDiv).css({"top":posTop-$(window).scrollTop()+"px","left":posLeft+"px"})}else{$(newDiv).css({"top":posTop-$(window).scrollTop()+"px","left":posLeft-25+"px"})}}else{if($(target).hasClass("infobulle2")){pos=$(target).offset();var posX=pos.left;var posY=pos.top-h;$(newDiv).css({"left":posX+"px","top":posY+"px"})}else{if($(target).hasClass("infobulle4")){var position=getPos(evt);var decalTop=(lt_IE8)?40:20;$(newDiv).css({"top":(position[1]+decalTop)+"px","left":(position[0]-30)+"px"})}else{if($(target).hasClass("infobulle5")){var evtPos=$(target).findPos();var posX=(evtPos.x-116);var posY=(evtPos.y-$(newDiv).height());if(posX<0){posX=evtPos.x;$(newDiv).children(".B5").addClass("B5g");$(newDiv).children(".B5").removeClass("B5")}if((posX+308)>$("body").width()){posX=evtPos.x-308+68;$(newDiv).children(".B5").addClass("B5d");$(newDiv).children(".B5").removeClass("B5")}$(newDiv).css({"left":posX+"px","top":posY+"px"})}else{if($(target).hasClass("infobulle6")){var evtPos=$(target).findPos();var posX=(evtPos.x+50);var posY=(evtPos.y-150);$(newDiv).css({"left":posX+"px","top":posY+"px"})}else{if($(target).hasClass("infobulle7")){$(newDiv).css("top",posTop-$(window).scrollTop()+"px")}else{if($(target).hasClass("infobulle9")){var artPos=$(art).offset();var posX=artPos.left;var posY=artPos.top;var decalX=(lt_IE8)?0:0;var decalY=(lt_IE8)?-2:-2;var sizeX=320;var sizeY=320;var imgSize=300;$(target).unbind("mouseout");$(newDiv).unbind("mouseout");if(typeZoom=="large"){decalX=(lt_IE8)?-140:-140;decalY=(lt_IE8)?-185:-185;if(isSub==true){decalX-=35}if(isLot==true){decalX+=130}if((posY+decalY)<$(window).scrollTop()){decalY=(lt_IE8)?0:0}}else{imgSize=194;sizeX=sizeY=220;if(isSub==true){decalX-=35}if(isLot==true){decalX+=160}if((posY+decalY+220)>($(window).scrollTop()+$(window).height())){decalY-=(lt_IE8)?72:72}}posX+=decalX;posY+=decalY;$(newDiv).css({"left":posX+"px","top":posY+"px","width":sizeX+"px","height":sizeY+"px"});var urls=[urlZoom];$.preload(urls,{onComplete:function(data){var zoomContent=$(newDiv).children(".zoom");var zoomLink=document.createElement("a");var zoomImg=document.createElement("img");$(zoomContent).children(".loading").remove();$(zoomImg).attr({"src":data.image,"width":imgSize,"height":imgSize});$(zoomLink).attr({"href":urlFiche,"title":"","class":"zoom thickbox"}).append(zoomImg);if(picto.length>0){var isFilter=(lt_IE7&&picto.css("filter")!="");var pictoImg=document.createElement("img");var pictoUrl=picto.attr("src");if(isFilter){pictoUrl=picto.css("filter");var reg1=new RegExp('[^"]*/.*.png',"i");var res=pictoUrl.match(reg1);if(res!=false){pictoUrl=res[0]}}if(typeZoom=="large"){var reg2=new RegExp("/(.*).png","i");pictoUrl=pictoUrl.replace(reg2,"/$1_large.png")}$(pictoImg).attr({"class":"picto","src":pictoUrl,"alt":""});$(zoomContent).append(pictoImg)}if(urlFiche!="javascript:void(0);"){$(zoomContent).append($(zoomLink));$(zoomLink).bind("click",function(){maskBulle();tb_show("",$(this).attr("href"));return false})}else{$(zoomContent).append($(zoomImg))}if(lt_IE7){setTimeout(function(){$(pictoImg).css({"background":"none","filter":'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+pictoUrl+'",sizingMethod="crop")',"visibility":"visible"});$(pictoImg).attr({src:window.CONST_PATH_IMG+"bg-blank.gif"})},300)}$().mousemove(function(e){var bulle=$("#ct_infobulle");var bulleX=$(bulle).offset().left;var bulleY=$(bulle).offset().top;if(e.pageX<bulleX||e.pageX>(bulleX+$(bulle).width())||e.pageY<bulleY||e.pageY>(bulleY+$(bulle).height())){maskBulle();$().unbind("mousemove")}})}});$(newDiv).bind("mouseleave",function(){maskBulle();$().unbind("mousemove")})}else{if($(target).hasClass("infobulle1_T")){var decalY=(lt_IE7)?75:65;$(newDiv).css("top",(posTop-$(window).scrollTop()+decalY)+"px")}else{if($(target).parents("DIV").attr("class")){if($(target).parents("DIV").hasClass("ct_astuce")){if(lt_IE7){decalX=15;decalY=8;$(newDiv).css({"top":posTop-$(window).scrollTop()-decalY+"px","left":posLeft-decalX+"px"})}}else{$(newDiv).css("top",posTop-$(window).scrollTop()+"px")}}else{$(newDiv).css("top",posTop+"px")}}}}}}}}}if($(target).hasClass("besoin_info")&&$(target).hasClass("infobulle1")){var newLeft=parseIntPxl($("#ct_infobulle").css("left"))-23;$("#ct_infobulle").css("left",newLeft+"px")}else{if(lt_IE7&&$(target).hasClass("infobulle1")&&!$(target).hasClass("home_int")){var iframe=document.createElement("iframe");$(iframe).attr("id","iframe_mask");var widthInfobulle=$("#ct_infobulle").width();var heightInfobulle=$("#ct_infobulle").height();var topInfobulle=parseIntPxl($("#ct_infobulle").css("top"));var leftInfobulle=parseIntPxl($("#ct_infobulle").css("left"));$(iframe).css({"position":"absolute","top":topInfobulle+5,"left":leftInfobulle+5,zIndex:"1004","width":widthInfobulle-10,"height":heightInfobulle-15,"border":"none","background":"transparent"});$("body").append($(iframe))}else{if($(target).hasClass("home_int")){$("#ct_infobulle").css("top",(parseIntPxl($("#ct_infobulle").css("top"))+10)+"px");$("#ct_infobulle").css("left",(parseIntPxl($("#ct_infobulle").css("left"))-7)+"px")}}}SpeedTrace("stop","displayBulle")}function parseIntPxl(param){return Math.round(param.substring(0,param.length-2))}$(document).ready(function(){$("#slickbox").hide();$("a#slick-show").click(function(){$("#slickbox").show("slow");$("#slickboxhp").show("slow");return false});$("a#slick-hide").click(function(){$("#slickbox").hide("fast");$("#slickboxhp").hide("fast");return false});$("a#slick-toggle").click(function(){$("#slickbox").toggle(400);$("#slickboxhp").toggle(400);return false})});function printit(){if($("#TB_window").css("visibility")=="hidden"){$("#media_print").attr("href","/refonte/static/css/print.css");if(window.print){window.print()}else{var WebBrowser='<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';document.body.insertAdjacentHTML("beforeEnd",WebBrowser);WebBrowser1.ExecWB(6,2)}}else{$("#media_print").attr("href","/refonte/static/css/print_calque.css");window.print()}return false}function initColProductPanier(){if(typeof(heightColProductPanier)=="undefined"){heightColProductPanier=$("#col-product").innerHeight()}var ColProductPanier=$("#col-product");var heightColMiddleLeft=$("#middle_left").innerHeight();if(heightColProductPanier<=heightColMiddleLeft){ColProductPanier.css("height",heightColMiddleLeft)}}function initPanierForm(){$("a.btViderPanier").click(function(){var urlAjax=$(this).attr("href");if(basket.removeAllItems()){$("table.products tr.product").remove();recalculePanier();if(typePage=="panier"){setTimeout("reloadCartDetail()",1000)}}return false});$("a.suppr").click(function(){if(confirm("Voulez-vous supprimer cet article ?")==true){maskBulle();$(this).closest("tr").remove();var idFidPanier=$(this).attr("id").split("_");var fidPanier=idFidPanier[1];basket.removeProductFromShoppingCart(basket._searchProductIndex(fidPanier));recalculePanier();initColProductPanier();if(typePage=="panier"){setTimeout("reloadCartDetail()",1000)}}});$(".moins, .plus").unbind("click").bind("click",function(){var exp=new RegExp("[.,]+","g");var line=$(this).closest("tr");var fqte=line.find("input.qte");var fqtepromo=line.find("td.quantite .ct_quantite>input");var fpu=line.find("input.prixU");var fpttc=line.find("td.prixT");var fpttcpromo=line.find("td.prixT .ct_prixT #prixTtc");var fmaxQte=line.find("input.maxqte");var fidPanier=line.find("input.idPanier");maxQte=parseInt($(fmaxQte).val());qte=(fpttcpromo.length==0)?parseInt($(fqte).val()):parseInt($(fqtepromo).val());qte+=$(this).hasClass("moins")?-1:1;if(qte<=0){if(confirm(basket_alertItemRemoval)){line.find("a.suppr").trigger("click");basket.removeProductsFromShoppingCart(basket._searchProductIndex(fidPanier))}else{return}}if(qte>maxQte){return}if($(this).hasClass("moins")){basket.decrementProduct(basket._searchProductIndex($(fidPanier).val()))}else{basket.incrementProduct(basket._searchProductIndex($(fidPanier).val()))}var prixU=parseFloat($(fpu).val());var price=Math.round((qte*prixU)*100)/100;var ttc=price.toString().split(exp);centimes=(isNaN(parseFloat(ttc[1])))?",00":","+ttc[1];centimes=(centimes.length==2)?centimes+"0":centimes;if(fpttcpromo.length==0){$(fqte).val(qte);$(fpttc).html(ttc[0]+""+centimes+" &euro;");recalculePanier()}else{$(fqtepromo).val(qte);$(fpttcpromo).html(ttc[0]+""+centimes+" &euro;");recalculePanier()}if(typePage=="panier"){setTimeout("reloadCartDetail()",1000)}});$("#panier-detail").find("a.marque, a.desc").mouseover(function(){$(this).closest("tr").addClass("sfhover")}).mouseout(function(){$(this).closest("tr").removeClass("sfhover")});$("#panier-detail img.thumb").mouseenter(function(){$(this).closest("tr").addClass("sfhover")});$("#panier-detail a.visuel").mouseleave(function(){$(this).closest("tr").removeClass("sfhover")});tb_init("a.thickbox, area.thickbox, input.thickbox")}function recalculePanier(){var ttc=0;var centimes=0;var nbarticle=0;var cagnottage=0;var exp=new RegExp("[.,]+","g");var products=$("#panier-detail tr.product");if(products.length==0){ttc=Array(0,0);$("#form-panier").children().not("#total").hide();$("#total>h2 strong").html("0");$("#total .total-chrono .prix").html("<strong>0</strong>,00 &euro;");$("#total .total-panier").html("<strong>0</strong>,00 &euro;");window.scrollTo(0,0);alert("Votre panier est vide");document.location.href="/refonte/store/home"}else{products.each(function(){var line=$(this).closest("tr");var fqte=line.find("input.qte");var fqtepromo=line.find("td.quantite .ct_quantite>input");var fpu=line.find("input.prixU");if(fqtepromo.length==0){ttc+=(parseInt(fqte.val())*parseFloat(fpu.val()));nbarticle+=parseInt(fqte.val())}else{ttc+=(parseInt(fqtepromo.val())*parseFloat(fpu.val()));nbarticle+=parseInt(fqtepromo.val())}cagnottage+=nbarticle*parseFloat($(this).find("input.cagnotte").val())});ttc=Math.round(ttc*100)/100;$("#f-ttc").val(ttc);ttc=ttc.toString().split(exp);centimes=(isNaN(parseFloat(ttc[1])))?",00":","+ttc[1];centimes=(centimes.length==2)?centimes+"0":centimes;cagnottage=Math.round(cagnottage*100)/100;cagnottage=cagnottage.toString().split(exp);cagnottageCent=(isNaN(parseFloat(cagnottage[1])))?",00":","+cagnottage[1];cagnottageCent=(cagnottageCent.length==2)?cagnottageCent+"0":cagnottageCent;$("#total>h2 strong").html(nbarticle);$("#total .total-panier").html("<strong>"+ttc[0]+"</strong>"+centimes+" &euro;");$("#panier-total .total .prix").html("<strong>"+ttc[0]+"</strong>"+centimes+" &euro;");$("#total .total-chrono .prix").html("<strong>"+cagnottage[0]+"</strong>"+cagnottageCent+" &euro;");$("#panier-total .chrono .prix").html("<strong>"+cagnottage[0]+"</strong>"+cagnottageCent+" &euro;")}}function initListeArticleFullLoad(isLoading,isScrolling,typeInit){SpeedTrace("start","initListeArticleFullLoad");var allLinks=$("#super_top, #middle, #bottom");if(!is_IE7){$(allLinks).addClass("cursor-wait")}else{$(allLinks).css("cursor","wait")}var callbymenu=($("#callbymenu").val()=="1");var rayon=$("#rayon").attr("value");var gellule=$("#category").attr("value");var sortType=$("#order_field").attr("value");var sortDirection=$("#order").attr("value");var choosenPage=$("#param-page").attr("value");var firstCall=false;var finalUrl=urlListeAjax;if(rayon=="newMasterCategory"){finalUrl+=gellule+"/"+sortType+"_"+(sortDirection==0?"asc":"desc")+"/"+choosenPage;fullLoadingBoutique=false}else{if(rayon.indexOf("/")<0){finalUrl=urlBoutiqueListAjax;finalUrl+=rayon;finalUrl+="/"+choosenPage;fullLoadingBoutique=true}else{if($("#menuLoaded")==null||$("#menuLoaded").val()!="true"){firstCall=true}fullLoadingBoutique=false;finalUrl+=rayon;if(!callbymenu||firstCall){finalUrl+="/"+gellule}if(sortType!=""&&sortDirection!=""){finalUrl+="/"+sortType+"/"+sortDirection}finalUrl+="/"+choosenPage;if(callbymenu||firstCall){finalUrl+="/menu"}callbymenu=(callbymenu||firstCall)?true:false}}var date=new Date();finalUrl+="?time="+date.getTime();$.get(finalUrl,{},function success(data){var div_liste=$("#liste_articles");var gellulesLoading=$("div#MOD_Gellule .isLoading");if(div_liste.size()>0){if(callbymenu){$("#middle_main").html(data).css("height","400px")}else{$(div_liste).html(data);$(gellulesLoading).removeClass("isLoading");if(is_IE7||bt_IE7){$(gellulesLoading).css("cursor","text")}$("ul.Gellule>li>a.Loading").removeClass("Loading")}if(rayon!="newMasterCategory"&&$("#suggestion")){var suggUrl=$("#suggestion").find(".cliquer").attr("href");if(lt_IE7){$("#suggestion").bind("mouseover",function(){$(this).addClass("sfhover")});$("#suggestion").bind("mouseout",function(){$(this).removeClass("sfhover")})}$("#suggestion").bind("click",function(){tb_show("Suggestions",suggUrl)});$("#suggestion").find(".cliquer").attr({"href":"javascript:void(0)"});$("#suggestion").removeClass("dn")}setTimeout(function(){updatePosFixedDOM(true);$(allLinks).removeClass("cursor-wait").css("cursor","default");$("#middle_left, #middle_main").height("auto");initBulles();tb_init("#liste_articles a.thickbox, #liste_articles area.thickbox");if(callbymenu){initMenu();refreshMenu();initPastille()}initListeArticleCriteres(typeInit,callbymenu);initPng("#liste_articles")},100);if(isScrolling==true){setTimeout(function(){etatFixe=0;if(!lt_IE7){initPosFixed()}},200)}}});SpeedTrace("stop","initListeArticleFullLoad")}function initAjoutPanier(obj,isListe,isGalerie){var DOM_link=$(obj);var DOM_article=(isListe)?DOM_link.closest(".line_article"):DOM_link.closest(".colG");var DOM_addParams=DOM_article.find("input.addcartparams");var DOM_qte=DOM_article.find("input.qte-liste");var idPdt=DOM_article.attr("id").split(/_/)[1];var addParams=DOM_addParams.val();var qteToAdd=(DOM_qte.length>0)?DOM_qte.val():1;eval("panier.basket.addProductInShoppingCart("+addParams.replace("__qty__",qteToAdd)+")");var DOM_dejaPanier=DOM_article.find(".deja_panier");if(isListe&&!isGalerie){DOM_link.addClass("added")}if(DOM_dejaPanier.length>0){if(isGalerie){DOM_article.addClass("deja");DOM_article.find(".suppr_prod").css("display","none")}}if(document.getElementById("nb_products_selected")!=undefined){document.getElementById("nb_products_selected").innerHTML=parseInt(document.getElementById("nb_products_selected").innerHTML)+1}if(panier.basket.shoppingCart[basket._searchProductIndex(idPdt)].isMaxQuantity()&&!isGalerie){DOM_article.find(".qte_max").css("display","block");DOM_article.find(".suppr_prod").css("display","none")}if(typePage=="panier"){setTimeout("reloadCartDetail()",1000)}if(DOM_dejaPanier.length>0){DOM_dejaPanier.html(panier.basket.shoppingCart[basket._searchProductIndex(idPdt)].getTotalQty()+" DANS LE PANIER")}return false}function modifQteFlash(id,qte,max){var art=$("#article_"+id);if($(art).size()>0){if(qte<=0){$(art).find(".deja_panier").html("");$(art).find(".add_cart_liste").removeClass("added");$(art).find(".qte_max").css("display","none");$(art).find(".suppr_prod").css("display","block")}else{$(art).find(".deja_panier").html(qte+" <span>DANS LE PANIER</span>");if(max==1){$(art).find(".qte_max").css("display","block")}else{$(art).find(".qte_max").css("display","none")}$(art).find(".suppr_prod").css("display","none")}}}function setPageHistory(load){var myparams=getDataForm("params-liste").split(/[&]/);var params="";var myparamsLength=myparams.length;for(var i=0;i<myparamsLength;i++){var param=myparams[i].split(/[=]/);if(i>0){params+="+"}params+=param[1]}if(load==true){$.historyLoad(params)}else{return params}}function initListeArticleCriteres(typeInit,callbymenu){SpeedTrace("start","initListeArticleCriteres");var isCallByMenu=callbymenu?1:0;if($("form#params-liste").size()>0){if(!fullLoadingBoutique){if(isCallByMenu==1||typeInit=="all"){$("ul#choix_select_produit>li>a").bind("click",function(){if(etatFixe==1){window.scrollTo(0,0)}var id_rayon=$(this).attr("id").split(new RegExp("[_]+","g"));trackGAContextEvent("Navigation produits","sousmenu/"+$(this).html(),false);id_rayon=id_rayon[1];if(id_rayon!=""){$("input#callbymenu").val("1");$("input#rayon").val(id_rayon);$("input#is-scrolling").val("1");$("input#param-page").val("1");initListeArticleFullLoad(true,true)}return false});var CtpastilleAll=$("ul.liste00>li>a.pastille").unbind("click");var CtpastilleDispo=$(CtpastilleAll).not(".pnotDispo,.waiting");$(CtpastilleDispo).bind("click",function(){if(etatFixe==1){window.scrollTo(0,limiteScroll+1)}trackGAContextEvent("Navigation produits","gelule/"+$(this).parent("li").children("span").html().replace("$0020",""),false);$(CtpastilleDispo).filter(".selected,.pastille_selected").removeClass("selected pastille_selected bio_selected");if(!$(this).hasClass("deja_achete")){$(this).addClass("selected pastille_selected isLoading");if($(this).hasClass("bio")){$(this).addClass("bio_selected")}}else{$(this).addClass("selected isLoading")}$(CtpastilleDispo).not(".selected").addClass("waiting");$("input#category").val($(this).parent("li").children("input").val());$("input#callbymenu").val("0");$("input#param-page").val("1");initListeArticleFullLoad(true,false);return false})}if(typeInit=="all"){$(DOM_menuRayonA2).bind("click",function(){clearTimeout(timerHideRayon);hideMenuRayon();if(etatFixe==1){window.scrollTo(0,0)}var id_rayon=$(this).attr("id").split(new RegExp("[_]+","g"));id_rayon=id_rayon[1];if("undefined"==id_rayon||null==id_rayon){id_rayon=0}if($(this).attr("href")!="#"&&id_rayon!=0){DOM_menuRayonA1.filter(".active").removeClass("active");DOM_menuRayonA2.filter(".selected").removeClass("selected");$(this).addClass("selected").closest("li.category").children("a").addClass("active");$("input#callbymenu").val("1");$("input#rayon").val(id_rayon);$("input#is-scrolling").val("1");$("input#param-page").val("1");if($("#params-liste").attr("action")!="ajax/liste_produit_galerie.php"){$("#params-liste").attr("action","ajax/liste_produit.php")}initListeArticleFullLoad(true,true)}else{if(link!="#"){return true}}return false})}$(".critere>a").unbind("click").bind("click",function(event){$(".critere>.moins_active,.critere>.plus_active").removeClass("moins_active plus_active");$(this).addClass(($(this).hasClass("moins")?"moins":"plus")+"_active");$("input#order_field").val($(this).parent("div.critere").children("input").val());$("input#order").val($(this).hasClass("moins")?"0":"1");$("input#callbymenu").val("0");initListeArticleFullLoad(true,false);return false})}}SpeedTrace("stop","initListeArticleCriteres")}function SetCookie(name,value){var argv=SetCookie.arguments;var argc=SetCookie.arguments.length;var expires=(argc>2)?argv[2]:null;var path=(argc>3)?argv[3]:null;var domain=(argc>4)?argv[4]:null;var secure=(argc>5)?argv[5]:false;document.cookie=name+"="+escape(value)+((expires==null)?"":("; expires="+expires.toGMTString()))+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"")}function DeleteCookie(name){var exp=new Date();exp.setTime(exp.getTime()-1);var cval=GetCookie(name);document.cookie=name+"="+cval+"; expires="+exp.toGMTString()}function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length}return unescape(document.cookie.substring(offset,endstr))}function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg){return getCookieVal(j)}i=document.cookie.indexOf(" ",i)+1;if(i==0){break}}return null}function setCookieVisite(){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=new Date();var date_visite=new Date();var interval_visite=1*1800*1000;var nb_visite=GetCookie("nb_visite");nb_visite=parseInt(nb_visite);nb_visite=isNaN(nb_visite)?-1:nb_visite;var last_visite=GetCookie("last_visite");last_visite=parseInt(last_visite);last_visite=isNaN(last_visite)?0:last_visite;if(last_visite==0||(date_visite.getTime()-last_visite)>interval_visite){last_visite=date_visite.getTime();nb_visite+=1;date_exp.setTime(date_exp.getTime()+(365*24*3600*1000));SetCookie("nb_visite",nb_visite,date_exp,myDomain);SetCookie("last_visite",last_visite,date_exp,myDomain)}}function setCookieCommande(nb_commande){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=new Date();nb_commande=parseInt(nb_commande);nb_commande=isNaN(nb_commande)?0:nb_commande;date_exp.setTime(date_exp.getTime()+(365*24*3600*1000));SetCookie("nb_commande",nb_commande,date_exp,myDomain)}function setCookieVideo(idVideo,nbJour){var argv=setCookieVideo.arguments;var argc=setCookieVideo.arguments.length;var nbJour=(argc>1)?argv[1]:365;var pathname=location.pathname;var myDomain="/";var date_exp=new Date();if(nbJour==0){date_exp=null}else{date_exp.setTime(date_exp.getTime()+(nbJour*24*3600*1000))}SetCookie("video_"+idVideo,1,date_exp,myDomain)}function setCookieIE8(val){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=new Date();if(val==1){date_exp.setTime(date_exp.getTime()+(100*365*24*3600*1000))}else{date_exp=null}SetCookie("msgie8",val,date_exp,myDomain)}function setCookieDidacBulle(infobulle){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=null;var cookieval=GetCookie("didacBulle");if(cookieval==null){cookieval=infobulle}else{cookieval+=";"+infobulle}SetCookie("didacBulle",cookieval,date_exp,myDomain)}function setCookieDidacBulles(infobulles){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=null;DeleteCookie("didacBulle");SetCookie("didacBulle",infobulles,date_exp,myDomain)}function showDidacBulle(positionBulle,event){var event=(typeof(event)=="undefined")?"":event;if(event!=""){var parents=$(event.target);var parents_pos=parents.findPos()}var position=positionBulle;var HTMLcontent="";var top;var left;var M="M8";var T="T8";var B="B8";var exp=new RegExp("[;]+","g");var cookieval=GetCookie("didacBulle");if(cookieval!=null){var bulles=cookieval.split(exp);if($.inArray(position,bulles)!=-1){return false}}switch(position){case"n_1_1":M="M8_2";T="T8_2";B="B8_2";top=115;left=746;type="T";HTMLcontent="<p><span>Service 100% GRATUIT</span></p><p>Ouvert de <span>8h30 à 20h30 du lundi au samedi.</span></p><p><strong>Je gagne du temps et je fais des économies&nbsp;!</strong></p>";break;case"n_1_2":top=135;left=500;type="B";HTMLcontent='<p>Grâce à Chrono +, <span>je cagnotte</span> à chaque commande&nbsp;!</p><a href="/img/boutiques/layer_commentcamarche.html?height=560&width=865&layername=layer03" class="thickbox" title="">+ d\'infos sur Chrono +.</a>';break;case"n_1_3":M="M8_2";T="T8_2";B="B8_2";top=15;left=445;type="T";HTMLcontent="<p>Cliquez ci-dessus pour <span>revoir la vidéo</span></a>";break;case"n_1_4":if($("#MOD_Gellule").length!=0){var eltPastille=$("#affineListe>.active>#MOD_Gellule");var posY=eltPastille.findPos().y+eltPastille.height()-20;if(lt_IE7){posY+=15}}else{var eltPastille=$("#affineListe>.active>.ct_pastille");var posY=eltPastille.findPos().y+eltPastille.height()}posY-=(lt_IE7)?130:115;var imgRemy=(lt_IE7)?"bg-infobulle-galerie-ie.gif":"bg-infobulle-galerie.png";M="M8 galerie";T="T8";B="B8_3";top=posY;left=516;type="T";HTMLcontent='<img class="remy" src="'+window.CONST_PATH_IMG+imgRemy+'" alt="" /><p><span>Modifiez ici l\'affichage des produits :</span> en liste ou en galerie, c\'est vous qui choisissez !</p>';break;case"n_2_1":M="M8_2";T="T8_2";B="B8_2";top=40;left=250;type="T";HTMLcontent="<p>Ouvert de <span>8h30 à 20h30 du lundi au samedi.</span></p>";break;case"n_2_2":top=420;left=746;type="B";HTMLcontent='<p>Je découvre la <a href="/refonte/store/boutique/BOUTIQUE_CHRONO_PLUS" title="">boutique Chrono +</a> : tous les produits qui me permettent de <strong>cagnotter des économies&nbsp;!</strong></p>';break;case"n_2_3":M="M8_2";T="T8_2";B="B8_2";top=190;left=746;type="B";HTMLcontent='<p><span>Je gagne du temps !</span><br />Les produits que j\'ai <strong>déjà commandés</strong> sont dans mon <a href="#" title="">Chronopanier&nbsp;!</a></p>';break;case"n_2_4":top=235;left=85;type="B";HTMLcontent='<p>Je peux sélectionner les produits de mon panier et les ajouter à une <span>une liste personnelle</span>.<br />Je la retrouve ensuite juste en cliquant sur " <a href="/refonte/store/myLists" title="">Listes</a> " juste <strong>au-dessus de mon panier</strong>.</p>';break;case"n_3_1":M="M8_2";T="T8_2";B="B8_2";top=20;left=720;type="T";HTMLcontent="<p>Je retrouve dans <strong>mon compte</strong> mes commandes passées, mes moyens de paiement, mes listes, mon Chrono +.</p>";break;case"n_3_2":M="M8_2";T="T8_2";B="B8_2";top=286;left=746;type="T";HTMLcontent='<p>Je découvre <a href="/refonte/store/boutique/BOUTIQUE_CHRONO_PLUS" title="">la boutique Chrono +</a> : tous les produits qui me permettent de <strong>cagnotter des économies</strong> !</p>';break;case"n_4_1":top=40;left=110;type="B";HTMLcontent='<p>Des <a href="#" title="">fruits</a> et <a href="#" title="">légumes frais</a>&nbsp;!<br /><strong>Contrôlés et choisis avec le plus grand soin</strong>,  ils sont disponibles dans les <span>produits du marché.</span></p>';break;case"n_4_2":top=170;left=746;type="T";T="T8";B="B8_3";HTMLcontent='<p>J\'ai accès ici à toutes les <a href="/refonte/store/boutique/BOUTIQUE_SELECTION" title="">sélections</a> : <strong>les promos, le bio, l\'espace caviste, les produits +, le commerce équitable...</strong></p>';break;case"n_5_1":top=155;left=746;type="B";HTMLcontent='<p>C\'est le moment de <span>cagnotter</span> dans la <a href="/refonte/store/boutique/BOUTIQUE_CHRONO_PLUS" title="">boutique Chrono +</a>&nbsp;!</p><p>Lors de ma prochaine commande, ma cagnotte Chrono + sera disponible : je pourrai <strong>profiter de mes économies&nbsp;!</strong></p>';break;case"n_5_2":M="M8_2";T="T8_2";B="B8_2";top=458;left=746;type="B";HTMLcontent='<p><span>Astuce de courses :</span></p><p>Je pique des <a href="#" title="">idées recettes</a> !</p><p>Et hop, les ingrédients en 1 clic dans mon panier !</p>';break;case"n_6_1":M="M8_2";T="T8_2";B="B8_2";top=70;left=255;type="T";HTMLcontent='<p>J\'ai déjà passé 5 commandes, <span><br />ma cagnotte Chrono +</span> est disponible dans <a href="/refonte/account/ajax/my?height=auto&width=883&layername=layer05&onglet=0&page=account" class="thickbox" title="">mon compte</a> </p><p>Je peux <strong>profiter de mes économies&nbsp;!</strong></p>';break;case"a_1_1":top=235;left=85;type="T";HTMLcontent='<p>Je peux sélectionner les produits de mon panier et les ajouter à <span>une liste personnelle</span>.<br />Je la retrouve ensuite juste en cliquant sur " <a href="/refonte/store/mylists" title="">Listes</a> " juste <strong>au-dessus de mon panier</strong>.</p>';break;case"a_1_2":M="M8_2";T="T8_2";B="B8_2";top=15;left=445;type="T";HTMLcontent="<p>Cliquez ci-dessus pour <span>revoir la vidéo</span></a>";break;case"a_1_3":var eltPastille=$("#affineListe>.active>.ct_pastille");var posY=eltPastille.findPos().y+eltPastille.height();posY-=(lt_IE7)?130:115;var imgRemy=(lt_IE7)?"bg-infobulle-galerie-ie.gif":"bg-infobulle-galerie.png";M="M8 galerie";T="T8";B="B8_3";top=posY;left=516;type="T";HTMLcontent='<img class="remy" src="'+window.CONST_PATH_IMG+imgRemy+'" alt="" /><p><span>Modifiez ici l\'affichage des produits :</span> en liste ou en galerie, c\'est vous qui choisissez !</p>';break;case"a_2_1":M="M8_2";T="T8_2";B="B8_2";top=20;left=696;type="T";HTMLcontent="<p>Je retrouve <strong>mon compte</strong> ici</p>";break;case"a_2_2":top=420;left=746;type="B";HTMLcontent='<p>La <a href="/refonte/store/boutique/BOUTIQUE_CHRONO_PLUS" title="">boutique Chrono + </a> est ici : j\'y vais et <strong>je cagnotte !</strong></p>';break;case"a_2_3":M="M8_2";T="T8_2";B="B8_2";top=476;left=746;type="B";HTMLcontent='<p><a href="/refonte/store/favourites">Mon Chronopanier</a> est disponible à tout moment dans les <strong>astuces de courses</strong></p>';break;case"a_3_1":M="M8_4";T="T8_4";B="B8_4";top=130;left=280;type="B";left+=(lt_IE7)?20:0;HTMLcontent='<em class="coche"></em><p>Le <strong class="text02">chronopanier</strong>, vous connaissez ?</p><p>C\'est un outil qui vous permet de <strong class="text02">gagner du temps à chaque commande</strong>,<br />en mémorisant automatiquement <strong>les produits que vous achetez le plus souvent</strong>.<br />Nous vous proposons <strong>une visite guidée en 3 clics</strong>, vous saurez tout en moins d\'une minute chrono !</p><ul class="etape"><li class="active">étape 1</li><li>étape 2</li><li>étape 3</li></ul><a class="txt_img bt_lire_suite" title="Lire la suite" href="/refonte/store/favourites">Lire la suite</a>';break;case"a_3_2":M="M8_4";T="T8_4";B="B8_4";top=220;left=80;type="B";left+=(lt_IE7)?20:0;HTMLcontent='<em class="coche01"></em><p class="text03">Voici la liste des <strong>produits que vous achetez le plus souvent</strong>, vous pouvez les ajouter au panier trés rapidement.</p><p class="text03"><strong class="text02">Vous pouvez aussi personnaliser votre Chronopanier</strong> en supprimant un produit à tout moment grâce au bouton suivant : <img src="/refonte/static/images/img-didacbulle-bt-supprimer.gif" alt="" title="" /></p><ul class="etape"><li>étape 1</li><li class="active">étape 2</li><li>étape 3</li></ul><a class="txt_img bt_lire_suite" title="Lire la suite" href="javascript:void(0);">Lire la suite</a>';break;case"a_3_3":M="M8_4";T="T8_4";B="B8_4";top=50;left=160;type="B";left+=(lt_IE7)?20:0;HTMLcontent='<em class="coche01"></em><p class="text03">Par défaut, nous vous présentons la liste complète des produits que vous avez déjà achetés par rayon, <strong>triés du plus fréquent au moins fréquent</strong>.</p><p><strong class="text02">Vous pouvez ensuite filtrer votre Chronopanier par catégorie de produits</strong><br />(ex. produits frais, boissons...) en cliquant ci-dessous.</p><ul class="etape"><li>étape 1</li><li>étape 2</li><li class="active">étape 3</li></ul><a class="txt_img bt_terminer" title="Terminer" href="javascript:void(0);">Terminer</a>';break;case"lot_virtuel":M="M8_4";T="T8_4";B="B8_4";top=265;left=330;type="B";left+=(lt_IE7)?20:0;HTMLcontent='<em class="coche02"></em><p class="text01">C’est très simple !</p><p><strong class="text02">Choisissez '+document.getElementById("cCM_nb").value+" produits ci-dessous</strong>, et ajoutez-les à votre panier.</p><p>Qu’ils soient <strong>identiques ou différents</strong>, à chaque fois que vous ajoutez "+document.getElementById("cCM_nb").value+" "+document.getElementById("cCM_nom").value+' au panier,<strong class="text02"> vous économisez '+document.getElementById("cCM_eco").value+" !</strong></p><p>La remise apparaît tout de suite dans votre panier.</p>";break;case"lot_virtuel_layer":M="M8_4";T="T8_4";B="B8_4";top=108;left=370;type="B";left+=(lt_IE7)?20:0;HTMLcontent='<em class="coche02"></em><p class="text01">C’est très simple !</p><p><strong class="text02">Choisissez '+document.getElementById("cCM_nb").value+" produits ci-dessous</strong>, et ajoutez-les à votre panier.</p><p>Qu’ils soient <strong>identiques ou différents</strong>, à chaque fois que vous ajoutez "+document.getElementById("cCM_nb").value+" "+document.getElementById("cCM_nom").value+' au panier,<strong class="text02"> vous économisez '+document.getElementById("cCM_eco").value+" !</strong></p><p>La remise apparaît tout de suite dans votre panier.</p>";break;case"lot_complet":M="M8_5";T="T8_5";B="B8_5";top=15;left=-120;type="B";var parents_content=$(parents).closest("tr");var text=$(parents_content).find("input.infos").val();if(text!=undefined||text!=""){HTMLcontent="<p>"+text+"</p>"}break}var newDiv=document.createElement("div");if(position=="lot_complet"){var nb_lot_complet=$(".didac_lot_complet").length+1;$(newDiv).attr("class","didac_lot_complet didac_infobulle "+type).append('<div class="'+T+'"></div><div class="'+M+'"><a href="javascript:void(0);" class="close" title="Fermer"></a>'+HTMLcontent+'</div><div class="'+B+'"></div>').attr("id","didac_"+position+nb_lot_complet)}else{$(newDiv).attr("class","didac_infobulle "+type).append('<div class="'+T+'"></div><div class="'+M+'"><a href="javascript:void(0);" class="close" title="Fermer"></a>'+HTMLcontent+'</div><div class="'+B+'"></div>').attr("id","didac_"+position)}if(position=="lot_complet"&&$(parents).children(".didac_lot_complet").length==0){$(parents).append(newDiv);$(newDiv).css({"top":"auto","bottom":top+"px","left":left+"px"});$(parents).unbind("mouseover");if(event.type=="createPictoInfo"){$(".close").show();setTimeout(function(){if(!is_IE){$(".didac_lot_complet").fadeOut("slow",function(){$(this).remove()})}else{$(".didac_lot_complet").remove()}$(parents).bind("mouseover",function(event){showDidacBulle("lot_complet",event)})},5000)}else{$(".close").hide();$(parents).bind("mouseleave",function(event){$(".didac_lot_complet").remove();$(parents).bind("mouseover",function(event){showDidacBulle("lot_complet",event)})})}}else{if(position=="lot_virtuel_layer"){$("#TB_window").append(newDiv);$(newDiv).css({"top":top+"px","left":left+"px"})}else{$("#global").append(newDiv);$(newDiv).css({"top":top+"px","left":left+"px"})}}$(newDiv).find("a.close").bind("click",function(){$(this).closest(".didac_infobulle").remove();if(position=="a_3_1"||position=="a_3_2"||position=="a_3_3"){setCookieDidacBulle(position);setCookieDidacBulle("a_3_1")}if(position=="lot_virtuel"||position=="lot_virtuel_layer"){setCookieDidacBulle(position)}});if(is_IE){$(newDiv).show()}else{$(newDiv).fadeIn("slow")}if(position=="a_3_1"){$(newDiv).find("a.bt_lire_suite").bind("click",function(){setCookieDidacBulle(position+"_ok");setCookieDidacBulle(position);document.location.href=$(this).attr("href");return false})}else{if(position=="a_3_2"){$(newDiv).find("a.bt_lire_suite").bind("click",function(){setCookieDidacBulle("a_3_1");setCookieDidacBulle(position);$(".didac_infobulle").remove();showDidacBulle("a_3_3")})}else{if(position=="a_3_3"){$(newDiv).find("a.bt_terminer").bind("click",function(){setCookieDidacBulle(position);$(".didac_infobulle").remove()})}else{if(position=="lot_virtuel"||position=="lot_virtuel_layer"){}else{if(position=="lot_complet"){}else{setCookieDidacBulle(position)}}}}}tb_init(".didac_infobulle a.thickbox")}function showInfoPanier(event){var event=(typeof(event)=="undefined")?"":event;if(event!=""){var parents=$(event.target);var parents_pos=parents.findPos()}var parents_content=(parents)?$(parents).closest("tr"):"";var text=$(parents_content).find("input.infos").val();if(parents_content.hasClass("promo02")||parents_content.hasClass("typePromo02")){HTMLcontent='<tr class="promo02 line_info"><td colspan="4" class="info"><div class="panier_info"><p class="panier_infoT">&nbsp;</p><p class="panier_infoM">'+text+'</p><p class="panier_infoB">&nbsp;</p></div></td></tr>'}else{if(parents_content.hasClass("promo03")||parents_content.hasClass("typePromo03")){HTMLcontent='<tr class="promo03 line_info"><td colspan="4" class="info"><div class="panier_info"><p class="panier_infoT">&nbsp;</p><p class="panier_infoM">'+text+'</p><p class="panier_infoB">&nbsp;</p></div></td></tr>'}else{HTMLcontent=""}}if(HTMLcontent!=""){parents_content.before(HTMLcontent);if(is_IE){$(".panier_info").show()}else{$(".panier_info").fadeIn(500)}$(parents).unbind("mouseover");setTimeout(function(){$(".line_info").remove();$(parents).bind("mouseover",function(event){showInfoPanier(event)})},5000)}}function callDidacBulle(page,dejaClient){var nb_visite=GetCookie("nb_visite");var nb_commande=GetCookie("nb_commande");nb_visite=parseInt(nb_visite);nb_visite=isNaN(nb_visite)?0:nb_visite;nb_commande=parseInt(nb_commande);nb_commande=isNaN(nb_commande)?0:nb_commande;var posYPanier=190;try{var posPanier=getYPos(0);var posSelection=getYPos(1);var posAstuce=getYPos(2)}catch(ex){}var pos_panier=parseInt(posYPanier)+parseInt(posPanier)+25;var pos_selection=parseInt(posYPanier)+parseInt(posSelection)+25;var pos_astuce=parseInt(posYPanier)+parseInt(posAstuce)+25;if(dejaClient==0){switch(nb_commande){case 0:if(page=="liste"&&$("input#is-home-boutique").val()!="1"){showDidacBulle("n_1_4")}if(page=="home"){showDidacBulle("n_1_1")}else{if(page=="panier"){showDidacBulle("n_1_2")}}break;case 1:if(page=="home"){showDidacBulle("n_2_1");showDidacBulle("n_2_3")}else{if(page=="panier"){showDidacBulle("n_2_4")}}break;case 2:if(page=="home"){showDidacBulle("n_3_2")}break;case 3:if(page=="home"){showDidacBulle("n_4_1");showDidacBulle("n_4_2")}break;case 4:if(page=="home"){showDidacBulle("n_5_1")}break;case 5:if(page=="home"){showDidacBulle("n_6_1")}break}}else{switch(nb_commande){case 0:if(page=="panier"){showDidacBulle("a_1_1")}break;case 3:if(page=="home"){showDidacBulle("a_3_1")}if(page=="chronopanier"){showDidacBulle("a_3_2")}break}}if(page=="lot_virtuel"){showDidacBulle("lot_virtuel")}if(page=="lot_virtuel_layer"){showDidacBulle("lot_virtuel_layer")}$(".didac_infobulle.selection").css("top",pos_selection+"px");$(".didac_infobulle.astuce").css("top",pos_astuce+"px");$(".didac_infobulle.panier").css("top",pos_panier+"px");$(".didac_infobulle.selection.B,.didac_infobulle.panier.B").each(function(){$(this).css("top",(parseInt($(this).css("top"))-$(this).height()))});window.setTimeout(function(){if(typeof(position)!="undefined"){if(position!="a_3_1"||position!="a_3_2"||position!="a_3_3"){$(".didac_infobulle").remove()}}},10000);$("#panier").bind("mousedown",function(){$(".didac_infobulle.astuce, .didac_infobulle.selection, .didac_infobulle.panier").remove()})}function getNbArticlePanier(){var dataSend=getDataForm("params-liste");var nbarticle=0;var callbymenu=($("#callbymenu").val()=="1");var rayon=$("#rayon").attr("value");var gellule=$("#category").attr("value");var sortType=$("#order_field").attr("value");var sortDirection=$("#order").attr("value");var choosenPage=$("#param-page").attr("value");var finalUrl=urlNbProdAjax;finalUrl+=rayon;if(!callbymenu){finalUrl+="/"+gellule}if(sortType!=""&&sortDirection!=""){finalUrl+="/"+sortType+"/"+sortDirection}finalUrl+="/"+choosenPage;if(callbymenu){finalUrl+="/menu"}var myXHR=$.ajax({url:finalUrl,global:false,async:false,timeout:5000,dataType:"json",success:function(data){nbarticle=data.nb_article},error:function(data){nbarticle=0}});return nbarticle}function initBannerIE8(){SpeedTrace("start","initBannerIE8");if(GetCookie("msgie8")==null){var newDiv=document.createElement("div");$(newDiv).attr("id","banner-ie8").append('<div><h2>Le saviez-vous ?</h2><p><a href="http://www.microsoft.com/france/windows/products/winfamily/ie/ie8/default.aspx" target="_blank"><strong>Votre version d\'Internet Explorer n\'est pas à jour.</strong><br />Pour votre confort de navigation sur Chronodrive.com, nous vous conseillons de le <span>mettre à jour</span></a>.</p><ul><li class="close"><a href="javascript:void(0);">Fermer</a></li><li class="dontshow"><a href="javascript:void(0);">Ne plus me le proposer</a></li></ul></div>');$("body").append(newDiv);if(lt_IE7){$(newDiv).css("width",parseInt($(window).width())+"px");$(window).bind("resize",function(){$("#banner-ie8").css("width",parseInt($(window).width())+"px")})}$(newDiv).find(".close").bind("click",function(){$(newDiv).remove();setCookieIE8(0);return false});$(newDiv).find(".dontshow").bind("click",function(){$(newDiv).remove();setCookieIE8(1);return false})}SpeedTrace("stop","initBannerIE8")}function setCookieFaceBook(val){var pathname=location.pathname;var myDomain=pathname.substring(0,pathname.lastIndexOf("/"))+"/";var date_exp=new Date();if(val==1){date_exp.setTime(date_exp.getTime()+(100*365*24*3600*1000))}else{date_exp=null}SetCookie("facebook",val,date_exp,myDomain)}function initBannerFaceBook(){var fb=GetCookie("facebook");if(fb!=1){var HTMLcontent='<div><a href="http://www.facebook.com/chronodrive" target="_blank" class="join">REJOIGNEZ VITE LA PAGE OFFICIELLE <strong>CHRONODRIVE</strong> SUR FACEBOOK !</a><ul><li class="close"><a href="javascript:void(0);">Fermer</a></li></ul></div>';var newDiv=document.createElement("div");$(newDiv).attr("id","banner-facebook");$(newDiv).append(HTMLcontent);$("body").append(newDiv);if(lt_IE7){$(newDiv).css("width",$(window).width()+"px");$(window).bind("resize",function(){$("#banner-facebook").css("width",parseInt($(window).width())+"px")})}$(newDiv).find(".close").bind("click",function(){$(newDiv).remove();setCookieFaceBook(1);return false});$(newDiv).find(".join").bind("click",function(){$(newDiv).remove();setCookieFaceBook(1)})}}function initBannerException(type,txt1,txt2){var msgException=GetCookie("msgException");if(msgException==null){isBannerException=true;var classBanner=(txt2!="")?"banner2":"";var txt2=(txt2!="")?"<span>"+txt2+"</span>":"";switch(type){case 1:var txtTitre="RÉOUVERTURE";break;case 2:var txtTitre="FERMETURE MOMENTANÉE";break;case 3:var txtTitre="FERMETURE EXCEPTIONNELLE";break;case 4:var txtTitre="OUVERTURE EXCEPTIONNELLE";break}var HTMLcontent="<div><h2><strong>"+txtTitre+"</strong> "+txt1+txt2+'</span></h2><ul><li class="close"><a href="javascript:void(0);">Fermer</a></li></ul></div>';var newDiv=document.createElement("div");$(newDiv).attr({"id":"banner-exception","class":classBanner}).append(HTMLcontent);$("body").append(newDiv);if(lt_IE7){$(newDiv).css("width",parseInt($(window).width())+"px");$(window).bind("resize",function(){$("#banner-exception").css("width",parseInt($(window).width())+"px")})}$(newDiv).find(".close").bind("click",function(){SetCookie("msgException",1);$(newDiv).remove();return false})}}function thisMovie(movieName){if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName]}else{return document[movieName]}}function checkLoaderHome(){var mktime=new Date();elapsedTimeLoader=((mktime.getTime()-stampStartLoader)/1000);if(averageImgLoaded>=95&&homeSWFLoaded==true&&bgImgPreloaded==true){clearInterval(checkLoaderInterval);if(isDidacticiel==true){tb_remove();setTimeout(didacLoad,150)}else{tb_remove()}}else{if(elapsedTimeLoader>=maxTimeLoader){clearInterval(checkLoaderInterval);tb_remove();setTimeout(didacRemove,150)}}}function callFacebookLayer(){var nb_visite=checkDidacticiel();var cookie_val=GetCookie("facebookLayer");if(nb_visite>0&&cookie_val!=3){tb_show("","/refonte/static/html/layer_facebook.html?height=auto&width=775&layername=layer_facebook","false")}}function callLoaderHome(){flashCompatible=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);if(flashCompatible==true){var nb_visite=checkDidacticiel();if(nb_visite<=0){var soHomeLoader=new SWFObject("/refonte/static/swf/trailer_loader.swf","homeLoader","630","336","9","#ffffff");soHomeLoader.addParam("allowFullScreen","false");soHomeLoader.addParam("menu","false");soHomeLoader.addParam("wmode","transparent");soHomeLoader.addParam("scale","showall");var classOverlay=(is_MacXFF)?"TB_overlayMacFFBGHack":"TB_overlayBG";tb_initDOM();maskBulle();$(DOM_tbInnerHtml).html('<div class="content loaderHome"><div id="cancelLoader">Si la page met du temps à s\'afficher, <a href="javascript:void(0)">cliquez ici</a></div><div id="home_loader"><noscript><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="748" height="463" id="homeLoader" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/refonte/static/swf/trailer_loader.swf" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="/refonte/static/swf/trailer_loader.swf" loop="false" menu="false" quality="high" bgcolor="#ffffff" width="630" height="336" name="homeLoader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></noscript></div></div>');DOM_tbContent.attr("class","layerLoader block_float").width(630).height(336);if(lt_IE7){DOM_tbIframe.css({"position":"absolute","top":"0","height":$(document).height()+"px"}).addClass("db")}DOM_tbOverlay.height($(window).height()).width("100%").addClass(classOverlay+" db noclick");DOM_tbWindow.css({"left":"50%","marginLeft":"-"+parseInt((630/2),10)+"px","width":630+"px","top":parseInt(DOM_window.height()/2)-parseInt(336/2)+DOM_window.scrollTop()+"px"}).addClass("db");soHomeLoader.write("home_loader");$(document).ready(function(){initLoaderHome()})}}else{if(flashVersion!=-1){setCookieVisite();$(document).ready(function(){$("#home_nieme").prepend('<p class="getflash">Ce site nécessite une mise à jour de votre Flash Player. Pour votre confort de navigation, <a target="_blank" href="http://www.adobe.com/fr/products/flashplayer/">cliquez-ici.<img src="images/logo_flash.gif" alt="" /></a></p>')})}}}function initLoaderHome(){$.preload("#global img",{threshold:1,onComplete:function(data){averageImgLoaded=parseInt(parseFloat(parseFloat(data.done)/parseFloat(data.total))*100)},onFinish:function(data){averageImgLoaded=100;var date_exp=new Date();date_exp.setTime(date_exp.getTime()+(365*24*3600*1000));setTimeout(function(){SetCookie("nb_visite",1,date_exp)},3000)}});var mktime=new Date();stampStartLoader=mktime.getTime();stampEndLoader=stampStartLoader+(maxTimeLoader*1000);checkLoaderInterval=window.setInterval(checkLoaderHome,500)}function browserWidth(){var myWidth=$(window).width();if($(document).height()>$(window).height()){myWidth+=22}return myWidth}var timerHideRayon=null;var timerShowRayon=null;var stampShowRayon=null;var DOM_menuRayonA1=null;var DOM_menuRayonDIV=null;var DOM_menuRayonA2=null;var DOM_iframeRayon=null;var nbSelectBox=0;function showMenuRayon(rayon){hideMenuRayon();if(lt_IE7){toggleIframeRayon(true,$(rayon).next("div"))}var t=new Date();stampShowRayon=t.getTime();$(rayon).addClass("over").next("div").addClass("db")}function hideMenuRayon(){DOM_menuRayonA1.removeClass("over");DOM_menuRayonDIV.removeClass("db");if(lt_IE7){toggleIframeRayon(false)}}function toggleIframeRayon(flag,elt){if(lt_IE7&&nbSelectBox>0){var iFrameHeight=(flag==false)?0:elt.height();var state=(flag==true)?"visible":"hidden";DOM_iframeRayon.css({"visibility":state,"height":iFrameHeight+"px"})}}function decalMenuRayon(){$(DOM_menuRayonDIV).each(function(){if(!$(this).parent().hasClass("selection")){var eltUL=$(this).children("ul");var nbUL=$(eltUL).length;if(nbUL>0&&nbUL<5){var paddingLeft=Math.round(((5-nbUL)*195)/2);$(eltUL[0]).css({"padding-left":paddingLeft+"px"})}}})}function initMenuRayonV2(){DOM_menuRayonA1=$("#top4_2>li>a");DOM_menuRayonDIV=$("#top4_2>li>div");DOM_menuRayonA2=DOM_menuRayonDIV.find("li.segment>a");DOM_iframeRayon=$("#iframeRayon");nbSelectBox=$("#global select").length;decalMenuRayon();DOM_menuRayonA1.bind("mouseover",function(){var elt=$(this);clearTimeout(timerShowRayon);timerShowRayon=setTimeout(function(){showMenuRayon(elt)},400)}).bind("mouseout",function(){clearTimeout(timerShowRayon);clearTimeout(timerHideRayon);timerHideRayon=setTimeout(hideMenuRayon,300)}).bind("click",function(){if($(this).hasClass("over")){var t=new Date();if((t.getTime()-stampShowRayon)>200){clearTimeout(timerShowRayon);clearTimeout(timerHideRayon);hideMenuRayon()}}else{clearTimeout(timerShowRayon);clearTimeout(timerHideRayon);showMenuRayon($(this))}});DOM_menuRayonDIV.bind("mouseenter",function(){clearTimeout(timerHideRayon);$(this).prev().addClass("over")}).bind("mouseleave",function(){clearTimeout(timerHideRayon);timerHideRayon=setTimeout(hideMenuRayon,400)})}function commentCaMarche(){var didac_lot_vrituel=false;if(GetCookie("didacBulle")!=null){var bulles=GetCookie("didacBulle").split(/;/);for(i=0;i<bulles.length;i++){if(bulles[i]=="lot_virtuel_layer"||bulles[i]=="lot_virtuel"){didac_lot_vrituel=true;break}}}if(!didac_lot_vrituel){window.setTimeout(function(){callDidacBulle("lot_virtuel_layer",null)},1000)}};

/** initFonctions.js */

function initArticleDetail(){initLinksThickboxOnLayer();$(".colG a.variateur").unbind("click").bind("click",function(){var elt=$(this).closest(".ct_variateur");var qteMax=elt.find(".qteMax");var qteTxt=elt.find(".qte_txt");var qte=parseInt(qteTxt.text());if($(this).hasClass("variateur_moins")){if(qte>1){qte-=1}}else{if(qte+1<=qteMax.val()){qte+=1}}qteTxt.text(qte);return false});$(".nextTab").click(function(){var selected=$tabs.tabs("option","selected");$tabs.tabs("select",selected+1);return false});$(".prevTab").click(function(){var selected=$tabs.tabs("option","selected");$tabs.tabs("select",selected-1);return false});var $tabs=$("#tabsProd").tabs();$tabs.tabs("select",0);$("#tabsProd").tabs({fx:{opacity:"toggle"}});var fx=$("#tabsProd").tabs("option","fx");$("#tabsProd").tabs("option","fx",{opacity:"toggle"})}function incrementQte(maxQte){var value=parseInt(document.formDetailProduitQte.qte.value,10);value=value+1;if(value>maxQte){value=maxQte}document.formDetailProduitQte.qte.value=value;document.getElementById("articleDetailQte").innerHTML=value}function decrementQte(){var value=parseInt(document.formDetailProduitQte.qte.value,10);value=value-1;if(value<1){value=1}document.formDetailProduitQte.qte.value=value;document.getElementById("articleDetailQte").innerHTML=value}function displayListe(elt){$("#erreur1").css("display","none");if($(elt).attr("value")=="new"){$("#new_liste").css("display","block");$("#bt-ok2").css("display","block");$("#bt-ok1").css("display","none")}else{$("#new_liste").css("display","none");$("#bt-ok1").css("display","block");$("#bt-ok2").css("display","none")}}function refreshList(data){var htmlCode="";if($.isArray(data.options)){$.each(data.options,function(){htmlCode+='<option value="'+this.id+'">'+this.name+"</option>"});$("#liste_id").html(htmlCode)}}function getListes(type){if(type=="json"){$.getJSON("get_liste.php",{type:"json"},function success(data){refreshList(data)})}else{$.get("get_liste.php",{type:"html"},function success(data){$("#liste_id").html(data)})}}function initAjoutList(){$("#liste_id").bind("change",function(){displayListe(this)});$("#liste_id").bind("blur",function(){displayListe(this)});$("a.retour").bind("click",function(){tb_remove()});$("#form-ajout-liste").submit(function(){if($("#liste_id").attr("value")=="new"){if($("#new_liste").attr("value")==""){var txtErreur=($("#new_liste").attr("value")=="")?"Veuillez saisir un nom de liste":"Cette liste existe déjà";$("#erreur1").text(txtErreur);$("#erreur1").css("display","block");$("#new_liste").addClass("erreur");return false}}else{if($("#liste_id").attr("value")=="0"){$("#erreur1").text("Veuillez sélectionner une liste");$("#erreur1").css("display","block");$("#liste_id").addClass("erreur");return false}}$("#erreur1").css("display","none");$("#new_liste").removeClass("erreur");$("#liste_id").removeClass("erreur");$("#form-ajout-liste").css("display","none");$("p.confirm").css("display","block");if($("#panier-detail")){$("#panier-detail input:checkbox:checked").attr("checked","");$("#panier-detail .bt-checkall").removeClass("checked");$('#panier-detail .ajoutliste>option[value="0"]').attr("selected",true)}var dataSend=getDataForm("form-ajout-liste");getJson($(this).attr("action"),dataSend,function(retour){if($("#new_liste").val()!=""){try{pageTracker._trackEvent("Liste","Création d'une liste")}catch(err){}}});return false})}function displayErreur(ligName,fName,msg,fClass){$("p.erreur03."+fName).html(msg);$("p.erreur03."+fName).css("display","block");if(fClass!=""){$("#f-"+fName).addClass(fClass)}}function displayStatutImage(elt,state){$(elt+" + img").remove();if(state!="clear"){if(elt!=""){$(elt).after('<img class="status" src="/static/images/picto-verif-'+state+'.png" alt="" />')}}}function clearField(field){$("p.erreur03."+field).css("display","none");$("#f-"+field).removeClass("focus");$("#f-"+field).removeClass("erreur1");$("#f-"+field).removeClass("erreur2");$("#f-"+field).removeClass("erreur3")}function verifNombre(str){var exp=new RegExp("^[0-9]*$","g");return exp.test(str)}function trimNombre(str){if(str.substring(0,1)=="0"){return str.substring(1)}else{return str}}function verifField(ligName,fName){clearField(fName);switch(fName){case"login":if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre numéro de client","erreur3");displayStatutImage("#f-"+fName,"");return false}else{if(!verifNombre($("#f-"+fName).attr("value"))){displayErreur(ligName,fName,"Ce numéro de client est invalide","erreur2");displayStatutImage("#f-"+fName,"bad");return false}}displayStatutImage("#f-"+fName,"ok");break;case"login-guest":if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre numéro de client","erreur3");displayStatutImage("#f-"+fName,"");return false}else{if(!verifNombre($("#f-"+fName).attr("value"))){displayErreur(ligName,fName,"Ce numéro de client est invalide","erreur2");displayStatutImage("#f-"+fName,"bad");return false}}displayStatutImage("#f-"+fName,"ok");break;case"password":if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre mot de passe","erreur3");displayStatutImage("#f-"+fName,"");return false}displayStatutImage("#f-"+fName,"ok");break;case"password-guest":if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre mot de passe","erreur3");displayStatutImage("#f-"+fName,"");return false}displayStatutImage("#f-"+fName,"ok");break}return true}function verifField2(ligName,fName){switch(fName){case"login":if($("#f-"+fName).attr("value").toLowerCase()=="0"){displayErreur(ligName,fName,"Ce numéro de client n'existe pas","erreur2");displayStatutImage("#f-"+fName,"bad");return false}break;case"login-guest":if($("#f-"+fName).attr("value").toLowerCase()=="0"){displayErreur(ligName,fName,"Ce numéro de client n'existe pas","erreur2");displayStatutImage("#f-"+fName,"bad");return false}break;case"password":if($("#f-"+fName).attr("value").toLowerCase()=="altima"){displayErreur(ligName,fName,"Votre mot de passe est invalide","erreur2");displayStatutImage("#f-"+fName,"bad");return false}else{if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre mot de passe","erreur3");displayStatutImage("#f-"+fName,"");return false}}break;case"password-guest":if($("#f-"+fName).attr("value").toLowerCase()=="altima"){displayErreur(ligName,fName,"Votre mot de passe est invalide","erreur2");displayStatutImage("#f-"+fName,"bad");return false}else{if($("#f-"+fName).attr("value")==""){displayErreur(ligName,fName,"Veuillez saisir votre mot de passe","erreur3");displayStatutImage("#f-"+fName,"");return false}}break}return true}function initLoginForm(){$("#f-login").blur(function(){verifField("login","login")});$("#f-password").blur(function(){verifField("password","password")});$("p.erreur03").css("display","none");$("#form-login").bind("submit",function(){var isValide=true;isValide=(verifField("login","login")&&isValide);isValide=(verifField("password","password")&&isValide);if(isValide){return true}else{return false}});initLinksThickboxOnLayer()}function initLoginGuestForm(){$("#f-login-guest").blur(function(){verifField("login","login-guest")});$("#f-password-guest").blur(function(){verifField("password","password-guest")});$("p.erreur03").css("display","none");$("#form-login-guest").bind("submit",function(){var isValide=true;isValide=(verifField("login","login-guest")&&isValide);isValide=(verifField("password","password-guest")&&isValide);isValide=(verifField2("login","login-guest")&&isValide);isValide=(verifField2("password","password-guest")&&isValide);if(isValide){var fLogin=$("#f-login-guest").val();var fMdp=$("#f-password-guest").val();getJson($(this).attr("action"),{"login":fLogin,"mdp":fMdp},function success(data){var erreurAjax=0;if(data.erreurLogin!=""){displayErreur("login","login-guest",data.erreurLogin,"erreur2");displayStatutImage("#f-login-guest","bad");erreurAjax=1}if(data.erreurMdp!=""){displayErreur("password","password-guest",data.erreurMdp,"erreur2");displayStatutImage("#f-password-guest","bad");erreurAjax=1}if(erreurAjax==0){$("#slickboxhp").toggle(400);var linkMyAccount=$("#linkMyAccount").val();tb_remove();if(data.redirectURL=="myaccount"){var baseURL=window.location.href.split("#")[0];baseURL=baseURL.split("?")[0];baseURL=baseURL+"?returnCompte=1";window.location=baseURL}else{if(data.redirectURL=="simplelogin"){var baseURL=window.location.href.split("#")[0];baseURL=baseURL.split("?")[0];window.location=baseURL}else{window.location=data.redirectURL}}}})}return false})}changeSearchType=function(type){$("#searchType").val(type);return false};changeSearchType2=function(type){$("#searchType2").val(type);return false};launchSearch=function(url){var typeRecherche=$("#searchType").attr("value");var motRecherche=$("#textSearch").attr("value");motRecherche=escapeTapestryStyle(motRecherche);window.location.href=url+"/"+typeRecherche+"/"+motRecherche;return false};launchSearch2=function(url){var typeRecherche=$("#searchType2").attr("value");var motRecherche=$("#textSearch2").attr("value");motRecherche=escapeTapestryStyle(motRecherche);window.location.href=url+"/"+typeRecherche+"/"+motRecherche;return false};launchSearchNoResult=function(url){var typeRecherche="product";var motRecherche=$("#textSearchedNoResult").attr("value");motRecherche=escapeTapestryStyle(motRecherche);window.location.href=url+"/"+typeRecherche+"/"+motRecherche;return false};loadHomeFlash=function(flashFile,xmlFile){var soDate=new Date();var so=new SWFObject(flashFile+"?time="+soDate.getTime(),"home_cd","748","463","9","#ffffff");so.addParam("allowFullScreen","false");so.addParam("allowScriptAccess","always");so.addParam("menu","false");so.addParam("wmode","transparent");so.addParam("scale","showall");so.addVariable("path_datas",xmlFile);if(so.write("home_nieme")){if($.browser.msie&&$.browser.version.substr(0,1)<7){$(document).ready(function(){$("#middle_right").addClass("middle_sanschemin")})}}else{var date=new Date();$.get(urlHomePromoDegrade+"?time="+date.getTime(),"",function success(data){$("#homePromoDegrade").html(data)})}};loadZoneEditChannel=function(link,template,channelid,layerid){var date=new Date();$("#"+layerid).load(link,"template="+template+"&channelid="+channelid+"&time="+date.getTime())};verifAccessCheckout=function(){if(basket.shoppingCart.length==0){alert(basket_alertBasketEmptyBeforeCheckout)}else{if(basket.getTotalAmount()<=basket_minAmount){alert(basket_minAmountAlert)}else{window.location=urlCheckoutOrder}}};initShoppingCart=function(url,loadFlash){$.getJSON(url,function(data){basket.shoppingCart=new Array();if(data!=null&&data.items!=null&&data.items.length>0){$.each(data.items,function(i,item){if(item.type=="spcitemview"){basket.initialize(item.productRef,item.productDesc,item.quantity,item.packQty,item.unitAmount/100,item.buyableQty,item.loyaltyAmount/100,item.promotionalAmount,item.PP,item.cssClass,item.typereload)}else{basket.initializePromo(item.lvdid,item.lvdtype,item.lvdvalue,item.lvdlabel,item.lvdnbproducts,item.lvdcomplet,item.nbprodrestant,item.remise/100,item.cssClass)}})}if(loadFlash){loadFlashBasket()}else{basket._draw()}basket.initialisationDone=true})};initDonOngInfo=function(){initLinksThickboxOnLayer();var cagnotte=parseFloat($("#cagnotte").val());var $tabs=$("#tabsProd").tabs();$tabs.tabs("select",0);$("#tabsProd").tabs("option","fx",{opacity:"toggle"});$(".tabs-nav>li").mouseup(function(){$("#id-asso").val($(this).children("a").attr("href").substring(5));$("#form-don").show();$(".don .confirm").hide();$("p.erreur03").hide();$("#f-don").val("")})};initModifyPaymentMode=function(cvvImagePath){$("document").ready(function(){$(".code_secu a.besoin_info").attr("title","<img src='"+cvvImagePath+"' width='100' height='27' alt='' />")})};trackPushBanner=function(position,nom){try{if("Video banniere"==position){pageTracker._trackEvent(position,"Clic sur push "+nom)}else{pageTracker._trackEvent("Push "+position,"Clic sur push "+nom)}}catch(err){}return true};escapeTapestryStyle=function(chaine){var resultat=chaine;resultat=escape(resultat);resultat=resultat.replace(/%/g,"$00");resultat=resultat.replace(/'/g,"$0027");resultat=resultat.replace(/\*/g,"$002a");resultat=resultat.replace(/@/g,"$0040");resultat=resultat.replace(/\+/g,"$002B");resultat=resultat.replace(/\//g,"$002F");return resultat};changeDisplayMode=function(){var rayon=$("#params-liste #rayon").val();var tabrayon=rayon.split("/");var done=false;if(tabrayon.length>1){var stRayon="";for(var i=0;i<tabrayon.length;i++){stRayon+="/"+tabrayon[i];if(isNaN(tabrayon[i])){document.location.href=urlChangeDisplayMode+stRayon;done=true;break}}}if(!done){document.location.href=urlChangeDisplayMode+$("#params-liste #rayon").val()+escapeTapestryStyle($("#params-liste #category").val())}};getArticleListQte=function(lien){return $(lien).closest("li.line_article").find("input.qte-liste").val()};function switchShop(from){try{if(from!="fromCart"){if(basket.isIdentified&&basket.getNbItem()>0){tb_show("",switchShopLayerUrl)}else{document.location.href=portailUrl}}else{if(basket.getNbItem()>0){tb_show("",switchShopLayerFromCartUrl)}}}catch(e){alert("erreur");document.location.href=portailUrl}}function initChangeContext(){var switchChoice=$("a.choice");$("#layer_switch li>h3, #layer_switch li>img").bind("click",function(){$(this).prevAll("a.choice").trigger("click")}).bind("mouseover",function(){$(this).css("cursor","pointer")});$(switchChoice).bind("click",function(){var choice=($(switchChoice).index(this)==0)?"1":"0";$(switchChoice).removeClass("check");$(this).addClass("check");$("#fNewSite").val(choice);return false});$("#layer_switch .bt-annuler").bind("click",function(){tb_remove();return false});$("#layer_switch .bt-valider").bind("click",function(){var fNewSite=$("#fNewSite").val();$.getJSON($("#formSwitch").attr("action"),{"newSite":fNewSite},function success(data){if(data.noerror){if(data.newsite=="1"){pageTracker._trackEvent("choix_site","corner choix nouveau")}else{pageTracker._trackEvent("choix_site","corner choix ancien")}window.document.location.href=data.urlRedirect}})})}msxmlNames=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];getHTTPRequest=function(){try{return new XMLHttpRequest()}catch(e){}for(var i=0;i<msxmlNames.length;i++){try{return new ActiveXObject(msxmlNames[i])}catch(e){}}throw new Exception(0,"Can't create XMLHttpRequest object")};technicalInformation=function(userId){var os=window.navigator.platform;os=escapeTapestryStyle(os);var screenResolution=window.screen.width+"-"+window.screen.height;var navigatorResolution=document.documentElement.clientWidth+"-"+document.documentElement.clientHeight;xhr=getHTTPRequest();xhr.open("POST","/refonte/store/home:TechnicalInformation/"+os+"/"+screenResolution+"/"+navigatorResolution+"/?user="+userId,true);xhr.send(null)};initHomeSwfLoaded=function(mode){if(mode=="guest"){nbHomeSWFLoaded+=1;if(parent=="home"){statusHomeCd=1}if(parent=="didac"){statusHomeDidac=1}if(nbHomeSWFLoaded>=2){homeSWFLoaded=true}}else{nbHomeSWFLoaded+=1;if(nbHomeSWFLoaded>=1){homeSWFLoaded=true;clearInterval(checkHomeCd)}}};initCustomerArticles=function(url){var date=new Date();$.ajax({url:"/refonte/store/ajax/PreloadCustomerArticlesList:initList/?time="+date.getTime()})};changePortionCug=function(selectNode,type){var liArticle;if("list"==type){liArticle=".line_article"}else{liArticle=".colG"}$(selectNode).closest(liArticle).find("input.addcartparams").val($("#addcartparams_"+$(selectNode).val()).val());$(selectNode).closest(liArticle).find("p.prix").html($("#portionPrice_"+$(selectNode).val()).val())};writeAddWordsTagg=function(label,format,httpsprotocole){var protocole="http";if(httpsprotocole){protocole="https"}var elTaggo="<img height='1' width='1' style='border-style:none;' alt='' src='"+protocole+"://www.googleadservices.com/pagead/conversion/1034985505/?label="+label+"&amp;guid=ON&amp;script=0'/> ";$("#addWordsDynamicTag").html(elTaggo)};removeCData=function(label){var libBanner=label.replace("CDATA","");libBanner=libBanner.replace("<","");libBanner=libBanner.replace("!","");libBanner=libBanner.replace("[","");libBanner=libBanner.replace("[","");libBanner=libBanner.replace("]","");libBanner=libBanner.replace("]","");libBanner=libBanner.replace(">","");return libBanner};initChangeTextSearch2=function(){$(".textSearch").val($(".textSearch2").val())};initInfosPanierBull=function(){$(".picto_info").bind("mouseover",function(event){showInfoPanier(event)})};
