/* #PRODUIRE{fond=script/onload,lang=es} md5:5eec37b9e501dec9daea51f7ee62ebaa */ function toggleSidebar(){ if ( ! $('#aside_wrapper').is(':animated') ){ var h=$(document).height(); $('#aside_wrapper').toggle('display',function(){ if ( $(document).height() - ( h + $('#header').height() ) > 0 ){ $('body').css({'height':$(document).height()}); } if ( $('#main').height() < h && h > $('#aside').height() ) { $('body').css({'height': 'auto'}); } }); } } function notification(nom, message){ var msg_history = $.cookie('msg_history'); if ( typeof(msg_history) == "undefined" ){ msg_history = ""; } if ( msg_history.indexOf(nom) == -1 ){ $.cookie('msg_history', msg_history+nom+';', { expires: 7, path: '/' }); if ( message ) { var lien = $("", {class: "button right gras tl blanc", title:"cierrar"}).text("cierrar").click(function(){ $("#boite_notification").slideUp("slow"); }); var contenu = $("
", {class: "text-center txxl"}).css({'padding': '3em 0.5em 3.5em 0.5em'}).append(message); var boite_notification = $("
", {id: "boite_notification"}).append(lien).append(contenu); $('body').prepend(boite_notification); $("#boite_notification").slideDown("slow"); } } } function handleAjaxLink(){ if ( $(document).width() < 520 ){ jQuery.modalbox = null; $(".mediabox").removeClass("pageajax mediabox cboxElement hasbox"); } else { var re=/ajax=1/; var h = ""; $(".pageajax").mousedown(function(e){ var t = decodeURIComponent(this.href).split('#'); if (t.length > 1) h = '#'+t[1]; if (e.which != 1 && re.test(t[0]) ){ $(this).attr({href: t[0].substr(0, (t[0].length-9))+h}); } }); $(".pageajax").click(function(e){ var t = this.href.split('#'); if (t.length > 1) h = ' #'+t[1]; if (e.which == 1 && !re.test(t[0]) ){ $(this).attr({href: t[0]+"&ajax=1"+h}); } }); } } $(document).ready(function(){ $(document).ajaxComplete(function() { handleAjaxLink(); }); $(".toggleSidebar").click(function(e){ toggleSidebar(); e.preventDefault(); }); handleAjaxLink(); var langues_dispo = ["en","fr","de","es"]; var langue_utilisateur = navigator.language || navigator.userLanguage; var langue_courante = 'es'; if ( langue_utilisateur != langue_courante ){ var msg = 'Root Me esta tambien disponible en estas idiomas :

'; for (var i = 0; i < langues_dispo.length; i++) { l = langues_dispo[i]; if ( l != langue_courante ){ url = 'https://www.root-me.org/'+l+'/'; c_url = $("#url_"+l).attr("href"); if ( c_url ) url = c_url; msg += ''+l.toUpperCase()+'     '; } } notification("explication_site_multilingue",msg); } else { notification("explication_site_multilingue",''); } $(window).scroll(function(){ posScroll = $(document).scrollTop(); if(posScroll >=450) $('.top_link').fadeIn(600); else $('.top_link').fadeOut(600); }); var top_link = $("", {class: "top_link", title:"volver arriba de la pagina"}).text("^").css({ 'position' : 'fixed', 'right' : '20px', 'bottom' : '20px', 'display' : 'none', 'padding' : '7px 20px 0px 20px', 'background' : '#2ba6cb', 'color' : '#fff', 'font-size' : '30px', 'opacity' : '0.5', 'z-index' : '100' }).click(function(){ $("html, body").animate({ scrollTop: 0 }, "slow"); }); $('body').append(top_link); });