(function(){var z=function(a){var b={},i;for(i in a){b[i]=a[i]}return b};var A=function(a){var b=[],i;for(i=0;a.length?i<a.length:a[i];++i){b[i]=a[i]}return b};Object.prototype.each=function(a){if(this.length!==undefined){A(this).each(a)}else{for(var b in this){if(b=="length"||b=="each"||b=="key"){continue}a.call(this,b)}}};Array.prototype.each=function(a){var i,l;for(i=-1,l=this.length;l>++i;){a.call(this,i)}};Object.prototype.key=function(a){var b=[];this.each(function(k){if(this[k]==a){b.push(k)}});return b[0]?b[0]:null};Array.prototype.key=function(a){if(Array.indexOf){return this.indexOf(a)}else{var b=[];this.each(function(k){if(this[k]==a){b.push(k)}});return b[0]||b[0]===0?b[0]:-1}};var B=function(){this.toString=function(){return"[object FWlum]"}};var C=null;var D=function(n){if(!n){return null}var o=new B();var p=n;if(n==document){o.elo=p=n.documentElement||n.body}o.after=function(a){var b=a.parent().el().insertBefore(n,a.el().nextSibling);return D(b)};o.append=function(a,b){if((typeof(a)=="string"&&b)||typeof(a)=="number"){n.appendChild(document.createTextNode(a))}else if(typeof(a)=="string"){var c="";a=a.split("\n");a.each(function(i){if(i>0){n.appendChild(document.createElement("br"))}n.appendChild(document.createTextNode(this[i]))})}else{n.appendChild(a.el())}return o};o.appendCode=function(a){var d=C.el("div");d.el().innerHTML=a;var b=d.children();for(i=0;i<b.length;i++){o.append(b[i])}return o};o.appendFct=function(a,b){a.css("visibility","hidden");var c=n.appendChild(a.el());b.call(c);return o};o.appendText=function(a,b){return o.append(typeof(a)!="string"?a.toString():a,b)};o.appendTo=function(a){var b=a.el().appendChild(n);return D(b)};o.before=function(a){var b=a.parent().el().insertBefore(n,a.el());return D(b)};o.prepend=function(a){if(n.firstChild){a.before(o.children()[0])}else{o.append(a)}return o};o.prependTo=function(a){if(a.el().firstChild){return o.before(a.children()[0])}else{var b=a.el().appendChild(n);return D(b)}};o.attr=function(a,b){if(!a){var c=n.attributes,i;var d={};z(c).each(function(k){d[this[k].name]=this[k].value});return d}else if(b!==undefined){if(b||b===0){n.setAttribute(a,b);if(a=="class"){n.className=b}}else{n.removeAttribute(a)}}else if(typeof(a)=="string"){var r;if(C.agent.IE){r=n.getAttribute(a)?n.getAttribute(a):""}else{r=n.hasAttribute(a)?n.getAttribute(a):""}return a=="class"&&!r?n.className:r}else if(typeof(a)=="object"){a.each(function(k){o.attr(k,this[k])})}return o};o.removeAttr=function(a){o.attr(a,null);return o};o.childs=o.children=function(){var a=n.childNodes;return q(a)};o.getClass=function(c){if(!c){return o.attr("class")}else{if(document.getElementsByClassName){var d=n.getElementsByClassName(c);return q(d)}else{var e=[];var f=function(b){var i;b.each(function(){var a=$.el(this);if(a.el().nodeType==1){if(a.hasClass(c)){e.push(a)}f(a.children())}});return e};var g=o;if(n==document){g=o.el(document.body)}return new s(f(o.children()))}}};o.addClass=function(a){if(a&&!o.hasClass(a)){o.attr("class",(o.getClass()?o.getClass()+" ":"").replace("  "," ")+a)}return o};o.hasClass=function(a){if(o.getClass()&&o.getClass().search(new RegExp("^([a-z0-9_-]* )*"+a+"( [a-z0-9_-]*)*$","gi"))>=0){return true}else{return false}};o.removeClass=function(a){if(a){if(o.hasClass(a)){o.attr("class",o.getClass().replace(a,"").replace("  "," ").replace(/^ /gi,"").replace(/ $/gi,""))}}else{o.attr("class","")}return o};o.toggleClass=function(a){if(a){if(o.hasClass(a)){o.removeClass(a)}else{o.addClass(a)}}return o};o.clone=function(){var a=n.cloneNode(true);return D(a)};o.css=function(c,d){if(!c){return n.style}else if(d!==undefined){var f=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});if(C.agent.IE&&f=="opacity"){f="filter";d=d===null?d:"alpha(opacity="+(d*100)+")"}else if(f=="float"){return o.css({"css-float":d,"style-float":d})}else if(typeof(d)=="number"&&C.inArray("width,height,top,left,margin,padding".split(","),c)){d+="px"}try{n.style[f]=d}catch(e){}}else if(typeof(c)=="string"){var f=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});if(c=="float"){var g=n.style.cssFloat?n.style.cssFloat:n.style.styleFloat;if(g){return g}return""}else if(c=="opacity"&&n.style.filter){if(n.style.filter.alpha){return n.style.filter.alpha.opacity/100}else{return 1}}else if(n.style&&n.style[f]){return n.style[f]}else if(n.currentStyle){return n.currentStyle.getAttribute(f)}else if("getComputedStyle"in window){d="";c=c.replace(/([A-Z])/g,"-$1").toLowerCase();var h=document.defaultView.getComputedStyle(n,null);if(h){d=h.getPropertyValue(c)}if(c=="opacity"&&d==""){d="1"}return d}else{return""}}else if(typeof(c)=="object"){c.each(function(a){o.css(a,this[a])})}return o};o.data=function(a,b){var c=n["data-fwlumelid"];if(!c){var c=+new Date;c+=F;n["data-fwlumelid"]=c;F++}if(!a){return E[c]}else if(b!==undefined){if(!E[c]){E[c]={}}E[c][a]=b}else if(typeof(a)=="string"||typeof(a)=="number"){if(E[c]){return E[c][a]}return null}else{a.each(function(k){o.data(k,this[k])})}return o};o.el=function(a){if(!a){return n}else if(typeof(a)=="string"){var b=n.createElement(a);return D(b)}else{return D(a)}};o.event=function(c,d,f){if(o.data("fn"+c+"event")){var g=o.data("fn"+c+"event");g.push(d);o.data("fn"+c+"event",g)}else{o.data("fn"+c+"event",[d]);var h=o;var j=function(e){var a=h.data("fn"+c+"event");var b=[];var i;for(i=0;i<a.length;i++){try{a[i].call(this,e)}catch(err){b.push(err)}}if(b.length){throw b[0];}};var k=n;if(n==document&&c=="load"){k=window}else if(o.tag()=="script"&&c=="load"){j=function(e){var a=h.data("fn"+c+"event");var i;for(i=0;i<a.length;i++){a[i].call(this,e)}h.data("fn"+c+"event",[])};n.onreadystatechange=function(e){if(this.readyState=="loaded"||this.readyState=="complete"){j.call(n,e)}}}if(k.attachEvent){k.attachEvent("on"+c,function(e){j.call(n,e)})}else if(k.addEventListener){k.addEventListener(c,function(e){j.call(n,e)},true)}}if(f){var g=o.data("fn"+c+"event");var l=g.length-1;var m=o.data("fneventsid")?o.data("fneventsid"):{};m[f]={"type":c,"index":l};o.data("fneventsid",m)}return o};o.runEvent=function(a,e){if(o.data("fn"+a+"event")){var b=o.data("fn"+a+"event");var i;for(i=0;i<b.length;i++){try{b[i].call(n,e)}catch(err){}}}};o.removeEvent=function(a){var b=o.data("fneventsid");if(b&&b[a]){var c=b[a];var d=o.data("fn"+c.type+"event");d.splice(c.index,1);var e;b.each(function(k){if(this[k]&&this[k].type==c.type&&this[k].index>c.index){b[k].index--}});o.data("fn"+c.type+"event",d);b[a]=undefined;o.data("fneventsid",b)}return o};o.active=function(a,b){o.event("mousedown",a);if(b){o.event("mouseup",b)}return o};o.click=function(a){return o.event("click",a)};o.focus=function(a,b){o.event("focus",a);if(b){o.event("blur",b)}return o};o.hover=function(a,b){o.event("mouseover",a);if(b){o.event("mouseout",b)}return o};o.load=function(a){return o.event("load",a)};o.getCode=function(){return n.innerHTML};o.id=function(a){if(a){var b=n.getElementById(a);return D(b)}else{return o.attr("id")}};o.newEl=function(a){return o.el(a)};o.offset=function(){var x=n.offsetLeft||0;var y=n.offsetTop||0;var a=x;var b=y;var c=n;while(c=c.offsetParent){x+=c.offsetLeft;y+=c.offsetTop}return{document:{x:x,y:y},left:a,top:b,width:n.offsetWidth,height:n.offsetHeight}};o.parent=function(a,b){if(!a){var c=n.parentNode;return D(c)}else if(!b){var d=n;var e=false;while(d.parentNode&&!e){d=d.parentNode;if(C.el(d).tag()==a.toLowerCase()){e=true}}}else if(a=="class"){var d=n;var e=false;while(d.parentNode&&!e){d=d.parentNode;if(C.el(d).hasClass(b)){e=true}}}else{var d=n;var e=false;while(d.parentNode&&!e){d=d.parentNode;if(C.el(d).attr(a)==b){e=true}}}if(e){return D(d)}return null};o.remove=function(){if(n){var a=n.parentNode.removeChild(n)}return D(a)};o.removeAll=function(){while(n.firstChild){n.removeChild(n.firstChild)}return o};o.scrollTo=function(d,e,g){if(!e){e=800}else if(typeof(e)=="function"){g=e;e=800}e=I(e);var h=p.scrollHeight-p.offsetHeight;if(d=="bottom"){d=h}else if(d=="#"){d=0}else if(typeof(d)=="string"){if(d.search("#")===0){d=C.id(d.replace("#","")).el().offsetTop}else{throw new Error("Attribut « to » de scrollTo incorrect");return o}}if(d>h){d=h}var i,f=p.scrollTop;if(f<d){i=true}else if(f>d){i=false}else{return o}var j=function(x){return-(x+1)*Math.pow(x-1,3)};var x=0;var k=f;var t=+new Date();var l=setInterval(function(){if(x<1){var a=j(x);while(Math.floor(+new Date()/G)>Math.floor(t/G)){x+=G/e;t+=G}t=+new Date();x=Math.round(x*e)/e;var b=j(x);var c=a-b;f+=(d-k)*c;p.scrollTop=f}else{p.scrollTop=d;clearInterval(l);if(g){g.call(n)}}},G);return o};o.tag=function(a){if(a){return o.tags(a).index(0)}else if(n.nodeName){return n.nodeName.toLowerCase()}else{return""}};o.tags=function(a){var b=n.getElementsByTagName(a);return q(b)};o.text=function(){if(n.textContent){return n.textContent}else if(o.tag()=="#text"||o.tag()=="#cdata-section"||o.tag()=="#comment"){return n.nodeValue}else{var c=function(a){var i;var b="";if(!a){return""}A(a).each(function(k){if(this[k].nodeName=="#text"){b+=this[k].nodeValue}else if(this[k].nodeName=="#cdata-section"){b+=this[k].nodeValue}else{b+=c(this[k].childNodes)}});return b};return c(n.childNodes)}};o.value=function(a){if(a!==undefined){n.value=a;return o}else if(o.tag()=="select"){return n.getElementsByTagName("option")[n.selectedIndex].value}else{return n.value}};o.fadeOut=function(a,b,j){return H(o,true,a,b,j)};o.fadeIn=function(a,b){return H(o,false,a,b)};o.show=function(a,b){return J(o,true,a,b)};o.hide=function(a,b){return J(o,false,a,b)};var q=function(a){var b=[];A(a).each(function(i){b[i]=D(this[i])});return new s(b)};var s=function(c){var i;for(i=0;i<c.length;i++){this[i]=c[i]}this.length=i;this.index=function(a){return this[a]?this[a]:null};this.each=function(a){for(i=0;i<c.length;i++){a.call(this[i].el(),i)}return this};this.attr=function(a,b){return this.each(function(){C.el(this).attr(a,b)})};this.css=function(a,b){return this.each(function(){C.el(this).css(a,b)})};this.event=function(a,b){return this.each(function(){C.el(this).event(a,b)})};this.getClass=function(a){var j=0;var b=[];for(i=0;i<this.length;i++){if(this[i].hasClass(a)){b[j]=this[i].el();j++}}return q(b)};this.hide=function(){return this.each(function(){C.el(this).hide()})};this.id=function(a){for(i=0;i<this.length;i++){if(this[i].id()==a){return this[i].el()}}return null};this.remove=function(){return this.each(function(){C.el(this).remove()})};this.removeClass=function(a){return this.each(function(){C.el(this).removeClass(a)})};this.tags=function(a){var j=0;var b=[];for(i=0;i<this.length;i++){if(this[i].tag()==a){b[j]=this[i].el();j++}}return q(b)};this.toString=function(){return"[object FWlumArray]"};this.active=function(a,b){return this.each(function(){C.el(this).active(a,b)})};this.click=function(a){return this.each(function(){C.el(this).click(a)})};this.focus=function(a,b){return this.each(function(){C.el(this).focus(a,b)})};this.hover=function(a,b){return this.each(function(){C.el(this).hover(a,b)})};this.load=function(a){return this.each(function(){C.el(this).load(a)})}};return o};var E={};var F=0;var G=13;var H=function(a,b,c,d,j){var e=a.el();if(!c){c=800}else if(typeof(c)=="function"){if(d){j=d}d=c;c=800}else if(d&&typeof(d)=="number"){j=d;d=null}c=I(c);var f=a.attr("style");var g=c+"ms ease opacity";setTimeout(function(){if(a.el()){a.css({"-moz-transition":null,"-webkit-transition":null,"-o-transition":null})}if(d){d.call(e)}},c);setTimeout(function(){a.css("opacity",b?(j?j:null):0)},0);return a.css({"-moz-transition":g,"-webkit-transition":g,"-o-transition":g})};var I=function(a){if(typeof(a)!="number")switch(a){case"slow":return 1600;case"fast":return 400;default:return 800}else if(a>=2*G){return parseInt(a)}else{return 800}};var J=function(e,g,h,i){var j=e.el();if(!h){h=800}else if(typeof(h)=="function"){i=h;h=800}h=I(h);var k=j.offsetHeight;var l=j.offsetWidth;var m=e.css("overflow");var n=e.css("height");var o=e.css("width");var p=function(a,b,c,d){return parseInt(a.css(b+"-"+c+(d?"-"+d:""))?a.css(b+"-"+c+(d?"-"+d:"")):a.css(b+(d?"-"+d:""))?a.css(b+(d?"-"+d:"")):0)};k-=p(e,"padding","top")+p(e,"padding","bottom")+p(e,"border","top","width")+p(e,"border","bottom","width");l-=p(e,"padding","left")+p(e,"padding","right")+p(e,"border","left","width")+p(e,"border","right","width");mto=p(e,"margin","top");mwto=p(e,"margin","left");if(g){var q={height:"0px",width:"0px","margin-top":"0px","margin-left":"0px",overflow:"hidden",visibility:"visible"}}else{var q={overflow:"hidden"}}e.css(q);var r=function(x){return-(x+1)*Math.pow(x-1,3)};var x=g?0:1;var f=g?0:k;var s=g?0:l;var u=g?0:mto;var v=g?0:mwto;var t=+new Date();var w=setInterval(function(){if((g&&x<1)||(!g&&x>0)){var a=r(x);while(Math.floor(+new Date()/G)>Math.floor(t/G)){if(g){x+=G/h}else{x-=G/h}t+=G}t=+new Date();x=Math.round(x*h)/h;var b=r(x);var c=a-b;f+=k*c;s+=l*c;u+=mto*c;v+=mwto*c;e.css({height:(f>0?f:0)+"px",width:(s>0?s:0)+"px","margin-top":(u>0?u:0)+"px","margin-left":(v>0?v:0)+"px",opacity:1-a})}else{var d={height:n,width:o,"margin-top":mto+"px","margin-left":mwto+"px",overflow:m,opacity:g?1:0,visibility:g?"visible":"hidden"};e.css(d);clearInterval(w);if(i){i.call(j)}}},G);return e};C=D(document);C.body=null;C.ajax=function(a,b,c,d){if(window.XMLHttpRequest||window.ActiveXObject){if(window.ActiveXObject){try{var f=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){var f=new ActiveXObject("Microsoft.XMLHTTP")}}else{var f=new XMLHttpRequest()}}else{throw new Error("AJAX");}f.open(a,b,true);f.onreadystatechange=function(){if(f.readyState==4){d(f)}};f.setRequestHeader('Content-type','application/x-www-form-urlencoded');f.send(c?C.attrlink(c):null)};C.attrlink=function(a){var b="";a.each(function(k){b+=(b?"&":"")+encodeURIComponent(k)+"="+encodeURIComponent(this[k])});return b};C.agent={IE4:(!document.getElementById&&!!document.all),NS4:(!document.getElementById&&!!document.layers),IE:(!!document.getElementById&&!!document.all),DOM:(!!document.getElementById),FX:(!!document.getElementById&&!!window.sidebar),OP:(!!document.getElementById&&!!window.opera),UNK:(!document.all&&!window.opera&&!document.layers&&!window.sidebar)};if(C.agent.IE4||C.agent.NS4||!C.agent.DOM){throw new Error();return}C.inArray=function(a,b){if(a.constructor==Array){return a.key(b)!=-1?true:false}else if(a.length!==undefined){return A(a).key(b)!=-1?true:false}else{return a.key(b)!==null?true:false}};C.isFWlum=function(o){return o.constructor==B};C.JSON=function(t){return JSON?JSON.parse(t):new Function("return "+t)()};C.remake$=function(){$=K;return C};C.load(function(){C.body=C.el(document.body)});var K=window.$;$=C})();
