function equalHeight(group) { var tallest = 0; group.each(function() { var thisHeight = jQuery( this ).height(); if ( thisHeight > tallest ) { tallest = thisHeight+20; } }); group.height(tallest); } // Main menu hover operation jQuery(document).ready(function(){ // Main menu hover effect jQuery('.mainMenu > ul > li:has(ul)').hover( function(){ jQuery(this).children('ul').css({'height':'auto'}); var height = jQuery(this).children('ul').height(); jQuery(this).children('ul').css({'height':'0'}); jQuery(this).children('ul').css({'left':jQuery(this).position().left+'px', 'top':'30px'}); jQuery(this).children('ul').animate({'height':height+'px'},200); }, function(){ jQuery(this).children('ul').animate({'height':'0'},100,function(){ jQuery(this).css({'left':'-5000px'}); }); } ); // Third level menu hover jQuery('.mainMenu ul li ul li:has(ul)').hover(function(){ jQuery(this).parent('ul').css({'overflow': 'visible'}); jQuery(this).children('ul').css({'height':'auto'}); jQuery(this).children('ul').css({'left':jQuery(this).width()+'px', 'top':'-1px'}); }, function(){ jQuery(this).children('ul').css({'height': '0'}); jQuery(this).children('ul').css({'left': '-5000px'}); }); //Main menu arrows for list items with children jQuery('.mainMenu > ul > li:has(ul)').addClass('arrow').hover(function(){ jQuery(this).addClass('hover'); }, function(){ jQuery(this).removeClass('hover'); }); jQuery('.mainMenu ul li ul li:has(ul)').addClass('arrow').hover(function(){ jQuery(this).addClass('hover'); }, function(){ jQuery(this).removeClass('hover'); }); // Main menu styling jQuery('.mainMenu a:first').css({ borderLeft: 'none' }); jQuery('.mainMenu a:last').css({ borderRight: 'none' }); // Homepage rotating banner jQuery('.rotatingBanner > ul').cycle({ fx: 'fade', speed: 1000, easing: 'easeInQuad' }); // Homepage infobox height adjustment. equalHeight(jQuery('.infobox-content')); //Gallerie Gallery Page Plugin jQuery("#gallery").galleria({ //showInfo: false, width: 620, height: 520, imageCrop: 'false', lightbox: true }); //Gallery Pages Sidebar Treeview Plugin jQuery("#tree").treeview({ collapsed: true, animated: "medium", control:"#sidetreecontrol", persist: "location" }); //Zebra the table jQuery(function() { jQuery(".tablezebra tr:nth-child(even)").addClass("even"); }); //Switch Languages if (jQuery('.header .switchLanguage a').text() == 'French'){ jQuery('.header .switchLanguage a').text('Français'); } //Expandable and Collapsible Content jQuery(".expand").click(function() { // Get associated div var readDiv = jQuery(this).next('div.block'); if(jQuery(readDiv).is(':hidden')) { jQuery(readDiv).slideDown(600); } else { jQuery(readDiv).slideUp(400); } }); jQuery("div.block").hide(); });