// For compression reasons, licence blocks have been reduced. Please go
// to the given URLs to know more about the plugins and their license.

// ScrollTo 1.4 (c) 2007-2008 Ariel Flesler - http://flesler.blogspot.com - MIT/GPL licences

;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);

// jQuery History Plugin (c) 2006 Taku Sano - MIT license - http://plugins.jquery.com/project/history

(function($){function History()
{this._curHash='';this._callback=function(hash){};};$.extend(History.prototype,{init:function(callback){this._callback=callback;this._curHash=location.hash;if($.browser.msie){if(this._curHash==''){this._curHash='#';}
$("body").prepend('<iframe id="jQuery_history" style="display: none;"></iframe>');var iframe=$("#jQuery_history")[0].contentWindow.document;iframe.open();iframe.close();iframe.location.hash=this._curHash;}
else if($.browser.safari){this._historyBackStack=[];this._historyBackStack.length=history.length;this._historyForwardStack=[];this._isFirst=true;this._dontCheck=false;}
this._callback(this._curHash.replace(/^#/,''));setInterval(this._check,100);},add:function(hash){this._historyBackStack.push(hash);this._historyForwardStack.length=0;this._isFirst=true;},_check:function(){if($.browser.msie){var ihistory=$("#jQuery_history")[0];var iframe=ihistory.contentDocument||ihistory.contentWindow.document;var current_hash=iframe.location.hash;if(current_hash!=$.history._curHash){location.hash=current_hash;$.history._curHash=current_hash;$.history._callback(current_hash.replace(/^#/,''));}}else if($.browser.safari){if(!$.history._dontCheck){var historyDelta=history.length-$.history._historyBackStack.length;if(historyDelta){$.history._isFirst=false;if(historyDelta<0){for(var i=0;i<Math.abs(historyDelta);i++)$.history._historyForwardStack.unshift($.history._historyBackStack.pop());}else{for(var i=0;i<historyDelta;i++)$.history._historyBackStack.push($.history._historyForwardStack.shift());}
var cachedHash=$.history._historyBackStack[$.history._historyBackStack.length-1];if(cachedHash!=undefined){$.history._curHash=location.hash;$.history._callback(cachedHash);}}else if($.history._historyBackStack[$.history._historyBackStack.length-1]==undefined&&!$.history._isFirst){if(document.URL.indexOf('#')>=0){$.history._callback(document.URL.split('#')[1]);}else{$.history._callback('');}
$.history._isFirst=true;}}}else{var current_hash=location.hash;if(current_hash!=$.history._curHash){$.history._curHash=current_hash;$.history._callback(current_hash.replace(/^#/,''));}}},load:function(hash){var newhash;if($.browser.safari){newhash=hash;}else{newhash='#'+hash;location.hash=newhash;}
this._curHash=newhash;if($.browser.msie){var ihistory=$("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=newhash;this._callback(hash);}
else if($.browser.safari){this._dontCheck=true;this.add(hash);var fn=function(){$.history._dontCheck=false;};window.setTimeout(fn,200);this._callback(hash);location.hash=newhash;}
else{this._callback(hash);}}});$(document).ready(function(){$.history=new History();});})(jQuery);

// Easing equations - http://gsgd.co.uk/sandbox/jquery/easing/ - GPL license

$.extend($.easing,{easeInOutExpo:function(A,B,E,D,C){if(B==0){return E}if(B==C){return E+D}if((B/=C/2)<1){return D/2*Math.pow(2,10*(B-1))+E}return D/2*(-Math.pow(2,-10*--B)+2)+E},easeInOutQuint:function(A,B,E,D,C){if((B/=C/2)<1){return D/2*B*B*B*B*B+E}return D/2*((B-=2)*B*B*B*B+2)+E}, easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;}});

// SerialScroll 1.2.1 (c) 2007-2008 Ariel Flesler - http://flesler.blogspot.com -  MIT/GPL licences

;(function($){var a='serialScroll',b='.'+a,c='bind',C=$[a]=function(b){$.scrollTo.window()[a](b)};C.defaults={duration:1e3,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1,constant:1};$.fn[a]=function(y){y=$.extend({},C.defaults,y);var z=y.event,A=y.step,B=y.lazy;return this.each(function(){var j=y.target?this:document,k=$(y.target||this,j),l=k[0],m=y.items,o=y.start,p=y.interval,q=y.navigation,r;if(!B)m=w();if(y.force)t({},o);$(y.prev||[],j)[c](z,-A,s);$(y.next||[],j)[c](z,A,s);if(!l.ssbound)k[c]('prev'+b,-A,s)[c]('next'+b,A,s)[c]('goto'+b,t);if(p)k[c]('start'+b,function(e){if(!p){v();p=1;u()}})[c]('stop'+b,function(){v();p=0});k[c]('notify'+b,function(e,a){var i=x(a);if(i>-1)o=i});l.ssbound=1;if(y.jump)(B?k:w())[c](z,function(e){t(e,x(e.target))});if(q)q=$(q,j)[c](z,function(e){e.data=Math.round(w().length/q.length)*q.index(this);t(e,this)});function s(e){e.data+=o;t(e,this)};function t(e,a){if(!isNaN(a)){e.data=a;a=l}var c=e.data,n,d=e.type,f=y.exclude?w().slice(0,-y.exclude):w(),g=f.length,h=f[c],i=y.duration;if(d)e.preventDefault();if(p){v();r=setTimeout(u,y.interval)}if(!h){n=c<0?0:n=g-1;if(o!=n)c=n;else if(!y.cycle)return;else c=g-n-1;h=f[c]}if(!h||d&&o==c||y.lock&&k.is(':animated')||d&&y.onBefore&&y.onBefore.call(a,e,h,k,w(),c)===!1)return;if(y.stop)k.queue('fx',[]).stop();if(y.constant)i=Math.abs(i/A*(o-c));k.scrollTo(h,i,y).trigger('notify'+b,[c])};function u(){k.trigger('next'+b)};function v(){clearTimeout(r)};function w(){return $(m,l)};function x(a){if(!isNaN(a))return a;var b=w(),i;while((i=b.index(a))==-1&&a!=l)a=a.parentNode;return i}})}})(jQuery);

// Application

$("a[rel]").live("click",function(){if($(this).attr("rel")=="Links"){return false}document.title="DeadPx.fr \273 "+$(this).attr("rel").replace("-"," ");$.history.load($(this).attr("rel").toLowerCase());return false});function pageload(A){if(!A){return false}part="#part-"+A;if($(part).length!=0){$.scrollTo($(part),1800,{axis:"xy",easing:"easeInOutExpo"})}else{$("#info-chargement").fadeIn();$("#info-chargement").ajaxError(function(D,C,B){$(this).text("Error loading page ! (error "+C.status+")");return false});$.get("/en/"+A+".ajax",function(B){if(A.match("article-")){A="read-article"}if($("#part-read-article").length==1){$("#part-read-article").hide("slow").remove()}if($(part).length!=0){return false}$("#contenu").append($(B));$(".part").css({width:"2000px",height:"1500px"});if($.inArray(A,["about","contact","tumblelog","portfolio"])!=-1){$.getScript(as+"/js/p/"+A+".jgz",function(){$.scrollTo($("#part-"+A),1800,{axis:"xy",easing:"easeInOutExpo"})})}else{$.scrollTo($("#part-"+A),1800,{axis:"xy",easing:"easeInOutExpo"})}$("#info-chargement").fadeOut()})}$("#navMenu li").removeClass("page_active");if(A.search("article-")!=-1){$('#navMenu li a[href="/articles/"]').parent().addClass("page_active")}else{if(A.search("accueil")!=-1){$('#navMenu li a[href="/"]').parent().addClass("page_active")}else{$('#navMenu li a[href="/'+A+'/"]').parent().addClass("page_active")}}if(A.search("article-")!=-1){$("html").css("overflow-y","auto")}else{$("html").css("overflow","hidden")}return true}$(function(){$("#contenu").css("display","none");$("#userbar").prepend($('<div id="info-chargement"></div>').html($("<img />").attr({src:as+"/img/global/loader.gif",alt:"Loading in progress...",title:"Loading"})));$("#info-chargement").fadeIn();$("html").css("overflow","hidden");$.history.init(pageload);$(".part").css({width:"2000px",height:"1500px"});$(".linklink").click(function(){elems=$(".menuLink, #userbar, #aboutLinks, #navMenu");if($("#linkbox").length!=0){$("#linkbox").slideToggle("slow");if(elems.css("bottom")=="-5px"){elems.animate({bottom:"115px"},"slow")}else{elems.animate({bottom:"-5px"},"slow")}}else{$("#info-chargement").fadeIn();$.get("/en/links.html",function(A){$("#userbar").append($('<div id="linkbox">'+A+"</div>"));$("#linkbox").slideToggle("slow");$("#info-chargement").fadeOut();elems.animate({bottom:"115px"},"slow")})}});$(".menuLink").hover(function(){$("#navMenu").fadeIn()},function(){$("#navMenu").fadeOut()}).removeClass("showmenu");if($("#part-lire-article").length==1){$("html").css("overflow-y","auto")}else{$("html").css("overflow","hidden")}});$(window).load(function(){$("#contenu").fadeIn(1500);$("#info-chargement").fadeOut(1300)});var as="http://assets.deadpx.fr/en";