(function($) { Drupal.behaviors.init_theme = {}; Drupal.behaviors.init_theme.attach = function (context) { // Growl-style system messages $('#messages-and-help > div.messages:not(.processed)') .addClass('processed') .each(function() { // If a message meets these criteria, we don't autoclose // - contains a link // - is an error or warning // - contains a lenghthy amount of text if ($('a', this).size() || $(this).is('.error') || $(this).is('.warning') || $(this).text().length > 100) { $(this).prepend("X"); $('span.close', this).click(function() { $(this).parent().slideUp('fast'); }); } else { // This essentially adds a 3 second pause before hiding the message. $(this).animate({opacity:1}, 5000, 'linear', function() { $(this).slideUp('fast'); }); } }); // DON'T USE JSCROLLPANE FOR NORMAL PAGES ANYMORE // if(!$('body').is('.front') && !$('body').is('.node-type-performance')){ // $('#main').jScrollPane({autoReinitialise:true, hijackInternalLinks:true}); // } $('#block-menu-block-2 ul.menu').listnav({cookieName:'test', attribute:'nom'}); $('.burger-icon.header').click(function(){ $('body').toggleClass('burger-header-shown'); }); $('.burger-icon.sidebar-first').click(function(){ $('body').toggleClass('burger-sidebar-first-shown'); }); }; Drupal.behaviors.init_timeline = {}; Drupal.behaviors.init_timeline.attach = function (context) { // $.paScPlayer.defaults.onDomReady = null; // $.paScPlayer.defaults.loadArtworks = 0; if($('html').is('.oldie')) { $('html').addClass('classic-nav'); } else if($('body').is('.front') || $('body').is('.node-type-performance')) { var _$modalIntro = $('