function blogNoCaret() { //Blog Never needs a caret because there is no subnav jQuery('#menu-item-286').css('background-image', 'none'); } jQuery( document ).ready(function() { //Change Top Level Links to go to secondary pages after the DOM loads. jQuery('#menu-item-269 a:first').attr('href','/about-us/'); jQuery('#menu-item-1222 a:first').attr('href','/about-us/'); jQuery('#menu-item-240 a:first').attr('href','/support-us/support-donate/'); jQuery('#menu-item-1193 a:first').attr('href','/support-us/support-donate/'); jQuery('#menu-item-1774 a:first').attr('href','/your-visit/explore-our-campus/'); jQuery('#menu-item-1776 a:first').attr('href','/your-visit/explore-our-campus/'); jQuery('#menu-item-261 a:first').attr('href','/book-your-event/discover-our-venues/'); jQuery('#menu-item-1214 a:first').attr('href','/book-your-event/discover-our-venues/'); jQuery('#menu-item-249 a:first').attr('href','/education/education-outreach-programs/'); jQuery('#menu-item-1202 a:first').attr('href','/education/education-outreach-programs/'); //on hover of main ul, active page sub ul will display jQuery('#menu-primary-menu').hover(function() { }, function() { jQuery('#menu-primary-menu li.active ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu li.active').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }); jQuery('#menu-primary-menu > li.menu-item').hover(function() { var curMenuID = jQuery(this).attr('id'); if (curMenuID == 'menu-item-286') { jQuery('#menu-primary-menu li.active ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu li.active').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); return; } jQuery('#menu-primary-menu li.active ul.sub-menu').css("display", "none"); blogNoCaret(); }, function() { blogNoCaret(); }); jQuery('#menu-primary-menu > li.active').hover(function() { jQuery('#menu-primary-menu > li.active ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu > li.active').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }, function() { jQuery('#menu-primary-menu > li.active').css("background-image", "none"); blogNoCaret(); }); jQuery('#menu-primary-menu').hover(function() { }, function() { jQuery('#menu-primary-menu > li.active').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }); //When you're on the second tier of navigation jQuery('#menu-primary-menu').hover(function() { }, function() { jQuery('#menu-primary-menu > li.current_page_parent ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu > li.current_page_parent').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }); jQuery('#menu-primary-menu > li.menu-item').hover(function() { var curMenuID = jQuery(this).attr('id'); if (curMenuID == 'menu-item-286') { jQuery('#menu-primary-menu li.active ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu li.active').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); return; } jQuery('#menu-primary-menu > li.current_page_parent ul.sub-menu').css("display", "none"); blogNoCaret(); }, function() { }); jQuery('#menu-primary-menu > li.current_page_parent').hover(function() { jQuery('#menu-primary-menu > li.current_page_parent ul.sub-menu').css("display", "block"); jQuery('#menu-primary-menu > li.current_page_parent').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }, function() { jQuery('#menu-primary-menu > li.current_page_parent').css("background-image", "none"); blogNoCaret(); }); jQuery('#menu-primary-menu').hover(function() { }, function() { jQuery('#menu-primary-menu > li.current_page_parent').css("background-image", "url('https://s3-us-west-2.amazonaws.com/tscweb/images/caret.png')"); blogNoCaret(); }); }); blogNoCaret();