//Cookie
jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined){options.expires=-1;}if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days);}value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;};
//Acidtabs
(function($){$.fn.acidTabs=function(options){var settings={'style':'one'};options=$.extend(settings,options);return this.each(function(){var o=options;container=this;container.setAttribute("class",o.style);var navitem=container.querySelector("li");var ident=navitem.id.split("_")[1];navitem.parentNode.setAttribute("data-current",ident);navitem.setAttribute("class","tabActiveHeader");var pages=container.querySelectorAll(".tabpage");for(var i=1;i<pages.length;i++){pages[i].style.display="none";}var tabs=container.querySelectorAll("li");for(var i=0;i<tabs.length;i++){tabs[i].onclick=displayPage;}});function displayPage(){var current=this.parentNode.getAttribute("data-current");document.getElementById("tabHeader_"+current).removeAttribute("class");document.getElementById("tabpage_"+current).style.display="none";var ident=this.id.split("_")[1];this.setAttribute("class","tabActiveHeader");document.getElementById("tabpage_"+ident).style.display="block";this.parentNode.setAttribute("data-current",ident);}};})(jQuery);
//Accordeon
$(document).ready(function(){
  var current = $("#current");
  var taille_max = 380; //max width
  var taille_min = 35; //min width
  $("#accordeon ul li a").click(function() {
    $(current).animate({width: taille_min}, { queue:false, duration:200 });
	$(this).animate({width: taille_max}, { queue:false, duration: 200});
	current = this;
  });
});
