ÿþ/ / * * * * *   C o u r s e   S e a r c h   H o m e p a g e   A c c o r d i a n   * * * * *  
 / / h i d e s   e v e r y t h i n g  
 f u n c t i o n   h i d e A l l ( )  
 {  
         h i d e A l l T a b s ( ) ;  
         h i d e A l l P a n e s ( ) ;  
         h i d e A l l S u b p a n e s ( ) ;  
 }  
 / / h i d s   a l l   p a n e s  
 f u n c t i o n   h i d e A l l P a n e s ( )  
 {  
         $ ( ' . a c c o r d i a n _ p a n e ' ) . h i d e ( ) ;  
 }  
 / / h i d e s   a l l   s u b p a n e s  
 f u n c t i o n   h i d e A l l S u b p a n e s ( )  
 {  
         $ ( ' . a c c o r d i a n _ s u b p a n e ' ) . h i d e ( ) ;  
 }  
 / / h i d e s   a l l   t a b s  
 f u n c t i o n   h i d e A l l T a b s ( )  
 {  
         $ ( ' u l . a c c o r d i o n _ t a b ' ) . h i d e ( ) ;  
 }  
 / / c l o s e s   a l l   t h e   o p e n   t a b s  
 f u n c t i o n   c l o s e T a b ( )  
 {  
         / / h i d e   e v e r y t h i n g  
         $ ( ' . a c c o r d i o n _ t a b : v i s i b l e ' ) . s l i d e U p ( ' f a s t ' ) ;  
 }  
 / / o p e n s   u p   a   s p e c i f i c   t a b   w i t h   a n i m a t i o n  
 f u n c t i o n   o p e n T a b ( p r e f i x )  
 {  
         / / s h o w   t h e   a c c o r d i o n   t a b   w i t h   t h e   p r e f i x  
         $ ( ' # d e t a i l _ '   +   p r e f i x ) . s l i d e D o w n ( ' m e d i u m ' ) ;  
 }  
 / / s h o w s   t h e   s h o r t   c o u r s e   p a n e   d e p e n d a n t   o n   t h e    
 f u n c t i o n   s h o w S h o r t P a n e ( p r e f i x )  
 {  
         / / s h o w   t h e   s h o r t   p a n e  
         s h o w P a n e ( ' s h o r t ' ) ;  
         / / u n - h i g h l i g h t   t h e   t a b s  
         u n H i g h i g h t S h o r t T a b s ( ) ;  
         / / c r e a t e   p l a c e s   t o   s t o r e   t h e   t a b   a n d   p a n e   o b j e c t  
         v a r   t a b ;  
         v a r   p a n e ;  
         / / c h e c k   f o r   s h o r t   -   t h i s   i s   f r o m   s e l e c t i o n   o n   t h e   l e f t - h a n d   s i d e  
         i f   ( p r e f i x   = =   ' s h o r t ' )  
         {  
                 / / g e t   t h e   f i r s t   s u b t a b   i n   t h e   p a n e  
                 t a b   =   $ ( ' # s h o r t _ t a b s   l i : f i r s t ' ) ;  
                 / / g e t   t h e   p r e f i x   o u t   o f   t h e   f i r s t   t a b   ( a s   i t   c o u l d   b e   e i t h e r   s e c t o r   o r   p r o f )  
                 p a n e   =   t a b . a t t r ( ' i d ' ) ;  
                 p a n e   =   p a n e . r e p l a c e ( ' l i _ ' ,   ' ' ) ;  
                 p a n e   =   p a n e . r e p l a c e ( ' _ t a b ' ,   ' ' ) ;  
         }  
         e l s e  
         {  
                 / / t h i s   w i l l   d e a l   w i t h   s e c t o r   a n d   p r o f e s s i o n  
                 v a r   t a b   =   $ ( ' # l i _ '   +   p r e f i x   +   ' _ t a b ' ) ;  
                 p a n e   =   p r e f i x ;  
         }  
         / / c h e c k   t h e   t a b  
         i f   ( t a b )  
         {  
                 / / h i g h l i g h t   i t  
                 h i g h i g h t S e c o n d a r y T a b s ( t a b ) ;  
         }  
         / / c h e c k   t h e   p a n e  
         i f   ( p a n e )  
         {  
                 / / s h o w   t h e   s u b p a n e  
                 s h o w S u b P a n e ( p a n e ) ;  
         }  
 }  
 / / s h o w s   t h e   s h o r t   c o u r s e   p a n e   d e p e n d a n t   o n   t h e    
 f u n c t i o n   s h o w R e s e a r c h P a n e ( p r e f i x )  
 {  
         / / s h o w   t h e   s h o r t   p a n e  
         s h o w P a n e ( ' p g r ' ) ;  
         / / u n - h i g h l i g h t   t h e   t a b s  
         u n H i g h i g h t R e s e a r c h T a b s ( ) ;  
         / / c r e a t e   p l a c e s   t o   s t o r e   t h e   t a b   a n d   p a n e   o b j e c t  
         v a r   t a b ;  
         v a r   p a n e ;  
         / / c h e c k   f o r   s h o r t   -   t h i s   i s   f r o m   s e l e c t i o n   o n   t h e   l e f t - h a n d   s i d e  
         i f   ( p r e f i x   = =   ' p g r ' )  
         {  
                 / / g e t   t h e   f i r s t   s u b t a b   i n   t h e   p a n e  
                 t a b   =   $ ( ' # p g r _ t a b s   l i : f i r s t ' ) ;  
                 / / g e t   t h e   p r e f i x   o u t   o f   t h e   f i r s t   t a b   ( a s   i t   c o u l d   b e   e i t h e r   s e c t o r   o r   p r o f )  
                 p a n e   =   t a b . a t t r ( ' i d ' ) ;  
                 p a n e   =   p a n e . r e p l a c e ( ' l i _ ' ,   ' ' ) ;  
                 p a n e   =   p a n e . r e p l a c e ( ' _ t a b ' ,   ' ' ) ;  
         }  
         e l s e  
         {  
                 / / t h i s   w i l l   d e a l   w i t h   s e c t o r   a n d   p r o f e s s i o n  
                 v a r   t a b   =   $ ( ' # l i _ '   +   p r e f i x   +   ' _ t a b ' ) ;  
                 p a n e   =   p r e f i x ;  
         }  
         / / c h e c k   t h e   t a b  
         i f   ( t a b )  
         {  
                 / / h i g h l i g h t   i t  
                 h i g h i g h t S e c o n d a r y T a b s ( t a b ) ;  
         }  
         / / c h e c k   t h e   p a n e  
         i f   ( p a n e )  
         {  
                 / / s h o w   t h e   s u b p a n e  
                 s h o w S u b P a n e ( p a n e ) ;  
         }  
 }  
 / / s h o w s   t h e   p a n e   s e l e c t e d  
 f u n c t i o n   s h o w P a n e ( p r e f i x )  
 {  
         $ ( ' # p a n e _ '   +   p r e f i x ) . s h o w ( ) ;  
 }  
 / / s h o w s   t h e   s u b p a n e   s e l e c t e d  
 f u n c t i o n   s h o w S u b P a n e ( p r e f i x )  
 {  
         $ ( ' # s u b p a n e _ '   +   p r e f i x ) . s h o w ( ) ;  
 }  
 / / u n - h i g h l i g h t s   a l l   t h e   t a b s  
 f u n c t i o n   u n H i g h i g h t S h o r t T a b s ( )  
 {  
         $ ( ' # s h o r t _ t a b s   l i ' ) . r e m o v e C l a s s ( ' t a b s - s e l e c t e d ' ) ;  
 }  
 / / u n - h i g h l i g h t s   a l l   t h e   t a b s  
 f u n c t i o n   u n H i g h i g h t R e s e a r c h T a b s ( )  
 {  
         $ ( ' # p g r _ t a b s   l i ' ) . r e m o v e C l a s s ( ' t a b s - s e l e c t e d ' ) ;  
 }  
 / / h i g h l i g h t s   a   p a r t i c u l a r   t a b  
 f u n c t i o n   h i g h i g h t S e c o n d a r y T a b s ( t a b )  
 {  
         t a b . a d d C l a s s ( ' t a b s - s e l e c t e d ' ) ;  
 }  
 / / a p p l i e s   t h e   c l i c k   e v e n t s   t o   t h e   t a b s  
 f u n c t i o n   i n i t M e n u ( )  
 {  
         $ ( ' # c o n t e n t _ a c c o r d i o n   a ' ) . c l i c k ( f u n c t i o n ( )  
         {  
                 v a r   i d   =   $ ( t h i s ) . a t t r ( ' i d ' ) ;  
                 i d   =   i d . r e p l a c e ( ' a _ ' ,   ' ' ) ;  
  
                 v a r   d e t a i l   =   $ ( ' # d e t a i l _ '   +   i d ) ;  
                 i f   ( ! d e t a i l . i s ( ' : v i s i b l e ' ) )  
                 {  
                         c l o s e T a b ( ) ;  
                         o p e n T a b ( i d ) ;  
                         / / h i d e   a l l   t h e   p a n e s   a n d   s u b p a n e s  
                         h i d e A l l P a n e s ( ) ;  
                         h i d e A l l S u b p a n e s ( ) ;  
                         / / y o u   o n l y   n e e d   t o   d e a l   w i t h   s h o r t   h e r e   a s   y o u   c a n n o t   c l i c k   o n   t h e   o t h e r   t a b s  
                         i f   ( i d   = =   ' s h o r t ' )  
                         {  
                                 s h o w S h o r t P a n e ( i d ) ;  
                         }   e l s e  
                         {  
                                 / / a l s o   n o w   t h e   p o s t g r a d u a t e   r e s e a r c h  
                                 i f   ( i d   = =   ' p g r ' )  
                                 {  
                                         s h o w R e s e a r c h P a n e ( i d )  
                                 }  
                                 e l s e  
                                 {  
                                         s h o w P a n e ( i d ) ;  
                                         s h o w S u b P a n e ( i d ) ;  
                                 }  
                         }  
                 }  
         } ) ;  
  
         $ ( ' # s h o r t _ t a b s   a ' ) . c l i c k ( f u n c t i o n ( )  
         {  
                 v a r   i d   =   $ ( t h i s ) . a t t r ( ' i d ' ) ;  
                 i d   =   i d . r e p l a c e ( ' _ t a b ' ,   ' ' ) ;  
                 o p e n T a b ( ' s h o r t ' ) ;  
                 h i d e A l l P a n e s ( ) ;  
                 h i d e A l l S u b p a n e s ( ) ;  
                 s h o w S h o r t P a n e ( i d ) ;  
         } ) ;  
         $ ( ' # p g r _ t a b s   a ' ) . c l i c k ( f u n c t i o n ( )  
         {  
                 v a r   i d   =   $ ( t h i s ) . a t t r ( ' i d ' ) ;  
                 i d   =   i d . r e p l a c e ( ' _ t a b ' ,   ' ' ) ;  
                 o p e n T a b ( ' p g r ' ) ;  
                 h i d e A l l P a n e s ( ) ;  
                 h i d e A l l S u b p a n e s ( ) ;  
                 s h o w R e s e a r c h P a n e ( i d ) ;  
         } ) ;  
 }  
 / / r u n s   w h e n   p a g e   i s   l o a d e d   -   t h i s   i n c l u d e s   w h e n   t h e   b a c k   b u t t o n   i s   c l i c k e d  
 f u n c t i o n   s t a r t u p M e n u ( )  
 {  
         / / h i d e   e v e r y t h i n g  
         h i d e A l l ( ) ;  
  
         v a r   t a b ;  
         / / c h e c k   f o r   t h e   # k e y   -   t h i s   i s   u s e d   i n   t h e   b r e a d c r u m b s   a n d   h i s t o r y  
         v a r   l o c   =   l o c a t i o n . h r e f ;  
         v a r   i n d e x   =   l o c . i n d e x O f ( ' # ' ) ;  
         / / i f   t h e r e   i s   a   k e y  
         i f   ( i n d e x   >   0 )  
         {  
                 / / g e t   t h e   k e y  
                 t a b   =   l o c . s u b s t r ( i n d e x ) ;  
                 / / c h e c k   f o r   s e c t o r   -   s p e c i a l   c a s e  
                 i f   ( t a b   = =   ' # s e c t o r '   | |   t a b   = =   ' # p r o f e s s i o n '   | |   t a b   = =   ' # c e n t r e '   | |   t a b   = =   ' # d e g r e e ' )  
                 {  
                         $ ( t a b   +   ' _ t a b ' ) . c l i c k ( ) ;  
                 }   e l s e  
                 {  
                         / / c l i c k   t h e   t a b   s e l e c t e d  
                         t a b   =   t a b . r e p l a c e ( ' # ' ,   ' # a _ ' ) ;  
                 }  
         }   e l s e  
         {  
                 / / n o   k e y   -   o p e n   t h e   f i r s t   t a b  
                 v a r   d e t a i l   =   $ ( ' # c o n t e n t _ o p t i o n s   l i : f i r s t ' ) ;  
                 p r e f i x   =   d e t a i l . a t t r ( ' i d ' ) ;  
                 t a b   =   p r e f i x . r e p l a c e ( ' p a n e _ ' ,   ' # a _ ' ) ;  
         }  
         / / c l i c k   t h e   t a b   s e l e c t e d  
         $ ( t a b ) . c l i c k ( ) ;  
 }  
  
 $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( )   {   i n i t M e n u ( ) ;   s t a r t u p M e n u ( ) ;   } ) ; 
