$(document).ready(function(){$("img").pngfix();$("#freebies").animate({top:$("#menu").position().top-157},1000,"easeOutBounce");$("#controller").activNavigation();$("#updates-items-container").newsTicker(7000)});(function(a){a.fn.activNavigation=function(){var d=0;var b=function(){a(document).activSlider();a(".client-inf").eq(0).animate({right:0},800,"easeInOutCubic");a(".client-img img:gt(0)").css("opacity",0.4);a(".client-img").each(function(f){a(this).click(function(){a(".client-inf").animate({right:"635px"},{queue:false,duration:800},"easeInOutCubic");a(".client-img img").animate({opacity:0.4},{queue:false,duration:800},"easeInOutCubic");a(".client-inf").eq(f).animate({right:0},800,"easeInOutCubic");a(".client-img img").eq(f).animate({opacity:1},800,"easeInOutCubic")})})};var e=function(){a("#send").click(function(){var k=false;var h=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;f();var j=a("#name").val();if(j==""){a("#name").addClass("input-error");k=true}var i=a("#email").val();if(i==""||!h.test(i)){a("#email").addClass("input-error");k=true}var l=a("#message").val();if(l==""){a("#message").addClass("input-error");k=true}if(k==true){a(".input-button").after('<span class="message error">Veuillez saisir les champs obligatoires</span>')}else{f();a(".input-button").after('<span class="message sending">Veuillez patienter, envoi en cours ...</span>');var m=a("#firm").val();var g=a("#phone").val();a.post("assets/content/sendmail.asp",{name:j,email:i,firm:m,phone:g,message:l},function(n){a("#name, #email, #firm, #phone, #message").val("");a(".message").remove();a(".input-button").after('<span class="message ok">Votre message à bien été envoyé !</span>')})}return false});var f=function(){a(".message").remove();a("#contact-form input, textarea").removeClass("input-error")}};a("#expertises").activAccordion();b();e();var c=function(){a("#controller").find("li a").each(function(f){a(this).removeClass("expertises-enabled clients-enabled edition-enabled contact-enabled")})};a(this).find("li a").each(function(f){a(this).click(function(){var h=a(this).attr("href");var j=a(this).attr("class");var k="assets/content/"+j+".asp";var g=this;if(j=="splush"){return true}c();if(j=="home"){if(d!=0){a("#freebies-small").hide();a("#freebies").css("top","-235px").show().animate({top:a("#menu").position().top-157},1000,"easeOutBounce")}}else{if(d==0){a("#freebies").hide();a("#freebies-small").css("top","-144px").show().animate({top:a("#menu").position().top-70},1000,"easeOutBounce")}}a("#loading").css("display","block");a("#content").html("");a.ajax({url:k,cache:false,success:function(m){a("#content").append(m);l()},error:i});var l=function(){a("#loading").css("display","none");a("img").pngfix();if(j=="home"){a("#content").css("padding-top","0");a("#updates-items-container").newsTicker(7000)}if(j=="expertises"){a("#content").css("padding-top","50px");a("#expertises").activAccordion();a(g).addClass("expertises-enabled")}if(j=="clients"){a("#content").css("padding-top","30px");b();a(g).addClass("clients-enabled")}if(j=="edition"){a("#content").css("padding-top","50px");a(g).addClass("edition-enabled")}if(j=="contact"){a("#content").css("padding-top","50px");e();a(g).addClass("contact-enabled")}};var i=function(){alert("Network error")};d=f;return false})})}})(jQuery);(function(a){a.fn.activAccordion=function(d){var b=a.extend({},a.fn.activAccordion.defaults,d);var g=a(this).find(b.headers);var e=a(this).find("div.expertise");var f=0;var c=440-(e.length*g.outerHeight());a(this).find("div.expback").css({height:c});e.each(function(h){if(h==0){a(this).css("height",c+"px");a(this).find(b.headers).hide()}else{a(this).css("height",a(this).find(b.headers).outerHeight())}a(this).find(b.headers).click(function(){g.slideDown();e.animate({height:a(this).outerHeight()+1},{queue:false,duration:b.duration},"easeInOutCubic");e.eq(h).animate({height:c+"px"},b.duration,"easeInOutCubic");g.eq(h).slideUp();return false})})};a.fn.activAccordion.defaults={headers:".explink",duration:800}})(jQuery);(function(a){a.fn.activSlider=function(l){var d=a.extend({},a.fn.activSlider.defaults,l);var b=a(".client").length;var e=0;var c=5;var i=function(){a(d.slides).css({height:a("#slideshow").height()*b+"px",marginTop:"-"+(e*a(d.slides).find(":first-child").height()+"px")})};i();a(window).resize(function(){i()});var h=function(m){a(d.slides).animate({marginTop:"-"+(m*a(d.slides).find(":first-child").height()+m*c+"px")},d.duration,"easeInOutCubic");a(".client-inf").animate({right:"635px"},{queue:false,duration:d.duration},"easeInOutCubic");a(".client-img img").animate({opacity:0.4},{queue:false,duration:d.duration},"easeInOutCubic");a(".client-inf").eq(e).animate({right:0},d.duration,"easeInOutCubic");a(".client-img img").eq(e).animate({opacity:1},d.duration,"easeInOutCubic")};var f=function(){if(e>0){e--}else{e=b-2}h(e)};var j=function(){if(e<b-2){e++}else{e=0}h(e)};a(d.prev).click(function(){f()});a(d.next).click(function(){j()});var g=a(d.prev+" img:first");a(d.prev).hover(function(){g.attr("src","images/arrowup-over.png")},function(){g.attr("src","images/arrowup.png")});var k=a(d.next+" img:first");a(d.next).hover(function(){k.attr("src","images/arrowdown-over.png")},function(){k.attr("src","images/arrowdown.png")})};a.fn.activSlider.defaults={slides:"#slides",prev:"#prev",next:"#next",duration:800}})(jQuery);(function(a){a.event.special.mousewheel={setup:function(){var b=a.event.special.mousewheel.handler;if(a.browser.mozilla){a(this).bind("mousemove.mousewheel",function(c){a.data(this,"mwcursorposdata",{pageX:c.pageX,pageY:c.pageY,clientX:c.clientX,clientY:c.clientY})})}if(this.addEventListener){this.addEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=b}},teardown:function(){var b=a.event.special.mousewheel.handler;a(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=function(){}}a.removeData(this,"mwcursorposdata")},handler:function(d){var b=Array.prototype.slice.call(arguments,1);d=a.event.fix(d||window.event);a.extend(d,a.data(this,"mwcursorposdata")||{});var e=0,c=true;if(d.wheelDelta){e=d.wheelDelta/120}if(d.detail){e=-d.detail/3}if(a.browser.opera){e=-d.wheelDelta}d.data=d.data||{};d.type="mousewheel";b.unshift(e);b.unshift(d);return a.event.handle.apply(this,b)}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);(function(a){a.fn.newsTicker=function(b){b=b||4000;initTicker=function(c){stopTicker(c);c.items=a("li",c);c.items.not(":eq(0)").hide().end();c.currentitem=0;startTicker(c)};startTicker=function(c){c.tickfn=setInterval(function(){doTick(c)},b)};stopTicker=function(c){clearInterval(c.tickfn)};pauseTicker=function(c){c.pause=true};resumeTicker=function(c){c.pause=false};doTick=function(c){if(c.pause){return}c.pause=true;a(c.items[c.currentitem]).fadeOut("slow",function(){a(this).hide();c.currentitem=++c.currentitem%(c.items.size());a(c.items[c.currentitem]).fadeIn("slow",function(){c.pause=false})})};this.each(function(){if(this.nodeName.toLowerCase()!="ul"){return}initTicker(this)}).hover(function(){pauseTicker(this)},function(){resumeTicker(this)});return this}})(jQuery);jQuery.extend(jQuery.easing,{easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}}});