


/* Javascript SITE AGDL
autor : laurent Toulemonde
entreprise : ideesimple
date : avril 2010
*/

var site_url="http://www.agauchedelalune.com";var site_urlAll=$.address.baseURL();var firstChangePlaylist=true;var dejaChangePlaylist=false;var FirstPage,DebutLoad=1,FirstLoad=true,QUIdejaAffich=null;$.address.change(function(event){contenuMenuGauche="<div class='contenuMenuGauche'>"+$("#MenuGauche").html()+"</div>";var link=event.value;link=link.replace(site_url,"");$("#li_container1").css("display","none");if(link!="/"){var BlocFicheArtiste=/les-artistes-agdl\//;if(QUIdejaAffich=="BlocFicheArtiste"&&BlocFicheArtiste.test(link)){linkVC=link.replace("/","");MenuIndexArtistClick=$(".touslesArtistesAGDL a[href^='"+linkVC+"']").parent().attr("rel");carrouselAGDL(MenuIndexArtistClick)}else if(BlocFicheArtiste.test(link)&&FirstLoad==true){QUIdejaAffich=site_urlAll.replace(site_url,"");var BlocFicheArtiste=/les-artistes-agdl\//;if(BlocFicheArtiste.test(QUIdejaAffich)){QUIdejaAffich="BlocFicheArtiste"}else{QUIdejaAffich=QUIdejaAffich}FirstLoad=false;if($("body div[rel="+QUIdejaAffich+"]").length==0){NomDivAttent='<div rel="'+QUIdejaAffich+'" style="display:none;">'+contenuMenuGauche+$("#blocReload").html()+'</div>';$("body").append(NomDivAttent)}else{$("body div[rel="+QUIdejaAffich+"]").html(contenuMenuGauche+$("#blocReload").html())}if($("body div[rel=BlocFicheArtiste]").length>0){$("#MenuGauche").html($("body div[rel=BlocFicheArtiste]").find(".contenuMenuGauche").html());$("body div[rel=BlocFicheArtiste]").find(".contenuMenuGauche").remove();$("#blocReload").html($("body div[rel=BlocFicheArtiste]").html());$("body div[rel=BlocFicheArtiste]").empty();$("#loader").remove();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;linkVC=link.replace("/","");MenuIndexArtistClick=$(".touslesArtistesAGDL a[href^='"+linkVC+"']").parent().attr("rel");carrouselAGDL(MenuIndexArtistClick);QUIdejaAffich="BlocFicheArtiste"}else{var valuerNum;$("#AllBloc").append('<div id="loader"></div>');url=site_url+"/admin/loadajax.html";$.ajax({url:url,type:"POST",data:"page="+site_url+link+"",dataType:'json',success:function(data){$("#blocReload").html(data.contenu);$("#MenuGauche").html(data.menu);$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();},complete:function(){$("#loader").remove();valuerNum=($(".GroupArtistes .ContentArtistes").attr("id")).split("blocArtiste");preload(valuerNum[1]);$(".contentCarou").scrollable();$(".contentCarouVertical").scrollable({vertical:true});tailleBlocBiographie();$("a[rel^='prettyPhoto']").prettyPhoto();$("#loader").remove();$('.ArtistesBiographie').tinyscrollbar();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;QUIdejaAffich="BlocFicheArtiste";verifierSIHome(link)}})}}else if(BlocFicheArtiste.test(link)){if($("body div[rel="+QUIdejaAffich+"]").length==0){NomDivAttent='<div rel="'+QUIdejaAffich+'" style="display:none;">'+contenuMenuGauche+$("#blocReload").html()+'</div>';$("body").append(NomDivAttent)}else{$("body div[rel="+QUIdejaAffich+"]").html(contenuMenuGauche+$("#blocReload").html())}if($("body div[rel=BlocFicheArtiste]").length>0){$("#MenuGauche").html($("body div[rel=BlocFicheArtiste]").find(".contenuMenuGauche").html());$("body div[rel=BlocFicheArtiste]").find(".contenuMenuGauche").remove();$("#blocReload").html($("body div[rel=BlocFicheArtiste]").html());$("body div[rel=BlocFicheArtiste]").empty();$("#loader").remove();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;linkVC=link.replace("/","");MenuIndexArtistClick=$(".touslesArtistesAGDL a[href^='"+linkVC+"']").parent().attr("rel");carrouselAGDL(MenuIndexArtistClick);QUIdejaAffich="BlocFicheArtiste"}else{var valuerNum;$("#AllBloc").append('<div id="loader"></div>');url=site_url+"/admin/loadajax.html";$.ajax({url:url,type:"POST",data:"page="+site_url+link+"",dataType:'json',success:function(data){$("#blocReload").html(data.contenu);$("#MenuGauche").html(data.menu);$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();},complete:function(){$("#loader").remove();valuerNum=($(".GroupArtistes .ContentArtistes").attr("id")).split("blocArtiste");preload(valuerNum[1]);$(".contentCarou").scrollable();$(".contentCarouVertical").scrollable({vertical:true});tailleBlocBiographie();$("a[rel^='prettyPhoto']").prettyPhoto();$("#loader").remove();$('.ArtistesBiographie').tinyscrollbar();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;QUIdejaAffich="BlocFicheArtiste";verifierSIHome(link)}})}}else{if(FirstLoad){QUIdejaAffich=site_urlAll.replace(site_url,"");FirstLoad=false}if($("body div[rel="+QUIdejaAffich+"]").length==0){NomDivAttent='<div rel="'+QUIdejaAffich+'" style="display:none;">'+contenuMenuGauche+$("#blocReload").html()+'</div>';$("body").append(NomDivAttent)}else{$("body div[rel="+QUIdejaAffich+"]").html(contenuMenuGauche+$("#blocReload").html())}verifSidejPresent(link)}}else{if(FirstLoad){var link=site_urlAll.replace(site_url,"");if(link=="/accueil-agdl.html"){$('body').attr("id","Home")}var BlocFicheArtiste=/les-artistes-agdl\//;if(BlocFicheArtiste.test(link)){QUIdejaAffich="BlocFicheArtiste";valuerNum=($(".GroupArtistes .ContentArtistes").attr("id")).split("blocArtiste");preload(valuerNum[1]);tailleBlocBiographie();$(".contentCarou").scrollable();$(".contentCarouVertical").scrollable({vertical:true});$("a[rel^='prettyPhoto']").prettyPhoto();$("#loader").remove();$('.ArtistesBiographie').tinyscrollbar();verifierSIHome(QUIdejaAffich);nettoyerTitreBiographie()}else{QUIdejaAffich=link}FirstPage=QUIdejaAffich;FirstLoad=false}else{QUIdejaAffich222=site_urlAll.replace(site_url,"");var BlocFicheArtiste=/les-artistes-agdl\//;if($("body div[rel="+QUIdejaAffich+"]").length>0){$("body div[rel="+QUIdejaAffich+"]").html(contenuMenuGauche+$("#blocReload").html())}else{NomDivAttent='<div rel="'+QUIdejaAffich+'" style="display:none;">'+contenuMenuGauche+$("#blocReload").html()+'</div>';$("body").append(NomDivAttent)}$("#MenuGauche").html($("body div[rel="+FirstPage+"]").find(".contenuMenuGauche").html());$("body div[rel="+FirstPage+"]").find(".contenuMenuGauche").remove();$("#blocReload").html($("body div[rel="+FirstPage+"]").html());$("body div[rel="+FirstPage+"]").empty();$("#loader").remove();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;QUIdejaAffich=FirstPage;nettoyerTitreBiographie();if(BlocFicheArtiste.test(QUIdejaAffich222)){linkVC=QUIdejaAffich222.replace("/","");MenuIndexArtistClick2=$(".touslesArtistesAGDL a[href^='"+linkVC+"']").parent().attr("rel");carrouselAGDL(MenuIndexArtistClick2)}$("a[rel^='prettyPhoto']").prettyPhoto();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;tailleBlocBiographie();verifierSIHome(QUIdejaAffich)}}$("a[rel^='prettyPhoto']").prettyPhoto();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();});function nettoyerTitreBiographie(){$(".contentCarou").find("span.titre").each(function(){Agarder=$(this).find("span.AffSeul").html();$(this).empty();$(this).html('<span class="AffSeul">'+Agarder+"</span>")})}function verifSidejPresent(link){if($("body div[rel="+link+"]").length>0){$("#MenuGauche").html($("body div[rel="+link+"]").find(".contenuMenuGauche").html());$("body div[rel="+link+"]").find(".contenuMenuGauche").remove();$("#blocReload").html($("body div[rel="+link+"]").html());$("body div[rel="+link+"]").empty();$("#loader").remove();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();}else{$("#AllBloc").append('<div id="loader"></div>');url=site_url+"/admin/loadajax.html";$.ajax({url:url,type:"POST",data:"page="+site_url+link+"",dataType:'json',success:function(data){$("#blocReload").html(data.contenu);$("#MenuGauche").html(data.menu)},complete:function(){$("#loader").remove();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();}})}$("a[rel^='prettyPhoto']").prettyPhoto();$("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;tailleBlocBiographie();verifierSIHome(link);QUIdejaAffich=link}function verifierSIHome(link){if(link=="/accueil-agdl.html"||link==""){$('body').attr("id","Home");$("body").find("span.BlocPopup").css("display","none")}else{$('body').attr("id","")}}function tailleBlocBiographie(){var HauteurDesbloc=0;$('.ContArtistesLeft').each(function(){nbre=($(this).children().length)-1;for(i=0;i<nbre;i++){HauteurDesbloc+=$(this).children(":eq("+i+")").outerHeight()}hauteurBocArt=$(this).height()-HauteurDesbloc-10;$(this).find("div.ArtistesBiographie").css("height",hauteurBocArt+"px");$(this).find("div.ArtistesBiographie .viewport").css("height",hauteurBocArt+"px");HauteurDesbloc=0})};


function scrollPourPageCorpo() {

    $(".BlocAvecScroll").each(function() {
    $(this).css("height",'470px');
    $(this).find('.viewport').css("height",'470px');
    });
}
var MenuIndexArtistClick;

$(document).ready(function() {

$("#MenuGauche li.MeBas").live('mouseover mouseout',function(event) {
if (event.type =="mouseover"){
    $(this).find("span.Tail13").css("display","block");
}
else {
    $(this).find("span.Tail13").css("display","none");
}})



scrollPourPageCorpo();



$("#contenuHome li").live('mouseover mouseout',function(event) {
if (navigator.appName=="Microsoft Internet Explorer") return;
if (event.type =="mouseover"){
    $(this).find("span.BlocPopup").css("display","block");
}
else {
    $(this).find("span.BlocPopup").css("display","none");
}})

                            $('a[rel=lienInterne]').live('click',function() {
                            var link = $(this).attr('href');
                            if (navigator.appName=="Microsoft Internet Explorer") {
                                if(link.substr(0,30)=="http://www.agauchedelalune.com") {
                                 link=link.replace(site_url,"");
                                }
                            }
                            $.address.value(link);
                            lienpourgooganaytics=site_url+"/"+link;
                            _gaq.push(['_trackEvent','lienInterne', 'lieninterne',lienpourgooganaytics]);
                            return false;
                            });

                        $("a[rel^='prettyPhoto']").prettyPhoto();
                        tailleBlocBiographie();

                        $(".playlistArtiste").live('click',function(event) {
                                var rel=$(this).attr('rel');
                                NomArtiste=$(this).parent().parent().find("h1 a").html();
                                var flashvars = {};
                                flashvars.playlist = rel;
                                  var params = {};
                                  var attributes = {};
                                  attributes.id = "BlocplaIn";
                                  attributes.wmode="transparent";
                                  attributes.quality="high";
                                  swfobject.embedSWF(site_url+"/assets/templates/default/js/pi.swf", "BlocplaIn", "730", "305", "9.0.0", false, flashvars, params, attributes);
                                $("#ArtisteEnlecture").attr('value',NomArtiste);
                                $("#ArtisteEnlecture").attr('rel',rel);

                                if (firstChangePlaylist == true) {
                                    var codeHtml='<h4>Playlist déjà écoutée</h4><ul id="list_playlist"><li><span rel="'+site_url+'/assets/templates/playlistMp3/playlistAGDL.xml" class="LoadOdplaylistArtiste">AGDL</span></li></ul>';
                                    $("#playlist_AGDL").append(codeHtml);
                                    firstChangePlaylist = false;
                                    dejaChangePlaylist =true;
                                }
                                else {
                                dejDelPresent = false;
                                    $("#list_playlist li span").each(function() {
                                        dejPresent=$(this).html();
                                        if (dejPresent == NomArtiste) {
                                            dejDelPresent=true;
                                        }
                                    });
                                    if (dejDelPresent == false) {
                                    var codeHtml='<li><span rel="'+rel+'" class="LoadOdplaylistArtiste">'+NomArtiste+'</span></li>';
                                    $("#list_playlist").append(codeHtml);
                                    $("#playlist_AGDL h4").html("Artistes déjà écoutés");
                                    dejDelPresent = false;
                                    }


                                }
                            });

                            $(".LoadOdplaylistArtiste").live('click',function() {
                                var rel=$(this).attr('rel');
                                NomArtiste=$("#ArtisteEnlecture").val();
                                var UrlPlaylist=$("#ArtisteEnlecture").attr('rel');

                                var flashvars = {};
                                flashvars.playlist = rel;
                                  var params = {};
                                  var attributes = {};
                                  attributes.id = "BlocplaIn";
                                  attributes.wmode="transparent";
                                  attributes.quality="high";
                                  swfobject.embedSWF(site_url+"/assets/templates/default/js/pi.swf", "BlocplaIn", "730", "305", "9.0.0", false, flashvars, params, attributes);
                                $("#ArtisteEnlecture").attr('value',NomArtiste);
                                $("#ArtisteEnlecture").attr('rel',UrlPlaylist);


                                if (dejaChangePlaylist == true) {
                                    var codeHtml='<li><span rel="'+UrlPlaylist+'" class="LoadOdplaylistArtiste">'+NomArtiste+'</span></li>';
                                    $("#list_playlist").append(codeHtml);
                                    dejaChangePlaylist = false;
                                    $("#playlist_AGDL h4").html("Artistes déjà écoutés");
                                }
                           });


                                $(".facebook,.twitter").live('hover',function(){
                                    $(this).find("span.lieu").toggle();
                                });

                                $(".touslesArtistesAGDL").live('click',function(){
                                    $("#li_container1").toggle();
                                });

                            $('#MenuGauche a,#contenuHome a').live('hover',function() {
                                $(this).attr('title','');
                            });
                        $(".touslesArtistesAGDL ul").makeacolumnlists({cols:4,colWidth:170,equalHeight:true,startN:1})
                        $("ul.ChangeVersion").tabs("div.panes > div");scrollPourPageCorpo();$(".BlocAvecScroll").tinyscrollbar();;

                        $('body').delegate('#recup_email_MEL', 'submit',function() {
                                $('.erreurChps').remove();
                                var hasError = false;
                                var ContreSpam=$("#ContreSpam").val();
                            $('.requiredField').each(function() {
                                    var thisItem = $(this);
                                        var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
                                        if(!emailReg.test(jQuery.trim($(this).val()))) {
                                            var thisItem = $(this);
                                            var msgTip = "Merci de saisir un e-mail valide";
                                            $('body').append('<div class="erreurChps"  id="erreurMail"><p>'+  msgTip +'</p>\</div>');
                                                var pos = thisItem.offset();
                                                var width = thisItem.width();
                                                $("#erreurMail").css( { "left": (pos.left -15) + "px", "top":pos.top - 25 + "px" } );
                                                $("#erreurMail").fadeIn('slow').delay(2000).fadeOut('slow', function() {
                                                    thisItem.focus();
                                                    $("#erreurMail").remove();
                                                });
                                            hasError = true;
                                        }
                                });
                                if(!hasError && ContreSpam =="") {
                                        CompleteFormNews='<div id="CompleteFormNews"><span id="closeForm" title="Cacher"></span><form action="#" method="post" id="contactform" onSubmit="return false;"><input type="hidden" value="" name="idmail" id="idmail" /><input type="hidden" value="" name="dateheur" id="dateheur" /><p><label for="nom">Nom :</label><input type="text" class="textfield input" id="nom" name="nom" value=""></p><p><label for="prenom">Pr&eacute;nom :</label><input type="text" class="textfield input" id="prenom" name="prenom" value=""></p><p><label for="mail">Email :</label><input type="text" class="input" id="mail" name="mail" value="" disabled="disabled"></p><p><label for="societe">Soci&eacute;t&eacute; :</label><input type="text" class="textfield input" id="societe" name="societe" value=""></p><p><label for="cp">Code postal :</label><input type="text" class="textfield input" id="cp" name="cp" value=""></p><p class="bsubmit"><input type="submit" class="submit_btn textfield" value="Enregistrer" id="submit_btn"></p></form><p id="textForm"></p></div>';
                                    var formInput = $(this).serialize();
                                    var url=site_url+"/gestionnewsletter.html";
                                    $.post(url,formInput, function(data){
                                        if (data[0].mailOk =="ok" && data[0].mailDeja !="OUI") {
                                                $('#blocNewsletter').append(CompleteFormNews);
                                                var pos =$("#blocNewsletter").offset();
                                                $("#CompleteFormNews").fadeIn('slow',function() {
                                                    $("#mail").val(data[0].mail);
                                                    $("#idmail").val(data[0].idInsert);
                                                });
                                                $("#textForm").html("<strong>Votre email a bien &eacute;t&eacute; enregistr&eacute;</strong>,<br />Vous pouvez compl&eacute;ter ce formulaire pour recevoir nos newsletters personalis&eacute;es.");
                                               $("#closeForm").click(function () {$("#CompleteFormNews").remove();});
                                               mettreEnplaceValidation();

                                        }
                                    else if (data[0].mailDeja =="OUI") {
                                            $('#blocNewsletter').append(CompleteFormNews);
                                                var pos =$("#blocNewsletter").offset();
                                                $("#CompleteFormNews").fadeIn('slow',function() {
                                                    $("#idmail").val(data[0].idDeja);
                                                    $("#mail").val(data[0].mail);
                                                    $("#prenom").val(data[0].prenom);
                                                    $("#nom").val(data[0].nom);
                                                    $("#societe").val(data[0].societe);
                                                    $("#cp").val(data[0].cp);
                                                    $("#dateheur").val(data[0].dateheur);
                                                    $("#submit_btn").val("mettre à jour");
                                                });
                                                $("#textForm").html("<strong>Votre email est d&eacute;j&agrave; enregistr&eacute; dans notre liste de diffusion</strong>,<br />vous pous compl&eacute;ter ce formulaire pour recevoir nos newsletters personalis&eacute;es.");
                                               $("#closeForm").click(function () {$("#CompleteFormNews").remove();});
                                               mettreEnplaceValidation();
                                    }

                                    },"json");
                                }

                                return false;
                        });
                        function mettreEnplaceValidation () {
                            $("#contactform").submit(function() {
                                var hasError = false;
                                if(!hasError) {
                                    var formInput = $(this).serialize();
                                    var url=site_url+"/gestionnewsletter.html";
                                    $.post(url,formInput, function(data){
                                        if (data[0].Update =="true") {
                                                $("#contactform").remove();
                                                var pos =$("#blocNewsletter").offset();
                                                 $("#textForm").html("<strong>vos informations ont bien été mises à jour</strong>.<br />l'équipe d'AGDL vous remercie.").doTimeout(3000,function (){
                                                 $("#CompleteFormNews").fadeOut('slow',function() {
                                                     $("#CompleteFormNews").remove();
                                                 });
                                                 });
                                        }
                                    },"json");
                                }
                                return false;
                            });
                        }
                        $("#BlocPlayer").hover(function(){
                            $(this).stop(true,false).animate({
                                height:"305px"
                            },500);
                        },function() {
                            $(this).stop(true,false).animate({
                                height:"23px"
                            },500);
                        })
});


function addEvent(obj,type,fn) {
        if (obj.addEventListener) //in Mozila
        {
                obj.addEventListener(type,fn,false);
                return true;
        }
        else // in IE
        {
                obj.attachEvent("on"+type,fn)
        }
}


(function($){var a={},c="doTimeout",d=Array.prototype.slice;$[c]=function(){return b.apply(window,[0].concat(d.call(arguments)))};$.fn[c]=function(){var f=d.call(arguments),e=b.apply(this,[c+f[0]].concat(f));return typeof f[0]==="number"||typeof f[1]==="number"?this:e};function b(l){var m=this,h,k={},g=l?$.fn:$,n=arguments,i=4,f=n[1],j=n[2],p=n[3];if(typeof f!=="string"){i--;f=l=0;j=n[1];p=n[2]}if(l){h=m.eq(0);h.data(l,k=h.data(l)||{})}else{if(f){k=a[f]||(a[f]={})}}k.id&&clearTimeout(k.id);delete k.id;function e(){if(l){h.removeData(l)}else{if(f){delete a[f]}}}function o(){k.id=setTimeout(function(){k.fn()},j)}if(p){k.fn=function(q){if(typeof p==="string"){p=g[p]}p.apply(m,d.call(n,i))===true&&!q?o():e()};o()}else{if(k.fn){j===undefined?e():k.fn(j===false);return true}else{e()}}}})(jQuery);


(function(c){function p(d,b,a){var e=this,l=d.add(this),h=d.find(a.tabs),i=b.jquery?b:d.children(b),j;h.length||(h=d.children());i.length||(i=d.parent().find(b));i.length||(i=c(b));c.extend(this,{click:function(f,g){var k=h.eq(f);if(typeof f=="string"&&f.replace("#","")){k=h.filter("[href*="+f.replace("#","")+"]");f=Math.max(h.index(k),0)}if(a.rotate){var n=h.length-1;if(f<0)return e.click(n,g);if(f>n)return e.click(0,g)}if(!k.length){if(j>=0)return e;f=a.initialIndex;k=h.eq(f)}if(f===j)return e;
g=g||c.Event();g.type="onBeforeClick";l.trigger(g,[f]);if(!g.isDefaultPrevented()){o[a.effect].call(e,f,function(){g.type="onClick";l.trigger(g,[f])});j=f;h.removeClass(a.current);k.addClass(a.current);return e}},getConf:function(){return a},getTabs:function(){return h},getPanes:function(){return i},getCurrentPane:function(){return i.eq(j)},getCurrentTab:function(){return h.eq(j)},getIndex:function(){return j},next:function(){return e.click(j+1)},prev:function(){return e.click(j-1)},destroy:function(){h.unbind(a.event).removeClass(a.current);
i.find("a[href^=#]").unbind("click.T");return e}});c.each("onBeforeClick,onClick".split(","),function(f,g){c.isFunction(a[g])&&c(e).bind(g,a[g]);e[g]=function(k){k&&c(e).bind(g,k);return e}});if(a.history&&c.fn.history){c.tools.history.init(h);a.event="history"}h.each(function(f){c(this).bind(a.event,function(g){e.click(f,g);return g.preventDefault()})});i.find("a[href^=#]").bind("click.T",function(f){e.click(c(this).attr("href"),f);});if(location.hash&&a.tabs=="a"&&d.find("[href="+location.hash+"]").length)e.click(location.hash);
else if(a.initialIndex===0||a.initialIndex>0)e.click(a.initialIndex)}
c.tools=c.tools||{version:"1.2.5"};c.tools.tabs={conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",rotate:false,history:false},addEffect:function(d,b){o[d]=b}};var o={"default":function(d,b){this.getPanes().hide().eq(d).show();$(".BlocAvecScroll").tinyscrollbar();b.call()},fade:function(d,b){var a=this.getConf(),e=a.fadeOutSpeed,l=this.getPanes();e?l.fadeOut(e):l.hide();l.eq(d).fadeIn(a.fadeInSpeed,b)},slide:function(d,
b){this.getPanes().slideUp(200);this.getPanes().eq(d).slideDown(400,b)},ajax:function(d,b){this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),b)}},m;c.tools.tabs.addEffect("horizontal",function(d,b){m||(m=this.getPanes().eq(0).width());this.getCurrentPane().animate({width:0},function(){c(this).hide()});this.getPanes().eq(d).animate({width:m},function(){c(this).show();b.call()})});c.fn.tabs=function(d,b){var a=this.data("tabs");if(a){a.destroy();this.removeData("tabs")}if(c.isFunction(b))b=
{onBeforeClick:b};b=c.extend({},c.tools.tabs.conf,b);this.each(function(){a=new p(c(this),d,b);c(this).data("tabs",a)});return b.api?a:this}})(jQuery);
