if (!Seasons) { var Seasons = {}; } (function ($) { Seasons.mobileSelectNav = function () { $("<div id=\"maDiv\"><div id=\"titre1\"><h1>Corpus & Ressources Archéologiques </h1></div></div>").insertBefore("nav.top"); $("<div id=\"titre2\"><h1>Du centre Camille Jullian </h1></div>").appendTo("#maDiv"); // Create the dropdown base $("<select class=\"mobile\" />").appendTo("nav.top"); // Create default option "Go to..." $("<option />", { "selected": "selected", "value" : "", "text" : "Go to..." }).appendTo("nav select"); // Populate dropdown with menu items $("nav.top a").each(function() { var el = $(this); if (el.parents('ul ul').length) { var parentCount = el.parents("ul").length; var dashes = new Array(parentCount).join('- '); $("<option />", { "value": el.attr("href"), "text": dashes + el.text() }).appendTo("nav select"); } else { $("<option />", { "value": el.attr("href"), "text": el.text() }).appendTo("nav.top select"); } $("nav.top select").change(function() { window.location = $(this).find("option:selected").val(); }); }); } })(jQuery); // (function($) { // var windowHeight= $(window).height(); // if(windowHeight < 600){ // $("#site-title a img").setAttribute('src','https://viccjcorea.intra.inist.fr:40000/files/theme_uploads/51bb2a6c09a2754a4e4e5c731cfbcc6b.png'); // } // })(jQuery);