	jQuery (document).ready(function($){
            $('#menu_container a[href='+window.location.pathname+']').parent().addClass('current-page-top');

            // this is different to the one above.
            $('#menu_container a').click(function() {
                $(this).addClass('current-page-top');
            });
            $('ul#nav').superfish({
                        pathLevels:    2,                  // the number of levels of submenus that remain open or are restored using pathClass
                        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
                        speed:       'fast',                          // faster animation speed 
                        autoArrows:  false,                           // disable generation of arrow mark-up 
                        dropShadows: false                            // disable drop shadows 
            });
            $('#nav>li>ul>li').hover(function() {
               $(this).parent().parent().addClass('current-page-top');
            }, function() {
               $('#nav .current-page-top').removeClass('current-page-top');
            });
			$('#carousel').infiniteCarousel({
				displayTime: 6000,
				inView:1,
				advance:1,
				thumbnailWidth: '112px',
				thumbnailHeight: '75px',
				imagePath: '/sites/public/155/resources/filemanager/template/infinitecarousel2/images/',
				textholderHeight : .20,
				padding:'0px'
            });

function dropdownrow() {
				$('.current-page-top').addClass('currently-open');
		
				$('.currently-open').unbind('mouseenter').unbind('mouseleave');
				$('.currently-open > ul').css({
				   'display':'block',
				   'visibility': 'visible',
				   'left': 'auto'
				});
}
				

            $('#nav > li:not(.currently-open)').hover(dropdownrow);

	});


