webroot/pages/assets/js/script.js
function activateNav(pos){
		var offset = 100,
		current, next, parent, isSub, hasSub;
		win.unbind('hashchange', hashchange);
		for(var i=sectionscount;i>0;i--){
			if(sections[i-1].pos <= pos+offset){
				navanchors.removeClass('current');
				current = navanchors.eq(i-1);
				current.addClass('current');
				
				parent = current.parent().parent();
				next = current.next();
				
				hasSub = next.is('ul');
				isSub = !parent.is('#documenter_nav');
				
				nav.find('ol:visible').not(parent).slideUp('fast');
				if(isSub){
					parent.prev().addClass('current');
					parent.stop().slideDown('fast');
				}else if(hasSub){
					next.stop().slideDown('fast');
				}
				win.bind('hashchange', hashchange);
				break;
			};
		}	
	}
function activateNav(pos){
		var offset = 100,
		current, next, parent, isSub, hasSub;
		win.unbind('hashchange', hashchange);
		for(var i=sectionscount;i>0;i--){
			if(sections[i-1].pos <= pos+offset){
				navanchors.removeClass('current');
				current = navanchors.eq(i-1);
				current.addClass('current');
				
				parent = current.parent().parent();
				next = current.next();
				
				hasSub = next.is('ul');
				isSub = !parent.is('#documenter_nav');
				
				nav.find('ol:visible').not(parent).slideUp('fast');
				if(isSub){
					parent.prev().addClass('current');
					parent.stop().slideDown('fast');
				}else if(hasSub){
					next.stop().slideDown('fast');
				}
				win.bind('hashchange', hashchange);
				break;
			};
		}	
	}
function activateNav ( pos ) { var offset = 100 , current , next , parent , isSub , hasSub ; win . unbind ( 'hashchange' , hashchange ) ; for ( var i = sectionscount ; i > 0 ; i -- ) { if ( sections [ i - 1 ] . pos <= pos + offset ) { navanchors . removeClass ( 'current' ) ; current = navanchors . eq ( i - 1 ) ; current . addClass ( 'current' ) ; parent = current . parent ( ) . parent ( ) ; next = current . next ( ) ; hasSub = next . is ( 'ul' ) ; isSub = ! parent . is ( '#documenter_nav' ) ; nav . find ( 'ol:visible' ) . not ( parent ) . slideUp ( 'fast' ) ; if ( isSub ) { parent . prev ( ) . addClass ( 'current' ) ; parent . stop ( ) . slideDown ( 'fast' ) ; } else if ( hasSub ) { next . stop ( ) . slideDown ( 'fast' ) ; } win . bind ( 'hashchange' , hashchange ) ; break ; } ; } }
activate current nav element
activate current nav element