var activeMenu; var timeoutMenu; var activeRotate = -1; $(document).ready(function() { //watermark search //$('div.search input').eq(0).watermark('Zoekterm'); //$('div#Login div.customForm_Row input').eq(0).watermark('Gebruikersnaam'); //$('div#Login div.customForm_Row input').eq(1).watermark('Wachtwoord'); if ($('div.controlBorder').length > 0) { $('body').addClass('backoffice'); backoffice = true; } $('div.home div.columns2 div.col2 div.content:last p:last').css('padding-bottom', '0px'); //Menu $('div#Menu div.AspNet-TreeView > ul > li:first').addClass('first'); $('div#Menu div.AspNet-TreeView > ul > li:last').addClass('last'); $('div#Submenu div.AspNet-TreeView > ul > li:last').addClass('last'); $('div#Menu div.AspNet-TreeView > ul > li').each(function() { $(this).mouseenter(function() { clearTimeout(timeoutMenu); if (activeMenu && activeMenu.index() != $(this).index()) { leaveMenu(); } activeMenu = $(this); $(this).addClass('hover'); $(this).find('ul').slideDown(300); }); }); $('div#Menu div.AspNet-TreeView').mouseleave(function() { timeoutMenu = setTimeout(leaveMenu, 300); }); //Columns $('div.columns4').each(function() { var columns = $(this).find('div.col1 div.content, div.col2 div.content, div.col3 div.content, div.col4 div.content'); var maxSize = 0; columns.each(function() { if ($(this).height() > maxSize) { maxSize = $(this).height(); } }); columns.height(maxSize); }); //Products $('div#ProductOverview div.product').each(function(index) { if ((index + 1) % 3 == 0) { $(this).addClass('breakItem'); } }); //Expand $('div.expand').each(function() { $(this).find('div.link a').click(function() { var info = $(this).parents('div.expand').find('div.info'); info.stop(true, true); info.slideToggle('slow'); }); }); //Home Rotator if ($('div#Content div#IntroRight.homeRotator').length > 0 && $('div#Content div#IntroRight.homeRotator p').length > 0 && backoffice == false) { $('div#Content div#IntroRight.homeRotator').append('