ÿþ/ / * *   D r i l l   D o w n   M e n u   v 1 . 0 -   ( c )   D y n a m i c   D r i v e   D H T M L   c o d e   l i b r a r y :   h t t p : / / w w w . d y n a m i c d r i v e . c o m  
 / / * *   S c r i p t   D o w n l o a d /   i n s t r u c t i o n s   p a g e :   h t t p : / / w w w . d y n a m i c d r i v e . c o m / d y n a m i c i n d e x 1 / d r i l l d o w n m e n u . h t m  
 / / * *   J u n e   8 t h ,   2 0 0 9 :   S c r i p t   C r e a t i o n   d a t e  
 / / * *   J u n e   1 0 t h ,   2 0 0 9 :   v 1 . 0 1 :   M i n o r   u p d a t e  
  
 / / V e r s i o n   1 . 5 :   J u n e   2 1 s t ,   0 9 ' :  
 / / * * 1 )   A b i l i t y   t o   i n c l u d e   m e n u   f r o m   e x t e r n a l   f i l e   a n d   a d d e d   t o   p a g e   v i a   A j a x  
 / / * * 2 )   A d d s   s u p p o r t   f o r   a r b i t r a r y   l i n k s   t o   a c t   a s   " b a c k   b u t t o n s "   f o r   a   d r i l l   m e n u .   J u s t   g i v e   t h e   l i n k   a   r e l = " d r i l l b a c k - m e n u i d "   a t t r i b u t e  
 / / * * 3 )   A d d s   d r i l l m e n u i n s t a n c e . b a c k ( )   m e t h o d ,   w h i c h   c a n   b e   c a l l e d   o n   d e m a n d   t o   g o   b a c k   o n e   l e v e l   w i t h i n   d r i l l   m e n u  
 / / * * 4 )   F i x e s   b u g   w i t h   b a c k g r o u n d   U L s   b e i n g   v i s i b l e   f o l l o w i n g   f o r e g r o u n d   U L   c o n t e n t s  
 / / * * 5 )   U p d a t e d   c s s   s o   b r o w s e r s   w i t h   J S   d i s a b l e d   w i l l   g e t   a   s c r o l l i n g ,   f i x e d   h e i g h t   U L  
  
 / / V e r s i o n   1 . 6 :   A u g u s t   9 t h ,   0 9 ' :   A d d s   a b i l i t y   t o   s p e c i f y   e x p l i c i t   h e i g h t   f o r   m a i n   m e n u ,   i n s t e a d   o f   d e f a u l t i n g   t o   t o p   U L ' s   n a t u r a l   h e i g h t .  
  
  
 f u n c t i o n   d r i l l d o w n m e n u ( s e t t i n g ) {  
 	 t h i s . s u b l e v e l a r r o w = { s r c : ' i n d e x / r i g h t . g i f ' ,   w i d t h : ' 8 p x ' ,   t o p : ' 3 p x ' ,   l e f t : ' 6 p x ' }   / / f u l l   U R L   t o   i m a g e   u s e d   t o   i n d i c a t e   t h e r e ' s   a   s u b   l e v e l  
 	 t h i s . b r e a d c r u m b a r r o w = ' i n d e x / r i g h t . g i f '   / / f u l l   U R L   t o   i m a g e   s e p a r a t i n g   b r e a d c r u m b   l i n k s   ( i f   i t ' s   d e f i n e d )  
 	 t h i s . l o a d i n g i m a g e = ' i n d e x l o a d e r . g i f '   / / f u l l   U R L   t o   ' l o a d i n g '   i m a g e ,   i f   m e n u   i s   l o a d e d   v i a   A j a x  
 	 t h i s . h o m e c r u m b t e x t = ' < i m g   s r c = i n d e x / b a s l i k l a r / m a r k a l a r . j p g > '   / / T o p   l e v e l   c r u m b   t e x t  
 	 t h i s . t i t l e l e n g t h = 3 5   / / l e n g t h   o f   p a r e n t   L I   t e x t   t o   e x t r a c t   f r o m   t o   u s e   a s   c r u m b   t i t l e s  
 	 t h i s . b a c k a r r o w = ' i n d e x / l e f t a r r o w . g i f '   / / f u l l   U R L   t o   i m a g e   a d d e d   i n   f r o n t   o f   b a c k   L I    
  
 	 / / / / / / / / / /   N o   n e e d   t o   e d i t   b e y o n d   h e r e   / / / / / / / / / / / / /  
 	 t h i s . m e n u i d = s e t t i n g . m e n u i d  
 	 t h i s . $ m e n u d i v = n u l l  
 	 t h i s . m a i n u l = n u l l  
 	 t h i s . $ u l s = n u l l  
 	 t h i s . n a v d i v s = { }  
 	 t h i s . m e n u h e i g h t = s e t t i n g . m e n u h e i g h t   | |   ' a u t o '  
 	 t h i s . s e l e c t e d u l = s e t t i n g . s e l e c t e d u l   | |   n u l l  
 	 t h i s . s p e e d = s e t t i n g . s p e e d   | |   7 0  
 	 t h i s . p e r s i s t = s e t t i n g . p e r s i s t   | |   { e n a b l e :   f a l s e ,   o v e r r i d e s e l e c t e d u r l :   f a l s e }  
 	 t h i s . $ a r r o w i m g s = n u l l  
 	 t h i s . c u r r e n t u l = 0  
 	 t h i s . f i l e s e t t i n g = s e t t i n g . f i l e s e t t i n g   | |   { u r l :   n u l l ,   t a r g e t E l e m e n t :   n u l l }  
 	 t h i s . z I n d e x v a l u e = 1 0 0  
 	 t h i s . a r r o w p o s x = 0   / / d e f a u l t   a r r o w   x   p o s i t i o n   r e l a t i v e   t o   p a r e n t   L I  
 	 v a r   t h i s d r i l l = t h i s  
 	 j Q u e r y . n o C o n f l i c t ( )  
 	 j Q u e r y ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( $ ) {  
 	 	 i f   ( t h i s d r i l l . f i l e s e t t i n g . u r l   & &   t h i s d r i l l . f i l e s e t t i n g . u r l . l e n g t h > 0 ) {   / / m e n u   d e f i n e d   i n s i d e   e x t e r n a l   f i l e   ( u s e   A j a x ) ?  
 	 	 	 v a r   $ d e s t = ( t y p e o f   t h i s d r i l l . f i l e s e t t i n g . t a r g e t E l e m e n t = = " s t r i n g " ) ?   $ ( ' # ' + t h i s d r i l l . f i l e s e t t i n g . t a r g e t E l e m e n t )   :   n u l l  
 	 	 	 i f   ( ! $ d e s t   | |   $ d e s t . l e n g t h ! = 1 ) {   / / i f   t a r g e t   e l e m e n t   i s n ' t   d e f i n e d   o r   m u l t i p l e   t a r g e t s   f o u n d  
 	 	 	 	 a l e r t ( " E r r o r :   T h e   t a r g e t   e l e m e n t   \ " "   +   t h i s d r i l l . f i l e s e t t i n g . t a r g e t E l e m e n t   +   " \ "   t o   a d d   t h e   m e n u   i n t o   d o e s n ' t   e x i s t   o r   i s   i n c o r r e c t l y   s p e c i f i e d . " )  
 	 	 	 	 r e t u r n  
 	 	 	 }  
 	 	 	 $ d e s t . h t m l ( ' < i m g   s r c = " ' + t h i s d r i l l . l o a d i n g i m a g e + ' "   s t y l e = " v e r t i c a l - a l i g n : m i d d l e "   / >   < b > L o a d i n g   D r i l l   D o w n   M e n u . . . < / b > ' )  
 	 	 	 $ . a j a x ( {  
 	 	 	 	 u r l :   t h i s d r i l l . f i l e s e t t i n g . u r l ,  
 	 	 	 	 e r r o r : f u n c t i o n ( a j a x r e q u e s t ) {  
 	 	 	 	 	 a l e r t ( ' E r r o r   f e t c h i n g   A j a x   c o n t e n t . \ n S e r v e r   R e s p o n s e :   ' + a j a x r e q u e s t . r e s p o n s e T e x t )  
 	 	 	 	 } ,   / / e n d   e r r o r  
 	 	 	 	 s u c c e s s : f u n c t i o n ( c o n t e n t ) {  
 	 	 	 	 	 $ d e s t . h t m l ( c o n t e n t )  
 	 	 	 	 	 t h i s d r i l l . i n i t ( $ ,   s e t t i n g )  
 	 	 	 	 }   / / e n d   s u c c e s s  
 	 	 	 } )   / / e n d   a j a x  
 	 	 }  
 	 	 e l s e {   / / i f   i n l i n e   m e n u  
 	 	 	 t h i s d r i l l . i n i t ( $ ,   s e t t i n g )  
 	 	 }  
 	 } )   / / e n d   d o c u m e n t . r e a d y  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . i n i t = f u n c t i o n ( $ ,   s e t t i n g ) {  
 	 	 v a r   t h i s d r i l l = t h i s  
 	 	 v a r   $ m a i n d i v = $ ( ' # ' + s e t t i n g . m e n u i d ) . c s s ( { p o s i t i o n : ' r e l a t i v e ' } )   / / r e l a t i v e   p o s i t i o n   m a i n   D I V  
 	 	 v a r   $ u l s = $ m a i n d i v . f i n d ( ' u l ' )  
 	 	 $ u l s . c s s ( { p o s i t i o n : ' a b s o l u t e ' ,   l e f t : 0 ,   t o p : 0 ,   v i s i b i l i t y : ' h i d d e n ' } )   / / a b s o l u t e l y   p o s i t i o n   U L s  
 	 	 t h i s . $ m a i n d i v = $ m a i n d i v  
 	 	 t h i s . $ u l s = $ u l s  
 	 	 t h i s . n a v d i v s . $ c r u m b = $ ( ' # ' + s e t t i n g . b r e a d c r u m b i d )  
 	 	 t h i s . n a v d i v s . $ b a c k b u t t o n s = $ ( ' a [ r e l ^ = " d r i l l b a c k - ' + s e t t i n g . m e n u i d + ' " ] ' ) . c s s ( { o u t l i n e : ' n o n e ' } ) . c l i c k ( f u n c t i o n ( e ) {  
 	 	 	 t h i s d r i l l . b a c k ( )  
 	 	 	 e . p r e v e n t D e f a u l t ( )  
 	 	 } )  
 	 	 t h i s . b u i l d m e n u ( $ )  
 	 	 $ ( w i n d o w ) . b i n d ( ' u n l o a d ' ,   f u n c t i o n ( ) {  
 	 	 	 t h i s d r i l l . u n i n i t ( )  
 	 	 } )  
 	 	 s e t t i n g = n u l l 	  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . b u i l d m e n u = f u n c t i o n ( $ ) {  
 	 v a r   t h i s d r i l l = t h i s  
 	 t h i s . $ u l s . e a c h ( f u n c t i o n ( i ) {   / / l o o p   t h r o u g h   e a c h   U L  
 	 	 v a r   $ t h i s u l = $ ( t h i s )  
 	 	 i f   ( i = = 0 ) {   / / i f   t o p m o s t   U L  
 	 	 	 $ ( ' < l i   c l a s s = " b a c k c o n t r o l t i t l e " > O t o b ü s   M a r k a l a r 1< / l i > ' ) . p r e p e n d T o ( $ t h i s u l ) . c l i c k ( f u n c t i o n ( e ) { e . p r e v e n t D e f a u l t ( ) } )  
 	 	 	 t h i s d r i l l . $ m a i n d i v . c s s ( { h e i g h t : ( t h i s d r i l l . m e n u h e i g h t = = ' a u t o ' ) ?   $ t h i s u l . o u t e r H e i g h t ( )   :   p a r s e I n t ( t h i s d r i l l . m e n u h e i g h t ) ,   o v e r f l o w : ' h i d d e n ' } )   / / s e t   m a i n   m e n u   D I V ' s   h e i g h t   t o   t o p   l e v e l   U L ' s   h e i g h t  
 	 	 	 	 . d a t a ( ' h ' ,   p a r s e I n t ( t h i s d r i l l . $ m a i n d i v . c s s ( ' h e i g h t ' ) ) )  
 	 	 	  
 	 	 }  
 	 	 e l s e {   / / i f   t h i s   i s n ' t   t h e   t o p m o s t   U L  
 	 	 	 v a r   $ p a r e n t u l = $ t h i s u l . p a r e n t s ( ' u l : e q ( 0 ) ' )  
 	 	 	 v a r   $ p a r e n t l i = $ t h i s u l . p a r e n t s ( ' l i : e q ( 0 ) ' )  
 	 	 	 $ ( ' < l i   c l a s s = " b a c k c o n t r o l " > < i m g   s r c = " ' + t h i s d r i l l . b a c k a r r o w + ' "   s t y l e = " b o r d e r - w i d t h : 0 "   / >   G e r i   D ö n < / l i > ' )   / / a d d   b a c k   L I   i t e m  
 	 	 	 	 . c l i c k ( f u n c t i o n ( e ) { t h i s d r i l l . b a c k ( ) ;   e . p r e v e n t D e f a u l t ( ) } )  
 	 	 	 	 . p r e p e n d T o ( $ t h i s u l )  
 	 	 	 v a r   $ a n c h o r l i n k = $ p a r e n t l i . c h i l d r e n ( ' a : e q ( 0 ) ' ) . c s s ( { o u t l i n e : ' n o n e ' } ) . d a t a ( ' c o n t r o l ' ,   { o r d e r : i } )   / / r e m o v e   o u t l i n e   f r o m   a n c h o r   l i n k s  
 	 	 	 v a r   $ a r r o w i m g = $ ( ' < i m g   c l a s s = " a r r o w c l a s s "   / > ' ) . a t t r ( ' s r c ' ,   t h i s d r i l l . s u b l e v e l a r r o w . s r c ) . c s s ( { p o s i t i o n : ' a b s o l u t e ' ,   b o r d e r W i d t h : 0 ,   p a d d i n g T o p : t h i s d r i l l . s u b l e v e l a r r o w . t o p ,   l e f t : $ p a r e n t l i . w i d t h ( ) - p a r s e I n t ( t h i s d r i l l . s u b l e v e l a r r o w . w i d t h ) - p a r s e I n t ( t h i s d r i l l . s u b l e v e l a r r o w . l e f t ) } ) . p r e p e n d T o ( $ a n c h o r l i n k )  
 	 	 	 $ a n c h o r l i n k . c l i c k ( f u n c t i o n ( e ) {   / / a s s i g n   c l i c k   b e h a v i o r   t o   a n c h o r   l i n k  
 	 	 	 	 t h i s d r i l l . s l i d e m e n u ( j Q u e r y ( t h i s ) . d a t a ( ' c o n t r o l ' ) . o r d e r )  
 	 	 	 	 e . p r e v e n t D e f a u l t ( )  
 	 	 	 } )  
 	 	 }  
 	 	 v a r   u l h e i g h t = ( $ t h i s u l . o u t e r H e i g h t ( )   <   t h i s d r i l l . $ m a i n d i v . d a t a ( ' h ' ) ) ?   t h i s d r i l l . $ m a i n d i v . d a t a ( ' h ' )   :   ' a u t o '  
 	 	 $ t h i s u l . c s s ( { v i s i b i l i t y : ' v i s i b l e ' ,   w i d t h : ' 1 0 0 % ' ,   h e i g h t : u l h e i g h t ,   l e f t : ( i = = 0 ) ?   ' a u t o '   :   $ p a r e n t l i . o u t e r W i d t h ( ) ,   t o p : 0 } )  
 	 	 $ t h i s u l . d a t a ( ' s p e c s ' ,   { w : $ t h i s u l . o u t e r W i d t h ( ) ,   h : $ t h i s u l . o u t e r H e i g h t ( ) ,   o r d e r : i ,   p a r e n t o r d e r : ( i = = 0 ) ?   - 1   :   $ a n c h o r l i n k . p a r e n t s ( ' u l : e q ( 0 ) ' ) . d a t a ( ' s p e c s ' ) . o r d e r ,   x : ( i = = 0 ) ?   $ t h i s u l . p o s i t i o n ( ) . l e f t   :   $ p a r e n t u l . d a t a ( ' s p e c s ' ) . x + $ p a r e n t u l . d a t a ( ' s p e c s ' ) . w ,   t i t l e : ( i = = 0 ) ?   t h i s d r i l l . h o m e c r u m b t e x t   :   $ p a r e n t l i . f i n d ( ' a : e q ( 0 ) ' ) . t e x t ( ) . s u b s t r i n g ( 0 ,   t h i s d r i l l . t i t l e l e n g t h ) } )  
 	 } )   / / e n d   U L   l o o p  
 	 v a r   s e l e c t e d u l c h e c k = t h i s . s e l e c t e d u l   & &   d o c u m e n t . g e t E l e m e n t B y I d ( t h i s . s e l e c t e d u l )   / / c h e c k   i f   " s e l e c t e d u l "   d e f i n e d ,   p l u s   i f   a c t u a l   e l e m e n t   e x i s t s  
 	 t h i s . $ a r r o w i m g s = t h i s . $ m a i n d i v . f i n d ( ' i m g . a r r o w c l a s s ' )  
 	 t h i s . a r r o w p o s x = p a r s e I n t ( t h i s . $ a r r o w i m g s . e q ( 0 ) . c s s ( ' l e f t ' ) )   / / g e t   d e f a u l t   x   p o s i t i o n   o f   a r r o w  
 	 i f   ( w i n d o w . o p e r a )  
 	 	 t h i s . $ u l s . e q ( 0 ) . c s s ( { z I n d e x :   t h i s . z I n d e x v a l u e } )   / / O p e r a   s e e m s   t o   r e q u i r e   t h i s   i n   o r d e r   f o r   t o p   l e v e l   a r r o w s   t o   s h o w  
 	 i f   ( t h i s . p e r s i s t . e n a b l e   & &   ( t h i s . p e r s i s t . o v e r r i d e s e l e c t e d u l   | |   ! t h i s . p e r s i s t . o v e r r i d e s e l e c t e d u l   & &   ! s e l e c t e d u l c h e c k )   & &   d r i l l d o w n m e n u . r o u t i n e s . g e t C o o k i e ( t h i s . m e n u i d ) ) {   / / g o   t o   l a s t   p e r s i s t e d   U L ?  
 	 	 v a r   u l o r d e r = p a r s e I n t ( d r i l l d o w n m e n u . r o u t i n e s . g e t C o o k i e ( t h i s . m e n u i d ) )  
 	 	 t h i s . s l i d e m e n u ( u l o r d e r ,   t r u e )  
 	 }  
 	 e l s e   i f   ( s e l e c t e d u l c h e c k ) {   / / i f   " s e l e c t e d u l "   s e t t i n g   d e f i n e d ,   s l i d e   t o   t h a t   U L   b y   d e f a u l t  
 	 	 v a r   u l o r d e r = $ ( ' # ' + t h i s . s e l e c t e d u l ) . d a t a ( ' s p e c s ' ) . o r d e r  
 	 	 t h i s . s l i d e m e n u ( u l o r d e r ,   t r u e )  
 	 }  
 	 e l s e {  
 	 	 t h i s . s l i d e m e n u ( 0 ,   t r u e )  
 	 }  
 	 t h i s . n a v d i v s . $ c r u m b . c l i c k ( f u n c t i o n ( e ) {   / / a s s i g n   c l i c k   b e h a v i o r   t o   b r e a d c r u m b   d i v  
 	 	 i f   ( e . t a r g e t . t a g N a m e = = " A " ) {  
 	 	 	 v a r   o r d e r = p a r s e I n t ( e . t a r g e t . g e t A t t r i b u t e ( ' r e l ' ) )  
 	 	 	 i f   ( ! i s N a N ( o r d e r ) ) {   / / c h e c k   l i n k   c o n t a i n s   a   v a l i d   r e l   a t t r i b u t e   i n t   v a l u e   ( i s   a n c h o r   l i n k )  
 	 	 	 	 t h i s d r i l l . s l i d e m e n u ( o r d e r )  
 	 	 	 	 e . p r e v e n t D e f a u l t ( )  
 	 	 	 }  
 	 	 }  
 	 } )  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . s l i d e m e n u = f u n c t i o n ( o r d e r ,   d i s a b l e a n i m a t e ) {  
 	 v a r   o r d e r = i s N a N ( o r d e r ) ?   0   :   o r d e r  
 	 t h i s . $ u l s . c s s ( { d i s p l a y :   ' n o n e ' } )  
 	 v a r   $ t a r g e t u l = t h i s . $ u l s . e q ( o r d e r ) . c s s ( { z I n d e x :   t h i s . z I n d e x v a l u e + + } )  
 	 $ t a r g e t u l . p a r e n t s ( ' u l ' ) . a n d S e l f ( ) . c s s ( { d i s p l a y :   ' b l o c k ' } )  
 	 t h i s . c u r r e n t u l = o r d e r  
 	 i f   ( $ t a r g e t u l . d a t a ( ' s p e c s ' ) . h   >   t h i s . $ m a i n d i v . d a t a ( ' h ' ) ) {  
 	 	 t h i s . $ m a i n d i v . c s s ( { o v e r f l o w Y : ' a u t o ' } ) . s c r o l l T o p ( 0 )  
 	 	 t h i s . $ a r r o w i m g s . c s s ( ' l e f t ' ,   t h i s . a r r o w p o s x - 1 5 )   / / a d j u s t   a r r o w   p o s i t i o n   i f   s c r o l l b a r   i s   a d d e d  
 	 }  
 	 e l s e {  
 	 	 t h i s . $ m a i n d i v . c s s ( { o v e r f l o w Y :   ' h i d d e n ' } ) . s c r o l l T o p ( 0 )  
 	 	 t h i s . $ a r r o w i m g s . c s s ( ' l e f t ' ,   t h i s . a r r o w p o s x )  
 	 }  
 	 t h i s . u p d a t e n a v ( $ ,   o r d e r )  
 	 t h i s . $ u l s . e q ( 0 ) . a n i m a t e ( { l e f t : - $ t a r g e t u l . d a t a ( ' s p e c s ' ) . x } ,   t y p e o f   d i s a b l e a n i m a t e ! = " u n d e f i n e d " ?   0   :   t h i s . s p e e d )  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . b a c k = f u n c t i o n ( ) {  
 	 i f   ( t h i s . c u r r e n t u l > 0 ) {  
 	 	 v a r   o r d e r = t h i s . $ u l s . e q ( t h i s . c u r r e n t u l ) . p a r e n t s ( ' u l : e q ( 0 ) ' ) . d a t a ( ' s p e c s ' ) . o r d e r  
 	 	 t h i s . s l i d e m e n u ( o r d e r )  
 	 }  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . u p d a t e n a v = f u n c t i o n ( $ ,   e n d o r d e r ) {  
 	 v a r   $ c u r r e n t u l = t h i s . $ u l s . e q ( e n d o r d e r )  
 	 i f   ( t h i s . n a v d i v s . $ c r u m b . l e n g t h = = 1 ) {   / / i f   b r e a d c r u m b   d i v   d e f i n e d  
 	 	 v a r   $ c r u m b = t h i s . n a v d i v s . $ c r u m b . e m p t y ( )  
 	 	 i f   ( e n d o r d e r > 0 ) {   / / i f   t h i s   i s n ' t   t h e   t o p m o s t   U L   ( n o   p o i n t   i n   s h o w i n g   c r u m b s   i f   i t   i s )  
 	 	 	 v a r   c r u m b h t m l = ' '  
 	 	 	 w h i l e   ( $ c u r r e n t u l   & &   $ c u r r e n t u l . d a t a ( ' s p e c s ' ) . o r d e r > = 0 ) {  
 	 	 	 	 c r u m b h t m l = '   < i m g   s r c = " ' + t h i s . b r e a d c r u m b a r r o w + ' "   / >   < a   h r e f = " # n a v "   r e l = " ' + $ c u r r e n t u l . d a t a ( ' s p e c s ' ) . o r d e r + ' " > ' + $ c u r r e n t u l . d a t a ( ' s p e c s ' ) . t i t l e + ' < / a > ' + c r u m b h t m l  
 	 	 	 	 $ c u r r e n t u l = ( $ c u r r e n t u l . d a t a ( ' s p e c s ' ) . o r d e r > 0 ) ?   t h i s . $ u l s . e q ( $ c u r r e n t u l . d a t a ( ' s p e c s ' ) . p a r e n t o r d e r )   :   n u l l  
 	 	 	 }  
 	 	 	 $ c r u m b . a p p e n d ( c r u m b h t m l ) . f i n d ( ' i m g : e q ( 0 ) ' ) . r e m o v e ( ) . e n d ( ) . f i n d ( ' a : l a s t ' ) . r e p l a c e W i t h ( t h i s . $ u l s . e q ( e n d o r d e r ) . d a t a ( ' s p e c s ' ) . t i t l e )   / / r e m o v e   l i n k   f r o m   v e r y   l a s t   c r u m b   t r a i l  
 	 	 }  
 	 	 e l s e {  
 	 	 	 $ c r u m b . a p p e n d ( t h i s . h o m e c r u m b t e x t )  
 	 	 }  
 	 }  
 	 i f   ( t h i s . n a v d i v s . $ b a c k b u t t o n s . l e n g t h > 0 ) {   / / i f   b a c k   b u t t o n s   f o u n d  
 	 	 i f 	 ( ! / S a f a r i / i . t e s t ( n a v i g a t o r . u s e r A g e n t ) )   / / e x c l u d e   S a f a r i   f r o m   b u t t o n   s t a t e   t o g g l i n g   d u e   t o   b u g   w h e n   t h e   b u t t o n   i s   a n   i m a g e   l i n k  
 	 	 	 t h i s . n a v d i v s . $ b a c k b u t t o n s . c s s ( ( e n d o r d e r > 0 ) ?   { o p a c i t y : 1 ,   c u r s o r : ' p o i n t e r ' }   :   { o p a c i t y : 0 . 5 ,   c u r s o r : ' d e f a u l t ' } )  
 	 }  
 }  
  
 d r i l l d o w n m e n u . p r o t o t y p e . u n i n i t = f u n c t i o n ( ) {  
 	 i f   ( t h i s . p e r s i s t . e n a b l e )  
 	 	 d r i l l d o w n m e n u . r o u t i n e s . s e t C o o k i e ( t h i s . m e n u i d ,   t h i s . c u r r e n t u l )  
 }  
  
 d r i l l d o w n m e n u . r o u t i n e s = {  
  
 	 g e t C o o k i e : f u n c t i o n ( N a m e ) {    
 	 	 v a r   r e = n e w   R e g E x p ( N a m e + " = [ ^ ; ] * " ,   " i " ) ;   / / c o n s t r u c t   R E   t o   s e a r c h   f o r   t a r g e t   n a m e / v a l u e   p a i r  
 	 	 i f   ( d o c u m e n t . c o o k i e . m a t c h ( r e ) )   / / i f   c o o k i e   f o u n d  
 	 	 	 r e t u r n   d o c u m e n t . c o o k i e . m a t c h ( r e ) [ 0 ] . s p l i t ( " = " ) [ 1 ]   / / r e t u r n   i t s   v a l u e  
 	 	 r e t u r n   n u l l  
 	 } ,  
  
 	 s e t C o o k i e : f u n c t i o n ( n a m e ,   v a l u e ) {  
 	 	 d o c u m e n t . c o o k i e   =   n a m e + " = " + v a l u e + " ;   p a t h = / "  
 	 }  
  
 }  
 
