ÿþt r y   {   i f ( n a v i g a t o r . a p p V e r s i o n . m a t c h ( / [ 3 4 ] \ . [ . 0 - 9   ] + S a f a r i / ) )   {  
 	 v a r   d   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 d . s t y l e . h e i g h t   =   0 ;  
 	 v a r   t g t   =   ' j s k - i f r m s e s s - '   +   M a t h . r a n d o m ( ) ;  
 	 d . i n n e r H T M L   =   ' < i f r a m e   i d = " '   +   t g t   +   ' "   n a m e = " '   +   t g t   +   ' "   s r c = " a b o u t : b l a n k "   w i d t h = 0   h e i g h t = 0   s t y l e = " b o r d e r :   n o n e " > < / i f r a m e > ' ;  
 	 v a r   f   =   f u n c t i o n ( )   {  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( d ) ;  
 	 	 v a r   i f r s e s s   =   d . f i r s t C h i l d ;  
 	 	 v a r   g e t F r a m e   =   f u n c t i o n ( F r a m e N a m e ,   P a r e n t )   {  
 	 	 	 v a r   t p   =   P a r e n t   ?   g e t F r a m e D o c ( P a r e n t )   :   d o c u m e n t ;  
 	 	 	 v a r   f r   =   t p . g e t E l e m e n t B y I d ( F r a m e N a m e ) . c o n t e n t W i n d o w ;  
 	 	 	 r e t u r n   f r ;  
 	 	 }  
 	 	 v a r   g e t F r a m e D o c   =   f u n c t i o n ( F r a m e N a m e ,   P a r e n t )   {  
 	 	 	 v a r   F E l   =   g e t F r a m e ( F r a m e N a m e ,   P a r e n t ) ;  
 	 	 	 r e t u r n   F E l . c o n t e n t D o c u m e n t   | |   F E l . d o c u m e n t ;  
 	 	 }  
  
 	 	 v a r   i D O C   =   g e t F r a m e D o c ( t g t ) ;  
 	 	 v a r   f r m   =   i D O C . c r e a t e E l e m e n t ( ' f o r m ' ) ;  
 	 	 f r m . m e t h o d   =   ' p o s t ' ; f r m . a c t i o n   =   w i n d o w . l o c a t i o n . p r o t o c o l   +   ' / / j s - k i t . c o m / a p i / s e s s i o n / r e f r e s h . j s ' ;  
 	 	 i D O C . b o d y . a p p e n d C h i l d ( f r m ) ;  
 	 	 i f r s e s s . o n r e a d y s t a t e c h a n g e   =   i f r s e s s . o n l o a d   =   f u n c t i o n ( )   {  
 	 	 	 i f ( i f r s e s s . r e a d y S t a t e   & &   i f r s e s s . r e a d y S t a t e   ! =   ' l o a d e d '  
 	 	 	 	 & &   i f r s e s s . r e a d y S t a t e   ! =   ' c o m p l e t e ' )   r e t u r n ;  
 	 	 	 i f r s e s s . o n l o a d   =   i f r s e s s . o n r e a d y s t a t e c h a n g e   =   n u l l ;  
 	 	 	  
 	 	 } ;  
 	 	 f r m . s u b m i t ( ) ;  
 	 }  
 	 i f ( d o c u m e n t . b o d y )   f ( ) ;  
 	 e l s e   s e t T i m e o u t ( f ,   0 ) ;  
 }   e l s e   { } }   c a t c h ( e )   { } ;  
 / *  
   *   C o p y r i g h t   ( c )   2 0 0 6 - 2 0 0 9   J S - K i t   < s u p p o r t @ j s - k i t . c o m > .   A l l   r i g h t s   r e s e r v e d .  
   *   Y o u   m a y   c o p y   a n d   m o d i f y   t h i s   s c r i p t   a s   l o n g   a s   t h e   a b o v e   c o p y r i g h t   n o t i c e ,  
   *   t h i s   c o n d i t i o n   a n d   t h e   f o l l o w i n g   d i s c l a i m e r   i s   l e f t   i n t a c t .  
   *   T h i s   s o f t w a r e   i s   p r o v i d e d   b y   t h e   a u t h o r   " A S   I S "   a n d   n o   w a r r a n t i e s   a r e  
   *   i m p l i e d ,   i n c l u d i n g   f i t n e s s   f o r   a   p a r t i c u l a r   p u r p o s e .   I n   n o   e v e n t   s h a l l  
   *   t h e   a u t h o r   b e   l i a b l e   f o r   a n y   d a m a g e s   a r i s i n g   i n   a n y   w a y   o u t   o f   t h e   u s e  
   *   o f   t h i s   s o f t w a r e ,   e v e n   i f   a d v i s e d   o f   t h e   p o s s i b i l i t y   o f   s u c h   d a m a g e .  
   *   $ I d :   c o m m e n t s . j s   1 4 5 5 4   2 0 0 9 - 0 6 - 1 0   1 0 : 1 5 : 5 9 Z   j s k i t   $  
   * /  
  
 i f ( ! w i n d o w . $ J C A )   {  
     v a r   $ J C A   =   [ ] ;  
     v a r   $ J C L T   =   {  
 	 l e a v e C o m m e n t :   ' L e a v e   a   c o m m e n t ' ,  
 	 l e a v e C o m m e n t A s :   ' L e a v e   a   c o m m e n t   a s : ' ,  
 	 g u e s t :   ' G u e s t ' ,  
 	 e x i s t i n g J S K i t P r o f i l e :   ' E x i s t i n g   J S - K i t   p r o f i l e ' ,  
 	 n e w J S K i t P r o f i l e :   ' N e w   J S - K i t   p r o f i l e ' ,  
 	 e x i s t i n g H a l o s c a n P r o f i l e :   ' E x i s t i n g   H a l o s c a n   p r o f i l e ' ,  
 	 u s i n g O p e n I D :   ' U s i n g   O p e n I D ' ,  
 	 b l o g s p o t U R L :   ' U s i n g   B l o g s p o t   U R L ' ,  
 	 c o n n e c t F a c e b o o k :   ' C o n n e c t   w i t h   F a c e b o o k   a c c o u n t ' ,  
 	 c o n n e c t Y a h o o :   ' C o n n e c t   w i t h   Y a h o o   a c c o u n t ' ,  
 	 c o n n e c t G F C :   ' C o n n e c t   w i t h   G o o g l e   F r i e n d   C o n n e c t ' ,  
 	 c o n n e c t T w i t t e r :   ' C o n n e c t   w i t h   T w i t t e r   a c c o u n t ' ,  
 	 l o g i n :   ' L o g i n ' ,  
 	 l o g i n B t n :   ' L o g i n ' ,  
 	 r e g i s t e r :   ' R e g i s t e r ' ,  
 	 p a s s w o r d :   ' P a s s w o r d : ' ,  
 	 r e t y p e P a s s w o r d :   ' R e - t y p e   P a s s w o r d : ' ,  
 	 h a l o s c a n L o g i n :   ' H a l o s c a n   l o g i n ' ,  
 	 h a l o s c a n P a s s w o r d :   ' H a l o s c a n   p a s s w o r d : ' ,  
 	 o p e n I D :   ' O p e n I D : ' ,  
 	 u r l :   ' U R L : ' ,  
 	 n a m e L a b e l :   ' Y o u r   n a m e : ' ,  
 	 n i c k n a m e L a b e l :   ' N i c k n a m e   ( r e q u i r e d ) : ' ,  
 	 n i c k n a m e R e q u i r e d :   ' N i c k n a m e   i s   a   r e q u i r e d   f i e l d ' ,  
 	 e m a i l L a b e l :   ' S e n d   r e p l i e s   t o   e m a i l : ' ,  
 	 e m a i l N o t e :   ' ( i f   p r o v i d e d ,   e m a i l   w i l l   n o t   b e   d i s p l a y e d   o r   s h a r e d ) ' ,  
 	 e m a i l F i r s t N o t e :   ' E - m a i l   i s   m a n d a t o r y   f o r   a d m i n i s t r a t o r ' ,  
 	 e m a i l R e q u i r e d :   ' E - m a i l   i s   r e q u i r e d .   C l i c k   " O K "   i f   y o u   a r e   t h e   a d m i n i s t r a t o r   o f   t h i s   s i t e .   \ n   C l i c k   " C a n c e l "   i f   y o u   a r e   n o t   t h e   a d m i n i s t r a t o r   o f   t h i s   s i t e . ' ,  
 	 e m a i l C o n f i r m a t i o n :   ' i s   a b o u t   t o   b e c o m e   t h e   o f f i c i a l   a d m i n i s t r a t o r   f o r   t h i s   s i t e .   \ n   C l i c k   " O K "   t o   c o n f i r m   o r   " C a n c e l "   t o   r e m o v e   t h e   e - m a i l   a d d r e s s . ' ,  
 	 r a t i n g L a b e l :   ' R a t i n g : ' ,  
 	 c o m m e n t L a b e l :   ' C o m m e n t : ' ,  
 	 s u b m i t :   ' S u b m i t   c o m m e n t ' ,  
 	 s a v e :   ' S a v e ' ,  
 	 c a n c e l :   ' C a n c e l ' ,  
 	 t o o S h o r t :   ' Y o u r   m e s s a g e   i s   t o o   s h o r t ' ,  
 	 t o o L o n g :   ' M e s s a g e   s i z e   s h o u l d   n o t   e x c e e d   { m a x C o m m e n t L e n g t h }   c h a r a c t e r s ' ,  
 	 j u n k C t l :   ' J u n k   c o n t r o l ' ,  
 	 b y V o t e s :   ' b y ' ,  
 	 s e l e c t e d A v a t a r :   ' S e l e c t e d   A v a t a r ' ,  
 	 u p l o a d A v a t a r :   ' U p l o a d   n e w   a v a t a r : ' ,  
 	 r e m o v e A v a t a r :   ' R e m o v e   A v a t a r ' ,  
 	 r e m o v e A v a t a r C o n f i r m :   ' R e m o v e   t h i s   a v a t a r ? ' ,  
 	 j s k i t A c c o u n t :   ' J S - K i t   a s :   ' ,  
 	 h a l o s c a n A c c o u n t :   ' H a l o s c a n   a s :   ' ,  
 	 l o g o u t :   ' l o g o u t ' ,  
 	 l e s s :   ' l e s s ' ,  
 	 m o r e :   ' m o r e ' ,  
 	 o p t i o n s U :   ' O p t i o n s   & # x 2 5 b 2 ; ' ,  
 	 o p t i o n s D :   ' O p t i o n s   & # x 2 5 b c ; ' ,  
 	 i s J u n k V o t e :   ' I s   t h i s   i n a p p r o p r i a t e   j u n k   o r   S P A M   m e s s a g e ? ' ,  
 	 e d i t A v a t a r s B t n L a b e l :   ' C l i c k   t o   m a n a g e   a v a t a r s ' ,  
 	 d e l e t e A v a t a r s B t n L a b e l :   ' C l i c k   t o   d e l e t e   a v a t a r ' ,  
 	 a v a t a r s M a n a g e m e n t L a b e l :   ' A v a t a r s   m a n a g e m e n t : ' ,  
 	 n o A v a t a r s M e s s a g e :   ' N o   a v a t a r s   u p l o a d e d ' ,  
 	 l o a d i n g :   ' L o a d i n g   . . . ' ,  
 	 s u b m i t P M :   ' L e a v e   p r i v a t e   m e s s a g e ' ,  
 	 w e l c o m e T o C o m m e n t s :   ' W e l c o m e   t o   J S - K i t   C o m m e n t s   & m d a s h ;   w e \ ' r e   v e r y   h a p p y   t o   s e e   y o u ! ' ,  
 	 a d m i n N o t e :   ' A d m i n i s t r a t i o n   N o t e   -   J S - K i t   C o m m e n t s   w i d g e t ' ,  
 	 o p e n W e l c o m e :   ' O p e n   A d m i n i s t r a t i o n   P a n e l ' ,  
 	 c l o s e W e l c o m e :   ' C l o s e   A d m i n i s t r a t i o n   P a n e l ' ,  
 	 c o n t a c t S u p p o r t :   ' C o n t a c t   o u r   s u p p o r t   t e a m ' ,  
 	 e d i t P r o f i l e :   ' E d i t   y o u r   p u b l i c   p r o f i l e ' ,  
 	 r e a d F A Q :   ' R e a d   o u r   F A Q ' ,  
 	 c u s t o m i z e L o o k :   ' C u s t o m i z e   t h e   l o o k   a n d   f e e l ' ,  
 	 a d m i n D a s h b o a r d :   ' A d m i n   D a s h b o a r d ' ,  
 	 f o l l o w T w i t t e r :   ' F o l l o w   u s   o n   T w i t t e r ' ,  
 	 c h e c k W i d g e t s :   ' C h e c k   o u t   o u r   o t h e r   w i d g e t s ' ,  
 	 r e q u i r e A u t h :   ' T h i s   s i t e   r e q u i r e s   r e g i s t r a t i o n   b e f o r e   y o u   c a n   l e a v e   a   c o m m e n t .   S e l e c t   a n   a u t h e n t i c a t i o n   o p t i o n   u n d e r   t h e   " L e a v e   a   c o m m e n t   a s "   m e n u ' ,  
 	 d e l e t e I m a g e :   ' D e l e t e   i m a g e ' ,  
 	 e d i t I m a g e :   ' E d i t   d e s c r i p t i o n ' ,  
 	 b i g I m a g e :   ' T h e   i m a g e   f i l e   y o u   a r e   t r y i n g   t o   u p l o a d   i s   t o o   b i g . ' ,  
 	 u p l o a d I m a g e :   ' U p l o a d   n e w   i m a g e   ( u p   t o   1 0   m e g a b y t e s ) : ' ,  
 	 a d d P i c T e x t :   ' A d d   p i c t u r e s ' ,  
 	 p i c T i t l e :   ' P I C T U R E S ' ,  
 	 c o m m e n t M o v e N o t i c e :   " P a g e   r e l o a d   w i l l   c a u s e   y o u r   c o m m e n t   t o   m o v e   a c c o r d i n g   t o   y o u r   s o r t i n g   a n d   o r d e r i n g   p r e f e r e n c e s . " ,  
 	 s h a r e Y a h o o :   " S h a r e   v i a   " ,  
 	 s h a r e T w i t t e r :   " T w e e t   t h i s " ,  
 	 s h a r e F B :   " S h a r e   v i a   F a c e b o o k " ,  
 	 s h a r e G F C :   " S h a r e   v i a   G o o g l e   F r i e n d   C o n n e c t " ,  
 	 c o m m e n t M o v e N o t i c e :   ' P a g e   r e l o a d   w i l l   c a u s e   y o u r   c o m m e n t   t o   m o v e   a c c o r d i n g   t o   y o u r   s o r t i n g   a n d   o r d e r i n g   p r e f e r e n c e s . ' ,  
                 g e t P e r m a l i n k U R L :   ' U R L   o f   t h i s   c o m m e n t ' ,  
                 g e t W i d g e t L i k e T h i s :   ' G e t   a   w i d g e t   l i k e   t h i s ' ,  
 	 o p t i o n s :   ' M o r e ' ,  
 	 s h o w U s e r P r o f i l e :   ' S h o w   u s e r \ ' s   p r o f i l e ' ,  
 	 m a r k A s O f f e n s i v e :   ' M a r k   c o m m e n t   a s   o f f e n s i v e '  
     } ;  
     v a r   $ J C L   =   w i n d o w . J S C C _ T r a n s l a t e   | |   f u n c t i o n ( t ,   t m p l )   {  
 	 v a r   t e x t   =   ( w i n d o w . $ J C L T L   ?   $ J C L T L [ t ]   :   f a l s e )   | |   $ J C L T [ t ]   | |   t ;  
 	 i f ( t m p l )   J S K i t L i b . f m a p ( t m p l ,  
 	 	 f u n c t i o n ( v , k ) { t e x t = t e x t . r e p l a c e ( n e w   R e g E x p ( ' { ' + k + ' } ' , ' g ' ) , v ) ; } ) ;  
 	 r e t u r n   t e x t ;  
     }  
 }  
  
  
 i f ( ! w i n d o w . J S K i t A P I )   J S K i t A P I   =   { } ;  
 J S K i t A P I . a l l o w e d _ e v e n t _ n a m e s   =   {   " c o m m e n t - s u b m i t " :   t r u e ,   " c o m m e n t s - d a t a - l o a d e d " :   t r u e   } ;  
 J S K i t A P I . s u b s c r i b e   =   f u n c t i o n ( k i t _ e v e n t ,   c a l l b a c k )   {  
 	 i f ( t h i s . a l l o w e d _ e v e n t _ n a m e s . h a s O w n P r o p e r t y ( k i t _ e v e n t ) )   {  
 	 	 r e t u r n   J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( n u l l ,  
 	 	 f u n c t i o n ( n a m e ,   b a s e ,   a r g s )   {  
 	 	 	 t r y   {  
 	 	 	 	 v a r   v   =   c a l l b a c k . a p p l y ( b a s e [ ' t h i s ' ] ,   a r g s ) ;  
 	 	 	 	 v a r   r v a l u e   =   {   ' t y p e ' :   ' v a l u e ' ,   ' v a l u e ' :   v   } ;  
 	 	 	 }   c a t c h ( e )   {  
 	 	 	 	 v a r   r v a l u e   =   {   ' t y p e ' : ' e x c e p t i o n ' ,   ' v a l u e ' :   e   } ;  
 	 	 	 }  
 	 	 	 b a s e . r e t u r n s . p u s h ( r v a l u e ) ;  
 	 	 } ,   " S T A B L E - A P I - "   +   k i t _ e v e n t ) ;  
 	 }   e l s e   {  
 	 	 r e t u r n   n u l l ;  
 	 }  
 }  
 J S K i t A P I . u n s u b s c r i b e   =   f u n c t i o n ( t o k e n )   {  
 	 J S K W $ E v e n t s . i n v a l i d a t e C o n t e x t ( t o k e n ) ;  
 }  
 J S K i t A P I . p u b l i s h   =   f u n c t i o n ( k i t _ e v e n t )   {  
 	 v a r   e l i s t   =   w i n d o w . J S K i t E v e n t s ;  
 	 i f   ( e l i s t )   {  
 	 	 J S K i t L i b . f m a p ( e l i s t ,   f u n c t i o n ( v )   {  
 	 	 	 J S K i t A P I . s u b s c r i b e ( v . s u b s c r i b e ,   v . c a l l b a c k ) ;  
 	 	 } ) ;  
 	 	 w i n d o w . J S K i t E v e n t s   =   n u l l ;  
 	 }  
 	 v a r   b a s e   =   {   ' t h i s ' :   t h i s ,   r e t u r n s :   [ ]   } ;  
 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " S T A B L E - A P I - "   +   k i t _ e v e n t ,   b a s e ,   a r g u m e n t s ) ;  
 	 r e t u r n   b a s e . r e t u r n s ;  
 }  
 / /   . a s k p u b l i c ( )   p u b l i s h e s   t h e   e v e n t ,   i n t e r p r e t s   t h e   r e s p o n s e   a n d   _ t h r o w s _  
 / /   i f   a n y   c a l l e d   c a l l b a c k   t h r e w .   O t h e r w i s e ,   a   s i m p l e   . p u b l i s h   w i l l   i g n o r e  
 / /   t h r o w s .   T h i s   i s   u s e d   t o   t r a n s l a t e   e r r o r s   g e n e r a t e d   i n   t h e   c a l l b a c k  
 / /   t o   t h e   a p p l i c a t i o n   i t s e l f .  
 J S K i t A P I . a s k p u b l i c   =   f u n c t i o n ( k i t _ e v e n t )   {  
 	 r e t u r n   J S K i t A P I . _ i n t e r p r e t ( J S K i t A P I . p u b l i s h . a p p l y ( t h i s ,   a r g u m e n t s ) ) ;  
 }  
 J S K i t A P I . _ i n t e r p r e t   =   f u n c t i o n ( r e t u r n s )   {  
 	 v a r   r v a l u e   =   {   ' t y p e ' :   ' v a l u e ' ,   ' v a l u e ' :   t r u e   } ;  
 	 / /   T h r o w   _ s o m e _   o b s e r v e d   e x c e p t i o n   o r   r e t u r n s   _ s o m e _   v a l u e .  
 	 / /   " _ s o m e _ "   b e c a u s e   t h e   s u b s c r i p t i o n   o r d e r   c a n   n o t   b e   r e l i e d   u p o n .  
 	 r e t u r n   J S K i t L i b . f o l d l ( r v a l u e ,   r e t u r n s ,   f u n c t i o n ( r )   {  
 	 	 i f ( r . t y p e   = =   ' e x c e p t i o n ' )   t h r o w ( r . v a l u e ) ;  
 	 	 r v a l u e . v a l u e   =   r . v a l u e ;  
 	 } ) . v a l u e ;  
 }  
  
  
  
 i f ( ! w i n d o w . J S K i t E P B ) {  
 	 v a r   J S K i t E P B   =   n e w   J S K i t E P B L i b ( ) ;  
 }  
  
 f u n c t i o n   J S K i t E P B L i b ( )   {  
 	 t h i s . J S K $ E P B   =   w i n d o w . J S K $ E P B   ?   w i n d o w . J S K $ E P B   :   { } ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . i s E x i s t s   =   f u n c t i o n ( )   {  
 	 r e t u r n   ( t h i s . J S K $ E P B . m a c   & &   t h i s . J S K $ E P B . p r o f i l e )   ?   1 :   0 ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . i s A d m i n   =   f u n c t i o n ( P a t h )   {  
 	 v a r   a r r I n d e x O f   =   f u n c t i o n ( a r r ,   V a l )   {  
 	 	 v a r   V a l L C   =   V a l . t o L o w e r C a s e ( ) ;  
 	 	 f o r ( v a r   i   =   a r r . l e n g t h   -   1 ;   i   > =   0 ;   i - - )   {  
 	 	 	 v a r   v   =   a r r [ i ] ;  
 	 	 	 i f ( t y p e o f ( v )   = =   " s t r i n g " )  
 	 	 	 	 v   =   v . t o L o w e r C a s e ( ) ;  
 	 	 	 i f ( v   = =   V a l L C )   r e t u r n   i ;  
 	 	 }  
 	 	 r e t u r n   - 1 ;  
 	 }  
 	 r e t u r n   t h i s . i s E x i s t s ( )   & &   t h i s . J S K $ E P B . p r o f i l e . o w n e r   & &   a r r I n d e x O f ( t h i s . J S K $ E P B . p r o f i l e . o w n e r , P a t h )   ! =   - 1   ?   1   :   0 ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . g e t V a l u e   =   f u n c t i o n ( V a l u e N a m e )   {  
 	 r e t u r n   ! t h i s . i s E x i s t s ( )   | |   t h i s . J S K $ E P B . p r o f i l e [ V a l u e N a m e ]   = =   u n d e f i n e d   ?   u n d e f i n e d   :   t h i s . J S K $ E P B . p r o f i l e [ V a l u e N a m e ] ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . g e t E l e m e n t   =   f u n c t i o n ( P r e f , E l , A r r K e y )   {  
 	 v a r   r s l t   =   [ ] ;  
 	 i f ( t y p e o f ( E l )   = =   ' o b j e c t ' )   {  
 	 	 i f ( E l   i n s t a n c e o f   A r r a y )   {  
 	 	 	 i f ( A r r K e y )   {  
 	 	 	 	 v a r   l e n   =   E l . l e n g t h ;  
 	 	 	 	 f o r ( v a r   i = 0 ;   i < l e n ;   i + + )  
 	 	 	 	 	 r s l t   =   r s l t . c o n c a t ( t h i s . g e t E l e m e n t ( P r e f , E l [ i ] , A r r K e y ) ) ;  
 	 	 	 }  
 	 	 }   e l s e   {  
 	 	 	 f o r ( v a r   i   i n   E l )  
 	 	 	 	 r s l t   =   r s l t . c o n c a t ( t h i s . g e t E l e m e n t ( P r e f , E l [ i ] , i ) ) ;  
 	 	 }  
 	 }   e l s e   {  
 	 	 i f ( A r r K e y )   {  
 	 	 	 r s l t . p u s h ( { ' N a m e ' :   P r e f + A r r K e y ,   ' V a l u e ' :   E l } ) ;  
 	 	 }  
 	 }  
 	 r e t u r n   r s l t ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . g e t A s O b j   =   f u n c t i o n ( )   {  
 	 v a r   r s l t   =   [ ] ;  
 	 v a r   p r e f   =   " e p b - " ;  
 	 v a r   e p b   =   t h i s . J S K $ E P B ;  
 	 i f ( ! e p b . p r o f i l e   | |   ! e p b . m a c )   r e t u r n   r s l t ;  
 	 r s l t . p u s h ( { ' N a m e ' :   p r e f + " m a c " , ' V a l u e ' :   e p b . m a c } ) ;  
 	 r e t u r n   r s l t . c o n c a t ( t h i s . g e t E l e m e n t ( p r e f , e p b . p r o f i l e ) ) ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . g e t U R I E n c o d e d S e r i a l i z e   =   f u n c t i o n ( )   {  
 	 v a r   s e r   =   t h i s . g e t A s O b j ( ) ;  
 	 v a r   a r   =   [ ] ;  
 	 f o r ( v a r   i = 0 ;   i < s e r . l e n g t h ;   i + + )   {  
 	 	 a r . p u s h ( s e r [ i ] . N a m e   +   " = "   +   e n c o d e U R I C o m p o n e n t ( s e r [ i ] . V a l u e ) ) ;  
 	 }  
 	 r e t u r n   a r . j o i n ( " & " ) ;  
 }  
  
 J S K i t E P B L i b . p r o t o t y p e . g e t A s H a s h   =   f u n c t i o n ( o b j )   {  
 	 v a r   s e r   =   t h i s . g e t A s O b j ( ) ;  
 	 J S K i t L i b . f m a p ( s e r ,   f u n c t i o n ( v )   {   o b j [ v . N a m e ]   =   v . V a l u e ;   } ) ;  
 	 r e t u r n   o b j ;  
 }  
  
  
  
 i f ( ! w i n d o w . J S K i t L i b )   J S K i t L i b   =   { v a r s : { } } ;  
  
  
  
 J S K i t L i b . c r   =   f u n c t i o n ( a r g )   {  
 	 i f ( ! a r g )   r e t u r n   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ;  
 	 a r g . t   =   a r g . t   | |   " d i v " ;  
 	 v a r   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( a r g . t ) ;  
 	 i f ( a r g . c l a s s N a m e )   d i v . c l a s s N a m e   =   a r g . c l a s s N a m e ;  
 	 i f ( a r g . s t y l e )   J S K i t L i b . f m a p ( a r g . s t y l e ,   f u n c t i o n ( v a l u e ,   k e y )   {   d i v . s t y l e [ k e y ]   =   v a l u e ;   } ) ;  
 	 r e t u r n   d i v ;  
 }  
  
 J S K i t L i b . d e l e t e P r o p e r t y   =   f u n c t i o n ( o b j ,   p r o p )   {  
 	 i f   ( t y p e o f   o b j [ p r o p ]   = =   ' f u n c t i o n ' )   {  
 	 	 o b j [ p r o p ]   =   n u l l ;  
 	 }   e l s e   {  
 	 	 t r y   {  
 	 	 	 d e l e t e   o b j [ p r o p ] ;  
 	 	 }   c a t c h   ( e )   {  
 	 	 	 o b j [ p r o p ]   =   n u l l ;  
 	 	 }  
 	 }  
 }  
  
 J S K i t L i b . t r i m   =   f u n c t i o n ( s t r )   {  
 	 i f   ( t y p e o f ( s t r )   ! =   " s t r i n g " )   r e t u r n   " " ;  
 	 v a r   s t r   =   s t r . r e p l a c e ( / ^ \ s \ s * / ,   ' ' ) ,   w s   =   / \ s / ,   i   =   s t r . l e n g t h ;  
 	 w h i l e   ( w s . t e s t ( s t r . c h a r A t ( - - i ) ) ) ;  
 	 r e t u r n   s t r . s l i c e ( 0 ,   i   +   1 ) ;  
 }  
  
 J S K i t L i b . e n c o d e J S O N L i t e r a l   =   f u n c t i o n ( s t r i n g )   {  
 	 v a r   r e p l a c e m e n t s   =   { ' \ b ' :   ' \ \ b ' ,   ' \ t ' :   ' \ \ t ' ,   ' \ n ' :   ' \ \ n ' ,   ' \ f ' :   ' \ \ f ' ,   ' \ r ' :   ' \ \ r ' ,   ' " '   :   ' \ \ " ' ,   ' \ \ ' :   ' \ \ \ \ ' } ;  
 	 r e t u r n   s t r i n g . r e p l a c e ( / [ \ " \ x 0 0 - \ x 1 f \ x 7 f - \ x 9 f \ u 0 0 a d \ u 0 6 0 0 - \ u 0 6 0 4 \ u 0 7 0 f \ u 1 7 b 4 \ u 1 7 b 5 \ u 2 0 0 c - \ u 2 0 0 f \ u 2 0 2 8 - \ u 2 0 2 f \ u 2 0 6 0 - \ u 2 0 6 f \ u f e f f \ u f f f 0 - \ u f f f f \ \ ] / g ,    
 	 	 f u n c t i o n   ( a )   {   r e t u r n   ( r e p l a c e m e n t s . h a s O w n P r o p e r t y ( a ) )   ?   r e p l a c e m e n t s [ a ]   :   ' \ \ u '   +   ( ' 0 0 0 0 '   +   a . c h a r C o d e A t ( 0 ) . t o S t r i n g ( 1 6 ) ) . s l i c e ( - 4 ) ;   } ) ;  
 }  
  
 J S K i t L i b . O b j e c t 2 J S O N   =   f u n c t i o n ( o b j )   {  
 	 v a r   o u t ;  
 	 s w i t c h   ( t y p e o f ( o b j ) )   {  
 	 	 c a s e   " n u m b e r "     :   o u t   =   o b j ;   b r e a k ;    
 	 	 c a s e   " s t r i n g "     :   o u t   =   ' " '   +   J S K i t L i b . e n c o d e J S O N L i t e r a l ( o b j )   +   ' " ' ;   b r e a k ; 	  
 	 	 c a s e   " b o o l e a n "   :   o u t   =   ' " '   +   o b j . t o S t r i n g ( )   +   ' " ' ;   b r e a k ;  
 	 	 d e f a u l t   :  
 	 	 	 i f   ( o b j   i n s t a n c e o f   A r r a y )   {  
 	 	 	 	 v a r   c o n t a i n e r   =   J S K i t L i b . f m a p ( o b j ,   f u n c t i o n ( e l e m e n t )   {   r e t u r n   J S K i t L i b . O b j e c t 2 J S O N ( e l e m e n t ) ;   } ) ;  
 	 	 	 	 o u t   =   ' [ '   +   c o n t a i n e r . j o i n ( " , " )   +   ' ] ' ;  
 	 	 	 }   e l s e   i f ( o b j   i n s t a n c e o f   O b j e c t )   {  
 	 	 	 	 v a r   s o u r c e   =   o b j . e x p o r t P r o p e r t i e s   | |   o b j ;  
 	 	 	 	 v a r   c o n t a i n e r   =   J S K i t L i b . f m a p ( s o u r c e ,   f u n c t i o n ( v a l u e ,   p r o p e r t y )   {  
 	 	 	 	 	 i f   ( s o u r c e   i n s t a n c e o f   A r r a y )   {   p r o p e r t y   =   v a l u e ;   v a l u e   =   o b j [ p r o p e r t y ] ;   }    
 	 	 	 	 	 r e t u r n   ' " '   +   p r o p e r t y   +   ' " : '   +   J S K i t L i b . O b j e c t 2 J S O N ( v a l u e ) ;  
 	 	 	 	 } ) ;  
 	             	 	 	 o u t   =   ' { '   +   c o n t a i n e r . j o i n ( " , " )   +   ' } ' ;  
 	 	 	 }  
 	 }  
 	 r e t u r n   o u t ;  
 }  
  
 J S K i t L i b . a p p e n d E x t e r n a l P a r a m s   =   f u n c t i o n ( s e r v i c e ,   r e q u e s t T y p e ,   c u r r e n t P a r a m s )   {  
 	 i f   ( ! w i n d o w . J S K i t E x t e r n a l P a r a m s )   r e t u r n   c u r r e n t P a r a m s ;  
 	 J S K i t L i b . f m a p ( w i n d o w . J S K i t E x t e r n a l P a r a m s ,   f u n c t i o n ( d a t a )   {  
 	 	 v a r   s e r v i c e R e g E x p   =   n e w   R e g E x p ( d a t a . s e r v i c e   | |   " * " ) ;  
 	 	 v a r   r e q u e s t T y p e R e g E x p   =   n e w   R e g E x p ( d a t a . r e q u e s t T y p e   | |   " * " ) ;  
 	 	 i f   ( s e r v i c e R e g E x p . t e s t ( s e r v i c e )   & &   r e q u e s t T y p e R e g E x p . t e s t ( r e q u e s t T y p e ) )   {  
 	 	 	 J S K i t L i b . f m a p ( d a t a . p a r a m s ,   f u n c t i o n ( v a l u e ,   k e y )   {   c u r r e n t P a r a m s [ k e y ]   =   v a l u e ;   } ) ;  
 	 	 }  
 	 } ) ;  
 	 r e t u r n   c u r r e n t P a r a m s ;  
 }  
  
  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 	 J S   M e n u   b a s e   c l a s s  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   J S M e n u I t e m B a s e ( o b j )   {  
 	 i f ( ! o b j )   r e t u r n ;  
 	 t h i s . i n i t ( o b j ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . i n i t   =   f u n c t i o n ( o b j )   {  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   o b j ,   f u n c t i o n ( v a l u e ,   k e y )   { t h i s [ k e y ]   =   v a l u e ; } ) ;  
 	 t h i s . i t e m s   =   [ ] ;  
 	 t h i s . c r e a t e I t e m ( ) ;  
 	 t h i s . a d d I t e m H i g h l i g h t i n g ( ) ;  
 	 t h i s . c r e a t e C o n t a i n e r ( ) ;  
 	 t h i s . a t t a c h C o n t a i n e r ( ) ;  
 	 t h i s . a d d A c t i o n ( ) ;  
 	 J S K i t L i b . h i d e ( t h i s . o u t e r C n t ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . c r e a t e I t e m   =   f u n c t i o n ( )   {  
 	 t h i s . i t e m N o d e   =   J S K i t L i b . c r ( { t : " t r " ,   c l a s s N a m e :   t h i s . c s s P r e f i x   +   " I t e m " } ) ;  
 	 i f ( t h i s . h i d d e n )   J S K i t L i b . h i d e ( t h i s . i t e m N o d e ) ;  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   [ " I c o n " ,   " T i t l e " ,   " E n d i n g " ] ,   f u n c t i o n ( p a r t ,   i )   {  
 	 	 v a r   t d   =   J S K i t L i b . c r ( { t : " t d " ,   c l a s s N a m e :   t h i s . c s s P r e f i x   +   " I t e m " } ) ;  
 	 	 t h i s . i t e m N o d e . a p p e n d C h i l d ( t d ) ;  
 	 	 v a r   d i v   =   J S K i t L i b . c r ( { c l a s s N a m e :   t h i s . c s s P r e f i x   +   " I t e m "   +   p a r t } ) ;  
 	 	 t d . a p p e n d C h i l d ( d i v ) ;  
 	 	 t h i s [ " r e n d e r "   +   p a r t ] ( d i v ) ;  
 	 	 J S K i t L i b . p r e v e n t S e l e c t ( d i v ) ;  
 	 	 t h i s [ p a r t . t o L o w e r C a s e ( )   +   " N o d e " ]   =   d i v ;  
 	 } ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . r e n d e r I c o n   =   f u n c t i o n ( c n t )   {  
 	 i f ( t h i s . i c o n )   J S K i t L i b . a d d P N G ( c n t ,   t h i s . i c o n ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . r e n d e r T i t l e   =   f u n c t i o n ( c n t )   {  
 	 c n t . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( t h i s . t i t l e ) ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . r e n d e r E n d i n g   =   f u n c t i o n ( c n t )   { } ;  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a d d I t e m H i g h l i g h t i n g   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K i t L i b . f m a p ( [ { e v e n t :   " m o u s e o v e r " ,   a c t i o n :   " a d d C l a s s " } ,   { e v e n t :   " m o u s e o u t " ,   a c t i o n :   " r e m o v e C l a s s " } ] ,   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . a d d E v e n t H a n d l e r ( s e l f . i t e m N o d e ,   [ e . e v e n t ] ,   f u n c t i o n ( )   {  
 	 	 	 i f ( s e l f . s t a t u s T e x t )   {  
 	 	 	 	 	 w i n d o w . s t a t u s   =   e . e v e n t   = =   " m o u s e o v e r "   ?   s e l f . s t a t u s T e x t   :   " " ;  
 	 	 	 }  
 	 	 	 J S K i t L i b . f m a p ( [ " i t e m " ,   " i c o n " ,   " t i t l e " ,   " e n d i n g " ] ,   f u n c t i o n ( p a r t )   {  
 	 	 	 	 J S K i t L i b [ e . a c t i o n ] ( s e l f [ p a r t   +   " N o d e " ] ,   s e l f . c s s P r e f i x   +   " I t e m M O " ) ;  
 	 	 	 } ) ;  
 	 	 } ) ;  
 	 } ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . c r e a t e C o n t a i n e r   =   f u n c t i o n ( )   {  
 	 t h i s . o u t e r C n t   =   J S K i t L i b . c r ( { c l a s s N a m e :   t h i s . c s s P r e f i x   +   " C o n t a i n e r " } ) ; 	  
 	 i f ( J S K i t L i b . i s I E ( ) )   t h i s . o u t e r C n t . s t y l e . z o o m   =   " 1 " ;  
 	 v a r   t b l   =   J S K i t L i b . c r ( { t : " t a b l e " } ) ;  
 	 t b l . c e l l S p a c i n g   =   t b l . c e l l P a d d i n g   =   " 0 " ;  
 	 t h i s . i n n e r C n t   =   J S K i t L i b . c r ( { t : " t b o d y " } ) ;  
 	 t h i s . o u t e r C n t . a p p e n d C h i l d ( t b l ) ;  
 	 t b l . a p p e n d C h i l d ( J S K i t L i b . c r ( { t : " t h e a d " } ) ) ;  
 	 t b l . a p p e n d C h i l d ( t h i s . i n n e r C n t ) ;  
 	 t b l . a p p e n d C h i l d ( J S K i t L i b . c r ( { t : " t f o o t " } ) ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a t t a c h C o n t a i n e r   =   f u n c t i o n ( )   {  
 	 J S K i t L i b . s h o w ( t h i s . o u t e r C n t ,   " i n l i n e " ) ;  
 	 t h i s . e n d i n g N o d e . p a r e n t N o d e . a p p e n d C h i l d ( t h i s . o u t e r C n t ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a p p e n d I t e m   =   f u n c t i o n ( i t e m )   {  
 	 i f ( ! t h i s . i t e m s . l e n g t h )   {  
 	 	 t h i s . a d d E x p a n d M a r k e r ( ) ;  
 	 	 t h i s . a d d E x p a n d H a n d l e r ( ) ;  
 	 	 t h i s . a d d C o l l a p s e C a l l b a c k ( ) ;  
 	 }  
 	 t h i s . i n n e r C n t . a p p e n d C h i l d ( i t e m . i t e m N o d e ) ;  
 	 t h i s . i t e m s . p u s h ( i t e m ) ;  
 	 i t e m . p a r e n t   =   t h i s ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a d d E x p a n d M a r k e r   =   f u n c t i o n ( )   {  
 	 t h i s . e n d i n g N o d e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( " \ u 2 5 B A " ) ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a d d E x p a n d H a n d l e r   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K i t L i b . f m a p ( [ { e v e n t :   " m o u s e o v e r " ,   d i s p l a y :   " i n l i n e " } ,   { e v e n t :   " m o u s e o u t " ,   d i s p l a y :   " n o n e " } ] ,   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . a d d E v e n t H a n d l e r ( s e l f . i t e m N o d e ,   [ e . e v e n t ] ,   f u n c t i o n ( )   {  
 	 	 	 J S K i t L i b . s h o w ( s e l f . o u t e r C n t ,   e . d i s p l a y ) ;  
 	 	 } ) ;  
 	 } ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a d d C o l l a p s e C a l l b a c k   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( u n d e f i n e d ,   f u n c t i o n ( )   {  
 	 	 s e l f . o u t e r C n t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 } ,   " J S M e n u - C o l l a p s e A l l " ) ;  
 }  
  
 J S M e n u I t e m B a s e . p r o t o t y p e . a d d A c t i o n   =   f u n c t i o n ( )   {  
 	 i f ( t h i s . a c t i o n )   J S K i t L i b . a d d E v e n t H a n d l e r ( t h i s . i t e m N o d e ,   [ " c l i c k " ] ,   t h i s . a c t i o n ) ;  
 }  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 	 J S   R o o t   M e n u   c l a s s  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   J S M e n u I t e m R o o t ( o b j )   {  
 	 t h i s . i n i t ( o b j ) ;  
 	 J S K i t L i b . a d d C l a s s ( t h i s . o u t e r C n t ,   t h i s . c s s P r e f i x   +   " R o o t C o n t a i n e r " ) ;  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e   =   n e w   J S M e n u I t e m B a s e ( ) ;  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . c r e a t e I t e m   =   f u n c t i o n ( )   {  
 	 t h i s . i t e m N o d e   =   J S K i t L i b . c r ( ) ;  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   [ { n a m e :   " t i t l e " ,   s u f f :   " " } ,   { n a m e :   " e n d i n g " ,   s u f f :   " E x p a n d M a r k e r " } ] ,   f u n c t i o n ( p a r t )   {  
 	 	 t h i s [ p a r t . n a m e   +   " N o d e " ]   =   J S K i t L i b . c r ( { c l a s s N a m e :   t h i s . c s s P r e f i x   +   " T i t l e "   +   p a r t . s u f f } ) ;  
 	 } ) ;  
 	 i f ( t h i s . t i t l e )   {  
 	 	 v a r   t b l   =   J S K i t L i b . c r ( { t : " t a b l e " } ) ;  
 	 	 v a r   r o w   =   t b l . i n s e r t R o w ( 0 ) ;  
 	 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   [ " t i t l e " ,   " e n d i n g " ] ,   f u n c t i o n ( p a r t ,   i )   {  
 	 	 	 r o w . i n s e r t C e l l ( i ) . a p p e n d C h i l d ( t h i s [ p a r t   +   " N o d e " ] ) ;  
 	 	 } ) ;  
 	 	 J S K i t L i b . a d d P N G ( t h i s . e n d i n g N o d e ,   " / / j s - k i t . c o m / i m a g e s / m e n u / v e r t i c a l - m e n u - e x p a n d - m a r k e r . p n g " ) ;  
 	 	 t h i s . t i t l e N o d e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( t h i s . t i t l e ) ) ;  
 	 	 t h i s . i t e m N o d e . a p p e n d C h i l d ( t b l ) ;  
 	 }  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . a d d I t e m H i g h l i g h t i n g   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K i t L i b . f m a p ( [ { e v e n t :   " m o u s e o v e r " ,   a c t i o n :   " a d d C l a s s " } ,   { e v e n t :   " m o u s e o u t " ,   a c t i o n :   " r e m o v e C l a s s " } ] ,   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . a d d E v e n t H a n d l e r ( s e l f . i t e m N o d e ,   [ e . e v e n t ] ,   f u n c t i o n ( )   {  
 	 	 	 J S K i t L i b [ e . a c t i o n ] ( s e l f . i t e m N o d e ,   s e l f . c s s P r e f i x   +   " T i t l e M O " ) ;  
 	 	 } ) ;  
 	 } ) ;  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . a d d E x p a n d H a n d l e r   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K i t L i b . a d d E v e n t H a n d l e r ( t h i s . i t e m N o d e ,   [ " c l i c k " ] ,   f u n c t i o n ( e )   {  
 	 	 v a r   n e e d 2 h i d e   =   ( s e l f . o u t e r C n t . s t y l e . d i s p l a y   ! =   " n o n e " ) ;  
 	 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " J S M e n u - C o l l a p s e A l l " ) ;  
 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;  
 	 	 i f ( n e e d 2 h i d e )   {  
 	 	 	 J S K i t L i b . r e m o v e C l a s s ( s e l f . t i t l e N o d e ,   s e l f . c s s P r e f i x   +   " T i t l e P r e s s e d " ) ;  
 	 	 }   e l s e   {  
 	 	 	 J S K i t L i b . a d d C l a s s ( s e l f . t i t l e N o d e ,   s e l f . c s s P r e f i x   +   " T i t l e P r e s s e d " ) ;  
 	 	 	 J S K i t L i b . s h o w ( s e l f . o u t e r C n t ,   " b l o c k " ) ;  
 	 	 }  
 	 } ) ;  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . a d d C o l l a p s e C a l l b a c k   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( u n d e f i n e d ,   f u n c t i o n ( )   {  
 	 	 s e l f . o u t e r C n t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 J S K i t L i b . r e m o v e C l a s s ( s e l f . t i t l e N o d e ,   s e l f . c s s P r e f i x   +   " T i t l e P r e s s e d " ) ;  
 	 } ,   " J S M e n u - C o l l a p s e A l l " ) ;  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . a t t a c h C o n t a i n e r   =   f u n c t i o n ( )   {  
 	 t h i s . i t e m N o d e . a p p e n d C h i l d ( t h i s . o u t e r C n t ) ;  
 }  
  
 J S M e n u I t e m R o o t . p r o t o t y p e . a d d E x p a n d M a r k e r   =   f u n c t i o n ( )   { } ;  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 	 J S   M e n u s   D e l i m e t e r  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   J S M e n u I t e m D e l i m e t e r ( o b j )   {  
 	 t h i s . l e v e l   =   o b j . l e v e l ;  
 	 t h i s . i t e m N o d e   =   J S K i t L i b . c r ( { t : " t r " } ) ;  
 	 v a r   t d   =   J S K i t L i b . c r ( { t : " t d " } ) ;  
 	 t d . c o l S p a n   =   " 3 " ;  
 	 v a r   d e l i m   =   J S K i t L i b . c r ( { c l a s s N a m e :   o b j . c s s P r e f i x   +   " D e l i m e t e r " } ) ;  
 	 t d . a p p e n d C h i l d ( d e l i m ) ;  
 	 t h i s . i t e m N o d e . a p p e n d C h i l d ( t d ) ;  
 }  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 	 J S   M e n u s   w i t h   d y n a m i c   t e x t   i n p u t  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   J S M e n u I t e m D T I ( o b j )   {  
 	 t h i s . i n i t ( o b j ) ;  
 }  
  
 J S M e n u I t e m D T I . p r o t o t y p e   =   n e w   J S M e n u I t e m B a s e ( ) ;  
  
 J S M e n u I t e m D T I . p r o t o t y p e . r e n d e r T i t l e   =   f u n c t i o n ( c n t )   {  
 	 v a r   t e x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( t h i s . t i t l e ) ;  
 	 v a r   i n p u t   =   J S K i t L i b . h t m l ( ' < i n p u t   t y p e = " t e x t "   r e a d o n l y   s t y l e = " d i s p l a y : n o n e "   v a l u e = " '   +   t h i s . i n p u t V a l u e   +   ' "   c l a s s = " '   +   t h i s . c s s P r e f i x   +   ' I n p u t " > ' ) ;  
 	 c n t . a p p e n d C h i l d ( t e x t ) ;  
 	 c n t . p a r e n t N o d e . i n s e r t B e f o r e ( i n p u t ,   c n t ) ;  
 	 J S K i t L i b . a d d E v e n t H a n d l e r ( t h i s . i t e m N o d e ,   [ " c l i c k " ] ,   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;  
 	 	 c n t . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 	 J S K i t L i b . s h o w ( i n p u t ) ;  
 	 	 i n p u t . f o c u s ( ) ;  
 	 	 i n p u t . s e l e c t ( ) ;  
 	 } ) ;  
 	 i n p u t . o n b l u r   =   f u n c t i o n ( )   {  
 	 	 J S K i t L i b . h i d e ( i n p u t ) ;  
 	 	 c n t . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ;  
 	 }  
 }  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / / 	 J S   M e n u s   i n t e r f a c e  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
  
 f u n c t i o n   J S M e n u ( t i t l e ,   d a t a ,   c s s P r e f i x ,   s c r o l l e r )   {  
 	 v a r   r o o t   =   n e w   J S M e n u I t e m R o o t ( { t i t l e :   t i t l e ,   c s s P r e f i x :   c s s P r e f i x ,   l e v e l :   0 } ) ;  
 	 v a r   c u r I t e m   =   r o o t ;  
 	 J S K i t L i b . f m a p ( d a t a ,   f u n c t i o n ( i t e m D a t a )   {  
 	 	 i t e m D a t a . c s s P r e f i x   =   c s s P r e f i x ;  
 	 	 v a r   i t e m   =   i t e m D a t a . t y p e   ?   ( n e w   w i n d o w [ " J S M e n u I t e m "   +   i t e m D a t a . t y p e ] ( i t e m D a t a ) )   :   ( n e w   J S M e n u I t e m B a s e ( i t e m D a t a ) ) ;  
 	 	 w h i l e ( i t e m . l e v e l   < =   c u r I t e m . l e v e l )   c u r I t e m   =   c u r I t e m . p a r e n t ;  
 	 	 c u r I t e m . a p p e n d I t e m ( i t e m ) ;  
 	 	 c u r I t e m   =   i t e m ;  
 	 } ) ;  
 	 J S K i t L i b . a d d E v e n t H a n d l e r ( d o c u m e n t ,   [ " c l i c k " ] ,   f u n c t i o n ( e )   {  
 	 	 i f ( J S K i t L i b . g e t B r o w s e r ( )   ! =   " g e c k o "   | |   e . b u t t o n   ! =   2 )   J S K W $ E v e n t s . s y n c B r o a d c a s t ( " J S M e n u - C o l l a p s e A l l " ) ;  
 	 } ) ;  
 	 r e t u r n   r o o t . i t e m N o d e ;  
 }  
  
  
  
  
 J S K i t L i b . i s P r e I E 7   =   f u n c t i o n ( )   {  
 	 i f   ( d o c u m e n t . b o d y   & &   d o c u m e n t . b o d y . f i l t e r s   & &   p a r s e I n t ( n a v i g a t o r . a p p V e r s i o n . s p l i t ( " M S I E " )   [ 1 ] )   <   7 )  
 	 	 r e t u r n   t r u e ;  
 }  
  
 J S K i t L i b . i s P r e I E 8   =   f u n c t i o n ( )   {  
 	 i f   ( d o c u m e n t . b o d y   & &   d o c u m e n t . b o d y . f i l t e r s   & &   p a r s e I n t ( n a v i g a t o r . a p p V e r s i o n . s p l i t ( " M S I E " )   [ 1 ] )   <   8 )  
 	 	 r e t u r n   t r u e ;  
 }  
  
 J S K i t L i b . i s I E   =   f u n c t i o n ( )   {  
 	 i f   ( d o c u m e n t . b o d y   & &   d o c u m e n t . b o d y . f i l t e r s   & &   n a v i g a t o r . a p p V e r s i o n . m a t c h ( / M S I E / ) )  
 	 	 r e t u r n   t r u e ;  
 }  
  
 J S K i t L i b . g e t B r o w s e r   =   f u n c t i o n ( )   {  
 	 i f   ( J S K i t L i b . v a r s . b r o w s e r )   r e t u r n   J S K i t L i b . v a r s . b r o w s e r ;  
 	 i f   ( d o c u m e n t . b o d y   & &   d o c u m e n t . b o d y . f i l t e r s   & &   n a v i g a t o r . a p p V e r s i o n . m a t c h ( / M S I E / ) )   {  
 	 	 	 J S K i t L i b . v a r s . b r o w s e r   =   " I E " ;  
 	 }   e l s e   i f   ( ( n a v i g a t o r . a p p C o d e N a m e . t o L o w e r C a s e ( ) = = " m o z i l l a " )    
 	 	 & &   ( n a v i g a t o r . a p p N a m e . t o L o w e r C a s e ( ) = = " n e t s c a p e " )    
 	 	 & &   ( n a v i g a t o r . p r o d u c t . t o L o w e r C a s e ( ) = = " g e c k o " )    
 	 )   {  
 	 	 i f   ( n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " s a f a r i " ) ! = - 1 )   {  
 	 	 	 J S K i t L i b . v a r s . b r o w s e r   =   " s a f a r i " ;  
 	 	 }   e l s e   i f   ( n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " f i r e f o x " ) ! = - 1 )   {  
 	 	 	 J S K i t L i b . v a r s . b r o w s e r   =   " g e c k o " ;  
 	 	 }  
 	 }   e l s e   i f   ( n a v i g a t o r . p r o d u c t   & &   n a v i g a t o r . p r o d u c t . t o L o w e r C a s e ( ) = = " g e c k o " )   {  
 	 	 J S K i t L i b . v a r s . b r o w s e r   =   " g e c k o " ;  
 	 }  
 	 r e t u r n   J S K i t L i b . v a r s . b r o w s e r ;  
 }  
  
 J S K i t L i b . i s F F 3   =   f u n c t i o n ( )   {  
 	 r e t u r n   ( n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " F i r e f o x / 3 " )   ! =   - 1 ) ;  
 }  
  
 J S K i t L i b . i s G C h r o m e   =   f u n c t i o n ( )   {  
 	 r e t u r n   ( n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( ' c h r o m e ' )   ! =   - 1 ) ;  
 }  
  
 J S K i t L i b . i s S a f a r i   =   f u n c t i o n ( )   {  
 	 i f   ( n a v i g a t o r . a p p V e r s i o n . m a t c h ( / S a f a r i / ) )   {  
 	 	 r e t u r n   t r u e ;  
 	 }  
 }  
  
 J S K i t L i b . i s O p e r a   =   f u n c t i o n ( )   {  
 	 i f   ( n a v i g a t o r . a p p N a m e . m a t c h ( / O p e r a / ) )   {  
 	 	 r e t u r n   t r u e ;  
 	 }  
 }  
  
  
  
 J S K i t L i b . a d d E v e n t H a n d l e r   =   f u n c t i o n ( o b j ,   e v e n t N a m e s ,   e v e n t H a n d l e r ,   c a p t u r e )   {  
 	 J S K i t L i b . f m a p ( e v e n t N a m e s ,   f u n c t i o n ( e )   {  
 	 	 i f   ( o b j . a d d E v e n t L i s t e n e r )   {  
 	 	 	 o b j . a d d E v e n t L i s t e n e r ( e ,   e v e n t H a n d l e r ,   ! ! c a p t u r e ) ;  
 	 	 }   e l s e   i f   ( o b j . a t t a c h E v e n t )   {  
 	 	 	 i f   ( c a p t u r e )   {  
 	 	 	 	 i f   ( c a p t u r e   = = =   t r u e )   c a p t u r e   =   o b j ;  
 	 	 	 	 c a p t u r e . s e t C a p t u r e ( ) ;  
 	 	 	 	 c a p t u r e . a t t a c h E v e n t ( ' o n l o s e c a p t u r e ' ,   e v e n t H a n d l e r ) ;  
 	 	 	 }  
 	 	 	 o b j . a t t a c h E v e n t ( ' o n '   +   e ,   e v e n t H a n d l e r ) ;  
 	 	 }  
 	 } ) ;  
 }  
  
 J S K i t L i b . r e m o v e E v e n t H a n d l e r   =   f u n c t i o n ( o b j ,   e v e n t N a m e s ,   e v e n t H a n d l e r ,   c a p t u r e )   {  
 	 J S K i t L i b . f m a p ( e v e n t N a m e s ,   f u n c t i o n ( e )   {  
 	 	 i f   ( o b j . r e m o v e E v e n t L i s t e n e r )   {  
 	 	 	 o b j . r e m o v e E v e n t L i s t e n e r ( e ,   e v e n t H a n d l e r ,   ! ! c a p t u r e ) ;  
 	 	 }   e l s e   i f   ( o b j . d e t a c h E v e n t )   {  
 	 	 	 i f   ( c a p t u r e )   {  
 	 	 	 	 i f   ( c a p t u r e   = = =   t r u e )   c a p t u r e   =   o b j ;  
 	 	 	 	 c a p t u r e . d e t a c h E v e n t ( ' o n l o s e c a p t u r e ' ,   e v e n t H a n d l e r ) ;  
 	 	 	 	 c a p t u r e . r e l e a s e C a p t u r e ( ) ;  
 	 	 	 }  
 	 	 	 o b j . d e t a c h E v e n t ( ' o n '   +   e ,   e v e n t H a n d l e r ) ;  
 	 	 }  
 	 } ) ;  
 }  
  
 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n   =   f u n c t i o n ( e )   {  
 	 i f   ( ! e )   e   =   w i n d o w . e v e n t ;  
 	 e . c a n c e l B u b b l e   =   t r u e ;  
 	 i f   ( e . s t o p P r o p a g a t i o n )   e . s t o p P r o p a g a t i o n ( ) ;  
 }  
  
 J S K i t L i b . p r e v e n t D e f a u l t E v e n t   =   f u n c t i o n ( e )   {  
     i f   ( ! e )   e   =   w i n d o w . e v e n t ;  
     e . r e t u r n V a l u e   =   f a l s e ;  
     i f   ( e . p r e v e n t D e f a u l t )   e . p r e v e n t D e f a u l t ( ) ;  
 }  
  
 J S K i t L i b . d e f e r C a l l   =   f u n c t i o n ( f u n c ,   o n l y I E )   {  
 	 i f   ( ! J S K i t L i b . v a r s . w i n d o w O n L o a d F i r e d   & &   ( ! o n l y I E   | |   ( o n l y I E   & &   J S K i t L i b . i s I E ( )   & &   ! w i n d o w . $ J S K i t N o D e f e r C a l l I f I E ) ) )   {  
 	 	 J S K i t L i b . a d d E v e n t H a n d l e r ( w i n d o w ,   [ ' l o a d ' ] ,   f u n c ) ;  
 	 }   e l s e   {  
 	 	 f u n c ( ) ;  
 	 }  
 }  
  
 J S K i t L i b . a d d H a n d l e r s   =   f u n c t i o n ( o b j ,   m o v e H a n d l e r ,   u p H a n d l e r ,   c a p t u r e )   {  
 	 J S K i t L i b . a d d E v e n t H a n d l e r ( o b j ,   [ ' m o u s e m o v e ' ] ,   m o v e H a n d l e r ,   c a p t u r e ) ;  
 	 J S K i t L i b . a d d E v e n t H a n d l e r ( o b j ,   [ ' m o u s e u p ' ] ,   u p H a n d l e r ,   c a p t u r e ) ;  
 }  
  
 J S K i t L i b . r e m o v e H a n d l e r s   =   f u n c t i o n ( o b j ,   m o v e H a n d l e r ,   u p H a n d l e r ,   c a p t u r e )   {  
 	 J S K i t L i b . r e m o v e E v e n t H a n d l e r ( o b j ,   [ ' m o u s e m o v e ' ] ,   m o v e H a n d l e r ,   c a p t u r e ) ;  
 	 J S K i t L i b . r e m o v e E v e n t H a n d l e r ( o b j ,   [ ' m o u s e u p ' ] ,   u p H a n d l e r ,   c a p t u r e ) ;  
 }  
  
 J S K i t L i b . n o t D r a g g a b l e   =   f u n c t i o n ( e l e m e n t )   {  
 	 e l e m e n t . o n s e l e c t s t a r t   =   f u n c t i o n ( e v )   {   J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e v ) ;   r e t u r n   t r u e ;   }  
 	 e l e m e n t . o n m o u s e d o w n   =   J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ;  
 	 r e t u r n   e l e m e n t ;  
 }  
  
 J S K i t L i b . g e t M o u s e P o s i t i o n   =   f u n c t i o n ( e )   {  
 	 i f   ( ! e )   v a r   e   =   w i n d o w . e v e n t ;  
 	 i f   ( e . c l i e n t X   | |   e . c l i e n t Y )   {  
 	 	 r e t u r n   { x : e . c l i e n t X ,   y : e . c l i e n t Y } ;  
 	 }   e l s e   {  
 	 	 r e t u r n   { x : e . p a g e X ,   y : e . p a g e Y } ;  
 	 }  
 }  
  
 J S K i t L i b . p r e v e n t S e l e c t   =   f u n c t i o n ( e l e m e n t ,   e x c e p t i o n s )   {  
 	 v a r   b r o w s e r   =   J S K i t L i b . g e t B r o w s e r ( ) ;  
 	 v a r   p r e v e n t   =   f u n c t i o n ( )   {  
 	 	 i f   ( b r o w s e r   = =   ' I E '   | |   b r o w s e r   = =   ' s a f a r i ' )   {  
 	 	 	 e l e m e n t . o n s e l e c t s t a r t   =   f u n c t i o n ( )   {   r e t u r n   f a l s e ;   }  
 	 	 }   e l s e   i f   ( b r o w s e r   = =   ' g e c k o ' )   {  
 	 	 	 J S K i t L i b . a d d C l a s s ( e l e m e n t ,   ' j s - n s g e c k o ' ) ;  
 	 	 }  
 	 }  
 	 i f   ( t y p e o f   e x c e p t i o n s   = =   ' o b j e c t ' )   {  
 	 	 v a r   i n c l u d e   =   e x c e p t i o n s . i n c l u d e   | |   [ ] ;  
 	 	 v a r   e x c l u d e   =   e x c e p t i o n s . e x c l u d e   | |   [ ] ;  
 	 	 / /   D o   n o t   h a n d l e   f o r   c e r t a i n   b r o w s e r s  
 	 	 i f   ( e x c l u d e . l e n g t h )   {  
 	 	 	 f o r   ( v a r   i = 0 ;   i   <   e x c l u d e . l e n g t h ;   i + + )   {  
 	 	 	 	 i f   ( e x c l u d e [ i ]   ! =   b r o w s e r )   {  
 	 	 	 	 	 p r e v e n t ( ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 	 / /   H a n d l e   f o r   c e r t a i n   b r o w s e r s  
 	 	 i f   ( i n c l u d e . l e n g t h )   {  
 	 	 	 f o r   ( v a r   i = 0 ;   i   <   i n c l u d e . l e n g t h ;   i + + )   {  
 	 	 	 	 i f   ( i n c l u d e [ i ]   = =   b r o w s e r )   {  
 	 	 	 	 	 p r e v e n t ( ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }   e l s e   {  
 	 	 p r e v e n t ( ) ;  
 	 }  
 }  
  
  
  
 J S K i t L i b . a d d C s s   =   f u n c t i o n ( c s s C o d e ,   n a m e ,   c o n t e n t )   {  
 	 v a r   d o c   =   c o n t e n t   | |   d o c u m e n t ;  
 	 i f ( n a m e )   {  
 	 	 n a m e   =   " j s - "   +   n a m e   +   " - c s s " ;  
 	 	 i f   ( d o c . g e t E l e m e n t B y I d ( n a m e ) )   r e t u r n ;  
 	 }  
 	 v a r   s e   =   d o c . c r e a t e E l e m e n t ( " s t y l e " ) ;  
 	 s e . t y p e   =   " t e x t / c s s " ;  
 	 i f ( n a m e )   s e . i d   =   n a m e ;  
 	 i f   ( s e . s t y l e S h e e t )   s e . s t y l e S h e e t . c s s T e x t   =   c s s C o d e ;  
 	 e l s e   s e . a p p e n d C h i l d ( d o c . c r e a t e T e x t N o d e ( c s s C o d e ) ) ;  
 	 v a r   h d   =   d o c . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) ;  
 	 i f ( h d   & &   h d [ 0 ] )   h d [ 0 ] . a p p e n d C h i l d ( s e ) ;  
 	 e l s e   d o c . w r i t e ( ' < s t y l e > ' + c s s C o d e + ' < / s t y l e > ' ) ;  
 }  
  
 J S K i t L i b . g e t E l e m e n t s B y C l a s s   =   f u n c t i o n ( n o d e ,   s e a r c h C l a s s ,   t a g )   {  
 	 v a r   c l a s s E l e m e n t s   =   [ ] ;  
 	 n o d e   =   n o d e   | |   d o c u m e n t ;  
 	 t a g   =   t a g   | |   ' * ' ;  
 	 v a r   t a g E l e m e n t s   =   n o d e . g e t E l e m e n t s B y T a g N a m e ( t a g ) ;  
 	 v a r   r e g e x   =   n e w   R e g E x p ( " ( ^ | \ \ s ) "   +   s e a r c h C l a s s   +   " ( \ \ s | $ ) " ) ;  
 	 f o r   ( v a r   i = 0 ,   j = 0 ;   i   <   t a g E l e m e n t s . l e n g t h ;   i + + )   {  
 	 	 i f   ( r e g e x . t e s t ( t a g E l e m e n t s [ i ] . c l a s s N a m e ) )   {  
 	 	 	 c l a s s E l e m e n t s [ j ]   =   t a g E l e m e n t s [ i ] ;  
 	 	 	 j + + ;  
 	 	 }  
 	 }  
 	 r e t u r n   c l a s s E l e m e n t s ;  
 } ;  
  
 J S K i t L i b . m a p C l a s s 2 O b j e c t   =   f u n c t i o n ( c t l ,   e )   {  
                 i f ( e . c l a s s N a m e )   {  
                                 v a r   a r r   =   S t r i n g ( e . c l a s s N a m e ) . s p l i t ( / [   ] + / ) ;  
                                 J S K i t L i b . m a p ( f u n c t i o n ( e l )   {   c t l [ e l ]   =   e   } ,   a r r ) ;  
                 }  
                 i f ( e . n a m e )   c t l [ e . n a m e ]   =   e ;  
                 t r y   {  
                                 v a r   s e l f   =   t h i s ;  
                                 J S K i t L i b . m a p ( f u n c t i o n ( c h i l d )   {  
                                                 J S K i t L i b . m a p C l a s s 2 O b j e c t ( c t l ,   c h i l d ) ;  
                                 } ,   e . c h i l d N o d e s ) ;  
                 }   c a t c h ( e ) { }  
                 r e t u r n   c t l ;  
 }  
  
 J S K i t L i b . h a s C l a s s   =   f u n c t i o n ( e l e m e n t ,   c l a s s N a m e )   {  
 	 r e t u r n   e l e m e n t . c l a s s N a m e . m a t c h ( n e w   R e g E x p ( ' ( \ \ s | ^ ) '   +   c l a s s N a m e   +   ' ( \ \ s | $ ) ' ) ) ;  
 }  
  
 J S K i t L i b . a d d C l a s s   =   f u n c t i o n ( e l e m e n t ,   c l a s s N a m e )   {  
 	 i f   ( ! J S K i t L i b . h a s C l a s s ( e l e m e n t ,   c l a s s N a m e ) )   {  
 	 	 e l e m e n t . c l a s s N a m e   + =   '   '   +   c l a s s N a m e ;  
 	 }  
 }  
  
 J S K i t L i b . r e m o v e C l a s s   =   f u n c t i o n ( e l e m e n t ,   c l a s s N a m e )   {  
 	 i f   ( J S K i t L i b . h a s C l a s s ( e l e m e n t ,   c l a s s N a m e ) )   {  
 	 	 v a r   r e g e x   =   n e w   R e g E x p ( ' ( \ \ s | ^ ) '   +   c l a s s N a m e   +   ' ( \ \ s | $ ) ' ) ;  
 	 	 e l e m e n t . c l a s s N a m e   =   e l e m e n t . c l a s s N a m e . r e p l a c e ( r e g e x ,   '   ' ) ;  
 	 }  
 }  
  
  
  
 J S K i t L i b . r e m o v e C h i l d r e n   =   f u n c t i o n ( e l e m e n t )   {  
 	 w h i l e ( e l e m e n t   & &   e l e m e n t . h a s C h i l d N o d e s ( ) )  
 	 	 e l e m e n t . r e m o v e C h i l d ( e l e m e n t . f i r s t C h i l d ) ;  
 }  
  
 J S K i t L i b . v i s i b l e   =   f u n c t i o n ( e l e m e n t )   {  
 	 r e t u r n   e l e m e n t . s t y l e . d i s p l a y   ! =   ' n o n e ' ;  
 }  
  
 J S K i t L i b . s h o w   =   f u n c t i o n ( e l e m e n t ,   s t y l e )   {  
 	 e l e m e n t . s t y l e . d i s p l a y   =   s t y l e   | |   ' ' ;  
 }  
  
 J S K i t L i b . h i d e   =   f u n c t i o n ( e l e m e n t )   {  
 	 e l e m e n t . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 }  
  
 J S K i t L i b . t o g g l e   =   f u n c t i o n ( e l e m e n t ,   s t y l e )   {  
 	 ( e l e m e n t . s t y l e . d i s p l a y   = =   ' n o n e ' )   ?   J S K i t L i b . s h o w ( e l e m e n t ,   s t y l e )   :     J S K i t L i b . h i d e ( e l e m e n t ) ;  
 }  
  
 J S K i t L i b . g e t S t y l e   =   f u n c t i o n ( e l e m e n t )   {  
 	 i f   ( t y p e o f   e l e m e n t . s t y l e . c s s T e x t   ! =   " u n d e f i n e d " )   {  
 	 	 r e t u r n   e l e m e n t . s t y l e . c s s T e x t ;  
 	 }   e l s e   {  
 	 	 r e t u r n   e l e m e n t . g e t A t t r i b u t e ( " s t y l e " ) ;  
 	 }  
 }  
  
 J S K i t L i b . s e t S t y l e   =   f u n c t i o n ( e l e m e n t ,   s t y l e )   {  
 	 i f   ( t y p e o f   e l e m e n t . s t y l e . c s s T e x t   ! =   " u n d e f i n e d " )   {  
 	 	 e l e m e n t . s t y l e . c s s T e x t   =   s t y l e ;  
 	 }   e l s e   {  
 	 	 e l e m e n t . s e t A t t r i b u t e ( " s t y l e " ,   s t y l e ) ;  
 	 }  
 }  
  
 J S K i t L i b . a d d S t y l e   =   f u n c t i o n ( e l e m e n t ,   s t y l e )   {  
 	 v a r   o l d S t y l e   =   J S K i t L i b . g e t S t y l e ( e l e m e n t ) ;  
 	 J S K i t L i b . s e t S t y l e ( e l e m e n t ,   o l d S t y l e   +   ' ;   '   +   s t y l e ) ;   / /   I E   n e e d s   ;  
 }  
  
 J S K i t L i b . f i n d P o s   =   f u n c t i o n ( o b j )   {  
 	 v a r   o r i g O b j   =   o b j ;  
 	 v a r   c u r l e f t   =   c u r t o p   =   c u r r i g h t   =   c u r b o t t o m   =   0 ;  
 	 i f   ( o b j . o f f s e t P a r e n t )   {  
 	 	 c u r l e f t   =   o b j . o f f s e t L e f t ;  
 	 	 c u r t o p   =   o b j . o f f s e t T o p ;  
 	 	 w h i l e   ( o b j   =   o b j . o f f s e t P a r e n t )   {  
 	 	 	 c u r l e f t   + =   o b j . o f f s e t L e f t ;  
 	 	 	 c u r t o p   + =   o b j . o f f s e t T o p ;  
 	 	 }  
 	 }  
 	 c u r r i g h t   =   c u r l e f t   +   o r i g O b j . o f f s e t W i d t h ;  
 	 c u r b o t t o m   =   c u r t o p   +   o r i g O b j . o f f s e t H e i g h t ;  
 	 r e t u r n   [ c u r l e f t , c u r t o p , c u r r i g h t , c u r b o t t o m ] ;  
 }  
  
 J S K i t L i b . g e t D o c S i z e   =   f u n c t i o n   ( ) {  
 	 v a r   d o c _ w i d t h , d o c _ h e i g h t ;  
 	 i f ( t y p e o f   w i n d o w . i n n e r W i d t h = = " n u m b e r " ) {  
 	 	 i f ( d o c u m e n t . d o c u m e n t E l e m e n t   & &   d o c u m e n t . d e f a u l t V i e w   & &   t y p e o f   d o c u m e n t . d e f a u l t V i e w . s c r o l l M a x Y = = " n u m b e r " ) {  
 	 	 	 d o c _ h e i g h t = d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t H e i g h t - d o c u m e n t . d e f a u l t V i e w . s c r o l l M a x Y ;  
 	 	 	 d o c _ w i d t h = d o c u m e n t . d o c u m e n t E l e m e n t . o f f s e t W i d t h - d o c u m e n t . d e f a u l t V i e w . s c r o l l M a x X ;  
 	 	 }   e l s e   {  
 	 	 	 d o c _ h e i g h t = w i n d o w . i n n e r H e i g h t ;  
 	 	 	 d o c _ w i d t h = w i n d o w . i n n e r W i d t h ;  
 	 	 }  
 	 }   e l s e   {  
 	 	 i f ( d o c u m e n t . d o c u m e n t E l e m e n t   & &   t y p e o f   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h = = " n u m b e r "   & &   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ) {  
 	 	 	 d o c _ h e i g h t = d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t ;  
 	 	 	 d o c _ w i d t h = d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h ;  
 	 	 }   e l s e   {  
 	 	 	 i f ( d o c u m e n t . c o m p a t M o d e   = =   " B a c k C o m p a t " ) {  
 	 	 	 	 d o c _ h e i g h t = d o c u m e n t . b o d y . o f f s e t H e i g h t ;  
 	 	 	 	 d o c _ w i d t h = d o c u m e n t . b o d y . o f f s e t W i d t h ;  
 	 	 	 }   e l s e   {                                                                  
 	 	 	 	 d o c _ h e i g h t = d o c u m e n t . b o d y . c l i e n t H e i g h t ;  
 	 	 	 	 d o c _ w i d t h = d o c u m e n t . b o d y . c l i e n t W i d t h ;  
 	 	 	 }  
 	 	 }  
 	 }  
 	 r e t u r n   [ d o c _ h e i g h t , d o c _ w i d t h ] ;  
 }  
  
 J S K i t L i b . g e t J S K i t B o d y E l e m e n t   =   f u n c t i o n ( )   {  
 	 v a r   b e   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' j s - k i t - b o d y - e l e m e n t ' ) ;  
 	 i f   ( ! b e )   {  
 	 	 b e   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 	 b e . i d   =   " j s - k i t - b o d y - e l e m e n t " ;  
 	 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( b e ) ;  
 	 }  
 	 r e t u r n   b e ;  
 }  
  
 J S K i t L i b . i s C h i l d N o d e O f   =   f u n c t i o n ( p a r e n t ,   c h i l d )   {  
 	 i f   ( p a r e n t   = = =   c h i l d )    
 	 	 r e t u r n   f a l s e  
 	 w h i l e   ( c h i l d   & &   c h i l d   ! = =   p a r e n t )   {  
 	 	 c h i l d   =   c h i l d . p a r e n t N o d e ;  
 	 }  
 	 r e t u r n   c h i l d   = = =   p a r e n t ;  
 }  
  
 J S K i t L i b . a d d C h i l d   =   f u n c t i o n ( t o ,   w h a t )   {  
                 i f   ( t y p e o f ( t o )   ! =   ' o b j e c t ' )  
                                 r e t u r n ;  
                 i f ( a r g u m e n t s . l e n g t h   = =   3   & &   a r g u m e n t s [ 2 ] )  
                                 t o . i n s e r t B e f o r e ( w h a t ,   t o . f i r s t C h i l d ) ;  
                 e l s e  
                                 t o . a p p e n d C h i l d ( w h a t ) ;  
 }  
  
 J S K i t L i b . s e t O p a c i t y   =   f u n c t i o n ( d i v ,   v a l )   {  
 	 i f ( d o c u m e n t . b o d y . f i l t e r s )   {  
 	 	 i f ( v a l   = =   1 )   d i v . s t y l e . f i l t e r   =   ' ' ;  
 	 	 e l s e   d i v . s t y l e . f i l t e r   =   ' a l p h a ( o p a c i t y :   '   +   M a t h . r o u n d ( v a l   *   1 0 0 )   +   ' ) ' ;  
 	 }   e l s e   {  
 	 	 d i v . s t y l e . o p a c i t y   =   v a l ;  
 	 }  
 }  
  
  
  
 J S K i t L i b . a d d P N G   =   f u n c t i o n ( n o d e ,   i m a g e U R L )   {  
 	 i f   ( J S K i t L i b . i s I E ( ) )   {  
 	 	 v a r   c p   =   $ J S K i t G l o b a l . c a c h e d P n g s ;  
 	 	 J S K i t L i b . f m a p ( c p ,   f u n c t i o n ( i m g )   {  
 	 	 	 i m g . n o d e s   =   J S K i t L i b . f i l t e r ( f u n c t i o n ( e l m )   {   r e t u r n   e l m   ! =   n o d e ;   } ,   i m g . n o d e s ) ;  
 	 	 } ) ;  
 	 	 i f ( c p [ i m a g e U R L ] )   {  
 	 	 	 i f ( c p [ i m a g e U R L ] . l o a d e d )   {  
 	 	 	 	 n o d e . r u n t i m e S t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   i m a g e U R L   +   " ' ,   s i z i n g M e t h o d = ' c r o p ' ) "  
 	 	 	 }   e l s e   {  
 	 	 	 	 c p [ i m a g e U R L ] . n o d e s . p u s h ( n o d e ) ;  
 	 	 	 }  
 	 	 }   e l s e   {  
 	 	 	 c p [ i m a g e U R L ]   =   { n o d e s : [ n o d e ] } ;  
 	 	 	 v a r   t P n g   =   d o c u m e n t . c r e a t e E l e m e n t ( " I M G " ) ;  
 	 	 	 t P n g . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 	 t P n g . o n l o a d   =   f u n c t i o n ( )   {  
 	 	 	 	 c p [ i m a g e U R L ] . l o a d e d   =   t r u e ;  
 	 	 	 	 v a r   n   =   c p [ i m a g e U R L ] . n o d e s ;  
 	 	 	 	 f o r ( v a r   i = 0 ;   i < n . l e n g t h ;   i + + )   {  
 	 	 	 	 	 n [ i ] . r u n t i m e S t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "   +   i m a g e U R L   +   " ' ,   s i z i n g M e t h o d = ' c r o p ' ) " ;  
 	 	 	 	 }  
 	 	 	 	 c p [ i m a g e U R L ] . n o d e s   =   [ ] ;  
 	 	 	 } ;  
 	 	 	 n o d e . a p p e n d C h i l d ( t P n g ) ;  
 	 	 	 t P n g . s r c   =   i m a g e U R L ;  
 	 	 }  
 	 }   e l s e   {  
 	 	 n o d e . s t y l e . b a c k g r o u n d I m a g e   =   ' u r l ( '   +   i m a g e U R L   +   ' ) ' ;  
 	 	 n o d e . s t y l e . b a c k g r o u n d R e p e a t   =   ' n o - r e p e a t ' ;                  
 	 }  
 	 r e t u r n   n o d e ;  
 }  
  
 J S K i t L i b . p r e l o a d I m g   =   f u n c t i o n ( i m g U R L )   {    
 	 i f   ( ! J S K i t L i b . p r e l o a d I m g L i s t )   J S K i t L i b . p r e l o a d I m g L i s t   =   { } ;  
 	 i f   ( ! J S K i t L i b . p r e l o a d I m g L i s t [ i m g U R L ] )   {  
 	 	 ( n e w   I m a g e ( ) ) . s r c   =   i m g U R L ;    
 	 	 J S K i t L i b . p r e l o a d I m g L i s t [ i m g U R L ]   =   t r u e ;  
 	 }  
 } ;  
  
 J S K i t L i b . p n g B a r   =   f u n c t i o n ( c o l o r ,   d i v ,   f i x e d )   {  
 	 v a r   s t r ;  
 	 v a r   u r l   =   " ' / / j s - k i t . c o m / i m a g e s / b a r s / b a r - "   +   c o l o r   +   " . p n g ' " ;  
 	 i f ( d o c u m e n t . b o d y   & &   d o c u m e n t . b o d y . f i l t e r s )   {  
 	 	 s t r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = "  
 	 	 	 +   u r l   +   " ,   s i z i n g M e t h o d = ' " + ( f i x e d ? ' c r o p ' : ' s c a l e ' ) + " ' ) " ;  
 	 	 i f ( d i v )   d i v . r u n t i m e S t y l e . f i l t e r   =   s t r ;  
 	 	 r e t u r n   " f i l t e r :   "   +   s t r   +   " ; " ;  
 	 }   e l s e   {  
 	 	 s t r   =   " u r l ( "   +   u r l   +   " ) " ;  
 	 	 i f ( d i v )   d i v . s t y l e . b a c k g r o u n d I m a g e   =   s t r ;  
 	 	 r e t u r n   " b a c k g r o u n d :   "   +   s t r   +   " ; " ;  
 	 }  
 } ;  
  
 J S K i t L i b . c r e a t e M i n i S t a r O b j e c t   =   f u n c t i o n ( r a t i n g ,   s c a l e ,   s p e c s )   {  
 	 v a r   f u l l S t a r   =   s p e c s . f u l l ;  
 	 v a r   e m p t y S t a r   =   s p e c s . e m p t y ;  
 	 v a r   s t a r W i d t h   =   s p e c s . w i d t h ;  
 	 v a r   s t a r H e i g h t   =   s p e c s . h e i g h t ;  
  
 	 v a r   s e t I m a g e   =   f u n c t i o n ( s t a r ,   i m a g e U R L )   {  
 	 	 i f ( s t a r . i m a g e U R L   = =   i m a g e U R L )  
 	 	 	 r e t u r n ;   / /   A l r e a d y   s e t   a n d   w e   k n o w   i t  
  
 	 	 s t a r . i m a g e U R L   =   i m a g e U R L ;  
 	 	 J S K i t L i b . a d d P N G ( s t a r ,   i m a g e U R L ) ;  
 	 }  
  
 	 v a r   o b j   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 v a r   o b j W i d t h   =   0 ;  
 	 v a r   o b j H e i g h t   =   s t a r H e i g h t ;  
  
 	 / *   I n c r e m e n t   b y   F u l l   S t a r   R a t i n g s   * /  
 	 f o r   ( v a r   i = 2 ;   i   < =   s c a l e ;   i   + =   2 )   {  
 	 	 v a r   s t a r   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
  
 	 	 s t a r . s t y l e . c s s F l o a t       =   ' l e f t ' ;  
 	 	 s t a r . s t y l e . s t y l e F l o a t   =   ' l e f t ' ;  
 	 	 s t a r . s t y l e . w i d t h         =   s t a r W i d t h   +   ' p x ' ;  
 	 	 s t a r . s t y l e . h e i g h t       =   s t a r H e i g h t   +   ' p x ' ;  
 	 	 s t a r . s t y l e . f o n t S i z e   =   s t a r H e i g h t   +   ' p x ' ;   / /   i e 6  
  
 	 	 o b j W i d t h   + =   s t a r H e i g h t ;  
  
 	 	 i f   ( r a t i n g   > =   i )   {  
 	 	 	 s e t I m a g e ( s t a r ,   f u l l S t a r ) ;  
 	 	 }   e l s e   {  
 	 	 	 s e t I m a g e ( s t a r ,   e m p t y S t a r ) ;  
 	 	 }  
  
 	 	 o b j . a p p e n d C h i l d ( s t a r ) ;  
 	 }  
  
 	 J S K i t L i b . s e t S t y l e ( o b j ,   " h e i g h t :   "   +   o b j H e i g h t   +   " p x ;   w i d t h :   "   +   o b j W i d t h   +   " p x ;   f l o a t :   l e f t ;   m a r g i n - r i g h t :   5 p x ; " ) ;  
  
 	 r e t u r n   o b j ;  
 }  
  
  
  
 J S K i t L i b . g e t O u t e r H T M L   =   f u n c t i o n ( n o d e )   {  
 	 v a r   c l o n e   =   n o d e . c l o n e N o d e ( t r u e ) ;  
 	 v a r   p a r e n t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 p a r e n t . a p p e n d C h i l d ( c l o n e ) ;  
 	 v a r   i h t m l   =   p a r e n t . i n n e r H T M L ;  
  
         / /   f f   c o n v e r t s   s p   c h a r a c t e r s   i n s i d e   o f   h r e f   t o   h e x   a s c i i  
 	 v a r   i h t m l H r e f   =   i h t m l . m a t c h ( / h r e f \ s * = \ s * " [ ^ " ] * ( % 7 B | % 7 D ) [ ^ " ] * " / g )   | |   [ ] ;  
 	 f o r   ( v a r   i = 0 ;   i <   i h t m l H r e f . l e n g t h ;   i + + )   {  
 	 	 v a r   a   =   i h t m l H r e f [ i ] ;  
 	 	 v a r   b   =   a . r e p l a c e ( / % 7 B / g ,   ' { ' ) ;  
 	 	 b   =   b . r e p l a c e ( / % 7 D / g ,   ' } ' ) ;  
 	 	 i h t m l   =   i h t m l . r e p l a c e ( a ,   b ) ;  
 	 }  
 	 r e t u r n   i h t m l ;  
 } ;  
  
 J S K i t L i b . h t m l   =   f u n c t i o n ( )   {  
                 v a r   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ;  
                 f o r ( v a r   t e x t   =   ' ' ,   i   =   0 ;   i   <   a r g u m e n t s . l e n g t h ;   i + + )  
                                 t e x t   + =   a r g u m e n t s [ i ] ;  
                 d i v . i n n e r H T M L   =   t e x t ;  
                 v a r   c h   =   d i v . f i r s t C h i l d ;  
                 d i v   =   n u l l ;  
                 r e t u r n   c h ;  
 }  
  
 J S K i t L i b . h t m l Q u o t e   =   f u n c t i o n   ( n e w V a l u e ,   p a r a m )   {  
 	 n e w V a l u e   =   n e w V a l u e . r e p l a c e ( / & / g , " & a m p ; " ) . r e p l a c e ( / < / g , " & l t ; " ) . r e p l a c e ( / > / g , " & g t ; " )  
 	 p a r a m   =   p a r a m   | |   { } ;  
 	 i f ( ! p a r a m . t i t l e )  
 	 	 n e w V a l u e   =   n e w V a l u e . r e p l a c e ( /   / , " & n b s p ; " ) ;  
 	 i f ( p a r a m . a t t r i b u t e )  
 	 	 n e w V a l u e   =   n e w V a l u e . r e p l a c e ( / " / g , " & q u o t ; " ) ;  
 	 r e t u r n   n e w V a l u e ;  
 }  
  
 J S K i t L i b . h t m l U n q u o t e   =   f u n c t i o n   ( n e w V a l u e )   {  
 	 r e t u r n   n e w V a l u e . r e p l a c e ( / & l t ; / g , " < " ) . r e p l a c e ( / & g t ; / g , " > " ) . r e p l a c e ( / & a m p ; / g , " & " ) ;  
 }  
  
 J S K i t L i b . a d d J S   =   f u n c t i o n ( s r c , c o n t e n t )   {  
 	 v a r   s I d   =   " j s - k i t - s c r i p t - " + s r c . r e p l a c e ( / [ \ / . ] / g ,   ' ' ) ;  
 	 c o n t e n t . j s k $ s c r i p t I d   =   s I d ;  
 	 i f ( d o c u m e n t . g e t E l e m e n t B y I d ( s I d ) )   {  
 	 	 r e t u r n ;  
 	 }  
 	 v a r   s   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s c r i p t ' ) ;  
 	 s . i d   =   s I d ;  
 	 s . t y p e   = ' t e x t / j a v a s c r i p t ' ;  
 	 s . c h a r s e t   =   ' u t f - 8 ' ;  
 	 s . s r c   =   s r c ;  
 	 c o n t e n t . a p p e n d C h i l d ( s ) ;  
 	 r e t u r n   s ;  
 }  
  
 J S K i t L i b . s t r i p T a g s   =   f u n c t i o n ( t e x t )   {  
 	 v a r   r   =   / < \ / ? ( a | e m | s t r o n g | i | b | u | s u p | s u b | o b j e c t | p a r a m | e m b e d | s p a n | p r e | p ) ( . | \ n ) * ? > / g i ;  
 	 t e x t   =   t e x t . r e p l a c e ( / < o b j e c t ( . | \ n ) + ? < \ / o b j e c t > / g i , " [ v i d e o ] " ) ;  
 	 t e x t   =   t e x t . r e p l a c e ( r , " " ) ;  
 	 r e t u r n   ( t e x t . l e n g t h   >   1 5 0 )   ?   t e x t . s l i c e ( 0 , 1 5 0 )   +   " . . . "   :   t e x t ;  
 }  
  
 J S K i t L i b . c r e a t e H i d d e n I f r a m e   =   f u n c t i o n ( i d ,   t a r g e t ,   c b ,   c l e a r O n l o a d ,   s r c )   {  
 	 c l e a r O n l o a d   =   ( t y p e o f   c l e a r O n l o a d   = =   ' u n d e f i n e d '   ?   t r u e   :   ! ! c l e a r O n l o a d ) ;  
 	 s r c   =   s r c   | |   ' a b o u t : b l a n k ' ;  
 	 t a r g e t   =   t a r g e t   | |   d o c u m e n t . b o d y ;  
 	 v a r   d   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 d . s t y l e . h e i g h t   =   0 ;  
 	 d . i n n e r H T M L   =   ' < i f r a m e   i d = " '   +   i d   +   ' "   n a m e = " '   +   i d   +   ' "   s r c = " '   +   s r c   +   ' "   w i d t h = " 0 "   h e i g h t = " 0 "   f r a m e b o r d e r = " 0 "     s t y l e = " b o r d e r :   n o n e " > < / i f r a m e > ' ;  
 	 t a r g e t . a p p e n d C h i l d ( d ) ;  
 	 v a r   i f r   =   d . f i r s t C h i l d ;  
 	 i f   ( c b )   {  
 	 	 i f r . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( e )   {  
 	 	 	 i f   ( i f r . r e a d y S t a t e   & &   i f r . r e a d y S t a t e   ! =   ' l o a d e d '   & &   i f r . r e a d y S t a t e   ! =   ' c o m p l e t e ' )   r e t u r n ;  
 	 	 	 i f   ( c l e a r O n l o a d )   {  
 	 	 	 	 i f r . o n r e a d y s t a t e c h a n g e   =   i f r . o n l o a d   =   n u l l ;  
 	 	 	 }  
 	 	 	 c b ( ) ;  
 	 	 } ;  
 	 	 i f   ( ! J S K i t L i b . i s O p e r a ( ) )   {  
 	 	 	 i f r . o n l o a d   =   i f r . o n r e a d y s t a t e c h a n g e ;  
 	 	 }  
 	 }  
 	 r e t u r n   i f r ;  
 }  
  
  
  
 J S K i t L i b . m a p   =   f u n c t i o n ( f ,   a r r )   {  
 	 i f ( a r r )   f o r ( v a r   i   =   0 ;   i   <   a r r . l e n g t h ;   i + + )   f ( a r r [ i ] ,   i ,   a r r ) ;  
 	 r e t u r n   a r r ;  
 }  
  
 J S K i t L i b . f i l t e r   =   f u n c t i o n ( f ,   a r r )   {  
 	 v a r   n e w A r r   =   [ ] ;  
 	 i f ( a r r )  
 	 	 f o r ( v a r   i   =   0 ;   i   <   a r r . l e n g t h ;   i + + )  
 	 	 	 i f ( f ( a r r [ i ] ,   i ,   a r r ) )  
 	 	 	 	 n e w A r r . p u s h ( a r r [ i ] ) ;  
 	 r e t u r n   n e w A r r ;  
 }  
  
 J S K i t L i b . f m a p   =   f u n c t i o n ( o , f )   {  
 	 v a r   r ,   a   =   [ ] ,   l   =   o . l e n g t h ;  
 	 i f ( l   >   0   | |   l   = = =   0 )  
 	 	 f o r ( v a r   i   =   0 ;   i   <   l ;   i + + )   {  
 	 	 	 r   =   f . c a l l ( t h i s , o [ i ] , i , a r g u m e n t s ) ;  
 	 	 	 i f ( r   ! = =   u n d e f i n e d )   a . p u s h ( r ) ;  
 	 	 }  
 	 e l s e  
 	 	 f o r ( v a r   i   i n   o )  
 	 	 	 i f ( o . h a s O w n P r o p e r t y ( i ) )   {  
 	 	 	 	 r   =   f . c a l l ( t h i s , o [ i ] , i , a r g u m e n t s ) ;  
 	 	 	 	 i f ( r   ! = =   u n d e f i n e d )   a . p u s h ( r ) ;  
 	 	 	 }  
 	 r e t u r n   a ;  
 }  
  
 J S K i t L i b . f o l d l   =   f u n c t i o n ( a c c , o , f )   {  
 	 v a r   r ,   l   =   o . l e n g t h ;  
 	 i f ( l   >   0   | |   l   = = =   0 )  
 	 	 f o r ( v a r   i   =   0 ;   i   <   l ;   i + + )   {  
 	 	 	 r   =   f . c a l l ( t h i s , o [ i ] , a c c , i ) ;  
 	 	 	 i f ( r   ! =   u n d e f i n e d )   a c c   =   r ;  
 	 	 }  
 	 e l s e  
 	 	 f o r ( v a r   i   i n   o )  
 	 	 	 i f ( o . h a s O w n P r o p e r t y ( i ) )   {  
 	 	 	 	 r   =   f . c a l l ( t h i s , o [ i ] , a c c , i ) ;  
 	 	 	 	 i f ( r   ! =   u n d e f i n e d )   a c c   =   r ;  
 	 	 	 }  
 	 r e t u r n   a c c ;  
 }  
  
 J S K i t L i b . i n t e r s p e r s e   =   f u n c t i o n ( f )   {  
 	 r e t u r n   J S K i t L i b . f o l d l ( [ ] ,   t h i s ,   f u n c t i o n ( e ,   a c c ,   i )   {  
 	 	 i f ( a c c . l e n g t h )   a c c . p u s h ( f ) ;  
 	 	 a c c . p u s h ( e ) ;  
 	 } ) ;  
 }  
  
  
  
 i f   ( t y p e o f   J S K i t L i b . v a r s . w i n d o w O n L o a d F i r e d   = =   ' u n d e f i n e d ' )   {  
                 J S K i t L i b . v a r s . w i n d o w O n L o a d F i r e d   =   f a l s e ;  
                 J S K i t L i b . a d d E v e n t H a n d l e r ( w i n d o w ,   [ ' l o a d ' ] ,   f u n c t i o n ( ) {   J S K i t L i b . v a r s . w i n d o w O n L o a d F i r e d   =   t r u e ;   } ) ;  
 }  
  
  
  
 v a r   J S K i t G l o b a l   =   f u n c t i o n ( )   {  
  
 	 t h i s . _ a p p A v a i l a b l e   =   { } ;  
 	 t h i s . _ a p p O b j e c t s   =   { } ;     / /   S p e c i f i c   o b j e c t s   o f   a n   a p p l i c a t i o n   t y p e    
 	 t h i s . _ a p p O b j e c t A c t i o n s   =   { } ;   / /   a p p . o b j e c t . a c t i o n s  
 	  
 	 t h i s . c a c h e d P n g s   =   { } ;  
  
 	 t h i s . _ i s A p p A v a i l a b l e   =   f u n c t i o n ( a p p )   {  
 	 	 r e t u r n   ( t h i s . _ a p p A v a i l a b l e [ a p p ] )   ?   t r u e   :   f a l s e ;  
 	 }  
  
 	 t h i s . i s R a t i n g s A p p A v a i l a b l e   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   t h i s . _ i s A p p A v a i l a b l e ( ' r a t i n g s ' ) ;  
 	 }  
  
 	 t h i s . i s C o m m e n t s A p p A v a i l a b l e   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   t h i s . _ i s A p p A v a i l a b l e ( ' c o m m e n t s ' ) ;  
 	 }  
  
 	 t h i s . _ s e t A p p A v a i l a b l e   =   f u n c t i o n ( a p p )   {  
 	 	 t h i s . _ a p p A v a i l a b l e [ a p p ]   =   t r u e ;  
 	 	 / *   i n d e x   t h i s   a p p   * /  
 	 	 t h i s . i n d e x A p p O b j e c t s ( a p p ) ;  
 	 	 / *   e x e c u t e   a n y   q u e u e d   a c t i o n s   * /  
 	 	 t h i s . e x e c u t e A p p O b j e c t A c t i o n s ( a p p ) ;  
 	 }  
  
 	 t h i s . s e t R a t i n g s A p p A v a i l a b l e   =   f u n c t i o n ( )   {  
 	 	 t h i s . _ s e t A p p A v a i l a b l e ( ' r a t i n g s ' ) ;  
 	 }  
  
 	 t h i s . s e t C o m m e n t s A p p A v a i l a b l e   =   f u n c t i o n ( )   {  
 	 	 t h i s . _ s e t A p p A v a i l a b l e ( ' c o m m e n t s ' ) ;  
 	 }  
  
 	 t h i s . i n d e x A p p O b j e c t s   =   f u n c t i o n ( a p p )   {  
 	 	 i f   ( a p p   = =   ' r a t i n g s ' )   {  
 	 	 	 v a r   a p p A r r a y   =   $ J R A ;  
 	 	 }   e l s e   i f   ( a p p   = =   ' c o m m e n t s ' )   {  
 	 	 	 v a r   a p p A r r a y   =   $ J C A ;  
 	 	 }   e l s e   {  
 	 	 	 a l e r t ( ' A t t e m p t   t o   i n d e x   i n v a l i d   a p p   t y p e ' ) ;  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 	 f o r   ( v a r   i = 0 ;   i   <   a p p A r r a y . l e n g t h ;   i + + )   {  
 	 	 	 / /   C h e c k   t h a t   i t ' s   n o t   s t a n d a l o n e  
 	 	 	 i f   ( a p p A r r a y [ i ] . i s S t a n d a l o n e ( ) )   {  
 	 	 	 	 c o n t i n u e ;  
 	 	 	 }  
 	 	 	 v a r   u n i q   =   a p p A r r a y [ i ] . u n i q ;  
 	 	 	 i f   (   !   t h i s . _ a p p O b j e c t s [ u n i q ]   )   {  
 	 	 	 	 t h i s . _ a p p O b j e c t s [ u n i q ]   =   { } ;  
 	 	 	 }  
 	 	 	 i f   (   !   t h i s . _ a p p O b j e c t s [ u n i q ] [ a p p ] )   {  
 	 	 	 	 t h i s . _ a p p O b j e c t s [ u n i q ] [ a p p ]   =   [ ] ;  
 	 	 	 }  
 	 	 	 t h i s . _ a p p O b j e c t s [ u n i q ] [ a p p ] . p u s h ( a p p A r r a y [ i ] ) ;  
 	 	 }  
 	 }  
  
 	 t h i s . e x e c u t e A p p O b j e c t A c t i o n s   =   f u n c t i o n ( a p p )   {  
 	 	 i f   ( t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] )   {  
 	 	 	 f o r   ( v a r   i = 0 ;   i   <   t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] . l e n g t h ;   i + + )   {  
 	 	 	 	 v a r   u n i q   =   t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] [ i ] . u n i q ;  
 	 	 	 	 i f   ( t h i s . _ g e t A p p O b j e c t ( a p p ,   u n i q ) )   {  
 	 	 	 	 	 t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] [ i ] . a c t i o n ( ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }  
  
 	 t h i s . _ g e t A p p O b j e c t   =   f u n c t i o n ( a p p ,   u n i q )   {  
 	 	 i f   ( t h i s . _ a p p O b j e c t s [ u n i q ]   & &   t h i s . _ a p p O b j e c t s [ u n i q ] [ a p p ] )   {  
 	 	 	 r e t u r n   t h i s . _ a p p O b j e c t s [ u n i q ] [ a p p ] [ 0 ] ;     / /   R e t u r n   o n l y   t h e   f i r s t  
 	 	 }  
 	 	 r e t u r n   n u l l ;  
 	 }  
  
 	 t h i s . g e t C o m m e n t s A p p O b j e c t   =   f u n c t i o n ( u n i q )   {  
 	 	 r e t u r n   t h i s . _ g e t A p p O b j e c t ( ' c o m m e n t s ' ,   u n i q ) ;  
 	 }  
  
 	 / *   R e t u r n s   a   R a t i n g s   O b j e c t   * /  
 	 t h i s . g e t R a t i n g s A p p O b j e c t   =   f u n c t i o n ( u n i q )   {  
 	 	 r e t u r n   t h i s . _ g e t A p p O b j e c t ( ' r a t i n g s ' ,   u n i q ) ;  
 	 }  
  
 	 t h i s . c o p y R a t i n g s A p p O b j e c t   =   f u n c t i o n ( u n i q ,   n o d e )   {  
 	 	 i f   (   !   t h i s . i s R a t i n g s A p p A v a i l a b l e ( ) )   {  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 	 v a r   o l d O b j   =   t h i s . g e t R a t i n g s A p p O b j e c t ( u n i q ) ;  
 	 	 v a r   n e w O b j   =   o l d O b j . c l o n e ( n o d e ,   {   ' v i e w ' : ' u s e r ' ,   ' c o m m e n t p r o m p t ' : ' n o ' ,   ' m e n u ' : ' n o '     }   ) ;  
 	 	 r e t u r n   n e w O b j ;  
 	 }  
  
 	 t h i s . _ t r y A p p O b j e c t A c t i o n   =   f u n c t i o n ( a p p ,   u n i q ,   a c t i o n )   {  
 	 	 i f   ( t h i s . _ i s A p p A v a i l a b l e ( a p p ) )   {  
 	 	 	 i f   ( t h i s . _ g e t A p p O b j e c t ( a p p ,   u n i q ) )   {  
 	 	 	 	 a c t i o n ( ) ;  
 	 	 	 }  
 	 	 }   e l s e   {  
 	 	 	 i f   (   !   t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] )   {  
 	 	 	 	 t h i s . _ a p p O b j e c t A c t i o n s [ a p p ]   =   [ ] ;  
 	 	 	 }  
 	 	 	 t h i s . _ a p p O b j e c t A c t i o n s [ a p p ] . p u s h (   {   ' u n i q '   :   u n i q ,   ' a c t i o n '   :   a c t i o n   }   ) ;  
 	 	 }  
 	 }  
  
 	 t h i s . t r y R a t i n g s A p p O b j e c t A c t i o n   =   f u n c t i o n ( u n i q ,   a c t i o n )   {  
 	 	 t h i s . _ t r y A p p O b j e c t A c t i o n ( ' r a t i n g s ' ,   u n i q ,   a c t i o n ) ;  
 	 }  
  
 	 t h i s . t r y C o m m e n t s A p p O b j e c t A c t i o n   =   f u n c t i o n ( u n i q ,   a c t i o n )   {  
 	 	 t h i s . _ t r y A p p O b j e c t A c t i o n ( ' c o m m e n t s ' ,   u n i q ,   a c t i o n ) ;  
 	 }  
 }  
  
 / *   S i n g l e t o n - l i k e   h a n d l e r   * /  
 J S K i t G l o b a l . g e t I n s t a n c e   =   f u n c t i o n ( )   {  
 	 i f   (   !   w i n d o w . J S K i t G l o b a l I n s t a n c e )   {  
 	 	 J S K i t G l o b a l I n s t a n c e   =   n e w   J S K i t G l o b a l ( ) ;  
 	 }  
 	 r e t u r n   J S K i t G l o b a l I n s t a n c e ;  
 }  
  
  
  
 / *   J S K i t G l o b a l     o b j e c t   * /  
 $ J S K i t G l o b a l   =   J S K i t G l o b a l . g e t I n s t a n c e ( ) ;  
  
  
  
 J S K i t L i b . g e t R e f   =   f u n c t i o n ( s e l f ,   i g n o r e P a t h )   {  
 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 r e t u r n   w l . p r o t o c o l   +   ' / / '  
 	 	 +   ( s e l f . p a t h O v e r r i d e  
 	 	 	 ?   ( s e l f . c o n f i g . d o m a i n . r e p l a c e ( / \ / . * / ,   ' ' )  
 	 	 	 	 +   ( i g n o r e P a t h   ?   ' '   :   s e l f . p a t h O v e r r i d e ) )  
 	 	 	 :   ( s e l f . c o n f i g . d o m a i n   +   w l . p a t h n a m e ) ) ;  
 }  
  
 J S K i t L i b . r e a d C o n f i g   =   f u n c t i o n ( w t y p e ,   t a r g e t ,   c f )   {  
 	 v a r   g t a g s   =   J S K i t L i b . p a r s e C o n f i g T a g s ( d o c u m e n t ,   w t y p e ,   ' s p a n ' ) ;  
 	 v a r   l t a g s   =   J S K i t L i b . p a r s e C o n f i g T a g s ( t a r g e t ,   ' ' ,   ' s p a n ' ) ;  
 	 f o r ( v a r   i   =   3 ;   i   <   a r g u m e n t s . l e n g t h ;   i + + )   {  
 	 	 v a r   a r g   =   a r g u m e n t s [ i ] ;  
 	 	 i f ( t y p e o f ( a r g )   = =   ' s t r i n g ' )   a r g   =   [ a r g ] ;  
 	 	 v a r   n a m e   =   a r g [ 0 ] ;  
 	 	 v a r   v a l u e   =   t a r g e t . g e t A t t r i b u t e ( n a m e )   | |   l t a g s [ n a m e ]   | |   g t a g s [ n a m e ] ;  
 	 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 	 s w i t c h   ( n a m e )   {  
 	 	 	 c a s e   ' p a t h ' :   v a l u e   =   J S K i t L i b . _ n o r m P a t h ( t a r g e t ,   v a l u e   | |   c f [ n a m e ] ) ;   b r e a k ;  
 	 	 	 c a s e   ' p e r m a l i n k ' :  
 	 	 	 	 v a l u e   =   v a l u e   | |   c f [ n a m e ]   | |   w l . h r e f . r e p l a c e ( w l . h a s h , ' ' ) ;  
 	 	 	 	 i f   ( ! v a l u e . m a t c h ( / ^ h t t p s ? : \ / \ / / ) )  
 	 	 	 	 	 v a l u e   =   " h t t p : / / "   +   w l . h o s t   +   v a l u e . r e p l a c e ( / ^ ( [ ^ \ / ] + ) / ,   " / $ 1 " ) ;  
 	 	 	 	 b r e a k ;  
 	 	 	 c a s e   ' t i t l e ' :   v a l u e   =   v a l u e   | |   c f [ n a m e ]   | |   d o c u m e n t . t i t l e ;   b r e a k ;  
 	 	 	 c a s e   ' d o m a i n ' :   v a l u e   =   v a l u e   | |   c f [ n a m e ]   | |   w l . h o s t ;   b r e a k ;  
 	 	 	 d e f a u l t :   v a l u e   =   v a l u e   | |   c f [ n a m e ] ;  
 	 	 }  
 	 	 i f ( a r g . l e n g t h   >   1 )   {  
 	 	 	 i f ( t y p e o f ( a r g [ 1 ] )   = =   ' n u m b e r ' )   {  
 	 	 	 	 i f ( v a l u e )   {  
 	 	 	 	 	 v a r   n   =   p a r s e I n t ( v a l u e ) ;  
 	 	 	 	 	 i f ( i s N a N ( n )   | |   n   <   0 )   {  
 	 	 	 	 	 	 i f ( v a l u e   = =   " n o " )   v a l u e   =   0 ;  
 	 	 	 	 	 	 e l s e   v a l u e   =   a r g [ 1 ] ;  
 	 	 	 	 	 }   e l s e   v a l u e   =   n ;  
 	 	 	 	 }   e l s e   v a l u e   =   a r g [ 1 ] ;  
 	 	 	 }   e l s e   i f ( t y p e o f ( a r g [ 1 ] )   = =   ' o b j e c t ' )   {  
 	 	 	 	 f o r ( v a r   j = a r g [ 1 ] . l e n g t h ;   j ;   j - - )  
 	 	 	 	 	 i f ( a r g [ 1 ] [ j - 1 ]   = =   v a l u e )   b r e a k ;  
 	 	 	 	 i f ( ! j )   v a l u e   =   a r g [ 1 ] [ j ] ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 i f ( ! v a l u e )   v a l u e   =   a r g [ 1 ] ;  
 	 	 	 }  
 	 	 }  
 	 	 c f [ n a m e ]   =   v a l u e ;  
 	 }  
 	 r e t u r n   c f ;  
 }  
  
 J S K i t L i b . p a r s e C o n f i g T a g s   =   f u n c t i o n ( t a r g e t ,   w t y p e ,   t a g )   {  
 	 v a r   c a c h e   =   d o c u m e n t . _ w i d g e t s _ c o n f i g ;  
 	 i f   ( w t y p e   & &   c a c h e   & &   c a c h e [ w t y p e ] )  
 	 	 r e t u r n   c a c h e [ w t y p e ] ;  
 	 v a r   r e g p   =   w t y p e   ?   w t y p e + ' ? - '   :   ' ' ;  
 	 v a r   n o d e s   =   t a r g e t . g e t E l e m e n t s B y T a g N a m e ( t a g ) ;  
 	 v a r   c o n f i g   =   { } ;  
 	 f o r   ( v a r   i   =   0 ;   i   <   n o d e s . l e n g t h ;   i + + )   {  
 	 	 v a r   r e g   =   R e g E x p ( " ^ j s - k i t - c o n f i g - " + r e g p + " ( . * ) $ " ) ;  
 	 	 v a r   m   =   r e g . e x e c ( n o d e s [ i ] . c l a s s N a m e ) ;  
 	 	 i f   ( m   & &   m . l e n g t h )   {  
 	 	 	 c o n f i g [ m [ 1 ] . t o L o w e r C a s e ( ) ]   =   n o d e s [ i ] . i n n e r H T M L ;  
 	 	 	 n o d e s [ i ] . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 }  
 	 }  
 	 i f   ( w t y p e )   {  
 	 	 d o c u m e n t . _ w i d g e t s _ c o n f i g   =   d o c u m e n t . _ w i d g e t s _ c o n f i g   | |   { } ;  
 	 	 d o c u m e n t . _ w i d g e t s _ c o n f i g [ w t y p e ]   =   c o n f i g ;  
 	 }  
 	 r e t u r n   c o n f i g ;  
 }  
  
 J S K i t L i b . _ n o r m P a t h   =   f u n c t i o n ( t a r g e t ,   p a t h )   {  
 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 v a r   u n i q   =   S t r i n g ( t a r g e t . g e t A t t r i b u t e ( " u n i q " )   | |   t a r g e t . g e t A t t r i b u t e ( " u n i q u e " )   | |   ' ' ) ;  
 	 / *   t r i m   u n i q   * /  
 	 v a r   u n i q   =   u n i q . r e p l a c e ( / ^ \ s \ s * / ,   ' ' ) ,   w s   =   / \ s / ,   i   =   u n i q . l e n g t h ;  
 	 w h i l e   ( w s . t e s t ( u n i q . c h a r A t ( - - i ) ) ) ;  
 	 u n i q   =   u n i q . s l i c e ( 0 ,   i   +   1 ) ;  
 	 / *   e n d   o f   t r i m   * /  
 	 v a r   p l u s   =   t r u e ;  
 	 i f   ( u n i q )   {  
 	 	 p l u s   =   u n i q . m a t c h ( / ^ \ + \ / * ( . * ) / ) ;  
 	 	 i f   ( p l u s )   p a t h   =   p l u s [ 1 ] ;  
 	 	 e l s e   p a t h   =   u n i q ;  
 	 }  
 	 i f ( p a t h )   {  
 	 	 p a t h   =   S t r i n g ( p a t h ) ;  
 	 	 v a r   a r   =   p a t h . m a t c h ( / ^ h t t p s ? : \ / \ / [ ^ \ / ] + ( . * ) / ) ;  
 	 	 i f ( a r )   p a t h   =   a r [ 1 ] ;  
 	 	 e l s e   p a t h   =   p a t h . r e p l a c e ( / ^ ( [ ^ \ / ] + ) / ,   ( p l u s   ?   w l . p a t h n a m e   :   " " )   +   " / $ 1 " ) ;  
 	 	 p a t h   =   p a t h . r e p l a c e ( / ^ \ / + / ,   " / " ) ;  
 	 }   e l s e   {   p a t h = w l . p a t h n a m e ;   }  
 	 r e t u r n   p a t h ;  
 }  
  
  
  
 J H I 2   =   { } ;  
 J H I 2 . c r e a t e   =   f u n c t i o n ( h i n t ,   e l e m e n t )   {  
 	 i f   ( ! e l e m e n t )   {  
 	 	 e l e m e n t   =   d o c u m e n t . c r e a t e E l e m e n t ( " i n p u t " ) ;  
 	 	 e l e m e n t . t y p e   =   " t e x t " ;  
 	 }  
 	 e l e m e n t . o r i g C o l o r   =   e l e m e n t . s t y l e . c o l o r   | |   ' b l a c k ' ;  
 	 e l e m e n t . h i n t   =   h i n t ;  
 	 e l e m e n t . d e f a u l t R e m o v e d   =   ! ! e l e m e n t . v a l u e ;  
 	 i f   ( ! e l e m e n t . v a l u e )   {  
 	 	 e l e m e n t . s t y l e . c o l o r   =   ' g r a y ' ;  
 	 	 e l e m e n t . v a l u e   =   e l e m e n t . h i n t ;  
 	 }  
 	 e l e m e n t . o n b l u r   =   f u n c t i o n ( )   {  
 	 	 i f   ( ! t h i s . d e f a u l t R e m o v e d   | |   t h i s . v a l u e   = =   ' ' )   {  
 	 	 	 t h i s . d e f a u l t R e m o v e d   =   f a l s e ;  
 	 	 	 t h i s . s t y l e . c o l o r   =   ' g r a y ' ;  
 	 	 	 t h i s . v a l u e   =   t h i s . h i n t ;  
 	 	 }  
 	 }  
 	 e l e m e n t . o n f o c u s   =   f u n c t i o n ( )   {  
 	 	 i f   ( ! t h i s . d e f a u l t R e m o v e d )   {  
 	 	 	 t h i s . d e f a u l t R e m o v e d   =   t r u e ;  
 	 	 	 t h i s . s t y l e . c o l o r   =   t h i s . o r i g C o l o r ;  
 	 	 	 t h i s . v a l u e   =   ' ' ;  
 	 	 }  
 	 }  
 	 r e t u r n   e l e m e n t ;  
 }  
  
 J H I 2 . r e m o v e   =   f u n c t i o n ( e l e m e n t )   {  
 	 i f   ( ! e l e m e n t   | |   ! e l e m e n t . h i n t )   r e t u r n ;  
 	 e l e m e n t . o n f o c u s ( ) ;  
 	 J S K i t L i b . f m a p ( [ ' o r i g C o l o r ' ,   ' h i n t ' ,   ' d e f a u l t R e m o v e d ' ,   ' o n b l u r ' ,   ' o n f o c u s ' ] ,   f u n c t i o n ( v ) {   J S K i t L i b . d e l e t e P r o p e r t y ( e l e m e n t ,   v ) ;   } ) ;  
 }  
  
  
  
 J S K i t F B . p r o t o t y p e . d i s p l a y S t a t e   =   f u n c t i o n ( e l )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   d   =   f u n c t i o n ( i d )   {   r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' - ' + s . t g t ) ;   } ;  
 	 J S K i t L i b . f m a p ( [ ' w a i t ' , ' l o g i n ' , ' p r o c e s s ' ] ,  
 	 	 f u n c t i o n ( v )   {  
 	 	 	 d ( v ) . s t y l e . d i s p l a y   =   ( e l = = v )   ?   ' b l o c k '   :   ' n o n e ' ;  
 	 	 }  
 	 ) ;  
 }  
  
 J S K i t F B . p r o t o t y p e . p r o c e s s P r o f i l e   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . d i s p l a y S t a t e ( ' p r o c e s s ' ) ;  
 	 v a r   a p i   =   F B . F a c e b o o k . a p i C l i e n t ;  
 	 v a r   u i d s   =   [ a p i . g e t _ s e s s i o n ( ) . u i d ] ;  
 	 v a r   f i e l d s   =   [ ' n a m e ' ,   ' p r o f i l e _ u r l ' ,   ' p i c _ b i g ' ,   ' p i c _ s q u a r e ' ,   ' p i c _ s q u a r e _ w i t h _ l o g o ' ] ;  
 	 a p i . u s e r s _ g e t I n f o ( u i d s ,   f i e l d s ,   f u n c t i o n ( d a t a )   {  
 	 	 i f ( ! d a t a )   {  
 	 	 	 s . p r o c e s s L o g i n S t a t u s ( ) ;  
 	 	 }   e l s e   {  
 	 	 	 F B . C o n n e c t . a d d S i g n e d P u b l i c S e s s i o n D a t a T o U r l ( " h t t p : / / j s - k i t . c o m / a p i / f a c e b o o k / p r o c e s s _ p r o f i l e " , f u n c t i o n ( u r l ) {  
 	 	 	 	 J S K i t L i b . a d d J S ( u r l + ' & p r o f i l e _ d a t a = ' + e n c o d e U R I C o m p o n e n t ( J S K i t L i b . O b j e c t 2 J S O N ( d a t a ) ) + ' & r e f = ' + s . r e f + ' & r n d = ' + M a t h . r a n d o m ( ) , d o c u m e n t . g e t E l e m e n t B y I d ( s . t g t ) ) ;  
 	 	 	 	 i f ( s . o n r e a d y )   s . o n r e a d y ( ) ;  
 	 	 	 } ) ;  
 	 	 } ;  
 	 } ) ;  
 }  
  
 J S K i t F B . p r o t o t y p e . p r o c e s s L o g i n   =   f u n c t i o n ( )   {  
 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 F B . C o n n e c t . r e q u i r e S e s s i o n ( ) ;  
 	 } ) ;  
 }  
  
 J S K i t F B . p r o t o t y p e . p r o c e s s L o g i n S t a t u s   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . d i s p l a y S t a t e ( ' l o g i n ' ) ;  
 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 F B . X F B M L . H o s t . p a r s e D o m T r e e ( ) ;  
 	 	 F B . F a c e b o o k . g e t _ s e s s i o n S t a t e ( ) . w a i t U n t i l R e a d y ( f u n c t i o n ( s t a t e )   {  
 	 	 	 i f ( s t a t e )   {  
 	 	 	 	 s . p r o c e s s P r o f i l e ( ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 s . d i s p l a y S t a t e ( ' l o g i n ' ) ;  
 	 	 	 }  
 	 	 } ) ;  
 	 } ) ;  
 }  
  
 J S K i t F B . p r o t o t y p e . i n i t   =   f u n c t i o n ( c b )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   t a r g e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( s . t g t ) ;  
 	 i f ( ! s . a p i _ k e y   | |   ! t a r g e t )   r e t u r n ;  
 	 w i n d o w . j s k $ f b _ i n i t   =   t r u e ;  
 	 v a r   i n i t F B   =   f u n c t i o n ( )   {  
 	 	 F B . i n i t ( s . a p i _ k e y , s . x d _ r e c e i v e r   | |   w i n d o w . j s k $ x d _ r e c e i v e r , { f e t c h S i g n e d P u b l i c S e s s i o n D a t a   :   t r u e } ) ;  
 	 	 i f ( c b )   c b ( ) ;  
 	 } ;  
 	 v a r   f b L o a d e d   =   f u n c t i o n ( e l )   {  
 	 	 i f ( e l   & &   e l . r e a d y S t a t e   & &   e l . r e a d y S t a t e   ! =   ' l o a d e d '  
 	 	 	 & &   e l . r e a d y S t a t e   ! =   ' c o m p l e t e ' )   r e t u r n ;  
 	 	 i f ( e l )   e l . o n r e a d y s t a t e c h a n g e   =   e l . o n l o a d   =   n u l l ;  
 	 	 i n i t F B ( ) ;  
 	 } ;  
 	 i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( ' F B _ H i d d e n C o n t a i n e r ' ) )   {  
 	 	 v a r   h c   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 	 h c . i d   =   ' F B _ H i d d e n C o n t a i n e r ' ;  
 	 	 h c . s t y l e . p o s i t i o n   =   ' a b s o l u t e ' ;  
 	 	 h c . s t y l e . t o p   =   ' - 1 0 0 0 0 p x ' ;  
 	 	 h c . s t y l e . l e f t   =   ' - 1 0 0 0 0 p x ' ;  
 	 	 h c . s t y l e . w i d t h   =   ' 0 p x ' ;  
 	 	 h c . s t y l e . h e i g h t   =   ' 0 p x ' ;  
 	 	 t a r g e t . a p p e n d C h i l d ( h c ) ;  
 	 }  
 	 i f ( ! w i n d o w . F B )   {  
 	 	 v a r   s c   =   J S K i t L i b . a d d J S ( ' h t t p : / / s t a t i c . a k . c o n n e c t . f a c e b o o k . c o m / j s / a p i _ l i b / v 0 . 4 / F e a t u r e L o a d e r . j s . p h p ' ,   t a r g e t ) ;  
 	 	 s c . o n l o a d   =   s c . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( )   { f b L o a d e d ( s c ) ; } ;  
 	 }   e l s e   {  
 	 	 i n i t F B ( ) ;  
 	 }  
 } ;  
  
 J S K i t F B . p r o t o t y p e . s h a r e C o m m e n t   =   f u n c t i o n ( )   {  
 	 v a r   s d   =   t h i s . s h a r e d a t a ;  
 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 F B . C o n n e c t . s h o w F e e d D i a l o g ( s d . t e m p l a t e ,   s d . c o m m e n t _ d a t a ,   n u l l ,  
 	 	 	 	 n u l l ,   n u l l ,   F B . R e q u i r e C o n n e c t . p r o m p t C o n n e c t ) ;  
 	 } ) ;  
 }  
  
 f u n c t i o n   J S K i t F B ( r e f ,   t g t ,   a p i _ k e y ,   x d _ r e c e i v e r ,   c b ,   s h a r e d a t a )   {  
 	 t h i s . r e f   =   r e f ;  
 	 t h i s . t g t   =   t g t ;  
 	 t h i s . a p i _ k e y   =   a p i _ k e y ;  
 	 t h i s . x d _ r e c e i v e r   =   x d _ r e c e i v e r ;  
 	 t h i s . o n r e a d y   =   c b ;  
 	 t h i s . s h a r e d a t a   =   s h a r e d a t a ;  
 	 v a r   s   =   t h i s ;  
 	 v a r   f   =   f u n c t i o n ( l o g g e d )   {  
 	 	 	 i f ( l o g g e d )   {  
 	 	 	 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 	 	 i f ( F B . C o n n e c t . _ s i n g l e t o n . _ u s e r I n f o )  
 	 	 	 	 	 F B . C o n n e c t . _ s i n g l e t o n . _ u s e r I n f o . s h o r t S t o r y S e t t i n g   =   1 ;  
 	 	 	 	 F B . C o n n e c t . _ s i n g l e t o n . _ f e e d S t a t u s M u s t B e R e f e t c h e d   =   ! s h a r e d a t a ;  
 	 	 	 	 } ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 	 	 F B . C o n n e c t . _ s i n g l e t o n . _ f e e d S t a t u s M u s t B e R e f e t c h e d   =   t r u e ;  
 	 	 	 	 } ) ;  
 	 	 	 } ;  
 	 	 	 r e t u r n   s h a r e d a t a   ?   s . s h a r e C o m m e n t ( )   :   s . p r o c e s s L o g i n S t a t u s ( ) ;  
 	 	 } ;  
 	 i f ( w i n d o w . j s k $ f b _ i n i t )   {  
 	 	 f ( t r u e ) ;  
 	 }   e l s e   {  
 	 	 t h i s . i n i t ( f ) ;  
 	 }  
 }  
  
 J S K i t F B . p r o t o t y p e . l o g o u t   =   f u n c t i o n ( )   {  
 	 i f ( w i n d o w . j s k $ f b _ i n i t )   {  
 	 	 F B . e n s u r e I n i t ( f u n c t i o n ( ) {  
 	 	 	 F B . C o n n e c t . l o g o u t ( ) ;  
 	 	 } ) ;  
 	 }  
 }  
  
 J S K i t F B . p r o t o t y p e . d e t e c t X D   =   f u n c t i o n ( t a r g e t )   {  
 	 i f ( w i n d o w . l o c a t i o n . s e a r c h . i n d e x O f ( ' f b c _ c h a n n e l = 1 ' ) > = 0 )   {  
 	 	 J S K i t L i b . a d d J S ( ' h t t p : / / s t a t i c . a k . f a c e b o o k . c o m / j s / a p i _ l i b / v 0 . 4 / X d C o m m R e c e i v e r . j s ' ,   t a r g e t ) ;  
 	 }  
 }  
  
  
  
 J S K i t G F C . p r o t o t y p e . i n i t   =   f u n c t i o n ( c b )   {  
 	 v a r   s   =   t h i s ;  
 	 i f ( ! s . s i t e   | |   ! s . t a r g e t )   r e t u r n ;  
 	 w i n d o w . j s k $ g f c _ i n i t   =   t r u e ;  
 	 v a r   i n i t G F C   =   f u n c t i o n ( )   {  
 	 	 g o o g l e . f r i e n d c o n n e c t . c o n t a i n e r . s e t P a r e n t U r l ( ' / ' ) ;  
 	 	 g o o g l e . f r i e n d c o n n e c t . c o n t a i n e r . l o a d O p e n S o c i a l A p i ( {  
 	 	 	 s i t e :   s . s i t e ,  
 	 	 	 o n l o a d :   f u n c t i o n ( s e c u r i t y T o k e n )   {  
 	 	 	 	 i f ( c b )   c b ( s e c u r i t y T o k e n ) ;  
 	 	 	 }  
 	 	 } ) ;  
 	 } ;  
 	 v a r   g f c L o a d e d   =   f u n c t i o n ( e l )   {  
 	 	 i f ( e l   & &   e l . r e a d y S t a t e   & &   e l . r e a d y S t a t e   ! =   ' l o a d e d '  
 	 	 	 & &   e l . r e a d y S t a t e   ! =   ' c o m p l e t e ' )   r e t u r n ;  
 	 	 i f ( e l )   e l . o n r e a d y s t a t e c h a n g e   =   e l . o n l o a d   =   n u l l ;  
 	 	 i n i t G F C ( ) ;  
 	 } ;  
 	 i f ( ! w i n d o w . g o o g l e   | |   ! w i n d o w . o p e n s o c i a l )   {  
 	 	 v a r   s c   =   J S K i t L i b . a d d J S ( ' h t t p : / / w w w . g o o g l e . c o m / f r i e n d c o n n e c t / s c r i p t / f r i e n d c o n n e c t . j s ? k e y = n o t s u p p l i e d & v = 0 . 8 ' ,   s . t a r g e t ) ;  
 	 	 s c . o n l o a d   =   s c . o n r e a d y s t a t e c h a n g e   =   f u n c t i o n ( )   { g f c L o a d e d ( s c ) ; } ;  
 	 }   e l s e   {  
 	 	 i n i t G F C ( ) ;  
 	 }  
 }  
  
 J S K i t G F C . p r o t o t y p e . p r o c e s s P r o f i l e   =   f u n c t i o n ( p r o f i l e D a t a )   {  
 	 J S K i t L i b . a d d J S ( ' / / j s - k i t . c o m / a p i / g o o g l e / p r o c e s s _ p r o f i l e ? '  
 	 	 + ' i d = ' + e n c o d e U R I C o m p o n e n t ( p r o f i l e D a t a . g e t I d ( ) )  
 	 	 + ' & s t = ' + e n c o d e U R I C o m p o n e n t ( t h i s . s e c u r i t y T o k e n )  
 	 	 + ' & r n d = ' + M a t h . r a n d o m ( ) , t h i s . t a r g e t ) ;  
 	 i f ( t h i s . o n r e a d y )   t h i s . o n r e a d y ( ) ;  
 }  
  
 J S K i t G F C . p r o t o t y p e . d i s p l a y S t a t e   =   f u n c t i o n ( e l )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   d   =   f u n c t i o n ( i d )   {   r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( i d + ' - ' + s . t g t ) ;   } ;  
 	 J S K i t L i b . f m a p ( [ ' w a i t ' , ' l o g i n ' , ' p r o c e s s ' ] ,  
 	 	 f u n c t i o n ( v )   {  
 	 	 	 d ( v ) . s t y l e . d i s p l a y   =   ( e l = = v )   ?   ' b l o c k '   :   ' n o n e ' ;  
 	 	 }  
 	 ) ;  
 }  
  
 J S K i t G F C . p r o t o t y p e . g e t V i e w e r D a t a   =   f u n c t i o n ( s u c c e s s _ c b ,   f a i l _ c b )   {  
 	 v a r   o n D a t a   =   f u n c t i o n ( d a t a )   {  
 	 	 v a r   v d   =   d a t a . g e t ( " v i e w e r _ d a t a " ) ;  
 	 	 i f   ( ! v d . h a d E r r o r ( )   & &   v d . g e t D a t a ( ) )   {  
 	 	 	 i f ( s u c c e s s _ c b )   s u c c e s s _ c b ( v d . g e t D a t a ( ) ) ;  
 	 	 }   e l s e   {  
 	 	 	 i f ( f a i l _ c b )   f a i l _ c b ( v d ) ;  
 	 	 }  
 	 } ;  
 	 v a r   r e q   =   o p e n s o c i a l . n e w D a t a R e q u e s t ( ) ;  
 	 r e q . a d d ( r e q . n e w F e t c h P e r s o n R e q u e s t ( " V I E W E R " ) ,   " v i e w e r _ d a t a " ) ;  
 	 r e q . s e n d ( o n D a t a ) ;  
 }  
  
 J S K i t G F C . p r o t o t y p e . p r o c e s s L o g i n S t a t u s   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . g e t V i e w e r D a t a ( f u n c t i o n ( p r o f i l e D a t a ) {  
 	 	 v a r   p r o c e s s E l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' p r o c e s s - '   +   s . t g t ) ;  
 	 	 i f ( p r o c e s s E l )   p r o c e s s E l . i n n e r H T M L   =   ' L o g g i n g   i n   '   +   p r o f i l e D a t a . g e t D i s p l a y N a m e ( )   +   ' . . . ' ;  
 	 	 s . d i s p l a y S t a t e ( ' p r o c e s s ' ) ;  
 	 	 s . p r o c e s s P r o f i l e ( p r o f i l e D a t a ) ;  
 	 } ,   f u n c t i o n ( )   {  
 	 	 s . d i s p l a y S t a t e ( ' l o g i n ' ) ;  
 	 	 g o o g l e . f r i e n d c o n n e c t . r e n d e r S i g n I n B u t t o n ( {   ' i d ' :   ' l o g i n - '   +   s . t g t ,   ' t e x t '   :   ' L o g   i n   w i t h   G o o g l e   F r i e n d   C o n n e c t ' ,   ' s t y l e ' :   ' l o n g '   } ) ;  
 	 } ) ;  
 }  
  
 J S K i t G F C . p r o t o t y p e . s h a r e C o m m e n t   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . g e t V i e w e r D a t a ( f u n c t i o n ( d a t a ) {  
 	 	 v a r   s d   =   s . s h a r e d a t a ;  
 	 	 v a r   U s e r N a m e   =   d a t a . g e t D i s p l a y N a m e ( ) ;  
 	 	 v a r   p a r a m s   =   { } ;  
 	 	 p a r a m s [ o p e n s o c i a l . A c t i v i t y . F i e l d . T I T L E ]   =   U s e r N a m e   +   '   j u s t   p o s t e d   t h e   f o l l o w i n g   c o m m e n t   o n   < a   h r e f = " '   +   s d . p e r m a l i n k   +   ' " > '   +   s d . d o m a i n   +   ' < / a > ' ;  
 	 	 p a r a m s [ o p e n s o c i a l . A c t i v i t y . F i e l d . B O D Y ]   =   ( ( s d . T e x t . l e n g t h   >   1 2 8 )   ?   s d . T e x t . s u b s t r ( 0 ,   1 2 8 )   +   ' . . . '   :   s d . T e x t )   +   ' < b r > < b r > P o w e r e d   ' ;  
 	 	 v a r   a c t i v i t y   =   o p e n s o c i a l . n e w A c t i v i t y ( p a r a m s ) ;  
 	 	 o p e n s o c i a l . r e q u e s t C r e a t e A c t i v i t y ( a c t i v i t y ,   o p e n s o c i a l . C r e a t e A c t i v i t y P r i o r i t y . H I G H ) ;  
 	 } , f u n c t i o n ( ) {  
 	 	 g o o g l e . f r i e n d c o n n e c t . r e q u e s t S i g n I n ( ) ;  
 	 } ) ;  
 }  
  
 J S K i t G F C . p r o t o t y p e . p r o c e s s L o g o u t   =   f u n c t i o n ( )   {  
 	 g o o g l e . f r i e n d c o n n e c t . r e q u e s t S i g n O u t ( ) ;  
 }  
  
 f u n c t i o n   J S K i t G F C ( r e f ,   t g t ,   s i t e ,   c b )   {  
 	 t h i s . r e f   =   r e f ;  
 	 t h i s . t g t   =   t g t ;  
 	 t h i s . s i t e   =   s i t e ;  
 	 v a r   s   =   t h i s ;  
 	 s . t a r g e t   =   d o c u m e n t . g e t E l e m e n t B y I d ( s . t g t ) ;  
 	 v a r   f   =   f u n c t i o n ( s e c u r i t y T o k e n )   {  
 	 	 s . s e c u r i t y T o k e n   =   s e c u r i t y T o k e n ;  
 	 	 c b . a p p l y ( s ) ;  
 	 }  
 	 i f ( w i n d o w . j s k $ g f c _ i n i t )   {  
 	 	 f ( ) ;  
 	 }   e l s e   {  
 	 	 t h i s . i n i t ( f ) ;  
 	 }  
 }  
  
  
  
 i f ( ! w i n d o w . J S K i t A u t h I n s t a n c e )   v a r   J S K i t A u t h I n s t a n c e   =   n u l l ;  
  
 $ J A L T   =   {  
 	 / / A u t h e n t i c a t i o n   m e t h o d s   l a b e l s :  
 	 r e g i s t e r J S K A M e t h o d :   ' N e w   J S - K i t   a c c o u n t ' ,  
 	 l o g i n J S K A M e t h o d :   ' J S - K i t   a c c o u n t ' ,  
 	 h a l o s c a n J S K A M e t h o d :   ' H a l o s c a n   a c c o u n t ' ,  
 	 o p e n i d J S K A M e t h o d :   ' O p e n I D ' ,  
 	 b l o g s p o t J S K A M e t h o d :   ' B l o g s p o t   U R L ' ,  
 	 f a c e b o o k J S K A M e t h o d :   ' F a c e b o o k   a c c o u n t ' ,  
 	 y a h o o J S K A M e t h o d :   ' Y a h o o   a c c o u n t ' ,  
 	 g f c J S K A M e t h o d :   ' G o o g l e   F r i e n d   C o n n e c t ' ,  
 	 t w i t t e r J S K A M e t h o d :   ' T w i t t e r   a c c o u n t ' ,  
 	 / / E r r o r   m e s s a g e s :  
 	 e r r o r   :   ' E r r o r ' ,  
 	 n o _ e m a i l   :   ' E m a i l   n o t   f o u n d   f o r   t h i s   a c c o u n t ' ,  
 	 l o n g _ l o g i n   :   ' L o g i n   i s   t o o   l o n g   ( s h o u l d   b e   n o t   m o r e   6 3   c h a r a c t e r s ) ' ,  
 	 e m p t y _ l o g i n   :   ' E n t e r   y o u r   l o g i n ' ,  
 	 e m p t y _ e m a i l   :   ' E n t e r   y o u r   e - m a i l ' ,  
 	 s h o r t _ l o g i n   :   ' L o g i n   i s   t o o   s h o r t   ( s h o u l d   b e   a t   l e a s t   6   c h a r a c t e r s ) ' ,  
 	 e m p t y _ o p e n i d   :   ' E n t e r   y o u r   O p e n I D   U R L ' ,  
 	 e m p t y _ b l o g s p o t   :   ' E n t e r   y o u r   B l o g s p o t   U R L ' ,  
 	 e m p t y _ p a s s w o r d   :   ' E n t e r   y o u r   p a s s w o r d ' ,  
 	 e m p t y _ p a s s w o r d 2   :   ' E n t e r   y o u r   p a s s w o r d ' ,  
 	 i n c o r r e c t _ l o g i n   :   ' L o g i n   m u s t   b e g i n   w i t h   a   l e t t e r   a n d   c o n t a i n   6   o r   m o r e   c h a r a c t e r s ,   i n c l u d i n g   n u m b e r s ,   a   d a s h   a n d   a   d o t . ' ,  
 	 i n c o r r e c t _ e m a i l   :   ' Y o u r   e m a i l   i s   i n c o r r e c t ,   p l e a s e   c h e c k   i t ' ,  
 	 f u l l _ d e s c r i p t i o n   :   ' J S - K i t   l o g i n   n e e d   t o   s t a r t   w i t h   a   l e t t e r   a n d   m a y   a l s o   c o n t a i n   n u m b e r s ,   a   d a s h   a n d   a   d o t .   L o g i n   a n d   p a s s w o r d   m u s t   h a v e   a   m i n i m u m   o f   6   c h a r a c t e r s .   E x a m p l e   o f   a   g o o d   l o g i n   n a m e :   J o e . B l o g g s ' ,  
 	 n o n e x i s t i n g _ l o g i n   :   ' L o g i n   d o e s   n o t   e x i s t   ' ,  
 	 p a s s w o r d _ i s _ s h o r t   :   ' P a s s w o r d   i s   t o o   s h o r t   ( s h o u l d   b e   a t   l e a s t   6   c h a r a c t e r s ) ' ,  
 	 u s e r _ a l r e a d y _ l o g g e d   :   ' Y o u   a r e   a l r e a d y   s i g n e d   i n   w i t h   t h i s   l o g i n ' ,  
 	 i n c o r r e c t _ r e c o v e r y _ k e y :   ' I n c o r r e c t   r e c o v e r y   k e y ' ,  
 	 l o g i n _ i s _ a l r e a d y _ u s e d   :   ' L o g i n   n a m e   i s   a l r e a d y   t a k e n   b y   s o m e o n e   e l s e ' ,  
 	 i n c o r r e c t _ b l o g s p o t _ u r l   :   ' Y o u r   B l o g s p o t   U R L   d o e s n \ ' t   s e e m   t o   b e   v a l i d ' ,  
 	 i n c o r r e c t _ l o g i n _ o r _ p a s s w o r d   :   ' L o g i n   o r   p a s s w o r d   i s   i n c o r r e c t ' ,  
 	 u s e r _ a l r e a d y _ h a s _ o t h e r _ l o g i n   :   ' Y o u   a r e   l o g g e d   i n   a l r e a d y ' ,  
 	 p a s s w o r d 2 _ m i s m a t c h :   ' P a s s w o r d s   d o   n o t   m a t c h ' ,  
 	 / / C o m m o n   l a b e l s  
 	 a u t h e n t i c a t i o n :   ' A u t h e n t i c a t i o n ' ,  
 	 j s k a I n f o N e w A c c :   ' N e w   J S - K i t   a c c o u n t : ' ,  
 	 j s k a I n f o N e w A c c N o t e :   ' J S - K i t   a u t h e n t i c a t i o n   c a n   a l s o   b e   u s e d   a s   a n   O p e n I D   a c r o s s   t h e   w e b :   ( h t t p : / / y o u r n a m e . j s - k i t . c o m ) ' ,  
 	 j s k a I n f o L o g i n N o t e :   ' I f   y o u   a l r e a d y   h a v e   a   J S - K i t   a c c o u n t ,   u s e   i t   t o   l o g i n ' ,  
 	 j s k a I n f o O I D F B :   ' O p e n I D ,   F a c e b o o k   a n d   Y a h o o   ( w h e n   e n a b l e d ) ' ,  
 	 j s k a I n f o O I D F B N o t e :   ' Y o u   c a n   u s e   y o u r   e x i s t i n g   O p e n I D   U R L ,   y o u r   F a c e B o o k   o r   Y a h o o   a u t h e n t i c a t i o n   t o   l o g i n   h e r e ' ,  
 	 j s k a I n f o P r i v a c y :   ' P r i v a c y : ' ,  
 	 j s k a I n f o P r i v a c y N o t e :   ' Y o u r   e m a i l   a d d r e s s   a n d   a u t h e n t i c a t i o n   i n f o r m a t i o n   w i l l   n o t   b e   s h a r e d .   < a   h r e f = " / / j s - k i t . c o m / a b o u t / p o l i c y . h t m l "   t a r g e t = " _ b l a n k " > M o r e < / a > ' ,  
 	 p a s s w o r d R e c o v e r y :   ' J S - K i t   P a s s w o r d   R e c o v e r y ' ,  
 	 e n t e r Y o u r L o g i n N o t e :   ' E n t e r   y o u r   l o g i n   y o u   r e g i s t e r e d   w i t h   b e l o w   a n d   c l i c k   " S e n d   P a s s w o r d " .   T h e n   c h e c k   y o u r   e m a i l   ( I n b o x   o r   S P A M   f o l d e r ) . ' ,  
 	 f o r g o t Y o u r P a s s w o r d :   ' f o r g o t   y o u r   p a s s w o r d ? ' ,  
 	 s e n d P a s s w o r d :   ' S e n d   P a s s w o r d ' ,  
 	 a u t h C o d e :   ' A u t h   C o d e ' ,  
 	 j s k a L o g o u t :   ' L o g o u t ' ,  
 	 e x i s t i n g J S K i t P r o f i l e :   ' E x i s t i n g   J S - K i t   p r o f i l e ' ,  
 	 s u b m i t :   ' S u b m i t ' ,  
 	 b a c k :   ' B a c k ' ,  
 	 l o g i n :   ' L o g i n ' ,  
 	 u s e r n a m e :   ' U s e r n a m e ' ,  
 	 l o g i n W i t h :   ' L o g i n   w i t h : ' ,  
 	 l o g i n B t n :   ' L o g i n ' ,  
 	 r e g i s t e r :   ' R e g i s t e r ' ,  
 	 p a s s w o r d :   ' P a s s w o r d : ' ,  
 	 r e t y p e P a s s w o r d :   ' R e - t y p e   P a s s w o r d : ' ,  
 	 l o g i n W i t h   :   ' L o g i n   w i t h : ' ,  
 	 c a n c e l   :   ' C a n c e l ' ,  
 	 l o a d i n g   :   ' L o a d i n g   . . . ' ,  
 	 j s k a L o g o u t   :   ' L o g o u t ' ,  
 	 o p e n I D   :   ' O p e n I D : ' ,  
 	 a l l F i e l d s A r e M a n d a t o r y   :   ' A l l   f i e l d s   a r e   m a n d a t o r y ' ,  
 	 y o u r E m a i l   :   ' Y o u r   E m a i l ' ,  
 	 b l o g s p o t U r l   :   ' B l o g s p o t   U R L : '  
 }  
 $ J A L   =   w i n d o w . J S K A _ T r a n s l a t e   | |   f u n c t i o n ( t )   {   r e t u r n   $ J A L T [ t ]   | |   t ;   }  
  
 J S K A u t h . p r o t o t y p e . s e t A u t h I n s t a n c e   =   f u n c t i o n ( )   {  
 	 i f   ( w i n d o w . J S K i t A u t h I n s t a n c e )   {  
 	 	 v a r   a u t h F o r m   =   J S K i t A u t h I n s t a n c e . a u t h F o r m ;  
 	 	 i f ( a u t h F o r m   & &   a u t h F o r m . p a r e n t N o d e )  
 	 	 	 J S K i t L i b . h i d e ( a u t h F o r m ) ;  
 	 }  
 	 J S K i t A u t h I n s t a n c e   =   t h i s ;  
 }  
  
 J S K A u t h . p r o t o t y p e . s h o w   =   f u n c t i o n ( a r e a N a m e ,   d a t a )   {  
 	 t h i s . s e t A u t h I n s t a n c e ( ) ;  
 	 t h i s . s h o w B a c k d r o p ( ) ;  
 	 v a r   a u t h F o r m   =   t h i s . a u t h F o r m ;  
 	 J S K i t L i b . s h o w ( a u t h F o r m ) ;  
 	 i f ( t h i s . c a l c P o s i t i o n )   {  
 	 	 v a r   p o s i t i o n   =   t h i s . c a l c P o s i t i o n ( ) ;  
 	 	 a u t h F o r m . s t y l e . t o p   =   p a r s e I n t ( p o s i t i o n . y )   +   " p x " ;  
 	 	 a u t h F o r m . s t y l e . l e f t   =   p a r s e I n t ( p o s i t i o n . x )   +   " p x " ;  
 	 }  
 	 t h i s . a u t h S e l e c t o r . v a l u e   =   a r e a N a m e ;  
 	 t h i s . s e t A c t i v e A r e a ( a r e a N a m e ,   d a t a ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . l o a d C s s   =   f u n c t i o n ( )   {  
                 J S K i t L i b . a d d C s s (  
 	 	 " . j s k a - b a c k d r o p   {   o p a c i t y :   0 ;   b a c k g r o u n d - c o l o r :   # 4 0 4 0 4 0 ;   z - I n d e x :   1 4 5 0 0 ;   w i d t h :   1 0 0 % ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( o p a c i t y = ' 0 ' ) ;   p o s i t i o n :   a b s o l u t e ;   t o p :   e x p r e s s i o n ( e v a l ( d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l T o p   ?   d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l T o p   :   d o c u m e n t . b o d y . s c r o l l T o p )   +   ' p x ' ) ;   r i g h t :   0 ;   b o t t o m :   0 ;   h e i g h t :   e x p r e s s i o n ( e v a l ( d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t   ?   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t H e i g h t   :   d o c u m e n t . b o d y . c l i e n t H e i g h t ) ) ;   w i d t h :   e x p r e s s i o n ( e v a l ( d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h   ?   d o c u m e n t . d o c u m e n t E l e m e n t . c l i e n t W i d t h   :   d o c u m e n t . b o d y . c l i e n t W i d t h ) ) ; "   :   " p o s i t i o n :   f i x e d ;   l e f t :   0 ;   t o p :   0 ;   h e i g h t :   1 0 0 % ;   - w e b k i t - t r a n s i t i o n :   o p a c i t y   0 . 5 s   e a s e - o u t ; "   )   +   " } "   +  
 	 	 " . j s k a - w r a p p e r   {   "   +   ( t h i s . m o d e   ! =   " e m b e d d e d "   ?   " p o s i t i o n :   a b s o l u t e ; "   :   " " )   +   " b a c k g r o u n d - c o l o r :   w h i t e ;   z - i n d e x :   2 0 0 0 0 ;   b o r d e r :   s o l i d   4 p x   # c b c b c b ;   t e x t - a l i g n :   l e f t ;   w i d t h :   3 5 0 p x ;   } "   +  
 	 	 " . j s k a - f a c e b o o k F r a m e   {   h e i g h t :   2 7 p x ;   w i d t h :   1 9 4 p x ;   b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   b o r d e r :   n o n e ;   z - I n d e x :   1 4 0 0 0 ;   } "   +  
 	 	 " . j s k a - s e l e c t o r   {   m a r g i n - l e f t :   5 p x ; } "   +  
 	 	 " . j s k a - h e a d e r   {   b a c k g r o u n d - c o l o r :   # e c e c e c ;   p a d d i n g :   8 p x   0   6 p x   1 0 p x ;   } "   +  
 	 	 " . j s k a - h e a d e r T e x t   {   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   f o n t - w e i g h t :   b o l d ;   f o n t - s i z e :   1 2 p t ;   c o l o r :   g r e y ;   f l o a t :   l e f t ;   } "   +  
 	 	 " . j s k a - i n f o T e x t   {   m a r g i n :   0 ;   p a d d i n g :   0 ; } "   +  
 	 	 " . j s k a - i n f o C o n t a i n e r   {   m a r g i n :   0   1 0 p x ; } "   +  
 	 	 " . j s k a - s h o w M o r e   {   c o l o r :   # 4 0 3 0 3 0 ;   f o n t - f a m i l y :   A r i a l ,   H e l v e t i c a ,   s a n s - s e r i f ;   } "   +  
 	 	 " . j s k a - i n f o B t n   {   w i d t h :   1 6 p x ;   h e i g h t :   1 6 p x ;   c u r s o r :   p o i n t e r ;   m a r g i n - l e f t :   1 0 p x ;   f l o a t :   l e f t } "   +  
 	 	 " . j s k a - s e l e c t o r C o n t a i n e r   {   b a c k g r o u n d - c o l o r :   # e c e c e c ;   p a d d i n g :   0   0   4 p x   1 0 p x ; } "   +  
 	 	 " . j s k a - c o n t a i n e r   {   b o r d e r - t o p :   s o l i d   1 p x   # c b c b c b ;   p a d d i n g - t o p :   2 0 p x ; } "   +  
 	 	 " . j s k a - c o n t r o l s   {   b a c k g r o u n d - c o l o r :   # e c e c e c ;   w i d t h :   1 0 0 % ;   p a d d i n g :   5 p x   0   5 p x   0 ;   m a r g i n - t o p :   2 0 p x ; } "   +  
 	 	 " . j s k a - r i g h t C o l u m n   {   f l o a t :   r i g h t ;   w i d t h :   6 5 % ; } "   +  
 	 	 " . j s k a - l e f t C o l u m n   {   f l o a t :   r i g h t ;   w i d t h :   3 3 % ;   p a d d i n g :   2 p x   5 p x   0   0 ;   t e x t - a l i g n :   r i g h t ; } "   +  
 	 	 " . j s k a - l a b e l   {   f o n t - s i z e :   9 p t ;   f o n t - f a m i l y :   A r i a l ; } "   +  
 	 	 " . j s k a - i n p u t   {   b o r d e r :   s o l i d   1 p x   # 7 f 9 9 b 9 ;   w i d t h :   8 0 % ; } "   +  
 	 	 " . j s k a - o p e n i d I n p u t   {   b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / o p e n i d - 1 6 x 1 6 . p n g )   n o - r e p e a t ;   b a c k g r o u n d - p o s i t i o n :   0   5 0 % ;   p a d d i n g - l e f t :   1 8 p x ; } "   +  
 	 	 " . j s k a - b l o g s p o t I n p u t   {   b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / b l o g g e r - 1 6 x 1 6 . p n g )   n o - r e p e a t ;   b a c k g r o u n d - p o s i t i o n :   0   5 0 % ;   p a d d i n g - l e f t :   1 8 p x ; } "   +  
 	 	 " . j s k a - e r r o r   {   c o l o r :   # F F 3 0 3 0 ;   f o n t :   1 1 p x   A r i a l ;   m a r g i n - b o t t o m :   2 p x ;   } "   +  
 	 	 " . j s k a - c a n c e l B t n   {   f l o a t :   r i g h t ;   m a r g i n - r i g h t :   5 p x ;   c u r s o r :   p o i n t e r ; } "   +  
 	 	 " . j s k a - t e x t   {   c o l o r :   # 4 0 4 0 4 0 ;   f o n t :   1 1 p x   A r i a l ;   } "   +  
 	 	 " . j s k a - b a c k   {   f o n t :   1 5 p x   H e l v e t i c a ;   c u r s o r :   p o i n t e r ;   m a r g i n - l e f t :   1 0 p x ;   f l o a t :   l e f t ; } "   +  
 	 	 " . j s k a - l o g o u t   {   f l o a t :   l e f t ;   m a r g i n - l e f t :   1 0 p x ;   c u r s o r :   p o i n t e r ; } "   +  
 	 	 " . j s k a - p a s s w o r d R e c o v e r y T e x t   {   m a r g i n :   0 p x   0 p x   5 p x   1 0 p x ;   } "   +  
 	 	 " . j s k a - f o r g o t P a s s w o r d {   c o l o r :   # 0 0 1 f a a ;   c u r s o r :   p o i n t e r ;   } "   +  
 	 	 " a . j s k a - f o r g o t P a s s w o r d : h o v e r   { c o l o r :   # 0 0 1 f a a ; } "   +  
 	 	 " a . j s k a - f o r g o t P a s s w o r d : v i s i t e d   { c o l o r :   # 0 0 1 f a a ; } "   +  
 	 	 " . j s k a - l i n k T o L o g i n {   c o l o r :   # 0 0 1 f a a ;   c u r s o r :   p o i n t e r ;   } "   +  
 	 	 " . j s k a - p r o g r e s s A r e a   {   d i s p l a y :   n o n e ;   } "   +  
 	 	 " . j s k a - p r o g r e s s P i c   {   d i s p l a y :   i n l i n e ;   f l o a t :   l e f t ;   m a r g i n - r i g h t :   0 . 2 e m ;   m a r g i n - l e f t :   1 e m ;   m a r g i n - t o p :   0 . 3 e m ;   w i d t h :   1 6 p x ;   h e i g h t :   1 6 p x ;   b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / p o l l s / l o a d i n g . g i f ) ;   } "   +  
 	 	 " . j s k a - p r o g r e s s L b l   {   d i s p l a y :   i n l i n e ;   m a r g i n - l e f t :   0 . 3 e m ;   m a r g i n - t o p :   0 . 5 e m ;   f l o a t :   l e f t ;   } "   +  
 	 	 " . j s k a - a u t h B u t t o n   { f l o a t :   r i g h t ;   m a r g i n - r i g h t :   7 p x ;   c u r s o r :   p o i n t e r ; } "   +  
 	 	 " . j s k a - c l e a r   {   c l e a r :   b o t h ; } " ,   " j s k a " ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . c a n c e l R e q u e s t s   =   f u n c t i o n ( ) {  
 	 v a r   s e l f   =   t h i s ;  
 	 J S K i t L i b . f m a p ( [ " f a c e b o o k " ,   " y a h o o " ,   " g f c " ,   " t w i t t e r " ] ,   f u n c t i o n ( p r o v i d e r ) {  
 	 	 i f ( s e l f . a r e a s   & &   s e l f . a r e a s [ p r o v i d e r ]   & &   s e l f . a r e a s [ p r o v i d e r ] . r p i c k u p )   {  
 	 	 	 t r y {   s e l f . a r e a s [ p r o v i d e r ] . r p i c k u p . c a n c e l R e q u e s t ( ) ;   }    
 	 	 	 c a t c h ( e ) { } ;  
 	 	 }  
 	   } ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . h i d e   =   f u n c t i o n ( )   {  
 	 t h i s . h i d e B a c k d r o p ( ) ;  
 	 t h i s . c a n c e l R e q u e s t s ( ) ;  
 	 J S K i t L i b . h i d e ( t h i s . a u t h F o r m ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . d e s t r o y   =   f u n c t i o n ( )   {  
 	 t h i s . h i d e ( ) ;  
 	 v a r   p r n   =   t h i s . a u t h F o r m . p a r e n d N o d e ;  
 	 i f   ( p r n )   p r n . r e m o v e C h i l d ( t h i s . a u t h F o r m ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . p r e p a r e A u t h F o r m   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   d i v   =   s e l f . a u t h F o r m ;  
 	 J S K i t L i b . h i d e ( d i v ) ;  
 	 i f   ( s e l f . m o d e   = =   " p o p u p " ) {  
 	                 v a r   j s d   =   n e w   J S D L ( d i v ,   d i v . d r a g E l e m e n t s ) ;  
 	 	 v a r   c a l c P o s i t i o n   =   f u n c t i o n ( ) {  
 	 	 	 v a r   c o o r d s   =   j s d . g e t E l m A b s P o s ( s e l f . t a r g e t ,   f a l s e ) ;  
 	 	 	 r e t u r n   {   " x "   :   c o o r d s . x ,   " y "   :   c o o r d s . y   +   s e l f . t a r g e t . o f f s e t H e i g h t } ;  
 	 	 } 	 	  
  
 	 	 s e l f . c a l c P o s i t i o n   =   s e l f . s t a r t P o s i t i o n   | |   c a l c P o s i t i o n ;  
 	 	 d o c u m e n t . b o d y . i n s e r t B e f o r e ( d i v ,   d o c u m e n t . b o d y . f i r s t C h i l d ) ;  
 	 }   e l s e   {  
 	 	 s e l f . t a r g e t . a p p e n d C h i l d ( d i v ) ;  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . s h o w B a c k d r o p   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . w i t h B a c k d r o p   & &   t h i s . m o d e   = =   " p o p u p " )   {  
 	 	 i f ( ! w i n d o w . b a c k d r o p )   {  
 	 	 	 w i n d o w . b a c k d r o p   =   d o c u m e n t . c r e a t e E l e m e n t ( ' D I V ' ) ;  
 	 	 	 b a c k d r o p . c l a s s N a m e   =   ' j s k a - b a c k d r o p ' ;  
 	 	 	 d o c u m e n t . b o d y . i n s e r t B e f o r e ( b a c k d r o p ,   d o c u m e n t . b o d y . f i r s t C h i l d ) ;  
 	 	 }  
 	 	 J S K i t L i b . s h o w ( b a c k d r o p ) ;  
 	 	 J S K i t L i b . s e t O p a c i t y ( b a c k d r o p ,   0 . 5 ) ;  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . h i d e B a c k d r o p   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . w i t h B a c k d r o p   & &   w i n d o w . b a c k d r o p ) {  
 	 	 J S K i t L i b . s e t O p a c i t y ( b a c k d r o p ,   0 ) ;  
 	 	 J S K i t L i b . h i d e ( b a c k d r o p ) ;  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . c h e c k A u t h O p t i o n s   =   f u n c t i o n ( o p t i o n s )   {  
 	 v a r   d e f a u l t O p t i o n s   =   t h i s . d e f a u l t A u t h O p t i o n s . j o i n ( " | " ) ;  
 	 f o r   ( v a r   i = 0 ;   i < o p t i o n s . l e n g t h ;   i + + ) {  
 	 	 i f   ( ! o p t i o n s [ i ] . m a t c h ( d e f a u l t O p t i o n s ) )   r e t u r n   f a l s e ;  
 	 }  
 	 r e t u r n   t r u e ;  
 }  
  
 J S K A u t h . p r o t o t y p e . a s s e m b l e   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   d e f a u l t O p t i o n s   =   [ " r e g i s t e r " ,   " l o g i n " ,   " h a l o s c a n " ,   " o p e n i d " ] ;  
 	 v a r   a u t h F o r m   =   s e l f . t o D o m ( s e l f . a u t h F o r m T m p l ) ;  
 	 v a r   a u t h F o r m E l e m e n t s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   a u t h F o r m ) ;  
 	 a u t h F o r m . d r a g E l e m e n t s   =   [ a u t h F o r m E l e m e n t s [ " j s k a - h e a d e r " ] ] ;  
  
 	 s e l f . a r e a C o n t a i n e r   =   a u t h F o r m E l e m e n t s [ " j s k a - c o n t a i n e r " ] ;  
 	 s e l f . s e l e c t o r C o n t a i n e r   =   a u t h F o r m E l e m e n t s [ " j s k a - s e l e c t o r C o n t a i n e r " ] ;  
  
 	 J S K i t L i b . a d d P N G ( a u t h F o r m E l e m e n t s [ " j s k a - i n f o B t n " ] ,   " / / j s - k i t . c o m / i m a g e s / i n f o r m a t i o n . p n g " ) ;  
 	 a u t h F o r m E l e m e n t s [ " j s k a - i n f o B t n " ] . o n c l i c k   =   f u n c t i o n ( ) {  
 	 	 s e l f . t o g g l e I n f o A r e a ( ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 o p t i o n s   =   ( s e l f . a u t h O p t i o n s   ?   s e l f . a u t h O p t i o n s   :   d e f a u l t O p t i o n s ) ;  
 	 s e l f . a u t h S e l e c t o r   =   s e l f . c r e a t e A u t h S e l e c t o r ( o p t i o n s ,   s e l f . a c t i v e A r e a B y D e f a u l t ,   f u n c t i o n ( e v ) {   s e l f . s e t A c t i v e A r e a ( t h i s . v a l u e ) ;   } ) ;  
 	 a u t h F o r m E l e m e n t s [ " j s k a - s e l e c t o r C o n t a i n e r " ] . a p p e n d C h i l d ( s e l f . a u t h S e l e c t o r ) ;  
  
 	 s e l f . s e t A c t i v e A r e a ( s e l f . a c t i v e A r e a B y D e f a u l t ) ;  
 	 r e t u r n   a u t h F o r m ;  
 }  
  
 J S K A u t h . p r o t o t y p e . t o g g l e I n f o A r e a   =   f u n c t i o n ( m o d e ) {  
 	 t h i s . s e t A c t i v e A r e a ( ( ( m o d e   = =   " h i d e "   | |   t h i s . i s I n f o A r e a A c t i v e )   ?   t h i s . c u r r e n t A r e a   :   " i n f o " ) ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . s e t A c t i v e A r e a   =   f u n c t i o n ( n a m e ,   d a t a ) {  
 	 v a r   s e l f   =   t h i s ;  
 	 s e l f . c a n c e l R e q u e s t s ( ) ;  
 	 i f   ( n a m e   = =   " i n f o " )   {  
 	 	 s e l f . i s I n f o A r e a A c t i v e   =   t r u e ;    
 	 }   e l s e   {    
 	 	 s e l f . i s I n f o A r e a A c t i v e   =   f a l s e ;  
 	 	 s e l f . c u r r e n t A r e a   =   n a m e ;  
 	 }  
 	 i f   ( n a m e . m a t c h ( / i n f o | p a s s w o r d R e c o v e r y / ) )   J S K i t L i b . h i d e ( s e l f . s e l e c t o r C o n t a i n e r ) ;   e l s e   J S K i t L i b . s h o w ( s e l f . s e l e c t o r C o n t a i n e r ) ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( s e l f . a r e a C o n t a i n e r ) ;  
 	 i f   ( ! s e l f . a r e a s [ n a m e ] )   s e l f . a r e a s [ n a m e ]   =   s e l f . c r e a t e A r e a ( n a m e ,   d a t a ) ;  
 	 e l s e   {  
 	 	 J S K i t L i b . f m a p ( d a t a   | |   [ ] ,   f u n c t i o n ( v a l u e ,   k e y ) {  
 	 	 s e l f . H N D L [ n a m e ] [ " i n p u t " ] [ k e y ] . v a l u e   =   v a l u e ;  
 	 	 } ) ;  
 	 }  
  
 	 s e l f . a r e a C o n t a i n e r . a p p e n d C h i l d ( s e l f . a r e a s [ n a m e ] ) ;  
  
 	 v a r   c r e a t e T h i r d P a r t y L o g i n C B   =   f u n c t i o n ( p r o v i d e r )   {  
 	 	 r e t u r n   f u n c t i o n ( e r r o r ,   d a t a ) {  
 	 	 	 	 i f   ( e r r o r   ! =   " d a t a " )   r e t u r n ;  
 	 	 	 	 i f   ( w i n d o w . J S K W $ E v e n t s )   J S K W $ E v e n t s . s y n c B r o a d c a s t ( ' J S K i t A u t h _ s u c c e s s _ '   +   p r o v i d e r   +   ' _ l o g i n ' ,   e r r o r ,   d a t a ) ;  
 	 	 	 	 s e l f . h i d e ( ) ;  
 	 	 	 }  
 	 }  
  
 	 v a r   c r e a t e R V C R e q u e s t   =   f u n c t i o n ( p r o v i d e r ,   t a r g e t )   {  
 	 	 r e t u r n   n e w   J S R V C ( {  
 	 	 	 	 u r i :   s e l f . u r i D o m a i n   +   ' / a p i / s e r v e r - a n s w e r . j s ' ,    
 	 	 	 	 ' t a r g e t ' :   t a r g e t ,    
 	 	 	 	 ' o n r e t u r n ' :   c r e a t e T h i r d P a r t y L o g i n C B ( p r o v i d e r ) ,    
 	 	 	 	 ' p i c k u p ' :   t r u e ,    
 	 	 	 	 ' r e q u e s t I d ' :   p r o v i d e r   +   ' _ c o n n e c t ' } ) ; 	  
 	 }  
  
 	 i f   ( n a m e   = =   " y a h o o " ) {   s e l f . a r e a s [ " y a h o o " ] . r p i c k u p   =   c r e a t e R V C R e q u e s t ( " y a h o o " ,   s e l f . t a r g e t ) ;   }  
 	 i f   ( n a m e   = =   " g f c " ) {  
 	 	 v a r   g f c _ c b   =   f u n c t i o n ( )   {  
 	 	 	 s e l f . a r e a s [ " g f c " ] . r p i c k u p   =   c r e a t e R V C R e q u e s t ( " g f c " ,   s e l f . t a r g e t ) ;  
 	 	 } ;  
 	 	 i f ( s e l f . g f c _ s i t e )   {  
 	 	 	 v a r   j s k $ g f c   =   n e w   J S K i t G F C (  
 	 	 	 	 s e l f . r e f ,  
 	 	 	 	 s e l f . a r e a s [ " g f c " ] . i d ,  
 	 	 	 	 s e l f . g f c _ s i t e ,  
 	 	 	 	 f u n c t i o n ( ) {  
 	 	 	 	 	 t h i s . o n r e a d y   =   g f c _ c b ( ) ;  
 	 	 	 	 	 t h i s . p r o c e s s L o g i n S t a t u s ( ) ;  
 	 	 	 	 } ) ;  
 	 	 }   e l s e   {  
 	 	 	 g f c _ c b ( ) ;  
 	 	 }  
 	 }  
 	 i f   ( n a m e   = =   " t w i t t e r " ) {   s e l f . a r e a s [ " t w i t t e r " ] . r p i c k u p   =   c r e a t e R V C R e q u e s t ( " t w i t t e r " ,   s e l f . t a r g e t ) ;   }  
 	 i f   ( n a m e   = =   " f a c e b o o k " )   {  
 	 	 v a r   f b _ c b   =   f u n c t i o n ( )   {  
 	 	 	 s e l f . a r e a s [ " f a c e b o o k " ] . r p i c k u p   =   c r e a t e R V C R e q u e s t ( " f a c e b o o k " ,   s e l f . r v c T a r g e t ) ;  
 	 	 } ;  
 	 	 i f ( s e l f . f a c e b o o k _ a p i _ k e y )   {  
 	 	 	 v a r   l o g e l   =   d o c u m e n t . g e t E l e m e n t B y I d ( ' l o g i n - '   +   s e l f . a r e a s [ " f a c e b o o k " ] . i d ) ;  
 	 	 	 v a r   j s k $ f b   =   n e w   J S K i t F B ( s e l f . r e f ,   s e l f . a r e a s [ " f a c e b o o k " ] . i d ,   s e l f . f a c e b o o k _ a p i _ k e y ,   s e l f . f a c e b o o k _ x d _ r e c e i v e r ,   f b _ c b ) ;  
 	 	 	 l o g e l . o n c l i c k   =   j s k $ f b . p r o c e s s L o g i n ;  
 	 	 }   e l s e   {  
 	 	 	 f b _ c b ( ) ;  
 	 	 }  
  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . g e t E r r o r T a r g e t   =   f u n c t i o n ( e r r C o d e )   {  
 	 i f   ( e r r C o d e . m a t c h ( / n o _ e m a i l / ) )   r e t u r n   " l o g i n " ;  
 	 i f   ( e r r C o d e . m a t c h ( / e m a i l / ) )   r e t u r n   " e m a i l " ;  
 	 i f   ( e r r C o d e . m a t c h ( / p a s s w o r d 2 / ) )   r e t u r n   " p a s s w o r d 2 " ;  
 	 i f   ( e r r C o d e . m a t c h ( / p a s s w o r d / ) )   r e t u r n   " p a s s w o r d " ;  
 	 r e t u r n   " l o g i n " ;  
 }  
  
 J S K A u t h . p r o t o t y p e . p r o c e s s C o n t r o l s   =   f u n c t i o n ( n a m e ,   t y p e ,   f u n c ) {  
 	 J S K i t L i b . f m a p ( t h i s . H N D L [ n a m e ] [ t y p e ] ,   f u n c ) ; 	  
 }  
  
 J S K A u t h . p r o t o t y p e . a d d K e y H a n d l e r   =   f u n c t i o n ( n a m e )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   b u t t o n   =   s e l f . H N D L [ n a m e ] [ " b u t t o n " ] . b u t t o n ;  
 	 t h i s . p r o c e s s C o n t r o l s ( n a m e ,   " i n p u t " ,   f u n c t i o n ( e l e m e n t ) {   i f   ( e l e m e n t )   {  
 	 	 i f ( J S K i t L i b . i s I E ( )   | |   J S K i t L i b . i s O p e r a ( ) )   e l e m e n t . o n k e y d o w n   =   f u n c t i o n ( e v )   {   r e t u r n   s e l f . k e y H a n d l e r ( e v ,   b u t t o n ) ; }  
 	 	 e l s e   e l e m e n t . o n k e y p r e s s   =   f u n c t i o n ( e v )   {   r e t u r n   s e l f . k e y H a n d l e r ( e v ,   b u t t o n ) ; }  
 	 } } ) ; 	  
 }  
  
 J S K A u t h . p r o t o t y p e . h i d e M e s s a g e s   =   f u n c t i o n ( n a m e )   {  
 	 t h i s . p r o c e s s C o n t r o l s ( n a m e ,   " m e s s a g e " ,   f u n c t i o n ( e l e m e n t ) {   i f   ( e l e m e n t )   J S K i t L i b . h i d e ( e l e m e n t ) ;   } ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . d i s a b l e C o n t r o l s   =   f u n c t i o n ( n a m e ,   v a l u e )   {  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   [ " i n p u t " ,   " b u t t o n " ] ,   f u n c t i o n ( t y p e ) {   t h i s . p r o c e s s C o n t r o l s ( n a m e ,   t y p e ,   f u n c t i o n ( e l e m e n t ) {   i f   ( e l e m e n t )   e l e m e n t . d i s a b l e d   =   v a l u e ;   } ) } ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . c l e a r I n p u t F i e l d s   =   f u n c t i o n ( n a m e )   {  
 	 t h i s . p r o c e s s C o n t r o l s ( n a m e ,   " i n p u t " ,   f u n c t i o n ( e l e m e n t ) {   i f   ( e l e m e n t )   {   e l e m e n t . v a l u e   =   " " ;   i f   ( t y p e o f ( e l e m e n t . o n b l u r )   = =   " f u n c t i o n " )   e l e m e n t . o n b l u r ( ) ;   }   } ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . t o D o m   =   f u n c t i o n ( a r e a )   {  
 	 r e t u r n   J S K i t L i b . h t m l ( a r e a . r e p l a c e ( / { L a b e l : ( [ ^ : } ] + [ ^ } ] * ) } / g ,   f u n c t i o n ( a , m ) {   r e t u r n   $ J A L ( m ) ;   } ) ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   =   ( J S K i t L i b . g e t B r o w s e r ( )   = =   ' g e c k o '   ?   '   a u t o c o m p l e t e = " O f f " '   :   ' ' ) ;  
  
 J S K A u t h . p r o t o t y p e . k e y H a n d l e r   =   f u n c t i o n ( e ,   b u t t o n ) {  
 	 e   =   e   | |   w i n d o w . e v e n t ;  
 	 s w i t c h ( e . k e y C o d e )   {  
 	 	 c a s e   1 0 :   c a s e   1 3 :  
 	 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
 	 	 	 b u t t o n . c l i c k ( ) ;  
 	 	 b r e a k ;  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . a u t h F o r m T m p l   =  
 ' < d i v   c l a s s = " j s k a - w r a p p e r " > '   +  
 	 ' < d i v   c l a s s = " j s k a - h e a d e r " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - h e a d e r T e x t " > { L a b e l : a u t h e n t i c a t i o n } < / d i v > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - i n f o B t n "   t i t l e = " { L a b e l : i n f o } " > < / d i v > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - s e l e c t o r C o n t a i n e r   j s k a - l a b e l " > { L a b e l : l o g i n W i t h } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t a i n e r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . i n f o S e c t i o n T m p l   =  
 ' < d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - t e x t   j s k a - i n f o C o n t a i n e r " > '   +  
 	 	 ' < p   c l a s s = " j s k a - i n f o T e x t   j s k a - e r r o r " > { L a b e l : j s k a I n f o N e w A c c } < / p > '   +    
 	 	 ' { L a b e l : j s k a I n f o N e w A c c N o t e } '   +  
 	 	 ' < p   c l a s s = " j s k a - i n f o T e x t   j s k a - e r r o r " > { L a b e l : e x i s t i n g J S K i t P r o f i l e } < / p > '   +  
 	 	 ' { L a b e l : j s k a I n f o L o g i n N o t e } '   +  
 	 	 ' < p   c l a s s = " j s k a - i n f o T e x t   j s k a - e r r o r " > { L a b e l : j s k a I n f o O I D F B } < / p > '   +  
 	 	 ' { L a b e l : j s k a I n f o O I D F B N o t e } '   +  
 	 	 ' < p   c l a s s = " j s k a - i n f o T e x t   j s k a - e r r o r " > { L a b e l : j s k a I n f o P r i v a c y } < / p > '   +  
 	 	 ' { L a b e l : j s k a I n f o P r i v a c y N o t e } '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < s p a n   c l a s s = " j s k a - b a c k " > { L a b e l : b a c k } < / s p a n > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   =  
 ' < d i v   c l a s s = " j s k a - p r o g r e s s A r e a   j s - p r o g r e s s H a n d l e " > '   +  
 	 ' < d i v   c l a s s = " j s k a - p r o g r e s s P i c " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - p r o g r e s s L b l   j s k a - l a b e l " > { L a b e l : l o a d i n g } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . l o g i n S e c t i o n T m p l   =  
 ' < d i v > '   +   J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : u s e r n a m e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d M e s s a g e H a n d l e " > < / d i v > '   +  
 	 	 ' < d i v > < a   c l a s s = " j s k a - f o r g o t P a s s w o r d   j s k a - t e x t " > { L a b e l : f o r g o t Y o u r P a s s w o r d } < / a > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : p a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : l o g i n B t n } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . h a l o s c a n S e c t i o n T m p l   =  
 ' < d i v > '   +   J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : u s e r n a m e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : p a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : l o g i n B t n } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . o p e n i d S e c t i o n T m p l   =  
 ' < d i v > '   +   J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t   j s k a - o p e n i d I n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   +   ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : o p e n I D } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : l o g i n B t n } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . b l o g s p o t S e c t i o n T m p l   =  
 ' < d i v > '   +   J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t   j s k a - b l o g s p o t I n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   +   ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : b l o g s p o t U r l } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : l o g i n B t n } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . y a h o o S e c t i o n T m p l   =  
 ' < d i v   s t y l e = " t e x t - a l i g n :   c e n t e r " > '   +  
 ' < d i v   c l a s s = " j s k a - p r o g r e s s A r e a   j s - p r o g r e s s H a n d l e " > < / d i v > '   +  
 ' < d i v   o n c l i c k = " w i n d o w . o p e n ( \ ' / / j s - k i t . c o m / a p i / o a u t h / y a h o o . h t m l \ ' , \ ' _ b l a n k \ ' , \ ' s t a t u s = n o ,   m e n u b a r = n o ,   r e s i z a b l e = n o ,   s c r o l l b a r s = y e s ,   t o o l b a r = n o ,   l o c a t i o n = y e s ,   d i r e c t o r i e s = n o \ ' ) "   s t y l e = " m a r g i n - l e f t :   a u t o ;   m a r g i n - r i g h t :   a u t o ;   w i d t h : 1 6 1 p x ;   h e i g h t : 2 2 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' / / j s - k i t . c o m / i m a g e s / y a h o o / y o s . p n g \ ' ,   s i z i n g M e t h o d = \ ' c r o p \ ' ) ; '   :   ' b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / y a h o o / y o s . p n g ) ; ' )   +   '   c u r s o r : p o i n t e r ; " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . t w i t t e r S e c t i o n T m p l   =  
 ' < d i v   s t y l e = " t e x t - a l i g n :   c e n t e r " > '   +  
 ' < d i v   c l a s s = " j s k a - p r o g r e s s A r e a   j s - p r o g r e s s H a n d l e " > < / d i v > '   +  
 ' < d i v   o n c l i c k = " w i n d o w . o p e n ( \ ' / / j s - k i t . c o m / a p i / o a u t h / t w i t t e r . h t m l \ ' , \ ' _ b l a n k \ ' , \ ' s t a t u s = n o ,   m e n u b a r = n o ,   r e s i z a b l e = n o ,   s c r o l l b a r s = y e s ,   t o o l b a r = n o ,   l o c a t i o n = y e s ,   d i r e c t o r i e s = n o \ ' ) "   s t y l e = " m a r g i n - l e f t :   a u t o ;   m a r g i n - r i g h t :   a u t o ;   w i d t h : 1 7 6 p x ;   h e i g h t : 2 8 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' / / j s - k i t . c o m / i m a g e s / t w i t t e r / t w i t t e r . p n g \ ' ,   s i z i n g M e t h o d = \ ' c r o p \ ' ) ; '   :   ' b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / t w i t t e r / t w i t t e r . p n g ) ; ' )   +   '   c u r s o r : p o i n t e r ; " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . f a c e b o o k S e c t i o n T m p l   =   f u n c t i o n ( )   {  
 	 v a r   t g t   =   " f b - "   +   M a t h . r a n d o m ( ) ;  
 	 r e t u r n   ( ' < d i v   i d = " '   +   t g t   +   ' "   s t y l e = " t e x t - a l i g n :   c e n t e r ; " > '   +  
 ' < d i v   c l a s s = " j s k a - p r o g r e s s A r e a   j s - p r o g r e s s H a n d l e " > < / d i v > '   +  
 	 ( ! t h i s . f a c e b o o k _ a p i _ k e y   ?  
 	 ' < d i v   s t y l e = " w i d t h :   2 0 0 p x ;   h e i g h t :   2 7 p x ;   m a r g i n :   a u t o ;   " > < i f r a m e   s r c = " h t t p : / / j s - k i t . c o m / a p i / f a c e b o o k / c o n n e c t - b u t t o n "   h e i g h t = " 3 0 p x "   w i d t h = " 2 1 0 p x "   a l l o w t r a n s p a r e n c y = " t r u e "   s t y l e = " b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   b o r d e r :   n o n e ;   z - I n d e x :   1 4 0 0 0 ; "   f r a m e b o r d e r = " 0 " > < / i f r a m e > < / d i v > '   :  
 	 ' < d i v   n a m e = '   +   t g t   +   ' "   s t y l e = " w i d t h :   2 0 0 p x ;   h e i g h t :   2 7 p x ;   m a r g i n :   a u t o ;   " > < d i v   i d = " w a i t - '   +   t g t   +   ' " > A s k i n g   F a c e b o o k . . . < / d i v > < d i v   i d = " l o g i n - '   +   t g t   +   ' "   s t y l e = " d i s p l a y :   n o n e ;   w i d t h :   2 0 0 p x ;   h e i g h t :   2 7 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = \ ' / / j s - k i t . c o m / i m a g e s / f a c e b o o k / c o n n e c t _ w h i t e _ l a r g e _ l o n g . g i f \ ' ,   s i z i n g M e t h o d = \ ' c r o p \ ' ) ; '   :   ' b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / f a c e b o o k / c o n n e c t _ w h i t e _ l a r g e _ l o n g . g i f ) ; ' )   +   '   c u r s o r : p o i n t e r ; " > < / d i v > < d i v   i d = " p r o c e s s - '   +   t g t   +   ' "   s t y l e = " d i s p l a y :   n o n e ; " > L o g g i n g   i n   < f b : n a m e   u i d = " l o g g e d i n u s e r "   l i n k e d = " f a l s e "   c a p i t a l i z e = " t r u e "   u s e y o u = " f a l s e " > < / f b : n a m e > . . . < / d i v > < / d i v > ' )   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 ' < / d i v > ' ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . g f c S e c t i o n T m p l   =   f u n c t i o n ( )   {  
 	 v a r   t g t   =   " g f c - "   +   M a t h . r a n d o m ( ) ;  
 r e t u r n   ' < d i v   i d = " '   +   t g t   +   ' "   s t y l e = " t e x t - a l i g n :   c e n t e r " > '   +  
 ' < d i v   c l a s s = " j s k a - p r o g r e s s A r e a   j s - p r o g r e s s H a n d l e " > < / d i v > '   +  
 ( t h i s . g f c _ s i t e   ?   ' < d i v   n a m e = " '   +   t g t   +   ' " > < d i v   i d = " w a i t - '   +   t g t   +   ' " > A s k i n g   G o o g l e . . . < / d i v > < d i v   i d = " l o g i n - '   +   t g t   +   ' "   s t y l e = " d i s p l a y :   n o n e ; " > < / d i v > < d i v   i d = " p r o c e s s - '   +   t g t   +   ' "   s t y l e = " d i s p l a y :   n o n e ; " > < / d i v > < / d i v > '   :  
 ' < d i v   s t y l e = " w i d t h :   2 7 0 p x ;   h e i g h t :   3 0 p x ;   m a r g i n :   a u t o ;   o v e r f l o w :   h i d d e n ;   " > < i f r a m e   s r c = " / / j s - k i t . c o m / a p i / g o o g l e / c o n n e c t - b u t t o n "   h e i g h t = " 5 0 p x "   w i d t h = " 3 0 0 p x "   a l l o w t r a n s p a r e n c y = " t r u e "   s t y l e = " b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   b o r d e r :   n o n e ;   z - I n d e x :   1 4 0 0 0 ; "   f r a m e b o r d e r = " 0 " > < / i f r a m e > < / d i v > ' ) +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 ' < / d i v > ' ;  
 }  
  
 J S K A u t h . p r o t o t y p e . r e g i s t e r S e c t i o n T m p l   =  
 ' < d i v > '   +   J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < p   c l a s s = " j s k a - i n f o T e x t   j s k a - e r r o r "   s t y l e = " t e x t - a l i g n :   c e n t e r ; " > { L a b e l : a l l F i e l d s A r e M a n d a t o r y } < / p > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : u s e r n a m e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " e m a i l I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - e m a i l M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : y o u r E m a i l } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : p a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d 2 I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d 2 M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : r e t y p e P a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : j s k a L o g o u t } "   c l a s s = " j s k a - l o g o u t "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : r e g i s t e r } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	   ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . p a s s w o r d R e c o v e r y R e q u e s t S e c t i o n T m p l   =  
 ' < d i v > '   +  
 	 ' < p   c l a s s = " j s k a - t e x t   j s k a - p a s s w o r d R e c o v e r y T e x t " > < b > { L a b e l : p a s s w o r d R e c o v e r y } < / b > < / p > '   +  
 	 J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < p   c l a s s = " j s k a - t e x t   j s k a - p a s s w o r d R e c o v e r y T e x t " > { L a b e l : e n t e r Y o u r L o g i n N o t e } < / p > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : u s e r n a m e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < s p a n   c l a s s = " j s k a - b a c k " > { L a b e l : b a c k } < / s p a n > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : s e n d P a s s w o r d } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . p a s s w o r d R e c o v e r y S e t P a s s w o r d S e c t i o n T m p l   =  
 ' < d i v > '   +  
 	 ' < p   c l a s s = " j s k a - t e x t   j s k a - p a s s w o r d R e c o v e r y T e x t " > < b > { L a b e l : p a s s w o r d R e c o v e r y } < / b > < / p > '   +  
 	 J S K A u t h . p r o t o t y p e . p r o g r e s s A r e a T m p l   +  
 	 ' < p   c l a s s = " j s k a - t e x t   j s k a - p a s s w o r d R e c o v e r y T e x t " > P l e a s e   e n t e r   t h e   n e w   p a s s w o r d < / p > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " l o g i n I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - l o g i n M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : u s e r n a m e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " a u t h C o d e I n p u t " '   +   J S K A u t h . p r o t o t y p e . a u t o C o m p l e t e   + ' > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - a u t h C o d e M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : a u t h C o d e } : < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : p a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - r i g h t C o l u m n " > '   +  
 	 	 ' < i n p u t   c l a s s = " j s k a - i n p u t "   n a m e = " p a s s w o r d 2 I n p u t "   t y p e = " p a s s w o r d " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - e r r o r   j s - p a s s w o r d 2 M e s s a g e H a n d l e " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - l e f t C o l u m n   j s k a - l a b e l " > { L a b e l : r e t y p e P a s s w o r d } < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < s p a n   c l a s s = " j s k a - b a c k " > { L a b e l : b a c k } < / s p a n > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : s u b m i t } "   n a m e = " a u t h B u t t o n "   c l a s s = " j s k a - a u t h B u t t o n "   t y p e = " b u t t o n " > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . p a s s w o r d R e c o v e r y S u c c e s s S e c t i o n T m p l   =    
 ' < d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - p a s s w o r d R e c o v e r y T e x t " > '   +  
 	 	 ' < p   c l a s s = " j s k a - t e x t " > < b > { L a b e l : p a s s w o r d R e c o v e r y } < / b > < / p > '   +  
 	 	 ' < p   c l a s s = " j s k a - t e x t " > N e w   p a s s w o r d   w a s   s e t   s u c c e s s f u l l y .   < / p > '   +  
 	 	 ' < a   c l a s s = " j s k a - l i n k T o L o g i n   j s k a - t e x t " > C l i c k   h e r e   t o   l o g   i n < / a > '   +  
 	 ' < / d i v > '   +  
 	 ' < d i v   c l a s s = " j s k a - c o n t r o l s " > '   +  
 	 	 ' < s p a n   c l a s s = " j s k a - b a c k " > { L a b e l : b a c k } < / s p a n > '   +  
 	 	 ' < i n p u t   v a l u e = " { L a b e l : c a n c e l } "   n a m e = c a n c e l B t n   t y p e = " b u t t o n "   c l a s s = " j s k a - c a n c e l B t n " > '   +  
 	 	 ' < d i v   c l a s s = " j s k a - c l e a r " > < / d i v > '   +  
 	 ' < / d i v > '   +  
 ' < / d i v > ' ;  
  
 J S K A u t h . p r o t o t y p e . p r o c e s s M e s s a g e   =   f u n c t i o n ( n a m e ,   e r r C o d e ,   d a t a )   {  
 	 i f ( e r r C o d e = = ' s u c c e s s ' )   {  
 	 	 t h i s . d i s a b l e C o n t r o l s ( n a m e ,   f a l s e ) ;  
 	 	 t h i s . c l e a r I n p u t F i e l d s ( n a m e ) ;  
 	 	 s w i t c h   ( n a m e )   {  
 	 	 	 c a s e   " p a s s w o r d R e c o v e r y R e q u e s t "   :   t h i s . s h o w ( " p a s s w o r d R e c o v e r y S e t P a s s w o r d " ,   { l o g i n :   t h i s . p a s s w o r d R e c o v e r y D a t a [ " l o g i n " ] } ) ; b r e a k ;  
 	 	 	 c a s e   " p a s s w o r d R e c o v e r y S e t P a s s w o r d "   :   t h i s . s h o w ( " p a s s w o r d R e c o v e r y S u c c e s s " ) ; b r e a k ;  
 	 	 	 d e f a u l t   :   i f   ( w i n d o w . J S K W $ E v e n t s )   J S K W $ E v e n t s . s y n c B r o a d c a s t ( ' J S K i t A u t h _ s u c c e s s _ l o g i n ' ,   d a t a ) ;   i f   ( t h i s . m o d e   ! =   " e m b e d d e d " )   t h i s . h i d e ( ) ; 	  
 	 	 }  
 	 }   e l s e   {  
 	 	 t h i s . s h o w E r r o r M e s s a g e ( n a m e ,   e r r C o d e ) ;  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . s h o w E r r o r M e s s a g e   =   f u n c t i o n ( n a m e ,   e r r C o d e ) {  
 	 J S K i t L i b . h i d e ( t h i s . H N D L [ n a m e ] . p r o g r e s s ) ;  
 	 t h i s . d i s a b l e C o n t r o l s ( n a m e ,   f a l s e ) ;  
 	 v a r   e r r o r T a r g e t   =   t h i s . g e t E r r o r T a r g e t ( e r r C o d e ) ;  
 	 i f ( e r r o r T a r g e t )   {  
 	 	 v a r   i n p u t H a n d l e   =   t h i s . H N D L [ n a m e ] [ " i n p u t " ] [ e r r o r T a r g e t ] ;  
 	 	 v a r   e r r o r M e s s a g e H a n d l e   =   t h i s . H N D L [ n a m e ] [ " m e s s a g e " ] [ e r r o r T a r g e t   +   " M s g " ] ;  
 	 	 i f   ( i n p u t H a n d l e )   i n p u t H a n d l e . f o c u s ( ) ;  
 	 	 i f   ( e r r o r M e s s a g e H a n d l e )   {  
 	 	 	 e r r o r M e s s a g e H a n d l e . i n n e r H T M L   =   $ J A L ( e r r C o d e ) ;  
 	 	 	 i f   ( n a m e   = =   " r e g i s t e r "   & &   e r r o r T a r g e t   ! =   " e m a i l " )   e r r o r M e s s a g e H a n d l e . a p p e n d C h i l d ( t h i s . b u i l d S h o w M o r e ( ) ) ;  
 	 	 	 e r r o r M e s s a g e H a n d l e . s t y l e . d i s p l a y   =   ' b l o c k ' ;  
 	 	 }  
 	 }  
 }  
  
 J S K A u t h . p r o t o t y p e . s e r v e r C a l l b a c k   =   f u n c t i o n ( t y p e ,   e r r C o d e ,   d a t a )   {  
 	 i f   ( t h i s . H N D L   & &   t h i s . H N D L [ t y p e ] )   J S K i t L i b . h i d e ( t h i s . H N D L [ t y p e ] . p r o g r e s s )  
 	 i f   ( t y p e   = =   " r e g i s t e r "   & &   d a t a   & &   d a t a . y o u r s )   d a t a . y o u r s . n e w U s e r   =   t r u e ;    
 	 t h i s . p r o c e s s M e s s a g e ( t y p e ,   e r r C o d e ,   d a t a ) ;  
 }  
  
 J S K A u t h . p r o t o t y p e . c r e a t e A r e a   =   f u n c t i o n ( n a m e ,   d a t a )   {  
 	 v a r   s e l f   =   t h i s ;  
  
 	 v a r   l o g o u t A c t i o n   =   f u n c t i o n ( )   {  
 	 	 s e t T i m e o u t ( f u n c t i o n ( ) {  
 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   ' / a p i / s e s s i o n / l o g o u t . j s ' ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   { } } ) ;  
 	 	 } ,   0 ) ;  
 	 }  
  
 	 v a r   s e c t i o n T m p l   =   s e l f [ n a m e   +   " S e c t i o n T m p l " ] ;  
 	 v a r   a r e a   =   s e l f . t o D o m ( t y p e o f ( s e c t i o n T m p l )   = =   " f u n c t i o n "   ?   s e c t i o n T m p l . a p p l y ( s e l f )   :   s e c t i o n T m p l ) ;  
 	 v a r   a r e a E l e m e n t s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   a r e a ) ;  
  
 	 v a r   b i n d O n c l i c k   =   f u n c t i o n ( e l e m e n t ,   f u n c ) {  
 	 	 i f   ( e l e m e n t )   e l e m e n t . o n c l i c k   =   f u n c t i o n ( ) {   f u n c ( ) ;   r e t u r n   f a l s e ;   }  
 	 }  
  
 	 i f   ( s e l f . m o d e   ! =   " e m b e d d e d " )   b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - c a n c e l B t n " ] ,   f u n c t i o n ( ) {   s e l f . h i d e ( ) ;   } )  
 	 e l s e   J S K i t L i b . h i d e ( a r e a E l e m e n t s [ " j s k a - c a n c e l B t n " ] ) ;  
  
 	 i f   ( n a m e   ! =   " i n f o " ) {  
 	 	 b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - l o g o u t " ] ,   f u n c t i o n ( ) {   l o g o u t A c t i o n ( ) ;   s e l f . h i d e ( ) ; } ) ;  
 	 	 i f   ( ! s e l f . l o g i n S t a t u s   & &   a r e a E l e m e n t s [ " j s k a - l o g o u t " ] )   J S K i t L i b . h i d e ( a r e a E l e m e n t s [ " j s k a - l o g o u t " ] ) ;  
 	 }   e l s e   b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - b a c k " ] ,   f u n c t i o n ( ) {   s e l f . t o g g l e I n f o A r e a ( " h i d e " ) ;   } ) ;    
  
 	 b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - f o r g o t P a s s w o r d " ] ,   f u n c t i o n ( ) {   s e l f . s h o w ( " p a s s w o r d R e c o v e r y R e q u e s t " )   } ) ;  
 	 b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - l i n k T o L o g i n " ] ,   f u n c t i o n ( ) {   s e l f . s h o w ( " l o g i n " )   } ) ;  
 	 i f   ( n a m e . m a t c h ( / p a s s w o r d R e c o v e r y / ) )   {  
 	 	 b i n d O n c l i c k ( a r e a E l e m e n t s [ " j s k a - b a c k " ] ,   f u n c t i o n ( ) {   s e l f . s h o w ( " l o g i n " )   } ) ;  
 	 }  
 	 i f   ( ! n a m e . m a t c h ( / r e g i s t e r | l o g i n | h a l o s c a n | o p e n i d | b l o g s p o t | p a s s w o r d R e c o v e r y / ) )   r e t u r n   a r e a ;  
  
 	 v a r   c r e a t e A c t i o n   =   f u n c t i o n ( t y p e ) {  
 	 	 r e t u r n   f u n c t i o n ( ) {  
 	 	 	 v a r   e r r o r   =   u n d e f i n e d ;  
 	 	 	 v a r   p a r a m s   =   {  
 	 	 	 	 l o g i n :   s e l f . H N D L [ t y p e ] [ " i n p u t " ] . l o g i n . v a l u e ,  
 	 	 	 	 p a s s w o r d :   s e l f . H N D L [ t y p e ] [ " i n p u t " ] . p a s s w o r d . v a l u e ,  
 	 	 	 	 p l a c e :   s e l f . p l a c e   | |   " " } ;  
 	 	 	 i f   ( t y p e   = =   " r e g i s t e r " )   {  
 	 	 	 	 p a r a m s [ " r e t y p e _ p a s s w o r d " ]   =   s e l f . H N D L [ " r e g i s t e r " ] [ " i n p u t " ] . p a s s w o r d 2 . v a l u e ;  
 	 	 	 	 p a r a m s [ " e m a i l " ]   =   s e l f . H N D L [ " r e g i s t e r " ] [ " i n p u t " ] . e m a i l . v a l u e ;  
 	 	 	 	 p a r a m s [ " v e r s i o n " ]   =   " 1 " ;  
 	 	 	 }  
 	 	 	 i f   ( p a r a m s [ ' l o g i n ' ] . l e n g t h   <   1   | |   ! s e l f . H N D L [ t y p e ] [ " i n p u t " ] . l o g i n . d e f a u l t R e m o v e d )   e r r o r   =   ' e m p t y _ l o g i n ' ;  
 	 	 	 i f   ( ! e r r o r   & &   t y p e   = =   " r e g i s t e r "   & &   p a r a m s [ ' e m a i l ' ] . l e n g t h   <   1 )   e r r o r   =   ' e m p t y _ e m a i l ' ;  
 	 	 	 i f   ( ! e r r o r   & &   p a r a m s [ ' p a s s w o r d ' ] . l e n g t h   <   1 )   e r r o r   =   ' e m p t y _ p a s s w o r d ' ;  
 	 	 	 i f   ( ! e r r o r   & &   t y p e   = =   " r e g i s t e r "   & &   p a r a m s [ ' r e t y p e _ p a s s w o r d ' ] . l e n g t h < 1 )   e r r o r   =   ' e m p t y _ p a s s w o r d 2 ' ;  
 	 	 	 i f   ( e r r o r )   {   s e l f . s h o w E r r o r M e s s a g e ( t y p e ,   e r r o r ) ;   r e t u r n   f a l s e ;   } ;  
 	 	 	 v a r   s c r i p t s   =   { " r e g i s t e r "   :   " / u s e r - r e g i s t r a t i o n " ,   " l o g i n "   :   " / u s e r - l o g i n " ,   " h a l o s c a n "   :   " / u s e r - h a l o s c a n - l o g i n " }  
 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   s c r i p t s [ t y p e ] ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   p a r a m s } ) ;  
 	 	 }  
 	 } ;  
  
 	 v a r   c r e a t e O p e n i d A c t i o n   =   f u n c t i o n ( t y p e ) {  
 	 	 r e t u r n   f u n c t i o n ( ) {  
 	 	 	 v a r   r a n d o m   =   f u n c t i o n ( )   { r e t u r n   M a t h . f l o o r ( M a t h . r a n d o m ( )   *   1 0 0 0 0 0 0 0 0 0 0 ) ; } ;  
 	 	 	 v a r   P P I D   =   ' p r f l _ '   +   r a n d o m ( )   +   ' - '   +   r a n d o m ( )   +   ' - '   +   r a n d o m ( ) ;  
 	 	 	 v a r   p a r a m s   =   {   j s k t i d :   P P I D } ;  
 	 	 	 i f   ( t y p e   = =   " b l o g s p o t " )   p a r a m s . p r o v i d e r   =   " b l o g s p o t " ;  
 	 	 	 i f   ( s e l f . m o d e   = =   " p o p u p "   & &   s e l f . L o g i n W i n d o w   & &   ! s e l f . L o g i n W i n d o w . c l o s e d )   {  
 	 	 	 	 s e l f . L o g i n W i n d o w . f o c u s ( ) ;  
 	 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   ' / o p e n i d - a u t h - p r o l o n g a t e ' ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   p a r a m s } ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 	 v a r   O p e n I D   =   s e l f . H N D L [ t y p e ] [ " i n p u t " ] . l o g i n ;  
 	 	 	 i f ( O p e n I D . v a l u e . l e n g t h   <   1   | |   ! O p e n I D . d e f a u l t R e m o v e d )   {  
 	 	 	 	 s e l f . s h o w E r r o r M e s s a g e ( t y p e ,   ' e m p t y _ '   +   t y p e ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 	 i f ( t y p e   = =   " b l o g s p o t "   & &   ! O p e n I D . v a l u e . m a t c h ( / \ . b l o g s p o t \ . c o m \ / ? $ / ) )   {  
 	 	 	 	 s e l f . s h o w E r r o r M e s s a g e ( t y p e ,   ' i n c o r r e c t _ b l o g s p o t _ u r l ' ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 	 v a r   A u t h U r l   =   s e l f . u r i D o m a i n   +   ' / s e t t i n g s / a u t h . c g i ? o p e n i d _ u r l = '   +   O p e n I D . v a l u e ;  
 	 	 	 i f   ( s e l f . m o d e   = =   " p o p u p " )   {  
 	 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   ' / o p e n i d - a u t h - w a i t - f o r - c o m p l e t i o n ' ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   p a r a m s } ) ;  
 	 	 	 	 s e l f . L o g i n W i n d o w   =   w i n d o w . o p e n ( A u t h U r l   +   ' & a c t i o n = p r f l & j s k t i d = '   +   P P I D ,   ' _ b l a n k ' ,  
 	 	 	 	 ' s t a t u s = n o ,   m e n u b a r = n o ,   r e s i z a b l e = n o ,   s c r o l l b a r s = y e s ,   t o o l b a r = n o ,   l o c a t i o n = y e s ,   d i r e c t o r i e s = n o ' ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 w i n d o w . l o c a t i o n   =   A u t h U r l   +   ' & a c t i o n = p r f l & p l a c e = '   +   ( s e l f . p l a c e   | |   " " ) ;  
 	 	 	 }  
 	 	 }  
 	 }  
  
 	 v a r   s p e c i f i c S u b m i t A c t i o n s   =   {  
 	 	 o p e n i d   :   c r e a t e O p e n i d A c t i o n ( " o p e n i d " ) ,  
 	 	 b l o g s p o t   :   c r e a t e O p e n i d A c t i o n ( " b l o g s p o t " ) ,    
 	 	 l o g i n   :   c r e a t e A c t i o n ( " l o g i n " ) ,  
 	 	 h a l o s c a n   :   c r e a t e A c t i o n ( " h a l o s c a n " ) ,    
 	 	 r e g i s t e r :   c r e a t e A c t i o n ( " r e g i s t e r " ) ,  
 	 	 p a s s w o r d R e c o v e r y R e q u e s t :   f u n c t i o n ( )   {  
 	 	 	 v a r   l o g i n I n p u t B o x   =   s e l f . H N D L [ " p a s s w o r d R e c o v e r y R e q u e s t " ] [ " i n p u t " ] . l o g i n ;  
 	 	 	 i f   ( l o g i n I n p u t B o x . v a l u e . l e n g t h   <   1   | |   ! l o g i n I n p u t B o x . d e f a u l t R e m o v e d )   {  
 	 	 	 	 s e l f . s h o w E r r o r M e s s a g e ( ' p a s s w o r d R e c o v e r y R e q u e s t ' ,   ' e m p t y _ l o g i n ' ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 s e l f . p a s s w o r d R e c o v e r y D a t a [ " l o g i n " ]   =   l o g i n I n p u t B o x . v a l u e ;  
 	 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   ' / u s e r - p a s s w o r d - r e c o v e r y ' ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   { l o g i n :   l o g i n I n p u t B o x . v a l u e } } ) ;  
 	 	 	 }  
 	 	 } ,  
 	 	 p a s s w o r d R e c o v e r y S e t P a s s w o r d :   f u n c t i o n ( )   {  
 	 	 	 v a r   i n p u t C o l l e c t i o n   =   s e l f . H N D L [ " p a s s w o r d R e c o v e r y S e t P a s s w o r d " ] [ " i n p u t " ]  
 	 	 	 v a r   p a r a m s   =   {  
 	 	 	 	 s t e p :   " s e t - p a s s w o r d " ,  
 	 	 	 	 l o g i n :   i n p u t C o l l e c t i o n . l o g i n . v a l u e ,  
 	 	 	 	 k e y :   J S K i t L i b . t r i m ( i n p u t C o l l e c t i o n . a u t h C o d e . v a l u e ) ,  
 	 	 	 	 p a s s w o r d :   i n p u t C o l l e c t i o n . p a s s w o r d . v a l u e ,  
 	 	 	 	 r e t y p e _ p a s s w o r d :   i n p u t C o l l e c t i o n . p a s s w o r d 2 . v a l u e  
 	 	 	 }  
 	 	 	 t h i s . p a s s w o r d R e c o v e r y D a t a [ " l o g i n " ]   =   u n d e f i n e d ;  
 	 	 	 n e w   J S R V C ( { u r i :   s e l f . u r i D o m a i n   +   ' / u s e r - p a s s w o r d - r e c o v e r y ' ,   ' t a r g e t ' :   s e l f . t a r g e t ,   r e q u e s t :   p a r a m s } ) ;  
 	 	 }  
 	 } ;  
  
 	 v a r   s u b m i t A c t i o n   =   f u n c t i o n ( )   {  
 	 	 s e l f . h i d e M e s s a g e s ( n a m e ) ;  
 	 	 s e l f . d i s a b l e C o n t r o l s ( n a m e ,   t r u e ) ;  
 	 	 s e l f . H N D L [ n a m e ] . p r o g r e s s . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 s p e c i f i c S u b m i t A c t i o n s [ n a m e ] . c a l l ( s e l f ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 } ; 	  
  
 	 i f   ( ! s e l f . H N D L )   s e l f . H N D L   =   [ ] ;  
 	 s e l f . H N D L [ n a m e ]   =   {  
 	 	 p r o g r e s s     :   a r e a E l e m e n t s [ ' j s - p r o g r e s s H a n d l e ' ] ,  
 	 	 c o n t a i n e r   :   a r e a ,  
 	 	 b u t t o n   :  
 	 	 	 { b u t t o n   :   a r e a E l e m e n t s [ " a u t h B u t t o n " ] } ,  
 	 	 m e s s a g e   :  
 	 	 	 { l o g i n M s g   :   a r e a E l e m e n t s [ " j s - l o g i n M e s s a g e H a n d l e " ] ,  
 	 	 	 e m a i l M s g   :   a r e a E l e m e n t s [ " j s - e m a i l M e s s a g e H a n d l e " ] ,  
 	 	 	 p a s s w o r d M s g   :   a r e a E l e m e n t s [ " j s - p a s s w o r d M e s s a g e H a n d l e " ] ,  
 	 	 	 p a s s w o r d 2 M s g   :   a r e a E l e m e n t s [ " j s - p a s s w o r d 2 M e s s a g e H a n d l e " ] } ,  
 	 	 i n p u t   :  
 	 	 	 { l o g i n   :   a r e a E l e m e n t s [ " l o g i n I n p u t " ] ,  
 	 	 	 a u t h C o d e   :   a r e a E l e m e n t s [ " a u t h C o d e I n p u t " ] ,  
 	 	 	 e m a i l :   a r e a E l e m e n t s [ " e m a i l I n p u t " ] ,  
 	 	 	 p a s s w o r d   :   a r e a E l e m e n t s [ " p a s s w o r d I n p u t " ] ,  
 	 	 	 p a s s w o r d 2   :   a r e a E l e m e n t s [ " p a s s w o r d 2 I n p u t " ] }  
 	 } ;  
  
 	 i f   ( n a m e   ! =   " p a s s w o r d R e c o v e r y S e t P a s s w o r d " )   J H I 2 . c r e a t e (   ( n a m e   = =   " o p e n i d "   ?   " h t t p : / / u s e r . m y o p e n i d . c o m "   :   ( n a m e   = =   " b l o g s p o t "   ?   " h t t p : / / y o u r b l o g . b l o g s p o t . c o m "   :   " J o e . B l o g g s " ) ) ,   s e l f . H N D L [ n a m e ] [ " i n p u t " ] . l o g i n ) ;    
 	 J S K i t L i b . f m a p ( d a t a   | |   [ ] ,   f u n c t i o n ( v a l u e ,   k e y ) {  
 	 	 s e l f . H N D L [ n a m e ] [ " i n p u t " ] [ k e y ] . v a l u e   =   v a l u e ;  
 	 } ) ;  
 	 b i n d O n c l i c k ( s e l f . H N D L [ n a m e ] [ " b u t t o n " ] . b u t t o n ,   s u b m i t A c t i o n ) ;  
 	 s e l f . a d d K e y H a n d l e r ( n a m e ) ;  
 	 r e t u r n   a r e a ;  
 }  
  
 J S K A u t h . p r o t o t y p e . b u i l d S h o w M o r e   =   f u n c t i o n ( )   {  
 	 v a r   t e m p l a t e   =    
 	 ' < s p a n   c l a s s = " j s k a - s h o w M o r e " >   ( '   +    
 	 	 ' < a   c l a s s = " j s - f u l l D e s c L i n k "   h r e f = " j a v a s c r i p t : v o i d ( 0 ) ; " > L e a r n   m o r e . . . < / a > ) '   +  
 	 	 ' < d i v   s t y l e = " d i s p l a y :   n o n e ; "   c l a s s = " j s - f u l l D e s c D i v " > '   +   $ J A L ( ' f u l l _ d e s c r i p t i o n ' )   +   ' < / d i v > '    
 	 ' < / s p a n > ' ;  
  
 	 v a r   s p a n   =   t h i s . t o D o m ( t e m p l a t e ) ;  
 	 v a r   h a n d l e r s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   s p a n ) ;  
  
 	 v a r   f u l l D e s c L i n k   =   h a n d l e r s [ ' j s - f u l l D e s c L i n k ' ] ;  
 	 v a r   f u l l D e s c D i v   =   h a n d l e r s [ ' j s - f u l l D e s c D i v ' ] ;    
 	 f u l l D e s c L i n k . o n c l i c k   =   f u n c t i o n ( e v ) {  
 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e v ) ;  
 	 	 f u l l D e s c L i n k . i n n e r H T M L   =   t h i s . v i s F u l l D e s c   ?   ' L e a r n   m o r e . . . '   :   ' H i d e ' ;  
 	 	 f u l l D e s c D i v . s t y l e . d i s p l a y   =   t h i s . v i s F u l l D e s c   ?   ' n o n e '   :   ' ' ;  
 	 	 t h i s . v i s F u l l D e s c   =   ! t h i s . v i s F u l l D e s c ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 	 r e t u r n   s p a n ;  
 }  
  
 J S K A u t h . p r o t o t y p e . c r e a t e A u t h S e l e c t o r   =   f u n c t i o n ( o p t i o n s ,   s e l e c t e d ,   o n c h a n g e )   {  
 	 v a r   a u t h S e l e c t o r   =   t h i s . t o D o m (  
 	 	 ' < s e l e c t   c l a s s = " j s k a - s e l e c t o r " > '   +        
 	 	 	 J S K i t L i b . f o l d l ( " " ,   o p t i o n s ,   f u n c t i o n ( o p t i o n ,   a c c )   {  
 	 	 	 	 r e t u r n   a c c   +   ' < o p t i o n   v a l u e = " '   +   o p t i o n   +   ' " '   +   ( ( s e l e c t e d   = =   o p t i o n )   ?   '   s e l e c t e d = " t r u e " '   :   ' ' )   +   ' > '   +   $ J A L ( o p t i o n + " J S K A M e t h o d " )   +   ' < / o p t i o n > ' ;  
 	 	 	 } )   +  
 	 	 ' < / s e l e c t > ' ) ;  
 	 a u t h S e l e c t o r . o n c h a n g e   =   o n c h a n g e ;  
 	 r e t u r n   a u t h S e l e c t o r ;  
 }  
  
 f u n c t i o n   J S K A u t h ( c o n f i g ,   t a r g e t )   {  
 	 t h i s . u r i D o m a i n   =   ( w i n d o w . l o c a t i o n . p r o t o c o l . s u b s t r ( 0 ,   4 )   ! =   ' h t t p '   ?   ' h t t p : '   :   ' ' )   +   ' / / j s - k i t . c o m ' ;  
 	 t h i s . a r e a s   =   { } ;  
 	 t h i s . p a s s w o r d R e c o v e r y D a t a   =   { } ;  
 	 t h i s . d e f a u l t A u t h O p t i o n s   =   [ " r e g i s t e r " ,   " l o g i n " ,   " h a l o s c a n " ,   " o p e n i d " ,   " f a c e b o o k " ,   " y a h o o " ,   " g f c " ,   " t w i t t e r " ] ;  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   c o n f i g ,   f u n c t i o n ( v ,   k ) {   t h i s [ k ]   =   v ;   } ) ;  
 	 t h i s . a c t i v e A r e a B y D e f a u l t   =   t h i s . a c t i v e A r e a B y D e f a u l t   | |   " l o g i n " ;  
  
 	 t h i s . a u t h F o r m   =   t h i s . a s s e m b l e ( ) ;  
 	 t h i s . t a r g e t   =   t a r g e t ;  
 	 t h i s . p r e p a r e A u t h F o r m ( ) ;  
 	 t h i s . l o a d C s s ( ) ;  
 }  
  
  
  
  
 f u n c t i o n   J S D L ( e l m P a r e n t ,   a r r D r a g E l m s )   {  
               v a r   s e l f   =   t h i s ;  
               s e l f . i s I E   =   J S K i t L i b . i s I E ( ) ;  
               v a r   d r g E l m s   =   a r r D r a g E l m s   | |   [ e l m P a r e n t ] ;  
               f o r ( v a r   i = 0 ;   i < d r g E l m s . l e n g t h ;   i + + )   {  
                               s e l f . a d d D r a g g a b l e C h i l d ( d r g E l m s [ i ] ) ;  
               }  
               s e l f . e l m P a r e n t   =   e l m P a r e n t ;  
               s e l f . s e t P a r e n t   =   1 ;  
 }  
  
 J S D L . p r o t o t y p e . r e S e t D r a g P a r e n t   =   f u n c t i o n   ( )   {  
               i f ( ! t h i s . s e t P a r e n t )   r e t u r n ;  
               i f ( t h i s . e l m P a r e n t . p a r e n t N o d e ! = d o c u m e n t . b o d y   | |   t h i s . e l m P a r e n t . s t y l e . p o s i t i o n ! = ' a b s o l u t e ' )   {  
                               v a r   e l m P o s ;  
                               i f ( t h i s . e l m P a r e n t . p a r e n t N o d e )   {  
                                               e l m P o s   =   t h i s . g e t E l m A b s P o s ( t h i s . e l m P a r e n t ,   f a l s e ) ;  
                                               t h i s . e l m P a r e n t . p a r e n t N o d e . r e m o v e C h i l d ( t h i s . e l m P a r e n t ) ;  
                               }  
                               d o c u m e n t . b o d y . a p p e n d C h i l d ( t h i s . e l m P a r e n t ) ;  
                               t h i s . e l m P a r e n t . s t y l e . p o s i t i o n   =   ' a b s o l u t e ' ;  
                               i f ( e l m P o s )   {  
                                               t h i s . e l m P a r e n t . s t y l e . l e f t   =   e l m P o s . x   +   " p x " ;  
                                               t h i s . e l m P a r e n t . s t y l e . t o p   =   e l m P o s . y   +   " p x " ;  
                               }  
               }  
               t h i s . s e t P a r e n t   =   0 ;  
 }  
  
 J S D L . p r o t o t y p e . g e t C u r S c r o l l   =   f u n c t i o n ( )   {  
               v a r   s c r o l l _ l e f t = 0 , s c r o l l _ t o p = 0 ;  
               i f ( s e l f . p a g e X O f f s e t ) {  
                               s c r o l l _ l e f t = s e l f . p a g e X O f f s e t ;  
               }   e l s e   {  
                               i f ( d o c u m e n t . d o c u m e n t E l e m e n t & & d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l L e f t ) {  
                                               s c r o l l _ l e f t = d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l L e f t ;  
                               }   e l s e   {  
                                               i f ( d o c u m e n t . b o d y ) {  
                                                               s c r o l l _ l e f t = d o c u m e n t . b o d y . s c r o l l L e f t ;  
                                               }  
                               }  
               }  
               i f ( s e l f . p a g e Y O f f s e t ) {  
                               s c r o l l _ t o p = s e l f . p a g e Y O f f s e t ;  
               }   e l s e   {  
                               i f ( d o c u m e n t . d o c u m e n t E l e m e n t & & d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l T o p ) {  
                                               s c r o l l _ t o p = d o c u m e n t . d o c u m e n t E l e m e n t . s c r o l l T o p ;  
                               }   e l s e   {  
                                               i f ( d o c u m e n t . b o d y ) {  
                                                               s c r o l l _ t o p = d o c u m e n t . b o d y . s c r o l l T o p ;  
                                               }  
                               }  
               }  
               r e t u r n   { " s c r o l l _ l e f t " : s c r o l l _ l e f t , " s c r o l l _ t o p " : s c r o l l _ t o p } ;  
 }  
  
 J S D L . p r o t o t y p e . g e t E l m A b s P o s   =   f u n c t i o n   ( e l e m e n t ,   u s e s c r o l l ) {  
               v a r   x = 0 ;  
               v a r   y = 0 ;  
               v a r   e = e l e m e n t ;  
               v a r   s c r o l l _ l e f t = 0 , s c r o l l _ t o p = 0 , c u r _ s c r o l l ;  
               i f ( u s e s c r o l l ) {  
                               c u r _ s c r o l l = t h i s . g e t C u r S c r o l l ( ) ;  
                               s c r o l l _ l e f t = c u r _ s c r o l l . s c r o l l _ l e f t ;  
                               s c r o l l _ t o p = c u r _ s c r o l l . s c r o l l _ t o p ;  
               }  
               i f ( ! t h i s . i s I E ) {  
                               w h i l e ( e ) {  
                                               x + = e . o f f s e t L e f t ;  
                                               y + = e . o f f s e t T o p ;  
                                               e = e . o f f s e t P a r e n t ;  
                               }  
                               e = e l e m e n t ;  
                               w h i l e ( e   & &   e ! = d o c u m e n t . b o d y   & &   e ! = d o c u m e n t . d o c u m e n t E l e m e n t ) {  
 	 	               x   - =   e . s c r o l l L e f t   | |   0 ;  
 	 	               y   - =   e . s c r o l l T o p   | |   0 ;  
                                               e = e . p a r e n t N o d e ;  
                               }  
                               i f ( u s e s c r o l l ) {  
                                               x - = s c r o l l _ l e f t ;  
                                               y - = s c r o l l _ t o p ;  
                               }  
                               r e t u r n   { x : x , y : y } ;  
               }  
               e = e l e m e n t ;  
               w h i l e ( e ) {  
                               v a r   l e f t _ b o r d e r = 0 ;  
                               v a r   t o p _ b o r d e r = 0 ;  
                               i f ( e ! = e l e m e n t ) {  
                                               v a r   l e f t _ b o r d e r   =   p a r s e I n t ( e . s t y l e . b o r d e r L e f t W i d t h )   | |   0 ;  
                                               v a r   t o p _ b o r d e r   =   p a r s e I n t ( e . s t y l e . b o r d e r T o p W i d t h )   | |   0 ;  
                               }  
                               i f ( d o c u m e n t . c o m p a t M o d e   = =   " B a c k C o m p a t " ) {  
                                               x + = e . o f f s e t L e f t - l e f t _ b o r d e r ;  
                                               y + = e . o f f s e t T o p - t o p _ b o r d e r ;  
                               }   e l s e   {  
                                               x + = e . o f f s e t L e f t + l e f t _ b o r d e r ;  
                                               y + = e . o f f s e t T o p + t o p _ b o r d e r ;  
                               }  
                               t r y   {  
                                               e = e . o f f s e t P a r e n t ;  
                               }   c a t c h ( e r r )   {   e = n u l l ;   } ;  
               }  
               i f ( u s e s c r o l l ) {  
                               x - = s c r o l l _ l e f t ;  
                               y - = s c r o l l _ t o p ;  
               }  
               r e t u r n   { x : x , y : y } ;  
 }  
  
 J S D L . p r o t o t y p e . a d d D r a g g a b l e C h i l d   =   f u n c t i o n ( d r a g E l m )   {  
               v a r   s e l f   =   t h i s ;  
               d r a g E l m . s t y l e . c u r s o r   =   " m o v e " ;  
               d r a g E l m . o n m o u s e d o w n   =   f u n c t i o n ( e ) { s e l f . o n S t a r t D r a g H a n d l e r ( e ) ; }  
 }  
  
 J S D L . p r o t o t y p e . o n S t a r t D r a g H a n d l e r   =   f u n c t i o n   ( e )   {  
               v a r   s e l f   =   t h i s ;  
               s e l f . r e S e t D r a g P a r e n t ( ) ;  
               e = e   | |   w i n d o w . e v e n t ;  
               v a r   e l m P o s   =   s e l f . g e t E l m A b s P o s ( t h i s . e l m P a r e n t ,   f a l s e ) ;  
               v a r   m o u s e P o s   =   J S K i t L i b . g e t M o u s e P o s i t i o n ( e ) ;  
               s e l f . s t a r t x   =   m o u s e P o s . x   -   e l m P o s . x ;  
               s e l f . s t a r t y   =   m o u s e P o s . y   -   e l m P o s . y ;  
               v a r   m a x L e f t   =   d o c u m e n t . b o d y . c l i e n t W i d t h   -   s e l f . e l m P a r e n t . o f f s e t W i d t h   -  
                               ( p a r s e I n t ( s e l f . e l m P a r e n t . s t y l e . m a r g i n L e f t )   | |   0 )   -  
                               ( p a r s e I n t ( s e l f . e l m P a r e n t . s t y l e . m a r g i n R i g h t )   | |   0 ) ;  
  
               v a r   o n M o v e D r a g H a n d l e r   =   f u n c t i o n ( e v e n t )   {  
                               e v e n t   =   e v e n t   | |   w i n d o w . e v e n t ;  
                               v a r   m o u s e P o s   =   J S K i t L i b . g e t M o u s e P o s i t i o n ( e v e n t ) ;  
                               v a r   l e f t   =   m o u s e P o s . x   -   s e l f . s t a r t x ;  
 	               s e l f . e l m P a r e n t . s t y l e . l e f t   =   ( l e f t   > =   m a x L e f t   ?   m a x L e f t   :   ( l e f t   <   0   ?   0   :   l e f t ) )   +   " p x " ;  
                               s e l f . e l m P a r e n t . s t y l e . t o p   =   ( m o u s e P o s . y   -   s e l f . s t a r t y   <   0 )   ?   0   :   ( m o u s e P o s . y   -   s e l f . s t a r t y )   +   " p x " ;  
               }  
  
               v a r   o n S t o p D r a g H a n d l e r   =   f u n c t i o n ( e v e n t )   {  
                               e v e n t   =   e v e n t   | |   w i n d o w . e v e n t ;  
                               J S K i t L i b . r e m o v e H a n d l e r s ( d o c u m e n t ,   o n M o v e D r a g H a n d l e r ,   o n S t o p D r a g H a n d l e r ,   s e l f . e l m P a r e n t ) ;  
                               J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e v e n t ) ;  
                               i f ( s e l f . e l m P a r e n t . j s k $ o n _ s t o p _ d r a g )   s e l f . e l m P a r e n t . j s k $ o n _ s t o p _ d r a g ( e ) ;  
               }  
  
               J S K i t L i b . a d d H a n d l e r s ( d o c u m e n t ,   o n M o v e D r a g H a n d l e r ,   o n S t o p D r a g H a n d l e r ,   s e l f . e l m P a r e n t ) ;  
               J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;  
               J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
               i f ( s e l f . e l m P a r e n t . j s k $ o n _ s t a r t _ d r a g )   s e l f . e l m P a r e n t . j s k $ o n _ s t a r t _ d r a g ( e ) ;  
 }  
  
  
  
 f u n c t i o n   J S K i t A v a t a r s ( c o n f i g )   {  
 	 J S K i t L i b . f m a p . c a l l ( t h i s ,   c o n f i g ,   f u n c t i o n ( v a l u e ,   k e y )   {   t h i s [ k e y ]   =   v a l u e ;   } ) ;  
 	 t h i s . c l e a n u p O p s Q u e u e ( ) ;  
 	 t h i s . a c t i v a t e E v e n t s ( ) ;  
 	 t h i s . l o a d C S S ( ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . _ l a b e l s   =   {  
 	 " l o a d i n g "   :   " L o a d i n g   . . . " ,  
 	 " u p l o a d A v a t a r "   :   " U p l o a d   n e w   a v a t a r   : " ,  
 	 " r e m o v e A v a t a r "   :   " R e m o v e   a v a t a r " ,  
 	 " s e l e c t e d A v a t a r "   :   " S e l e c t e d   a v a t a r " ,  
 	 " n o A v a t a r s M e s s a g e "   :   " N o   a v a t a r s   u p l o a d e d " ,  
 	 " l o a d i n g A v a t a r s D a t a "   :   " A v a t a r s   a r e   l o a d i n g .   P l e a s e   w a i t   . . . " ,  
 	 " r e m o v e A v a t a r C o n f i r m "   :   " R e m o v e   t h i s   a v a t a r ? "  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . l a b e l   =   f u n c t i o n ( n a m e )   {   r e t u r n   ( t h i s . l a b e l s   ?   ( t h i s . l a b e l s ( n a m e )   = =   n a m e   ?   f a l s e   :   t h i s . l a b e l s ( n a m e ) )   :   f a l s e )   | |   t h i s . _ l a b e l s [ n a m e ]   | |   n a m e ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a n o n y m o u s A v a t a r D a t a   =   f u n c t i o n ( )   {   r e t u r n   { " n a m e " :   " / / j s - k i t . c o m / a v a t a r / g x p A 9 9 f 0 j K l o h F _ D g t h r o T . p n g " ,   " w i d t h " :   1 0 0 ,   " h e i g h t " :   1 0 0 } ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a s s e m b l e A v a t a r A r e a   =   f u n c t i o n ( c o n t a i n e r ,   a v a t a r )   {  
 	 i f   ( ! c o n t a i n e r )   r e t u r n ;  
 	 t h i s . a v a t a r A r e a   =   c o n t a i n e r ;  
 	 t h i s . s e t A c t i v e A v a t a r ( a v a t a r ) ;  
 	 r e t u r n   c o n t a i n e r ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . s e t A c t i v e A v a t a r   =   f u n c t i o n ( a c t i v e A v a t a r )   {  
 	 i f   ( ! t h i s . a v a t a r A r e a )   r e t u r n ;  
 	 a c t i v e A v a t a r   =   a c t i v e A v a t a r   | |   t h i s . g e t A c t i v e A v a t a r ( ) ;  
 	 i f   ( ! a c t i v e A v a t a r )   {  
 	 	 a c t i v e A v a t a r   =   t h i s . a n o n y m o u s A v a t a r D a t a ( ) ;    
 	 	 t h i s . c h o s e n A v a t a r   =   u n d e f i n e d ;  
 	 }  
 	 J S K i t L i b . a d d S t y l e ( t h i s . a v a t a r A r e a ,   "   b a c k g r o u n d :   u r l ( ' "   +   t h i s . a v a t a r U R L ( a c t i v e A v a t a r . n a m e )   +   " ' )   n o - r e p e a t   c e n t e r   c e n t e r ; " ) ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( t h i s . a v a t a r A r e a ) ;  
 	 i f   ( t h i s . c o n t r o l B u t t o n s )   t h i s . a p p e n d C o n t r o l B u t t o n s ( t h i s . a v a t a r A r e a ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . t o g g l e A v a t a r s L i s t V i e w   =   f u n c t i o n ( )   {   i f   ( t h i s . a v a t a r s L i s t C o n t a i n e r )   J S K i t L i b . t o g g l e ( t h i s . a v a t a r s L i s t C o n t a i n e r ) ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a p p e n d C o n t r o l B u t t o n s   =   f u n c t i o n ( c o n t a i n e r )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   o n E d i t B u t t o n C l i c k   =   f u n c t i o n ( )   {   s e l f . t o g g l e A v a t a r s L i s t V i e w ( ) ;   } ;  
 	 v a r   o n D e l e t e B u t t o n C l i c k   =   f u n c t i o n ( )   {  
 	 	 i f   ( ! c o n f i r m ( s e l f . l a b e l ( ' r e m o v e A v a t a r C o n f i r m ' ) ) )   r e t u r n ;  
 	 	 v a r   o u t e r   =   s e l f . c h o s e n A v a t a r [ 1 ] ;  
 	 	 o u t e r . p a r e n t N o d e . r e m o v e C h i l d ( o u t e r ) ;  
 	 	 s e l f . p r o c e s s A c t i o n ( " r e m o v e " ,   s e l f . c h o s e n A v a t a r [ 0 ] . n a m e ) ;  
 	 	 i f   ( s e l f . a v a t a r s . l e n g t h   = =   0 )   s e l f . s h o w N o A v a t a r s M e s s a g e ( ) ;  
 	 	 s e l f . s e t A c t i v e A v a t a r ( ) ;  
 	 } ;  
 	 c o n t a i n e r . e d i t B u t t o n       =   t h i s . c r e a t e C o n t r o l B u t t o n ( " e d i t " ,       { " t o p " :   6 0 ,   " l e f t " :   1 5 } ,   o n E d i t B u t t o n C l i c k ) ;  
 	 c o n t a i n e r . d e l e t e B u t t o n   =   t h i s . c r e a t e C o n t r o l B u t t o n ( " d e l e t e " ,   { " t o p " :   6 0 ,   " l e f t " :   5 5 } ,   o n D e l e t e B u t t o n C l i c k ) ;  
  
 	 c o n t a i n e r . a p p e n d C h i l d ( c o n t a i n e r . e d i t B u t t o n ) ;  
 	 c o n t a i n e r . a p p e n d C h i l d ( c o n t a i n e r . d e l e t e B u t t o n ) ;  
  
 	 c o n t a i n e r . o n m o u s e o u t   =   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . h i d e ( t h i s . e d i t B u t t o n ) ;  
 	 	 J S K i t L i b . h i d e ( t h i s . d e l e t e B u t t o n ) ;  
 	 } ;  
 	 c o n t a i n e r . o n m o u s e o v e r   =   f u n c t i o n ( e )   {  
 	 	 J S K i t L i b . s h o w ( t h i s . e d i t B u t t o n ) ;  
 	 	 i f   ( s e l f . c h o s e n A v a t a r )   J S K i t L i b . s h o w ( t h i s . d e l e t e B u t t o n ) ;  
 	 } ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . c r e a t e C o n t r o l B u t t o n   =   f u n c t i o n ( t y p e ,   p o s i t i o n ,   o n C l i c k A c t i o n )   {  
 	 v a r   b u t t o n   =   d o c u m e n t . c r e a t e E l e m e n t ( " D I V " ) ;  
 	 J S K i t L i b . s e t S t y l e ( b u t t o n ,  
 	 	 " d i s p l a y :   n o n e ;   b a c k g r o u n d :   t r a n s p a r e n t ;   p o s i t i o n :   a b s o l u t e ;   p a d d i n g :   0 ;   m a r g i n :   0 ;   "   +  
 	 	 " w i d t h :   3 0 p x ;   h e i g h t :   3 0 p x ;   t o p : "   +   p o s i t i o n . t o p   +   " p x ;   l e f t : "   +   p o s i t i o n . l e f t   +   " p x ;   c u r s o r :   p o i n t e r ; " ) ;  
 	 b u t t o n . o n c l i c k   =   o n C l i c k A c t i o n ;  
 	 b u t t o n . t i t l e   =   t h i s . l a b e l ( t y p e   +   " A v a t a r s B t n L a b e l " ) ;  
 	 J S K i t L i b . a d d P N G ( b u t t o n ,   " / / j s - k i t . c o m / i m a g e s / a v a t a r - "   +   t y p e   +   " . p n g " ) ;  
 	 r e t u r n   b u t t o n ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . g e t A v a t a r s   =   f u n c t i o n ( )   {   r e t u r n   t h i s . a v a t a r s   | |   [ ] ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . g e t A c t i v e A v a t a r   =   f u n c t i o n ( g e t F r o m L i s t )   {  
 	 i f   ( t h i s . b u l k O p e r a t i o n s   & &   ! g e t F r o m L i s t )   r e t u r n   t h i s . c h o s e n A v a t a r   ?   t h i s . c h o s e n A v a t a r [ 0 ]   :   u n d e f i n e d ;  
 	 r e t u r n   J S K i t L i b . f o l d l ( u n d e f i n e d ,   t h i s . a v a t a r s   | |   [ ] ,   f u n c t i o n ( a v a t a r )   {   i f   ( a v a t a r . c h o s e n )   r e t u r n   a v a t a r ;   } ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a v a t a r U R L   =   f u n c t i o n ( n a m e )   {   r e t u r n   ( / ^ ( h t t p s ? : ) * \ / \ / / . t e s t ( n a m e ) )   ?   n a m e   :   t h i s . u r i A v a t a r   +   n a m e ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . c l e a n u p O p s Q u e u e   =   f u n c t i o n ( )   {   t h i s . o p s Q u e u e   =   [ ] ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . p r o c e s s A c t i o n   =   f u n c t i o n ( o p e r a t i o n ,   a v a t a r )   {  
 	 t h i s . o p s Q u e u e . p u s h ( { " o p " :   o p e r a t i o n ,   " a v a t a r " :   a v a t a r } ) ;  
 	 i f   ( t h i s . b u l k O p e r a t i o n s )   r e t u r n ;    
 	 t h i s . a v a t a r s   =   t h i s . a p p l y A v a t a r s C h a n g e s ( t h i s . a v a t a r s ) ;  
 	 i f   ( o p e r a t i o n   = =   " r e m o v e " )   t h i s . r e m o v e A v a t a r ( a v a t a r ) ;  
 	 t h i s . o p s Q u e u e . p o p ( ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . r e m o v e A v a t a r   =   f u n c t i o n ( a v a t a r )   {   t h i s . s e n d S e r v e r R e q u e s t ( " r e m o v e " ,   [ ] ,   [ " a v r m " ,   a v a t a r ] ) ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . m k A v a t a r   =   f u n c t i o n ( a v a t a r ,   o n m o u s e o v e r ,   o n m o u s e o u t ,   o n m o u s e d o w n ,   o u t e r o n m o u s e d o w n )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   c o n t e n t   =   J S K i t L i b . h t m l (  
 	 	 ' < d i v   c l a s s = " j s k - a v t - c o n t a i n e r   j s - h i d e B o r d e r " > '   +  
 	 	     ' < d i v   c l a s s = " j s k - a v t - w r a p p e r " > '   +  
 	 	         ' < d i v   c l a s s = " j s k - a v t - i m a g e " > < / d i v > '   +  
 	 	         ' < d i v   c l a s s = " j s k - a v t - c o n t r o l " > '   +    
 	 	             ' < d i v   c l a s s = " j s k - a v t - c o n t r o l - s e l e c t e d " > '   +   s e l f . l a b e l ( ' s e l e c t e d A v a t a r ' )   +   ' < / d i v > '   +  
 	 	             ' < d i v   c l a s s = " j s k - a v t - c o n t r o l - r e m o v e " > '   +   s e l f . l a b e l ( ' r e m o v e A v a t a r ' )   +   ' < / d i v > '   +  
 	 	         ' < / d i v > '   +  
 	 	     ' < / d i v > '   +  
 	 	 ' < / d i v > '  
 	 ) ;  
 	 v a r   e l e m e n t s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   c o n t e n t ) ;  
 	 v a r   g e t   =   f u n c t i o n ( n a m e )   {   r e t u r n   e l e m e n t s [ " j s k - a v t - "   +   n a m e ] ;   } ;  
 	 J S K i t L i b . a d d P N G ( g e t ( " i m a g e " ) ,   J S K i t A v a t a r s . p r o t o t y p e . a v a t a r U R L . c a l l ( { u r i A v a t a r :   s e l f . u r i A v a t a r } ,   a v a t a r . n a m e ) ) ;  
 	 J S K i t L i b . a d d S t y l e ( g e t ( " i m a g e " ) ,   " w i d t h :   "   +   a v a t a r . w i d t h   +   " p x ;   h e i g h t :   "   +   a v a t a r . h e i g h t   +   " p x ;   "   +  
 	 	 	 ( t h i s . o l d S t y l e I E   ?   " "   :   " p o s i t i o n :   r e l a t i v e ;   l e f t :   "   +   ( ( 1 1 4 - a v a t a r . w i d t h ) / 2 )   +   " p x ; " ) ) ;  
 	 J S K i t L i b . h i d e ( g e t ( " c o n t r o l - s e l e c t e d " ) ) ;  
 	 J S K i t L i b . h i d e ( g e t ( " c o n t r o l - r e m o v e " ) ) ;  
 	 v a r   a r g s   =   [ a v a t a r ,   g e t ( " c o n t a i n e r " ) ,   g e t ( " c o n t r o l - s e l e c t e d " ) ,   g e t ( " c o n t r o l - r e m o v e " ) ] ;  
 	 g e t ( " c o n t r o l " ) . o n m o u s e o v e r   =   f u n c t i o n ( )   {   r e t u r n   o n m o u s e o v e r . a p p l y ( s e l f ,   a r g s ) ;   } ;  
 	 g e t ( " c o n t r o l " ) . o n m o u s e o u t   =   f u n c t i o n ( )   {   r e t u r n   o n m o u s e o u t . a p p l y ( s e l f ,   a r g s ) ;   } ;  
 	 g e t ( " c o n t r o l - r e m o v e " ) . o n m o u s e d o w n   =   f u n c t i o n ( e )   {    
 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;    
 	 	 r e t u r n   o n m o u s e d o w n . a p p l y ( s e l f ,   a r g s ) ;  
 	 } ;  
 	 g e t ( " c o n t a i n e r " ) . o n m o u s e d o w n   =   f u n c t i o n ( )   {   o u t e r o n m o u s e d o w n . a p p l y ( s e l f ,   a r g s ) ;   } ;  
 	 i f   ( a v a t a r . c h o s e n )   o u t e r o n m o u s e d o w n . a p p l y ( s e l f ,   a r g s ) ;    
 	 r e t u r n   g e t ( " c o n t a i n e r " ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a p p l y A v a t a r s C h a n g e s   =   f u n c t i o n ( a v a t a r s )   {  
 	 v a r   g e t A v a t a r I d x   =   f u n c t i o n ( a v t s ,   a v a t a r N a m e )   {  
 	 	 f o r   ( v a r   j = 0 ;   j < a v t s . l e n g t h ;   j + + )   {   i f   ( a v t s [ j ] . n a m e   = =   a v a t a r N a m e )   r e t u r n   j ;   }  
 	 	 r e t u r n   - 1 ;  
 	 } ;  
 	 f o r   ( v a r   i = 0 ;   i < t h i s . o p s Q u e u e . l e n g t h ;   i + + )   {  
 	 	 v a r   a v a t a r I d x   =   g e t A v a t a r I d x ( a v a t a r s ,   t h i s . o p s Q u e u e [ i ] . a v a t a r ) ;  
 	 	 i f   ( a v a t a r I d x   <   0 )   b r e a k ;  
 	 	 s w i t c h   ( t h i s . o p s Q u e u e [ i ] . o p )   {  
                                                 c a s e   ' r e m o v e ' :   a v a t a r s . s p l i c e ( a v a t a r I d x , 1 ) ;   b r e a k ;  
 	 	 	 c a s e   ' a c t i v a t e ' :   a v a t a r s [ a v a t a r I d x ] . c h o s e n   =   t r u e ;   b r e a k ;  
 	 	 	 c a s e   ' d e a c t i v a t e ' :   a v a t a r s [ a v a t a r I d x ] . c h o s e n   =   f a l s e ;   b r e a k ;  
 	 	 }  
 	 }  
 	 i f   ( t h i s . b u l k O p e r a t i o n s )   {  
 	 	 v a r   a v a t a r U p l o a d e d   =   t r u e ;  
 	 	 f o r   ( v a r   k = 0 ;   k < a v a t a r s . l e n g t h ;   k + + )   {  
 	 	 	 a v a t a r I d x   =   g e t A v a t a r I d x ( t h i s . o r i g A v a t a r s ,   a v a t a r s [ k ] . n a m e ) ;  
 	 	 	 i f   ( a v a t a r I d x   <   0 )   {  
 	 	 	 	 f o r   ( v a r   l = 0 ;   l < t h i s . o p s Q u e u e . l e n g t h ;   l + + )   {  
 	 	 	 	 	 i f   ( t h i s . o p s Q u e u e [ l ] . a v a t a r = = a v a t a r s [ k ] . n a m e )   {   a v a t a r U p l o a d e d   =   f a l s e ;   b r e a k ;   }  
 	 	 	 	 }  
 	 	 	 	 i f   ( a v a t a r U p l o a d e d )   t h i s . p r o c e s s A c t i o n ( " a d d " ,   a v a t a r s [ k ] . n a m e ) ;    
 	 	 	 }  
 	 	 }  
 	 }  
 	 r e t u r n   a v a t a r s ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . r e p l a c e A v a t a r s   =   f u n c t i o n ( a v a t a r s )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 i f   ( ! t h i s . a v a t a r s L i s t A r e a )   r e t u r n ;  
 	 a v a t a r s   =   a v a t a r s   | |   [ ] ;  
 	 i f   ( t h i s . b u l k O p e r a t i o n s )   {  
 	 	 i f   ( t y p e o f ( t h i s . a v a t a r s )   = =   " u n d e f i n e d " )   {  
 	 	 	 t h i s . o r i g A v a t a r s   =   t h i s . a v a t a r s   =   a v a t a r s ;  
 	 	 }   e l s e   t h i s . a v a t a r s   =   t h i s . a p p l y A v a t a r s C h a n g e s ( a v a t a r s ) ;  
 	 }   e l s e   {  
 	 	 t h i s . a v a t a r s   =   a v a t a r s ;  
 	 	 t h i s . s e t A c t i v e A v a t a r ( ) ;  
 	 }  
 	 v a r   a v a t a r s C o u n t   =   t h i s . a v a t a r s . l e n g t h ;  
 	 v a r   o n m o u s e o v e r   =   f u n c t i o n ( a v a t a r ,   o u t e r ,   s e l ,   r e m )   {  
 	 	 J S K i t L i b . h i d e ( s e l ) ;  
 	 	 J S K i t L i b . s h o w ( r e m ) ;  
 	 } ;  
 	 v a r   o n m o u s e o u t   =   f u n c t i o n ( a v a t a r ,   o u t e r ,   s e l ,   r e m )   {  
 	 	 J S K i t L i b . h i d e ( r e m ) ;  
 	 	 i f   ( s e l f . c h o s e n A v a t a r   & &   s e l f . c h o s e n A v a t a r [ 1 ]   = =   o u t e r )   J S K i t L i b . s h o w ( s e l ) ;  
 	 } ;  
 	 v a r   o n m o u s e d o w n   =   f u n c t i o n ( a v a t a r ,   o u t e r ,   s e l ,   r e m )   {  
 	 	 i f   ( c o n f i r m ( s e l f . l a b e l ( ' r e m o v e A v a t a r C o n f i r m ' ) ) )   {  
 	 	 	 s e l f . p r o c e s s A c t i o n ( " r e m o v e " ,   a v a t a r . n a m e ) ;  
 	 	 	 o u t e r . p a r e n t N o d e . r e m o v e C h i l d ( o u t e r ) ;  
 	 	 	 i f   ( s e l f . c h o s e n A v a t a r   & &   s e l f . c h o s e n A v a t a r [ 1 ]   = =   o u t e r )   {  
 	 	 	 	 s e l f . c h o s e n A v a t a r   =   u n d e f i n e d ;  
 	 	 	 	 s e l f . s e t A c t i v e A v a t a r ( ) ;    
 	 	 	 }  
 	 	 	 a v a t a r s C o u n t - - ;  
 	 	 }  
 	 	 i f   ( a v a t a r s C o u n t   <   1 )   s e l f . s h o w N o A v a t a r s M e s s a g e ( ) ;  
 	 } ;  
 	 v a r   o u t e r o n m o u s e d o w n   =   f u n c t i o n ( a v a t a r ,   o u t e r ,   s e l ,   r e m )   {  
 	 	 i f   ( s e l f . c h o s e n A v a t a r )   {  
 	 	 	 J S K i t L i b . r e m o v e C l a s s ( s e l f . c h o s e n A v a t a r [ 1 ] ,   ' j s - s h o w B o r d e r ' ) ;  
 	 	 	 J S K i t L i b . a d d C l a s s ( s e l f . c h o s e n A v a t a r [ 1 ] ,   ' j s - h i d e B o r d e r ' ) ;  
 	 	 	 J S K i t L i b . h i d e ( s e l f . c h o s e n A v a t a r [ 2 ] ) ;  
 	 	 	 J S K i t L i b . h i d e ( s e l f . c h o s e n A v a t a r [ 3 ] ) ;  
 	 	 }  
 	 	 i f   ( s e l f . c h o s e n A v a t a r   & &   s e l f . c h o s e n A v a t a r [ 1 ]   = =   o u t e r )   {  
 	 	 	 s e l f . p r o c e s s A c t i o n ( " d e a c t i v a t e " ,   a v a t a r . n a m e ) ;  
 	 	 	 s e l f . c h o s e n A v a t a r   =   u n d e f i n e d ;  
 	 	 	 s e l f . s e t A c t i v e A v a t a r ( ) ;  
 	 	 }   e l s e   {  
 	 	 	 J S K i t L i b . r e m o v e C l a s s ( o u t e r ,   ' j s - h i d e B o r d e r ' ) ;  
 	 	 	 J S K i t L i b . a d d C l a s s ( o u t e r ,   ' j s - s h o w B o r d e r ' ) ;  
 	 	 	 i f   ( s e l f . c h o s e n A v a t a r )   s e l f . p r o c e s s A c t i o n ( " d e a c t i v a t e " ,   s e l f . c h o s e n A v a t a r [ 0 ] . n a m e ) ;  
 	 	 	 s e l f . p r o c e s s A c t i o n ( " a c t i v a t e " ,   a v a t a r . n a m e ) ;  
 	 	 	 s e l f . c h o s e n A v a t a r   =   [ a v a t a r ,   o u t e r ,   s e l ,   r e m ] ;  
 	 	 	 J S K i t L i b . s h o w ( s e l ) ;  
 	 	 	 J S K i t L i b . h i d e ( r e m ) ;  
 	 	 	 s e l f . s e t A c t i v e A v a t a r ( a v a t a r ) ;  
 	 	 }  
 	 } ;  
 	 v a r   m k A v a t a r   =   f u n c t i o n ( a v a t a r )   {   r e t u r n   s e l f . m k A v a t a r ( a v a t a r ,   o n m o u s e o v e r ,   o n m o u s e o u t ,   o n m o u s e d o w n ,   o u t e r o n m o u s e d o w n ) ;   } ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( t h i s . a v a t a r s L i s t A r e a ) ;  
 	 f o r   ( v a r   i   =   t h i s . a v a t a r s . l e n g t h   -   1 ;   i   > =   0 ;   i - - )   t h i s . a v a t a r s L i s t A r e a . a p p e n d C h i l d ( m k A v a t a r ( t h i s . a v a t a r s [ i ] ) ) ;  
 	 t h i s . a v a t a r s L i s t A r e a . a p p e n d C h i l d ( J S K i t L i b . h t m l ( ' < d i v   c l a s s = " j s - k i t - c l e a r " > < / d i v > ' ) ) ;  
 	 i f   ( a v a t a r s C o u n t   <   1 )   s e l f . s h o w N o A v a t a r s M e s s a g e ( ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . s h o w N o A v a t a r s M e s s a g e   =   f u n c t i o n ( )   {  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( t h i s . a v a t a r s L i s t A r e a ) ;  
 	 t h i s . a v a t a r s L i s t A r e a . a p p e n d C h i l d ( J S K i t L i b . h t m l ( ' < d i v   c l a s s = " j s k - a v t - n o A v a t a r s M s g " > '   +   t h i s . l a b e l ( " n o A v a t a r s M e s s a g e " )   +   ' < / d i v > ' ) ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . r e f r e s h A v a t a r s   =   f u n c t i o n ( i s D a t a V a l i d ,   a v a t a r s )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 i f   ( i s D a t a V a l i d )   {   t h i s . r e p l a c e A v a t a r s ( a v a t a r s ) ;   r e t u r n ;   }  
 	 s e t T i m e o u t ( f u n c t i o n ( )   {   s e l f . s e n d S e r v e r R e q u e s t ( " l i s t " ) ;   } ,   0 ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . s e n d S e r v e r R e q u e s t   =   f u n c t i o n ( a c t i o n ,   b u l k O p e r a t i o n s ,   s i n g l e O p e r a t i o n )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 i f   ( a c t i o n   = =   " s a v e "   & &   b u l k O p e r a t i o n s . l e n g t h   <   1 )   r e t u r n ;  
 	 v a r   r e q u e s t   =   J S K i t E P B . g e t A s H a s h ( { " r e f " :   s e l f . r e f } ) ;  
 	 i f   ( a c t i o n   = =   " l i s t " )   r e q u e s t [ " i d " ]   =   t h i s . i d ;  
 	 i f   ( b u l k O p e r a t i o n s )   r e q u e s t . a v a t a r s   =   b u l k O p e r a t i o n s . j o i n ( ' ; ' ) ;  
 	 i f   ( s i n g l e O p e r a t i o n )   r e q u e s t [ s i n g l e O p e r a t i o n [ 0 ] ]   =   s i n g l e O p e r a t i o n [ 1 ] ;  
 	 n e w   J S R V C ( { " u r i " :   s e l f . u r i A v a t a r   +   a c t i o n ,   " r e q u e s t " :   r e q u e s t } ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . s a v e A v a t a r s   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . o p s Q u e u e . l e n g t h   <   1 )   r e t u r n ;  
 	 v a r   o p s   =   J S K i t L i b . f o l d l ( [ ] ,   t h i s . o p s Q u e u e ,   f u n c t i o n ( o p e r a t i o n ,   a c c )   {   i f   ( o p e r a t i o n . o p   ! =   ' a d d ' )   a c c . p u s h ( o p e r a t i o n . o p   +   ' , '   +   o p e r a t i o n . a v a t a r ) ;   } ) ;  
 	 t h i s . a v a t a r s   =   t h i s . o r i g A v a t a r s   =   t h i s . a p p l y A v a t a r s C h a n g e s ( t h i s . a v a t a r s ) ;  
 	 t h i s . s e n d S e r v e r R e q u e s t ( " s a v e " ,   o p s ) ;  
 	 t h i s . c l e a n u p O p s Q u e u e ( ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . r e v e r t A v a t a r s   =   f u n c t i o n ( )   {  
 	 i f   ( t h i s . o p s Q u e u e . l e n g t h   <   1 )   r e t u r n ;  
 	 v a r   o p s   =   J S K i t L i b . f o l d l ( [ ] ,   t h i s . o p s Q u e u e ,   f u n c t i o n ( o p e r a t i o n ,   a c c )   {   i f   ( o p e r a t i o n . o p   = =   ' a d d ' )   a c c . p u s h ( ' r e m o v e , '   +   o p e r a t i o n . a v a t a r ) ;   } ) ;  
 	 t h i s . a v a t a r s   =   t h i s . o r i g A v a t a r s ;  
 	 v a r   a v a t a r   =   t h i s . g e t A c t i v e A v a t a r ( t r u e ) ;  
 	 i f   ( o p s . l e n g t h   >   0 )   {  
 	 	 i f   ( a v a t a r )   o p s . p u s h ( ' a c t i v a t e , '   +   a v a t a r . n a m e ) ;  
 	 	 t h i s . s e n d S e r v e r R e q u e s t ( " s a v e " ,   o p s ) ;  
 	 }  
 	 i f   ( ! a v a t a r )   t h i s . c h o s e n A v a t a r   =   u n d e f i n e d ;  
 	 t h i s . c l e a n u p O p s Q u e u e ( ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a c t i v a t e E v e n t s   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 t h i s . a v a t a r s L i s t H a n d l e r   =   f u n c t i o n ( n a m e ,   a v a t a r s ,   i d ,   c a l l e r I d )   {  
 	 	 i f   ( ( i d   & &   i d   = =   s e l f . i d )   | |   ( c a l l e r I d   & &   c a l l e r I d   ! =   s e l f . i d ) )   s e l f . r e p l a c e A v a t a r s ( a v a t a r s ) ;  
 	 } ;  
 	 t h i s . e v e n t s C t x   =   J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( t h i s . e v e n t C t x ,   s e l f . a v a t a r s L i s t H a n d l e r ,   " J S A v a t a r s _ r e p l a c e A v a t a r s " ) ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . d e A c t i v a t e E v e n t s   =   f u n c t i o n ( )   {  
 	 i f   ( ! t h i s . e v e n t s C t x )   r e t u r n ;  
 	 J S K W $ E v e n t s . d e R e g i s t e r E v e n t C a l l b a c k ( t h i s . e v e n t s C t x ,   t h i s . a v a t a r s L i s t H a n d l e r ,   " J S A v a t a r s _ r e p l a c e A v a t a r s " ) ;  
 	 d e l e t e   t h i s . e v e n t s C t x ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . s y n c A v a t a r s C h a n g e s   =   f u n c t i o n ( )   {   J S K W $ E v e n t s . s y n c B r o a d c a s t ( " J S A v a t a r s _ r e p l a c e A v a t a r s " ,   t h i s . g e t A v a t a r s ( ) ,   u n d e f i n e d ,   t h i s . i d ) ;   }  
  
 J S K i t A v a t a r s . p r o t o t y p e . a s s e m b l e A v a t a r s L i s t A r e a   =   f u n c t i o n ( c o n t a i n e r ,   a v a t a r s ,   i s H i d d e n )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 i f   ( ! c o n t a i n e r   | |   ( c o n t a i n e r   & &   c o n t a i n e r . u p l o a d F o r m ) )   r e t u r n ;  
 	 i f   ( ! t h i s . c o n t r o l s )   t h i s . c o n t r o l s   =   [ ] ;  
 	 v a r   c o n t e n t   =   J S K i t L i b . h t m l (  
 	 	 ' < d i v   c l a s s = " j s k - a v t - a r e a " > '   +  
 	 	     ' < d i v   c l a s s = " j s k - a v t - s e c t i o n - l a b e l " > '   +   s e l f . l a b e l ( ' a v a t a r s M a n a g e m e n t L a b e l ' )   +   ' < / d i v > '   +  
 	 	     ' < d i v   c l a s s = " j s k - a v t - l i s t - a r e a " > '   +  
 	 	         ' < d i v   c l a s s = " j s k - a v t - d a t a L o a d i n g " > '   +  
 	 	             ' < i m g   c l a s s = " j s k - a v t - d a t a L o a d i n g - i c o n "   s r c = " / / j s - k i t . c o m / i m a g e s / p r o f i l e / l o a d i n g . g i f "   / > '   +  
 	 	             ' < d i v   c l a s s = " j s k - a v t - d a t a L o a d i n g - l a b e l " > '   +   s e l f . l a b e l ( ' l o a d i n g A v a t a r s D a t a ' )   +   ' < / d i v > '   +  
 	 	         ' < / d i v > '   +  
 	 	     ' < / d i v > '   +  
 	 	     ' < d i v   c l a s s = " j s k - a v t - u p l o a d - a r e a " > '   +  
 	 	         ' < f o r m   c l a s s = " j s k - a v t - u p l o a d - f o r m "   m e t h o d = " P O S T "   e n c t y p e = " m u l t i p a r t / f o r m - d a t a "   a c t i o n = " '   +   t h i s . u r i A v a t a r   +   ' a d d " > '   +  
 	 	             ' < d i v   c l a s s = " j s k - a v t - u p l o a d - l a b e l " > '   +   s e l f . l a b e l ( ' u p l o a d A v a t a r ' )   +   ' < / d i v > '   +  
 	 	             ' < i n p u t   t y p e = " f i l e "   n a m e = " i m a g e "   c l a s s = " j s k - a v t - u p l o a d - i n p u t "   / > '   +  
 	 	         ' < / f o r m > '   +  
 	 	     ' < / d i v > '   +  
 	 	 ' < / d i v > '  
 	 ) ;  
 	 v a r   a v a t a r s V a l i d   =   ! t h i s . b u l k O p e r a t i o n s   | |   ! ! a v a t a r s ;  
 	 v a r   e l e m e n t s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   c o n t e n t ) ;  
 	 v a r   u p l o a d F o r m   =   e l e m e n t s [ " j s k - a v t - u p l o a d - f o r m " ] ;  
 	 t h i s . u p l o a d C o n t r o l   =   e l e m e n t s [ " j s k - a v t - u p l o a d - i n p u t " ] ;  
 	 t h i s . c o n t r o l s . p u s h ( t h i s . u p l o a d C o n t r o l ) ;  
 	 t h i s . a v a t a r s L i s t A r e a   =   e l e m e n t s [ " j s k - a v t - l i s t - a r e a " ] ;  
 	 t h i s . a v a t a r s L i s t C o n t a i n e r   =   c o n t a i n e r ;  
  
 	 J S K i t L i b . f m a p ( J S K i t E P B . g e t A s H a s h ( { " r e f " :   s e l f . r e f } ) ,   f u n c t i o n ( v ,   k )   {  
 	 	 u p l o a d F o r m . a p p e n d C h i l d ( J S K i t L i b . h t m l ( ' < i n p u t   t y p e = " h i d d e n "   n a m e = " '   +   k   +   ' "   v a l u e = " '   +   e n c o d e U R I C o m p o n e n t ( v )   +   ' " > ' ) ) ;  
 	 } ) ;  
  
 	 v a r   f r e e z e   =   f u n c t i o n ( l o c k )   {  
 	 	 e l e m e n t s [ " j s k - a v t - u p l o a d - l a b e l " ] . i n n e r H T M L   =   s e l f . l a b e l ( l o c k   ?   " l o a d i n g "   :   " u p l o a d A v a t a r " ) ;  
 	 	 J S K i t L i b . f m a p ( s e l f . c o n t r o l s ,   f u n c t i o n ( c o n t r o l )   {  
 	 	 	 i f   ( ! c o n t r o l . b t n L o c k e d )   c o n t r o l . d i s a b l e d   =   ( l o c k   = =   t r u e )   ?   " t r u e "   :   " " ;  
 	 	 } ) ;  
 	 } ;  
 	 v a r   o n L o a d   =   f u n c t i o n ( )   {  
 	 	 f r e e z e ( f a l s e ) ;  
 	 	 e l e m e n t s [ " j s k - a v t - u p l o a d - f o r m " ] . r e s e t ( ) ;  
 	 	 i f   ( ! a v a t a r s V a l i d )   {  
 	 	 	 s e l f . r e f r e s h A v a t a r s ( f a l s e ) ;  
 	 	 	 a v a t a r s V a l i d   =   t r u e ;  
 	 	 }  
 	 } ;  
 	 e l e m e n t s [ " j s k - a v t - u p l o a d - i n p u t " ] . o n c h a n g e   =   f u n c t i o n ( )   {  
 	 	 a v a t a r s V a l i d   =   f a l s e ;  
 	 	 i f   ( ! u p l o a d F o r m . t a r g e t )   {  
 	 	 	 v a r   t g t   =   ' j s - i f r m - '   +   M a t h . r a n d o m ( ) ;  
 	 	 	 J S K i t L i b . c r e a t e H i d d e n I f r a m e ( t g t ,   e l e m e n t s [ " j s k - a v t - u p l o a d - a r e a " ] ,   o n L o a d ,   f a l s e ) ;  
 	 	 	 u p l o a d F o r m . t a r g e t   =   t g t ;  
 	 	 }  
 	 	 u p l o a d F o r m . s u b m i t ( ) ;  
 	 	 f r e e z e ( t r u e ) ;  
 	 } ;  
  
 	 i f   ( a v a t a r s )   t h i s . a v a t a r s   =   a v a t a r s ;    
 	 t h i s . r e f r e s h A v a t a r s ( a v a t a r s V a l i d ,   t h i s . a v a t a r s ) ;  
 	 c o n t a i n e r . u p l o a d F o r m   =   u p l o a d F o r m ;  
 	 c o n t a i n e r . a p p e n d C h i l d ( c o n t e n t ) ;  
 	 i f   ( i s H i d d e n )   J S K i t L i b . h i d e ( t h i s . a v a t a r s L i s t C o n t a i n e r ) ;  
 	 r e t u r n   c o n t a i n e r ;  
 }  
  
 J S K i t A v a t a r s . p r o t o t y p e . l o a d C S S   =   f u n c t i o n ( )   {  
 	 t h i s . o l d S t y l e I E   =   J S K i t L i b . i s P r e I E 8 ( )   | |   ( J S K i t L i b . i s I E ( )   & &   ! J S K i t L i b . i s P r e I E 8 ( )   & &   d o c u m e n t . c o m p a t M o d e   = =   " B a c k C o m p a t " ) ;  
 	 J S K i t L i b . a d d C s s (  
 	 	 " . j s k - a v t - c o n t a i n e r   {   f l o a t :   l e f t ;   d i s p l a y :   i n l i n e - b l o c k ;   m a r g i n :   2 p x ;   w i d t h :   1 1 8 p x ;   t e x t - a l i g n :   c e n t e r ;   } "   +  
 	 	 " . j s k - a v t - w r a p p e r   {   m a r g i n :   2 p x ;   w i d t h :   1 1 4 p x ;   h e i g h t :   1 1 4 p x ;   b a c k g r o u n d - p o s i t i o n :   t o p   c e n t e r ;   } "   +  
 	 	 " . j s k - a v t - c o n t r o l   {   p a d d i n g :   2 p x   5 p x   0 p x   5 p x ;   f o n t - f a m i l y :   H e l v e t i c a ,   V e r d a n a ;   f o n t - s i z e :   8 p t ;   h e i g h t :   1 4 p x ;   } "   +  
 	 	 " . j s k - a v t - c o n t r o l - s e l e c t e d   {   t e x t - a l i g n :   c e n t e r ;   } "   +  
 	 	 " . j s k - a v t - c o n t r o l - r e m o v e   {   t e x t - a l i g n :   c e n t e r ;   c u r s o r :   p o i n t e r ;   t e x t - d e c o r a t i o n :   u n d e r l i n e ;   } "   +  
 	 	 " . j s k - a v t - u p l o a d - l a b e l   {   f o n t - s i z e :   1 2 p x ;   } "   +  
 	 	 " . j s k - a v t - n o A v a t a r s M s g   {   f o n t - s t y l e :   i t a l i c ;   p a d d i n g :   1 0 p x ;   } "   +  
 	 	 " . j s k - a v t - d a t a L o a d i n g   {   t e x t - a l i g n :   c e n t e r ;   f o n t - s t y l e :   i t a l i c ;   m a r g i n :   1 0 p x ;   f o n t - s i z e :   1 2 p x ;   } "   +  
 	 	 " . j s - s h o w B o r d e r   {   b o r d e r : r i d g e   2 p x   # a 0 a 0 a 0 ;   } "   +  
 	 	 " . j s - h i d e B o r d e r   {   b o r d e r : s o l i d   2 p x   # f e f e f e ;   } "   +  
 	 	 " . j s - k i t - c l e a r   {   c l e a r :   b o t h ;   } " ,   " a v a t a r s "  
 	 ) ;  
 }  
  
  
  
 f u n c t i o n   J S K b d H a n d l e r ( e l e m e n t ,   e v e n t s )   {  
  
 	 t h i s . k b d C a l l b a c k   =   f u n c t i o n ( e )   {  
 	 	 v a r   e v e n t   =   e   | |   w i n d o w . e v e n t ;  
 	 	 v a r   k e y   =   e v e n t . c h a r C o d e   | |   e v e n t . k e y C o d e ;  
 	 	 i f   ( k e y   = =   9   | |   k e y   = =   1 3   | |   k e y   = =   2 7 )   J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e v e n t ) ;  
 	 	 i f ( J S K i t L i b . i s S a f a r i ( ) )   J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e v e n t ) ;  
 	 	 f o r ( v a r   i   =   0 ;   i   <   e v e n t s . l e n g t h ;   i + + )   {  
 	 	 	 f o r ( v a r   j   =   0 ;   j   <   e v e n t s [ i ] . k e y s . l e n g t h ;   j + + )   {  
 	 	 	 	 i f ( t y p e o f ( e v e n t s [ i ] . k e y s [ j ] )   = =   " s t r i n g " )   e v e n t s [ i ] . k e y s [ j ]   =   S t r i n g . c h a r C o d e A t ( e v e n t s [ i ] . k e y s [ j ] ) ;  
 	 	 	 	 v a r   s h i f t C o n d i t i o n   =   ( e v e n t s [ i ] . s h i f t   ! =   u n d e f i n e d )   ?   e v e n t s [ i ] . s h i f t   = =   e v e n t . s h i f t K e y   :   t r u e ;    
 	 	 	 	 i f   ( e v e n t s [ i ] . k e y s [ j ]   = =   k e y   & &   s h i f t C o n d i t i o n )   {  
 	 	 	 	 	 i f ( ! e v e n t s [ i ] . a r g s )  
 	 	 	 	 	 	 ( e v e n t s [ i ] . a c t i o n ) ( ) ;  
 	 	 	 	 	 e l s e  
 	 	 	 	 	 	 e v e n t s [ i ] . a c t i o n . a p p l y ( e v e n t s [ i ] ,   e v e n t s [ i ] . a r g s ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }  
  
 	 i f ( e l e m e n t . a d d E v e n t L i s t e n e r )   {  
 	 	 i f ( J S K i t L i b . i s S a f a r i ( ) )   e l e m e n t . a d d E v e n t L i s t e n e r ( " k e y d o w n " ,   t h i s . k b d C a l l b a c k ,   f a l s e ) ;  
 	 	 e l s e   i f ( J S K i t L i b . i s O p e r a ( ) )   e l e m e n t . a d d E v e n t L i s t e n e r ( " k e y d o w n " ,   t h i s . k b d C a l l b a c k ,   f a l s e ) ;  
 	 	 e l s e   e l e m e n t . a d d E v e n t L i s t e n e r ( " k e y p r e s s " ,   t h i s . k b d C a l l b a c k ,   f a l s e ) ;  
 	 }   e l s e   {  
 	 	 e l e m e n t . o n k e y d o w n   =   t h i s . k b d C a l l b a c k ;  
 	 }  
 }  
  
  
  
 f u n c t i o n   J S I P E 2 ( o b j )   {  
 / *    
 	 J S I P E 2   A P I  
  
 	 o b j : 	 	 o b j e c t   c o n t a i n s   p r o p e r t y  
 	 t i t l e :   	 	 h i n t  
 	 d e f a u l t T e x t : 	 d e f a u l t   t e x t   i n   c r e a t e d   d i v  
 	 p r o p e r t y : 	 p r o p e r t y   w h e r e   s a v e   t h e   r e s u l t  
 	 m a x L e n g t h : 	 m a x   s t r i n g   l e n g t h  
 	 w i d t h :   	 	 i n p u t   w i d t h  
 	 j s k $ w a s E d i t e d 	 c a l l b a c k ,   c a l l e d   a t   t h e   e n d   o f   e d i t i n g    
 	  
 	 e x a m p l e :    
 	 v a r   j s i p e   =   n e w   J S I P E 2 ( { o b j :   e l e m ,  
 	 	 	 	 p r o p e r t y :   ' d e s c r ' ,  
 	 	 	 	 t i t l e :   ' D e s c r i p t i o n ' ,  
 	 	 	 	 d e f a u l t T e x t :   ' A d d   c a p t i o n ' ,  
 	 	 	 	 w i d t h :   ' 9 0 p x ' ,  
 	 	 	 	 m a x L e n g t h :   1 2 ,  
 	 	 	 	 j s k $ w a s E d i t e d :   f u n c t i o n ( ) { . . . }  
 	 } ) ;  
  
 * /  
  
 	 f o r ( v a r   i   i n   o b j )  
 	 	 t h i s [ i ]   =   o b j [ i ] ;  
 	 v a r   d i v   =   J S K i t L i b . c r ( ) ;  
 	 d i v . t i t l e   =   t h i s . t i t l e   | |   " C l i c k   t o   e d i t " ;  
 	 v a r   d e f a u l t T e x t   =   t h i s . d e f a u l t T e x t   | |   " E m p t y   v a l u e   ( c l i c k   t o   e d i t ) " ;  
 	 v a r   m a x T e x t L e n g t h   =   t h i s . m a x L e n g t h   | |   2 5 6 ;  
  
 	 v a r   s e l f   =   t h i s ;  
  
 	 v a r   t e x t D i v   =   J S K i t L i b . c r ( { s t y l e : { d i s p l a y : " i n l i n e " } } ) ;  
 	 t e x t V a l u e   =   ( J S K i t L i b . t r i m ( s e l f . o b j [ s e l f . p r o p e r t y ] ) . l e n g t h   >   0 )   ?   s e l f . o b j [ s e l f . p r o p e r t y ]   :   d e f a u l t T e x t ;  
 	 v a r   t e x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( t e x t V a l u e ) ;  
 	 t e x t D i v . o n m o u s e o v e r   =   f u n c t i o n ( )   {   J S K i t L i b . a d d C l a s s ( t e x t D i v ,   " j s i p e - o n m o u s e o v e r " ) ;   }  
 	 t e x t D i v . o n m o u s e o u t     =   f u n c t i o n ( )   {   J S K i t L i b . r e m o v e C l a s s ( t e x t D i v ,   " j s i p e - o n m o u s e o v e r " ) ;   }  
 	 t e x t D i v . a p p e n d C h i l d ( t e x t ) ;  
 	 d i v . a p p e n d C h i l d ( t e x t D i v ) ;  
  
 	 v a r   e d i t D i v   =   J S K i t L i b . c r ( { s t y l e : { d i s p l a y : " n o n e " } } ) ;  
 	 d i v . a p p e n d C h i l d ( e d i t D i v ) ;  
 	 v a r   e d i t   =   J S K i t L i b . c r ( { t : " i n p u t " ,   t y p e : " e d i t " ,   s t y l e : { w i d t h :   ( s e l f . w i d t h   | |   " 1 5 0 p x " ) } } ) ;  
 	 e d i t . v a l u e   =   t h i s . o b j [ t h i s . p r o p e r t y ] ;  
 	 e d i t D i v . a p p e n d C h i l d ( e d i t ) ;  
  
 	 v a r   a p p l y D i v   =   J S K i t L i b . c r ( ) ;  
 	 J S K i t L i b . a d d C l a s s ( a p p l y D i v ,   " j s i p e - a p p l y B u t t o n " ) ;  
 	 a p p l y D i v . t i t l e   =   " A p p l y " ;  
 	 J S K i t L i b . a d d P N G ( a p p l y D i v ,   " / / j s - k i t . c o m / i m a g e s / t i c k . p n g " ) ;  
 	 e d i t D i v . a p p e n d C h i l d ( a p p l y D i v ) ;  
 	  
 	 t h i s . d i s p l a y M o d e   =   f u n c t i o n ( )   {  
 	 	 t e x t D i v . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 e d i t D i v . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 t e x t D i v . r e m o v e C h i l d ( t e x t ) ;  
 	 	 t e x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( s e l f . o b j [ s e l f . p r o p e r t y ]   | |   d e f a u l t T e x t ) ;  
 	 	 t e x t D i v . a p p e n d C h i l d ( t e x t ) ;  
 	 	 i f ( s e l f . j s k $ w a s E d i t e d )   s e l f . j s k $ w a s E d i t e d ( ) ;  
 	 }  
  
 	 t h i s . e d i t M o d e   =   f u n c t i o n ( e )   {  
 	 	 t e x t D i v . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 e d i t D i v . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 e d i t . f o c u s ( ) ;  
 	 	 e d i t . s e l e c t ( ) ;  
 	 }  
  
 	 v a r   a p p l y C h a n g e s   =   f u n c t i o n ( )   {  
 	 	 i f ( e d i t . v a l u e   = =   s e l f . o b j [ s e l f . p r o p e r t y ] )   {   s e l f . d i s p l a y M o d e ( ) ;   r e t u r n ; }  
 	 	 i f ( e d i t . v a l u e . l e n g t h   >   m a x T e x t L e n g t h )   {  
 	 	 	 a l e r t ( " T h e   t e x t   y o u   e n t e r e d   c a n n o t   e x c e e d   " +   m a x T e x t L e n g t h   + "   s y m b o l s " ) ;  
 	 	 	 r e s e t C h a n g e s ( ) ;  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 	 s e l f . o b j [ s e l f . p r o p e r t y ]   =   e d i t . v a l u e   =   J S K i t L i b . t r i m ( e d i t . v a l u e ) ;  
 	 	 e d i t . b l u r ( ) ;  
 	 	 s e l f . d i s p l a y M o d e ( ) ;  
 	 }  
  
 	 v a r   r e s e t C h a n g e s   =   f u n c t i o n ( )   {  
 	 	 e d i t . v a l u e   =   s e l f . o b j [ s e l f . p r o p e r t y ] ;  
 	 	 e d i t . b l u r ( ) ;  
 	 	 s e l f . d i s p l a y M o d e ( ) ;  
 	 }  
  
 	 v a r   j u m p N e x t S i b l i n g   =   f u n c t i o n ( )   {  
 	 	 e d i t . b l u r ( ) ;  
 	 	 i f ( s e l f . n e x t S i b )  
 	 	 	 s e l f . n e x t S i b . e d i t M o d e ( ) ;  
 	 }  
  
 	 v a r   j u m p P r e v S i b l i n g   =   f u n c t i o n ( )   {  
 	 	 e d i t . b l u r ( ) ;  
 	 	 i f ( s e l f . p r e v S i b )  
 	 	 	 s e l f . p r e v S i b . e d i t M o d e ( ) ;  
 	 }  
  
 	 i f ( t h i s . d b l c l i c k )  
 	 	 t e x t D i v . o n d b l c l i c k   =   t h i s . e d i t M o d e ;  
 	 e l s e  
 	 	 t e x t D i v . o n c l i c k   =   t h i s . e d i t M o d e ;  
 	 e d i t . o n b l u r   =   a p p l y C h a n g e s ;  
 	 a p p l y D i v . o n m o u s e d o w n   =   a p p l y C h a n g e s ;  
  
 	 v a r   K b d H a n d l e r   =   n e w   J S K b d H a n d l e r ( e d i t ,   [  
 	 	 	 	 	 { a c t i o n : a p p l y C h a n g e s ,   k e y s : [ 1 0 , 1 3 ] }  
 	 	 	 	 	 , { a c t i o n : r e s e t C h a n g e s ,   k e y s : [ 2 7 ] }  
 	 	 	 	 	 , { a c t i o n : j u m p N e x t S i b l i n g ,   k e y s : [ 9 ] ,   s h i f t : f a l s e }  
 	 	 	 	 	 , { a c t i o n : j u m p P r e v S i b l i n g ,   k e y s : [ 9 ] ,   s h i f t : t r u e }  
 	 	 	 	 	 ] ) ;  
  
 	 t h i s . d i v   =   d i v ;  
 }  
  
 J S I P E 2 . p r o t o t y p e . a d d N e x t S i b l i n g   =   f u n c t i o n ( n e x t )   {  
 	 i f   ( n e x t )   {  
 	 	 t h i s . n e x t S i b   =   n e x t ;  
 	 	 n e x t . p r e v S i b   =   t h i s ;  
 	 }  
 }  
  
  
  
 f u n c t i o n   J S I P E ( o b j )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 s e l f . o b j   =   o b j ;  
 	 v a r   f o r m   =   t h i s . m a k e F o r m ( o b j . t i t l e ) ;  
 	 v a r   i n p   =   f o r m . i n p u t ;  
 	 s e l f . f o r m   =   f o r m ;  
  
 	 f o r m . c l e a n e r . o n m o u s e d o w n   =   f u n c t i o n ( e ) {  
 	 	 i n p . v a l u e   =   " " ;  
 	 	 f o r m . c l e a n e r . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 	 i n p . f o c u s ( ) ;  
 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e   | |   w i n d o w . e v e n t ) ;  
 	 }  
 	  
 	 v a r   k e y H a n d l e r   =   f u n c t i o n ( e )   {  
 	 	 e   =   e   | |   w i n d o w . e v e n t ;  
 	 	 s e t T i m e o u t ( f u n c t i o n ( ) {  
 	 	 	 f o r m . c l e a n e r . s t y l e . v i s i b i l i t y   =   ( i n p . v a l u e . l e n g t h   ! =   0 )   ?   " v i s i b l e "   :   " h i d d e n " ;  
 	 	 	 i f ( o b j . t y p e   = =   " T a b "   | |   o b j . t y p e   = =   " I m a g e " )   f o r m . c l e a n e r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 } ,   0 ) ;  
 	 	 s w i t c h ( e . k e y C o d e   | |   e . w h i c h )   {  
 	 	 	 c a s e   2 7 :  
 	 	 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
 	 	 	 	 i f ( o b j . m o d e   = =   " f u l l " )   s e l f . f i n i s h E d i t i n g ( o b j . f i e l d ,   o b j . f i e l d . l a s t V a l u e ) ;  
 	 	 	 	 i f ( o b j . j s k $ o n _ c a n c e l _ e x i t )   o b j . j s k $ o n _ c a n c e l _ e x i t ( ) ;  
 	 	 	 b r e a k ;  
 	 	 	 c a s e   1 0 :   c a s e   1 3 :  
 	 	 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
 	 	 	 	 i f   ( i n p . v a l u e   & &   o b j . m o d e   = =   " f u l l " )  
 	 	 	 	 	 s e l f . f i n i s h E d i t i n g ( o b j . f i e l d ,   i n p . v a l u e ) ;  
 	 	 	 	 i f ( o b j . j s k $ o n _ s u b m i t _ e x i t )   o b j . j s k $ o n _ s u b m i t _ e x i t ( i n p . v a l u e ) ;  
 	 	 	 b r e a k ;  
 	 	 	 c a s e   9 :  
 	 	 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
 	 	 	 	 i f   ( o b j . s i b l i n g s )   o b j . s i b l i n g s [ ( o b j . f i e l d . p o s + 1 ) % o b j . s i b l i n g s . l e n g t h ] . t a b K e y H a n d l e r ( ) ;  
 	 	 	 b r e a k ;  
 	 	 }  
 	 }  
 	 s e l f . a d d K e y H n d l ( k e y H a n d l e r ) ; 	 	  
 	 i f   ( o b j . i n p S i z e )   i n p . s t y l e . w i d t h   =   o b j . i n p S i z e ;  
 	 f o r m . c l e a n e r . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 i f ( o b j . m o d e   = =   " f o r m " )   r e t u r n   f o r m ;  
  
 	 i f ( ! w i n d o w . j s i p e $ g l o b )   w i n d o w . j s i p e $ g l o b   =   { } ;  
 	 v a r   g l o b   =   w i n d o w . j s i p e $ g l o b ;  
 	 o b j . f i e l d . s t y l e . c u r s o r   =   " p o i n t e r " ;  
 	 i f ( o b j . s i b l i n g s )   o b j . f i e l d . p o s   =   o b j . s i b l i n g s . l e n g t h ;  
  
 	 t h i s . f i n i s h E d i t i n g   =   f u n c t i o n ( f i e l d ,   n e w V a l u e )   {  
 	 	 i f ( ! f i e l d . i n p u t )   r e t u r n ;  
 	 	 g l o b . i s E d i t i n g   =   f a l s e ;  
 	 	 f i e l d . i n p u t . o n b l u r   =   J S K i t L i b . i s O p e r a ( )   ?   u n d e f i n e d   :   " " ;  
 	 	 f i e l d . i n p u t . o n k e y p r e s s   =   J S K i t L i b . i s O p e r a ( )   ?   u n d e f i n e d   :   " " ;  
 	 	 f i e l d . i n p u t   =   n u l l ;  
 	 	 f i e l d . w a s E d i t e d ( n e w V a l u e ) ;  
 	 	 f i e l d . s t y l e . t e x t D e c o r a t i o n   =   f i e l d . o l d D e c o r a t i o n ;  
 	 }  
  
 	 v a r   o n c l i c k H a n d l e r   =   f u n c t i o n ( )   {  
 	 	 i f ( o b j . f i e l d . i n p u t )   r e t u r n   f a l s e ;  
 	 	 i f ( o b j . j s i p e $ s t a r t   & &   ! o b j . j s i p e $ s t a r t ( ) )   r e t u r n   f a l s e ;  
 	 	 i f ( g l o b . s t o p E d i t i n g )   g l o b . s t o p E d i t i n g ( ) ;  
 	 	 i f ( o b j . c o n t a i n e r E l e m e n t . t I d )   {  
 	 	 	 c l e a r T i m e o u t ( o b j . c o n t a i n e r E l e m e n t . t I d ) ;  
 	 	 	 o b j . c o n t a i n e r E l e m e n t . t I d   =   0 }    
 	 	 o b j . f i e l d . o l d D e c o r a t i o n   =   o b j . f i e l d . s t y l e . t e x t D e c o r a t i o n ;  
 	 	 o b j . f i e l d . i s H t m l L i n k   =   o b j . f i e l d . f i r s t C h i l d . t a g N a m e   = =   ' A ' ;  
 	 	 o b j . f i e l d . l a s t V a l u e   =   o b j . i t e m O b j e c t [ o b j . P r o p e r t y ] ;  
 	 	 o b j . f i e l d . o n d b l c l i c k   =   J S K i t L i b . i s O p e r a ( )   ?   u n d e f i n e d   :   " " ;  
 	 	 i n p . t y p e   =   ' t e x t ' ;  
 	 	 i n p . v a l u e   =   o b j . i t e m O b j e c t [ o b j . P r o p e r t y ] ;  
 	 	 s e l f . a d d K e y H n d l ( k e y H a n d l e r ) ; 	 	  
  
 	 	 i n p . o n b l u r   =   f u n c t i o n ( e )   {  
 	 	 	 i f ( s e l f . f o r m . i n p u t . v a l u e )   {  
 	 	 	 	 s e l f . f i n i s h E d i t i n g ( s e l f . o b j . f i e l d ,   s e l f . f o r m . i n p u t . v a l u e ) ;  
 	 	 	 	 i f   ( o b j . f i e l d . l a s t V a l u e   = =   s e l f . f o r m . i n p u t . v a l u e )   {  
 	 	 	 	 	 i f ( o b j . j s k $ o n _ c a n c e l _ e x i t )   o b j . j s k $ o n _ c a n c e l _ e x i t ( s e l f . f o r m . i n p u t . v a l u e ) }  
 	 	 	 	 e l s e {  
 	 	 	 	 	 i f ( o b j . j s k $ o n _ s u b m i t _ e x i t )   o b j . j s k $ o n _ s u b m i t _ e x i t ( s e l f . f o r m . i n p u t . v a l u e ) }  
 	 	 	 } ;  
 	 	 	 / / D o   n o t   c l o s e   f i e l d   u n t i l   n o n - e m p t y  
 	 	 }  
  
 	 	 o b j . f i e l d . i n p u t   =   i n p ;  
 	 	 g l o b . s t o p E d i t i n g   =   f u n c t i o n ( )   {  
 	 	 	 g l o b . s t o p E d i t i n g   =   n u l l ;  
 	 	 	 i f ( ( o b j . f i e l d . i n p u t ) & & o b j . f i e l d . i n p u t . v a l u e )   s e l f . f i n i s h E d i t i n g ( o b j . f i e l d ,   o b j . f i e l d . i n p u t . v a l u e ) ;  
 	 	 }  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( o b j . f i e l d ) ;  
 	 	 o b j . f i e l d . a p p e n d C h i l d ( f o r m . m a i n ) ;  
 	 	 o b j . f i e l d . s t y l e . t e x t D e c o r a t i o n   =   " n o n e " ;  
 	 	 f o r m . c l e a n e r . s t y l e . v i s i b i l i t y   =   ( i n p . v a l u e . l e n g t h   ! =   0 )   ?   " v i s i b l e "   :   " h i d d e n " ;  
 	 	 i f ( o b j . t y p e   = =   " T a b "     | |   o b j . t y p e   = =   " I m a g e " )   f o r m . c l e a n e r . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 i n p . o n s e l e c t s t a r t   =   f u n c t i o n ( e )   {  
 	 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e   | |   w i n d o w . e v e n t ) ;  
 	 	 	 r e t u r n   t r u e ;  
 	 	 } ;  
 	 	 o b j . c o n t a i n e r E l e m e n t . o n s e l e c t s t a r t   =   f u n c t i o n ( e )   {   r e t u r n   t r u e   } ;  
 	 	 i n p . f o c u s ( ) ;  
 	 	 i n p . s e l e c t ( ) ;  
 	 	 g l o b . i s E d i t i n g   =   t r u e ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 v a r   o n d b l c l i c k H a n d l e r   =   f u n c t i o n ( )   {  
 	 	 i f ( 0   & &   o b j . f i e l d . i s H t m l L i n k )  
 	 	 	 w i n d o w . l o c a t i o n . h r e f   =   t h i s . f i r s t C h i l d . v a l u e ;  
 	 }  
  
 	 s w i t c h ( o b j . t y p e )   {  
 	 c a s e   " T a b " :  
 	 	 o b j . f i e l d . o n d b l c l i c k   =   o n c l i c k H a n d l e r ;  
 	 	 b r e a k ;  
 	 c a s e   " O t h e r s " :  
                                 o b j . f i e l d . o n c l i c k   =   o n c l i c k H a n d l e r ;  
                                 o b j . f i e l d . t a b K e y H a n d l e r   =   o n c l i c k H a n d l e r ;  
                                 o b j . f i e l d . o n d b l c l i c k   =   o n d b l c l i c k H a n d l e r ;  
 	 	 b r e a k ;  
 	 c a s e   " S e a r c h " :   c a s e   " I m a g e " :  
 	 	 o b j . f i e l d . o n c l i c k   =   o n c l i c k H a n d l e r ;  
 	 	 b r e a k ;  
 	 }  
 }  
  
 J S I P E . p r o t o t y p e . a d d K e y H n d l   =   f u n c t i o n ( k e y H a n d l e r ) {  
 	 v a r   i n p   =   t h i s . f o r m . i n p u t ;  
                 s w i t c h ( t h i s . o b j . t y p e )   {  
                 c a s e   " T a b " :  
                                 i f   ( J S K i t L i b . i s I E ( ) )   i n p . o n k e y d o w n   =   k e y H a n d l e r ;  
                                 e l s e   i f ( J S K i t L i b . i s S a f a r i ( ) )   i n p . o n k e y u p   =   k e y H a n d l e r ;  
                                 e l s e   i n p . o n k e y p r e s s   =   k e y H a n d l e r ;  
                                 b r e a k ;  
                 c a s e   " O t h e r s " :   c a s e   " I m a g e " :  
 	 	 i f ( J S K i t L i b . i s O p e r a ( ) )   i n p . o n k e y p r e s s   =   k e y H a n d l e r ;  
 	 	 e l s e   i n p . o n k e y d o w n   =   k e y H a n d l e r ;  
                                 b r e a k ;  
                 c a s e   " S e a r c h " :  
 	 	 i f   ( J S K i t L i b . i s I E ( )   | |   J S K i t L i b . i s S a f a r i ( ) )  
 	 	 	 i n p . o n k e y d o w n   =   k e y H a n d l e r ;  
 	 	 e l s e   i n p . o n k e y p r e s s   =   k e y H a n d l e r ;  
                                 b r e a k ;  
                 }  
 }  
  
 J S I P E . p r o t o t y p e . m a k e F o r m   =   f u n c t i o n ( t i t l e ) {  
 	 v a r   t e x t   =   t h i s . d t C o n t e n t . r e p l a c e ( / T I T L E / ,   t i t l e   | |   " " ) ;  
 	 v a r   d i v   =   J S K i t L i b . h t m l ( t e x t ) ;  
 	 v a r   c t l s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   d i v ) ;  
 	 i f ( ! t i t l e )   c t l s [ ' j s - J S I P E T i t l e ' ] . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 r e t u r n   { ' m a i n ' :   d i v , ' i n p u t ' :   c t l s [ ' j s - J S I P E I n p u t ' ] ,   ' c l e a n e r ' : c t l s [ ' j s - J S I P E C l e a n e r ' ] } ;  
 }  
  
 J S I P E . p r o t o t y p e . d t C o n t e n t  
 = ' < t a b l e   b o r d e r = 0   s t y l e = " p a d d i n g :   0 p x ;   d i s p l a y :   i n l i n e "   c e l l s p a c i n g = " 0 p x "   c e l l p a d d i n g = " 0 p x " > '  
 + '             < t r > '  
 + '                             < t d   c l a s s = " j s - J S I P E T i t l e "   s t y l e = " p a d d i n g : 0 p x   4 p x   0 p x   0 p x ;   c u r s o r :   t e x t ; " > < b > T I T L E < / b > < / t d > '  
 + '                             < t d   s t y l e = " p a d d i n g :   0 p x ; " > '  
 + '                                             < i n p u t   c l a s s = " j s - J S I P E I n p u t "   s t y l e = " v e r t i c a l - a l i g n : m i d d l e ;   p a d d i n g :   0 p x ; " > < / i n p u t > < / t d > '  
 + '                             < t d   s t y l e = " p a d d i n g :   0 p x ; " > '  
 + '                                             < i m g   c l a s s = " j s - J S I P E C l e a n e r "   s t y l e = " m a r g i n - l e f t :   4 p x ;   v e r t i c a l - a l i g n : b o t t o m ;   c u r s o r :   p o i n t e r ; "   s r c = " / / j s - k i t . c o m / i m a g e s / c l e a r - s e a r c h - b u t t o n . g i f "   w i d t h = " 1 6 "   h e i g h t = " 1 6 " > < / i m g > < / t d > '  
 + '             < / t r > '  
 + ' < / t a b l e > ' ;  
  
  
  
 i f ( ! w i n d o w . J S K W $ E v e n t s ) {  
                 v a r   J S K W $ E v e n t s   =   n e w   J S E C ( ) ;  
 }  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / /   J S   E v e n t   C l a s s  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   J S E C ( )   {  
 	 t h i s . c o n t e x t H a n d l e s   =   [ ] ;  
 }  
  
 J S E C . p r o t o t y p e . r e g i s t e r E v e n t C a l l b a c k   =   f u n c t i o n   ( c o n t e x t H a n d l e ,   e v e n t H a n d l e ,   e v e n t N a m e )   {  
 	 i f ( ! c o n t e x t H a n d l e )   {  
 	 	 c o n t e x t H a n d l e   =   n e w   J S E C C ( e v e n t H a n d l e ,   e v e n t N a m e ) ;  
 	 	 t h i s . c o n t e x t H a n d l e s . p u s h ( c o n t e x t H a n d l e ) ;  
 	 	 c o n t e x t H a n d l e . c H d l I d   =   t h i s . c o n t e x t H a n d l e s . l e n g t h   -   1 ;  
 	 }   e l s e   {  
 	 	 c o n t e x t H a n d l e . r e g i s t e r E v e n t C a l l b a c k ( e v e n t H a n d l e ,   e v e n t N a m e ) ;  
 	 }  
 	 r e t u r n   c o n t e x t H a n d l e ;  
 }  
  
 J S E C . p r o t o t y p e . d e R e g i s t e r E v e n t C a l l b a c k   =   f u n c t i o n   ( c o n t e x t H a n d l e ,   e v e n t H a n d l e ,   e v e n t N a m e )   {  
 	 c o n t e x t H a n d l e . d e R e g i s t e r E v e n t C a l l b a c k ( e v e n t H a n d l e ,   e v e n t N a m e ) ;  
 }  
  
 J S E C . p r o t o t y p e . s y n c B r o a d c a s t   =   f u n c t i o n   ( e v e n t N a m e )   {  
 	 v a r   a r g s   =   a r g u m e n t s ;  
 	 J S K i t L i b . f m a p ( t h i s . c o n t e x t H a n d l e s ,   f u n c t i o n ( c ) {  
 	 	 i f ( c )   c . b r o a d C a s t . a p p l y ( c ,   a r g s ) ;  
 	 } ) ;  
 }  
  
 J S E C . p r o t o t y p e . a s y n c B r o a d c a s t   =   f u n c t i o n   ( e v e n t N a m e )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   a r g s   =   a r g u m e n t s ;  
 	 s e t T i m e o u t ( f u n c t i o n ( ) {  
 	 	 s e l f . s y n c B r o a d c a s t . a p p l y ( s e l f ,   a r g s ) ;  
 	 } ,   0 ) ;  
 }  
  
 J S E C . p r o t o t y p e . i n v a l i d a t e C o n t e x t   =   f u n c t i o n   ( c o n t e x t H a n d l e )   {  
 	 i f ( c o n t e x t H a n d l e )   {  
 	 	 c o n t e x t H a n d l e . i n v a l i d a t e C o n t e x t ( ) ;  
 	 	 d e l e t e   t h i s . c o n t e x t H a n d l e s [ c o n t e x t H a n d l e . c H d l I d ] ;  
 	 }  
 }  
  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 / /   J S   E v e n t   C o n t e x t   C l a s s  
 / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /  
 f u n c t i o n   J S E C C ( e v e n t H a n d l e ,   e v e n t N a m e )   {  
 	 t h i s . r e g i s t e r e d C a l l b a c k s   =   [ ] ;  
 	 i f ( e v e n t N a m e   | |   e v e n t H a n d l e )   t h i s . r e g i s t e r E v e n t C a l l b a c k ( e v e n t H a n d l e ,   e v e n t N a m e ) ;  
 }  
  
 J S E C C . p r o t o t y p e . r e g i s t e r E v e n t C a l l b a c k   =   f u n c t i o n   ( e v e n t H a n d l e ,   e v e n t N a m e )   {  
 	 v a r   e v   =   e v e n t N a m e   | |   ' ' ;  
 	 i f ( ! t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] )   t h i s . r e g i s t e r e d C a l l b a c k s [ e v ]   =   [ ] ;  
 	 t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] . p u s h ( e v e n t H a n d l e ) ;  
 }  
  
 J S E C C . p r o t o t y p e . d e R e g i s t e r E v e n t C a l l b a c k   =   f u n c t i o n   ( e v e n t H a n d l e ,   e v e n t N a m e )   {  
 	 v a r   e v   =   e v e n t N a m e   | |   ' ' ;  
 	 v a r   s e l f   =   t h i s ;  
 	 i f ( ! e v e n t H a n d l e )   {  
 	 	 d e l e t e   t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] ;  
 	 	 r e t u r n ;  
 	 }  
 	 v a r   k = 0 ;  
 	 w h i l e ( k < t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] . l e n g t h )   {  
 	 	 i f ( t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] [ k ]   = =   e v e n t H a n d l e )   {  
 	 	 	 s e l f . r e g i s t e r e d C a l l b a c k s [ e v ] . s p l i c e ( k ,   1 ) ;  
 	 	 }   e l s e   k + + ;  
 	 }  
 	 i f ( ! t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] . l e n g t h )   d e l e t e   t h i s . r e g i s t e r e d C a l l b a c k s [ e v ] ;  
 }  
  
 J S E C C . p r o t o t y p e . i n v a l i d a t e C o n t e x t   =   f u n c t i o n   ( )   {  
 	 t h i s . r e g i s t e r e d C a l l b a c k s   =   [ ] ;  
 	 t r y   {  
 	 	 i f ( t h i s . j s k $ i n v a l i d a t e )   t h i s . j s k $ i n v a l i d a t e ( ) ;  
 	 }   c a t c h ( e )   {   ;   } ;  
 }  
  
 J S E C C . p r o t o t y p e . b r o a d C a s t   =   f u n c t i o n   ( e v e n t N a m e )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   a r   =   [ ' ' ] ;  
 	 v a r   a r g s   =   a r g u m e n t s ;  
 	 i f ( e v e n t N a m e ! = ' ' )   a r . p u s h ( e v e n t N a m e ) ;  
 	 J S K i t L i b . f m a p ( a r ,   f u n c t i o n ( e v ) {  
 	 	 i f ( s e l f . r e g i s t e r e d C a l l b a c k s [ e v ] )   J S K i t L i b . f m a p ( s e l f . r e g i s t e r e d C a l l b a c k s [ e v ] ,   f u n c t i o n ( e v H d l ) {  
 	 	 	 e v H d l . a p p l y ( s e l f ,   a r g s ) ;  
 	 	 } ) ;  
 	 } ) ;  
 }  
  
  
  
 f u n c t i o n   J S P G C ( i t e m s C o u n t ,   i t e m s P e r P a g e )   {  
 	 t h i s . i t e m s P e r P a g e   =   i t e m s P e r P a g e ;  
 	 t h i s . i t e m s   =   [ ] ;  
 	 t h i s . i t e m s C o u n t   =   0 ;  
 	 t h i s . p a g e s   =   [ ] ;  
 	 t h i s . p a g e C o u n t   =   0 ;  
 	 t h i s . s e t P a g e C o u n t ( t h i s . g e t P a g e C n t B y I t e m C n t ( i t e m s C o u n t ) ,   i t e m s C o u n t ) ;  
 }  
  
 J S P G C . p r o t o t y p e . n e w I t e m   =   f u n c t i o n ( i t e m )   {  
 	 v a r   n e w I t e m   =   {   o b j :   u n d e f i n e d ,   h t m l :   u n d e f i n e d ,   d i v :   u n d e f i n e d   } ;  
 	 i f ( i t e m )   J S K i t L i b . f m a p ( i t e m ,   f u n c t i o n ( V , K ) {   n e w I t e m [ K ]   =   V ;   } ) ;  
 	 r e t u r n   n e w I t e m ;  
 } ;  
  
 J S P G C . p r o t o t y p e . s e t I t e m s   =   f u n c t i o n   ( s I d x ,   C n t ,   i t e m s A r r )   {  
 	 f o r ( v a r   i = s I d x ;   i < s I d x + C n t ;   i + + )   {  
 	 	 t h i s . i t e m s [ i ]   =   i t e m s A r r [ i - s I d x ] ;  
 	 }  
 }  
  
 J S P G C . p r o t o t y p e . a d d I t e m   =   f u n c t i o n   ( i t e m ,   s I d x )   {  
 	 t h i s . i t e m s . s p l i c e ( s I d x ,   0 ,   i t e m ) ;  
 	 t h i s . i t e m s C o u n t + + ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t I t e m s   =   f u n c t i o n   ( s I d x ,   C n t )   {  
 	 r e t u r n   ( s I d x > = 0   & &   C n t )   ?   t h i s . i t e m s . s l i c e ( s I d x ,   s I d x + C n t )   :   [ ] ;  
 }  
  
 J S P G C . p r o t o t y p e . d e l e t e I t e m s   =   f u n c t i o n   ( s I d x ,   C n t )   {  
 	 t h i s . i t e m s . s p l i c e ( s I d x ,   C n t ) ;  
 	 t h i s . i t e m s C o u n t   - =   C n t ;  
 }  
  
 J S P G C . p r o t o t y p e . s e t I t e m s C o u n t   =   f u n c t i o n   ( n e w I t e m s C o u n t )   {  
 	 i f ( n e w I t e m s C o u n t < t h i s . i t e m s C o u n t )   {  
 	 	 t h i s . d e l e t e I t e m s ( n e w I t e m s C o u n t ,   t h i s . i t e m s C o u n t - n e w I t e m s C o u n t ) ;  
 	 }   e l s e   {  
 	 	 i f ( n e w I t e m s C o u n t > 0 )   t h i s . i t e m s [ n e w I t e m s C o u n t - 1 ]   =   u n d e f i n e d ;  
 	 	 t h i s . i t e m s C o u n t   =   n e w I t e m s C o u n t ;  
 	 }  
 }  
  
 J S P G C . p r o t o t y p e . g e t I t e m I d x B y I d   =   f u n c t i o n   ( i t e m I d )   {  
 	 v a r   i t e m I d x ;  
 	 f o r ( v a r   i = 0 ;   i < t h i s . i t e m s C o u n t ;   i + + )   {  
 	 	 i f ( t h i s . i t e m s [ i ]   & &   t h i s . i t e m s [ i ] . o b j . I D = = i t e m I d )   {  
 	 	 	 i t e m I d x   =   i ;  
 	 	 	 b r e a k ;  
 	 	 }  
 	 }  
 	 r e t u r n   i t e m I d x ;  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e I t e m s A t t r   =   f u n c t i o n ( i t e m I d x ,   C n t ,   A t t r )   {  
 	 J S K i t L i b . f m a p ( t h i s . g e t I t e m s ( i t e m I d x ,   C n t ) ,   f u n c t i o n ( i t e m )   {  
 	 	 i t e m [ A t t r ]   =   u n d e f i n e d ;  
 	 } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e I t e m s   =   f u n c t i o n ( i t e m I d x ,   C n t )   {  
 	 v a r   i t e m s   =   t h i s . g e t I t e m s ( i t e m I d x ,   C n t ) ;  
 	 J S K i t L i b . f m a p ( i t e m s ,   f u n c t i o n ( V , K )   {  
 	 	 i t e m s [ K ]   =   u n d e f i n e d ;  
 	 } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . n e w P a g e   =   f u n c t i o n   ( p a g e )   {  
 	 v a r   n e w P a g e   =   { i n v a l i d V i s u a l i z a t i o n :   t r u e ,   i n v a l i d D a t a :   t r u e } ;  
 	 i f ( p a g e )   J S K i t L i b . f m a p ( p a g e ,   f u n c t i o n ( V , K ) {   n e w P a g e [ K ]   =   V ;   } ) ;  
 	 r e t u r n   n e w P a g e ;  
 }  
  
 J S P G C . p r o t o t y p e . a d d P a g e   =   f u n c t i o n   ( p a g e )   {  
 	 t h i s . p a g e s [ t h i s . p a g e s . l e n g t h ]   =   p a g e   | |   t h i s . n e w P a g e ( ) ;  
 	 t h i s . p a g e C o u n t + + ;  
 }  
  
 J S P G C . p r o t o t y p e . d e l e t e P a g e   =   f u n c t i o n   ( )   {  
 	 d e l e t e   t h i s . p a g e s [ t h i s . p a g e s . l e n g t h ] ;  
 	 t h i s . p a g e C o u n t - - ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e s   =   f u n c t i o n   ( p a g e I d x ,   C n t )   {  
 	 r e t u r n   ( p a g e I d x > = 0   & &   C n t )   ?   t h i s . p a g e s . s l i c e ( p a g e I d x ,   p a g e I d x + C n t )   :   [ ] ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e   =   f u n c t i o n   ( p a g e I d x )   {  
 	 v a r   p a g e A r r   =   t h i s . g e t P a g e s ( p a g e I d x ,   1 ) ;  
 	 r e t u r n   ( p a g e A r r . l e n g t h > 0 )   ?   p a g e A r r [ 0 ]   :   u n d e f i n e d ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t S t a r t P a g e I t e m   =   f u n c t i o n   ( p a g e I d x )   {  
 	 r e t u r n   p a g e I d x   *   t h i s . i t e m s P e r P a g e ;  
 }  
  
 J S P G C . p r o t o t y p e . s e t P a g e C o u n t   =   f u n c t i o n   ( n e w P a g e C o u n t ,   n e w I t e m s C o u n t )   {  
 	 w h i l e ( t h i s . p a g e C o u n t < n e w P a g e C o u n t )   t h i s . a d d P a g e ( ) ;  
 	 w h i l e ( t h i s . p a g e C o u n t - n e w P a g e C o u n t > 0 )   t h i s . d e l e t e P a g e ( ) ;  
 	 t h i s . p a g e C o u n t   =   n e w P a g e C o u n t ;  
 	 t h i s . s e t I t e m s C o u n t ( n e w I t e m s C o u n t ) ;  
 	 i f ( ! n e w I t e m s C o u n t   & &   n e w P a g e C o u n t )   t h i s . s e t P a g e A t t r ( 0 ,   1 ,   { i n v a l i d D a t a :   f a l s e } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e A t t r   =   f u n c t i o n   ( p a g e I d x ,   A t t r )   {  
 	 v a r   p a g e   =   t h i s . g e t P a g e ( p a g e I d x ) ;  
 	 r e t u r n   p a g e   ?   p a g e [ A t t r ]   :   u n d e f i n e d ;  
 }  
  
 J S P G C . p r o t o t y p e . s e t P a g e A t t r   =   f u n c t i o n   ( p a g e I d x ,   C n t ,   A t t r s )   {  
 	 J S K i t L i b . f m a p ( t h i s . g e t P a g e s ( p a g e I d x ,   C n t ) ,  
 	 	 f u n c t i o n ( c u r P a g e )   {  
 	 	 	 J S K i t L i b . f m a p ( A t t r s ,   f u n c t i o n ( V , K ) {   c u r P a g e [ K ]   =   V   } )    
 	 	 } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e B y I t e m I d x   =   f u n c t i o n ( i n d e x )   {  
 	 r e t u r n   M a t h . f l o o r ( i n d e x / t h i s . i t e m s P e r P a g e ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e C n t B y I t e m C n t   =   f u n c t i o n ( i t e m C n t )   {  
 	 r e t u r n   M a t h . c e i l ( i t e m C n t / t h i s . i t e m s P e r P a g e ) ;  
 }  
  
 J S P G C . p r o t o t y p e . s e t P a g e I t e m s   =   f u n c t i o n   ( s t a r t P a g e ,   n e w D a t a )   {  
 	 v a r   p a g e C o u n t   =   t h i s . g e t P a g e C n t B y I t e m C n t ( n e w D a t a . l e n g t h ) ;  
 	 t h i s . s e t P a g e A t t r ( s t a r t P a g e ,   p a g e C o u n t ,   { i n v a l i d D a t a :   f a l s e ,   i n v a l i d V i s u a l i z a t i o n :   t r u e } ) ;  
 	 v a r   s t a r t I t e m   =   t h i s . g e t S t a r t P a g e I t e m ( s t a r t P a g e ) ;  
 	 v a r   s e l f   =   t h i s ;  
 	 t h i s . s e t I t e m s ( s t a r t I t e m ,   n e w D a t a . l e n g t h ,   J S K i t L i b . f m a p ( n e w D a t a ,   f u n c t i o n ( C ) {   r e t u r n   s e l f . n e w I t e m ( { o b j :   C } ) ;   } ) ) ;  
 }  
  
 J S P G C . p r o t o t y p e . a d d P a g e I t e m   =   f u n c t i o n   ( i t e m ,   i t e m I d x )   {  
 	 i f ( t h i s . p a g e C o u n t * t h i s . i t e m s P e r P a g e = = t h i s . i t e m s C o u n t )   {  
 	 	 t h i s . a d d P a g e ( ) ;  
 	 	 t h i s . s e t P a g e A t t r ( t h i s . p a g e C o u n t - 1 ,   1 ,   { i n v a l i d D a t a :   f a l s e } ) ;  
 	 }  
 	 v a r   i d x   =   ( t y p e o f   i t e m I d x   = =   " u n d e f i n e d " )   ?   t h i s . i t e m s C o u n t   :   i t e m I d x ;  
 	 t h i s . a d d I t e m ( i t e m ,   i d x ) ;  
 	 v a r   i n s e r t P a g e I d x   =   t h i s . g e t P a g e B y I t e m I d x ( i d x ) ;  
 	 t h i s . s e t P a g e A t t r ( i n s e r t P a g e I d x ,   t h i s . p a g e C o u n t - i n s e r t P a g e I d x ,   {   i n v a l i d V i s u a l i z a t i o n :   t r u e } ) ;  
 	 f o r ( v a r   i = i n s e r t P a g e I d x + 1 ;   i < t h i s . p a g e C o u n t ;   i + + )   {  
 	 	 i f ( ! t h i s . g e t P a g e A t t r ( i ,   ' i n v a l i d D a t a ' ) )   {  
 	 	 	 i f ( ! ( t h i s . g e t P a g e I t e m s ( i ) [ 0 ] ) )   {  
 	 	 	 	 t h i s . s e t P a g e A t t r ( i ,   1 ,   { i n v a l i d D a t a :   t r u e } ) ;  
 	 	 	 }  
 	 	 }  
 	 }  
 }  
  
 J S P G C . p r o t o t y p e . d e l e t e P a g e I t e m   =   f u n c t i o n   ( i t e m I d x )   {  
 	 v a r   d e l e t e P a g e I d x   =   t h i s . g e t P a g e B y I t e m I d x ( i t e m I d x ) ;  
 	 t h i s . d e l e t e I t e m s ( i t e m I d x ,   1 ) ;  
 	 t h i s . s e t P a g e A t t r ( d e l e t e P a g e I d x ,   t h i s . p a g e C o u n t - d e l e t e P a g e I d x ,   {   i n v a l i d V i s u a l i z a t i o n :   t r u e } ) ;  
 	 f o r ( v a r   i = d e l e t e P a g e I d x ;   i < t h i s . p a g e C o u n t - 1 ;   i + + )   {  
 	 	 i f ( ! t h i s . g e t P a g e A t t r ( i ,   ' i n v a l i d D a t a ' ) )   {  
 	 	 	 v a r   i t e m s C n t   =   t h i s . g e t P a g e I t e m s C n t ( i ) ;  
 	 	 	 i f ( ! ( t h i s . g e t P a g e I t e m s ( i ) [ i t e m s C n t - 1 ] ) )   {  
 	 	 	 	 t h i s . s e t P a g e A t t r ( i ,   1 ,   { i n v a l i d D a t a :   t r u e } ) ;  
 	 	 	 }  
 	 	 }  
 	 }  
 	 i f ( ( t h i s . p a g e C o u n t - 1 ) * t h i s . i t e m s P e r P a g e = = t h i s . i t e m s C o u n t   & &   t h i s . p a g e C o u n t > 1 )   t h i s . d e l e t e P a g e ( ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e I t e m s   =   f u n c t i o n   ( p a g e I d x )   {  
 	 v a r   s t a r t I t e m   =   t h i s . g e t S t a r t P a g e I t e m ( p a g e I d x ) ;  
 	 v a r   i t e m s C n t   =   t h i s . g e t P a g e I t e m s C n t ( p a g e I d x ) ;  
 	 r e t u r n   t h i s . g e t I t e m s ( s t a r t I t e m ,   i t e m s C n t ) ;  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e P a g e s V i e w   =   f u n c t i o n   ( p a g e I d x ,   C n t )   {  
 	 t h i s . s e t P a g e A t t r ( p a g e I d x ,   C n t ,   { i n v a l i d V i s u a l i z a t i o n :   t r u e } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e P a g e s   =   f u n c t i o n   ( p a g e I d x ,   C n t )   {  
 	 f o r ( v a r   i = 0 ;   i < C n t ;   i + + )   {  
 	 	 v a r   s t a r t I t e m   =   t h i s . g e t S t a r t P a g e I t e m ( p a g e I d x + i ) ;  
 	 	 v a r   i t e m s C n t   =   t h i s . g e t P a g e I t e m s C n t ( p a g e I d x + i ) ;  
 	 	 t h i s . i n v a l i d a t e I t e m s ( s t a r t I t e m ,   i t e m s C n t ) ;  
 	 }  
 	 t h i s . s e t P a g e A t t r ( p a g e I d x ,   C n t ,   { i n v a l i d D a t a :   t r u e ,   i n v a l i d V i s u a l i z a t i o n :   t r u e } ) ;  
 }  
  
 J S P G C . p r o t o t y p e . n e w D a t a   =   f u n c t i o n   ( n e w I t e m s C o u n t ,   s t a r t P a g e ,   n e w D a t a )   {  
 	 v a r   n e w P a g e C o u n t   =   t h i s . g e t P a g e C n t B y I t e m C n t ( n e w I t e m s C o u n t ) ;  
 	 t h i s . s e t P a g e C o u n t ( n e w P a g e C o u n t   | |   1 ,   n e w I t e m s C o u n t ) ;  
 	 t h i s . s e t P a g e I t e m s ( s t a r t P a g e ,   n e w D a t a ) ;  
 }  
  
 J S P G C . p r o t o t y p e . a d d N e w I t e m   =   f u n c t i o n   ( o b j ,   i t e m I d ,   i s P r e p e n d )   {  
 	 v a r   i t e m   =   t h i s . n e w I t e m ( ) ;  
 	 i t e m . o b j   =   o b j ;  
 	 t h i s . a d d P a g e I t e m ( i t e m ,   i t e m I d   ?   t h i s . g e t I t e m I d x B y I d ( i t e m I d )   +   ( i s P r e p e n d   ?   0   :   1 )   :   u n d e f i n e d ) ;  
 }  
  
 J S P G C . p r o t o t y p e . d e l e t e I t e m   =   f u n c t i o n   ( i t e m I d )   {  
 	 t h i s . d e l e t e P a g e I t e m ( t h i s . g e t I t e m I d x B y I d ( i t e m I d ) ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e V i s u a l i z a t i o n   =   f u n c t i o n   ( p a g e I d x ,   c b )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 i f ( p a g e I d x < 0   | |   p a g e I d x > = t h i s . p a g e C o u n t )   r e t u r n   c b ( u n d e f i n e d ) ;  
 	 v a r   c u r P a g e   =   t h i s . g e t P a g e ( p a g e I d x ) ;  
 	 v a r   g e t P a g e F u n c   =   f u n c t i o n ( ) {   s e l f . g e t P a g e V i s u a l i z a t i o n ( p a g e I d x ,   c b ) ;   } ;  
 	 i f ( t h i s . g e t P a g e A t t r ( p a g e I d x ,   ' i n v a l i d D a t a ' ) )  
 	 	 r e t u r n   t h i s . d a t a R e q u e s t ( p a g e I d x ,   c u r P a g e ,   c b ) ;  
 	 i f ( t h i s . g e t P a g e A t t r ( p a g e I d x ,   ' i n v a l i d V i s u a l i z a t i o n ' ) )   {  
 	 	 c u r P a g e . i n v a l i d V i s u a l i z a t i o n   =   f a l s e ;  
 	 	 r e t u r n   t h i s . d a t a V i s u a l i z a t o r ( t h i s . g e t S t a r t P a g e I t e m ( p a g e I d x ) ,   t h i s . g e t P a g e I t e m s ( p a g e I d x ) ,   c u r P a g e ,   g e t P a g e F u n c ) ;  
 	 }  
 	 r e t u r n   c b ( t h i s . g e t P a g e ( p a g e I d x ) . t a r g e t ,   t r u e ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e I t e m s C n t   =   f u n c t i o n ( p a g e I d x )   {  
 	 i f ( p a g e I d x < 0   | |   p a g e I d x > = t h i s . p a g e C o u n t )   r e t u r n   0 ;  
 	 r e t u r n   ( p a g e I d x = = t h i s . p a g e C o u n t - 1   ?   ( t h i s . i t e m s C o u n t - p a g e I d x * t h i s . i t e m s P e r P a g e )   :   t h i s . i t e m s P e r P a g e ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t I t e m B y I d   =   f u n c t i o n ( i t e m I d )   {  
 	 v a r   i t e m s A r r   =   t h i s . g e t I t e m s ( t h i s . g e t I t e m I d x B y I d ( i t e m I d ) ,   1 ) ;  
 	 r e t u r n   ( i t e m s A r r . l e n g t h > 0 )   ?   i t e m s A r r [ 0 ]   :   u n d e f i n e d ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t P a g e B y I t e m I d   =   f u n c t i o n ( i t e m I d )   {  
 	 r e t u r n   t h i s . g e t P a g e B y I t e m I d x ( t h i s . g e t I t e m I d x B y I d ( i t e m I d ) ) ;  
 }  
  
 J S P G C . p r o t o t y p e . g e t F i r s t I t e m   =   f u n c t i o n   ( )   {  
 	 i f ( t h i s . i t e m s C o u n t )   {  
 	 	 v a r   i t e m s A r r   =   t h i s . g e t I t e m s ( 0 ,   1 ) ;  
 	 	 r e t u r n   ( i t e m s A r r . l e n g t h > 0 )   ?   i t e m s A r r [ 0 ]   :   u n d e f i n e d ;  
 	 }   e l s e   {  
 	 	 r e t u r n   u n d e f i n e d ;  
 	 }  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e I t e m V i e w   =   f u n c t i o n   ( i t e m I d )   {  
 	 v a r   i t e m I d x   =   t h i s . g e t I t e m I d x B y I d ( i t e m I d ) ;  
 	 t h i s . i n v a l i d a t e I t e m s A t t r ( i t e m I d x ,   1 ,   ' h t m l ' ) ;  
 	 v a r   p a g e I d x   =   t h i s . g e t P a g e B y I t e m I d x ( i t e m I d x ) ;  
 	 t h i s . i n v a l i d a t e P a g e s V i e w ( p a g e I d x ,   1 ) ;  
 }  
  
 J S P G C . p r o t o t y p e . i n v a l i d a t e   =   f u n c t i o n   ( )   {  
 	 t h i s . i n v a l i d a t e P a g e s ( 0 ,   t h i s . p a g e C o u n t ) ;  
 }  
  
  
  
 / / / / / / / / / / / / / / / / / / / /   J S R V C  
 / /   r e q u e s t O b j  
 / /   r e q u e s t :   { u r i :   s o m e u r i ,   p a r a m 1 :   v a l 1 ,   p a r a m 2 :   v a l 2 ,   . . . }  
 / /   [ t r a n s p o r t :   ( " G E T "   |   " P O S T " ) ]  
 / /   [ t a r g e t :   s o m e _ D O M _ e l e m e n t ]  
 / /   [ v a r i a b l e R e q u e s t :   [ { p a r a m 1 _ 1 :   v a l 1 _ 1 ,   p a r a m 1 _ 2 :   v a l 1 _ 2 ,   . . . } ,  
 / / 	 	 	 { p a r a m 2 _ 1 :   v a l 2 _ 1 ,   p a r a m 2 _ 2 :   v a l 2 _ 2 , . . . } ,   . . . ] ]  
 / /   [ f o r m :   s o m e _ f o r m ]  
 / /   [ o n r e t u r n :   s o m e _ c a l l b a c k ]  
 / /   [ r a n d e v u   :   ( t r u e   |   f a l s e ) ]  
 / /   [ r e q u e s t I d :   s o m e   r e q u e s t   i d e n t i t y ]  
  
 f u n c t i o n   J S R V C ( r e q u e s t O b j )   {  
 	 v a r   s   =   t h i s ;  
 	 s . r e q u e s t I d   =   r e q u e s t O b j . r e q u e s t I d   | |   s . g e n e r a t e R e q u e s t I d ( ) ;  
 	 s . r e q u e s t s I n P r o g r e s s   =   0 ;  
 	 s . r e q u e s t s Q u e u e   =   [ ] ;  
 	 s . p r o c e s s R e q u e s t ( r e q u e s t O b j ) ;  
 }  
  
 J S R V C . p r o t o t y p e . g e n e r a t e R e q u e s t I d   =   f u n c t i o n ( )   {  
 	 r e t u r n   ( ( n e w   D a t e ( ) ) . v a l u e O f ( )   +   M a t h . r a n d o m ( ) ) . t o S t r i n g ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . p r o c e s s R e q u e s t   =   f u n c t i o n ( r e q u e s t O b j )   {  
 	 v a r   s   =   t h i s ;  
 	 s . e r r o r   =   u n d e f i n e d ;  
 	 i f ( s . r e q u e s t s I n P r o g r e s s )   {  
 	 	 s . r e q u e s t s Q u e u e . p u s h ( r e q u e s t O b j ) ;  
 	 	 r e t u r n ;  
 	 }  
 	 s . r e q u e s t O b j   =   r e q u e s t O b j ;  
 	 i f ( s . r e q u e s t O b j . p i c k u p   & &   ! s . e v e n t C t x )   s . e v e n t C t x   =   J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( s . e v e n t C t x ,   f u n c t i o n ( )   { s . e v e n t C a l l b a c k . a p p l y ( s ,   a r g u m e n t s ) ; } ,   " r a n d e v u _ a n s w e r " ) ;  
 	 v a r   r e q   =   s . r e q u e s t O b j ;  
 	 s . p r e P r o c e s s R e q u e s t ( ) ;  
 	 i f ( ! r e q . t r a n s p o r t )  
 	 	 r e q . t r a n s p o r t   =   r e q . f o r m   ?   " P O S T "   :   s . g e t R e q u e s t T r a n s p o r t ( ) ;  
 	 r e q . t a r g e t   =   r e q . t a r g e t   | |   d o c u m e n t . b o d y ;  
 	 v a r   o n C o m p l e t e C B   =   r e q . t i m e o u t   ?   f u n c t i o n ( )   {  
 	 	 s . s t a r t T i m e o u t T i m e r . c a l l ( s ) ;  
 	 }   :   u n d e f i n e d ;  
 	 v a r   h a n d l e r s   =   { ' o n l o a d ' :   s . o n L o a d R e q u e s t ,   ' o n r e a d y s t a t e c h a n g e ' :   s . o n L o a d R e q u e s t } ;  
 	 s w i t c h ( r e q . t r a n s p o r t )   {  
 	 c a s e   " G E T " :  
 	 	 s . p r o c e s s G E T R e q u e s t ( o n C o m p l e t e C B ,   h a n d l e r s ) ;  
 	 	 b r e a k ;  
 	 c a s e   " P O S T " :  
 	 	 s . p r o c e s s P O S T R e q u e s t ( o n C o m p l e t e C B ,   h a n d l e r s ) ;  
 	 	 b r e a k ;  
 	 }  
 }  
  
 J S R V C . p r o t o t y p e . p r e P r o c e s s R e q u e s t   =   f u n c t i o n ( )   {  
 	 v a r   r e q   =   t h i s . r e q u e s t O b j ;  
 	 i f ( ! r e q . r e q u e s t )   r e q . r e q u e s t   =   { } ;  
 	 J S K i t L i b . f m a p ( r e q . e p b   | |   { } ,   f u n c t i o n ( v ,   k )   {   r e q . r e q u e s t [ k ]   =   v ;   } ) ;  
 	 i f   ( r e q . r e f )   r e q . r e q u e s t . r e f   =   r e q . r e f ;  
 	 r e q . r e q u e s t . r a n d e v u I d   =   t h i s . r e q u e s t I d ;  
 	 i f ( ! r e q . v a r i a b l e R e q u e s t )   r e q . v a r i a b l e R e q u e s t   =   [ ] ;  
 	 i f ( r e q . p i c k u p )   r e q . r e q u e s t . r a n d e v u R n d   =   M a t h . r a n d o m ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . c a l c G e t R e q u e s t   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   r e q   =   s . r e q u e s t O b j ;  
 	 v a r   r e q v a r   =   r e q . v a r i a b l e R e q u e s t ;  
 	 v a r   p e r m G E T R e q   =   s . s e r i a l i z e R e q u e s t ( r e q . r e q u e s t ) ;  
 	 v a r   v a r G E T R e q   =   J S K i t L i b . f m a p ( r e q v a r ,   f u n c t i o n ( e l ,   i d x ) {  
 	 	 r e t u r n   s . s e r i a l i z e R e q u e s t ( e l ,   ' [ '   +   i d x   +   ' ] ' ) ;  
 	 } ) ;  
 	 r e t u r n   [ p e r m G E T R e q ,   v a r G E T R e q ] ;  
 }  
  
 J S R V C . p r o t o t y p e . g e t R e q u e s t T r a n s p o r t   =   f u n c t i o n ( )   {  
 	 v a r   s e r   =   t h i s . c a l c G e t R e q u e s t ( ) ;  
 	 v a r   p e r m R e q   =   s e r [ 0 ] ;  
 	 v a r   v a r R e q   =   s e r [ 1 ] ;  
 	 v a r   f i r s t R e q L e n   =   p e r m R e q . l e n g t h   +  
 	 	 ( v a r R e q . l e n g t h > 0   ?   v a r R e q [ 0 ] . l e n g t h   :   0 ) ;  
 	 v a r   t o t a l R e q L e n   =   0 ;  
 	 f o r ( v a r   i = 0 ;   i < v a r R e q . l e n g t h ;   i + + )  
 	 	 t o t a l R e q L e n   + =   v a r R e q [ i ] . l e n g t h ;  
 	  
 	 r e t u r n   ( ( f i r s t R e q L e n   >   1 7 0 0 )   | |   ( t o t a l R e q L e n   >   3 4 0 0 )   ?  
 	 	 " P O S T "   :   " G E T " ) ;  
 }  
  
 J S R V C . p r o t o t y p e . s t a r t T i m e o u t T i m e r   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . t i m e o u t T i m e r   =   s e t T i m e o u t ( f u n c t i o n ( )   {   s . t i m e o u t E x p i r e d ( ) ;   } ,   s . r e q u e s t O b j . t i m e o u t ) ;  
 }  
  
 J S R V C . p r o t o t y p e . t i m e o u t E x p i r e d   =   f u n c t i o n ( )   {  
 	 t h i s . e r r o r   =   " t i m e o u t " ;  
 	 t h i s . r e t u r n A n s w e r ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . r e t u r n A n s w e r   =   f u n c t i o n ( a n s w e r D a t a )   {  
 	 v a r   s   =   t h i s ;  
 	 a n s w e r D a t a   =   a n s w e r D a t a   | |   { } ;  
 	 i f ( a n s w e r D a t a . s c r i p t )   {  
 	 	 v a r   s c r i p t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s c r i p t ' ) ;  
 	 	 s c r i p t . t e x t   =   a n s w e r D a t a . s c r i p t ;  
 	 	 t h i s . r e q u e s t O b j . t a r g e t . a p p e n d C h i l d ( s c r i p t ) ;  
 	 }  
 	 i f ( s . r e q u e s t O b j . o n r e t u r n )   {  
 	 	 s . r e q u e s t O b j . o n r e t u r n . c a l l ( s ,   s . e r r o r   | |   " d a t a " ,   a n s w e r D a t a . d a t a ) ;  
 	 }  
 }  
  
 J S R V C . p r o t o t y p e . s e r i a l i z e R e q u e s t   =   f u n c t i o n ( o b j ,   p r e f i x )   {  
 	 r e t u r n   J S K i t L i b . f m a p ( o b j ,   f u n c t i o n ( v ,   k )   {  
 	 	 r e t u r n   e n c o d e U R I C o m p o n e n t ( k )   +   ( p r e f i x   | |   ' ' )   +   " = "   +   e n c o d e U R I C o m p o n e n t ( v ) ;  
               } ) . j o i n ( " & " ) ;  
 }  
  
 J S R V C . p r o t o t y p e . s e t E l e m e n t A t t r i b u t e s   =   f u n c t i o n ( o b j ,   a t t r s )   {  
 	 v a r   s   =   t h i s ;  
 	 i f   ( ! o b j )   r e t u r n ;  
 	 J S K i t L i b . f m a p ( a t t r s ,   f u n c t i o n ( v ,   k )   {  
 	 	 o b j [ k ]   =   f u n c t i o n ( )   {   v . c a l l ( s ,   o b j )   } ;  
 	 } ) ;  
 }  
  
 J S R V C . p r o t o t y p e . r u n S c r i p t   =   f u n c t i o n ( s r c ,   d a t a ,   h a n d l e r s )   {  
 	 v a r   s c r i p t   =   d o c u m e n t . c r e a t e E l e m e n t ( ' s c r i p t ' ) ;  
 	 t h i s . s e t E l e m e n t A t t r i b u t e s ( s c r i p t ,   h a n d l e r s ) ;  
 	 s c r i p t . s e t A t t r i b u t e ( " c h a r s e t " ,   " u t f - 8 " ) ;  
 	 s c r i p t . s e t A t t r i b u t e ( " s r c " ,     s r c   +   ( d a t a   ?   ' ? '   +   d a t a   :   ' ' ) ) ;  
 	 t h i s . r e q u e s t s I n P r o g r e s s + + ;  
 	 t h i s . r e q u e s t O b j . t a r g e t . a p p e n d C h i l d ( s c r i p t ) ;  
 	 t h i s . s c r i p t   =   s c r i p t ;  
 }  
  
 J S R V C . p r o t o t y p e . p r o c e s s G E T R e q u e s t   =   f u n c t i o n ( o n C o m p l e t e C B ,   h a n d l e r s )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   s e r   =   s . c a l c G e t R e q u e s t ( ) ;  
 	 v a r   r e q p e r m   =   s e r [ 0 ] ;  
 	 v a r   r e q p e r m l e n   =   r e q p e r m . l e n g t h ;  
 	 v a r   r e q v a r   =   s e r [ 1 ] ;  
 	 v a r   r e q v a r l e n   =   r e q v a r . l e n g t h ;  
 	 v a r   c u r r e q u e s t   =   ' ' ;  
 	 f o r ( v a r   i = 0 ;   i < r e q v a r l e n ;   i + + )   {  
 	 	 c u r r e q u e s t   + =   ' & '   +   r e q v a r [ i ] ;  
 	 	 i f ( c u r r e q u e s t . l e n g t h   +   r e q p e r m l e n   +  
 	 	 	 ( i + 1 < r e q v a r l e n   ?   r e q v a r [ i + 1 ] . l e n g t h   :   0 )   >   2 0 0 0 )   {  
 	 	 	 s . r u n S c r i p t ( s . r e q u e s t O b j . u r i ,  
 	 	 	 	 r e q p e r m   +   c u r r e q u e s t ,   h a n d l e r s ) ;  
 	 	 	 c u r r e q u e s t   =   ' ' ;  
 	 	 }  
 	 }  
 	 i f ( ( c u r r e q u e s t )   | |   ( ! r e q v a r l e n ) )  
 	 	 s . r u n S c r i p t ( s . r e q u e s t O b j . u r i ,  
 	 	 	 r e q p e r m   +   ' & '   +   c u r r e q u e s t ,   h a n d l e r s ) ;  
 	 i f ( o n C o m p l e t e C B )   o n C o m p l e t e C B ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . p r o c e s s P O S T R e q u e s t   =   f u n c t i o n ( o n C o m p l e t e C B ,   h a n d l e r s )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   r e q   =   s . r e q u e s t O b j . r e q u e s t ;  
 	 v a r   r e q v a r   =   s . r e q u e s t O b j . v a r i a b l e R e q u e s t ;  
 	 v a r   r e q v a r l e n   =   s . r e q u e s t O b j . v a r i a b l e R e q u e s t . l e n g t h ;  
 	 v a r   c r e a t e F o r m   =   f u n c t i o n ( )   {  
 	 	 v a r   i f r a m e   =   ' j s - i f r m - '   +   M a t h . r a n d o m ( ) ;  
 	 	 v a r   i f r   =   J S K i t L i b . c r e a t e H i d d e n I f r a m e ( i f r a m e ,   s . r e q u e s t O b j . t a r g e t ) ;  
 	 	 v a r   d o c   =   i f r . c o n t e n t D o c u m e n t   ?   i f r . c o n t e n t D o c u m e n t   :   i f r . d o c u m e n t ;  
 	 	 v a r   f   =   d o c . c r e a t e E l e m e n t ( ' F O R M ' ) ;  
 	 	 f . d o c   =   d o c ;  
 	 	 i f ( J S K i t L i b . i s I E ( ) )   d o c . c h a r s e t   =   " u t f - 8 " ;  
 	 	 f . t a r g e t   =   i f r a m e ;  
 	 	 d o c . b o d y . a p p e n d C h i l d ( f ) ;  
 	 	 r e t u r n   f ;  
 	 } ;  
 	 v a r   g e t F o r m   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   ( s . r e q u e s t O b j . f o r m   & &   ! r e q v a r l e n )   ?  
 	 	 	 s . r e q u e s t O b j . f o r m   :   c r e a t e F o r m ( ) ;  
 	 }  
 	 v a r   f i l l F o r m   =   f u n c t i o n ( f o r m ,   o b j )   {  
 	 	 f o r m . m e t h o d     =   ' P O S T ' ;  
 	 	 f o r m . e n c t y p e   =   " a p p l i c a t i o n / x - w w w - f o r m - u r l e n c o d e d " ;  
 	 	 f o r m . a c c e p t C h a r s e t   =   ' U T F - 8 ' ;  
 	 	 f o r m . a c t i o n     =   s . r e q u e s t O b j . u r i ;  
 	 	 J S K i t L i b . f m a p ( o b j ,   f u n c t i o n ( v ,   k )   {  
 	 	 	 v a r   f r m e l   =   ( f o r m . d o c   | |   d o c u m e n t ) . c r e a t e E l e m e n t ( ' I N P U T ' ) ;  
 	 	 	 f r m e l . t y p e   =   " h i d d e n " ;  
 	 	 	 f r m e l . n a m e   =   k ;  
 	 	 	 f r m e l . v a l u e   =   v ;  
 	 	 	 f o r m . a p p e n d C h i l d ( f r m e l ) ;  
 	 	 } ) ;  
 	 }  
 	 v a r   p o s t R e q u e s t   =   f u n c t i o n ( p o b j ,   v o b j )   {  
 	 	 v a r   f o r m   =   g e t F o r m ( ) ;  
 	 	 f i l l F o r m ( f o r m ,   p o b j ) ;  
 	 	 i f ( v o b j )   f i l l F o r m ( f o r m ,   v o b j ) ;  
 	 	 i f   ( f o r m . t a r g e t )   s . s e t E l e m e n t A t t r i b u t e s ( d o c u m e n t . g e t E l e m e n t B y I d ( f o r m . t a r g e t ) ,   h a n d l e r s ) ;  
 	 	 J S K i t L i b . f m a p ( h a n d l e r s ,   f u n c t i o n ( v ,   k )   {  
 	 	 	 f o r m [ k ]   =   v ;  
 	 	 } ) ;  
 	 	 s . r e q u e s t s I n P r o g r e s s + + ;  
 	 	 f o r m . s u b m i t ( ) ;  
 	 }  
 	 J S K i t L i b . f m a p ( r e q v a r ,   f u n c t i o n ( v )   {  
 	 	 p o s t R e q u e s t ( r e q ,   v ) ;  
 	 } ) ;  
 	 i f ( ! r e q v a r l e n )   p o s t R e q u e s t ( r e q ) ;  
 	 i f ( o n C o m p l e t e C B )   o n C o m p l e t e C B ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . o n L o a d R e q u e s t   =   f u n c t i o n ( e l )   {  
 	 v a r   s   =   t h i s ;  
 	 i f ( e l . r e a d y S t a t e   & &   e l . r e a d y S t a t e   ! =   ' l o a d e d '  
 	 	 & &   e l . r e a d y S t a t e   ! =   ' c o m p l e t e ' )   r e t u r n ;  
 	 e l . o n r e a d y s t a t e c h a n g e   =   e l . o n l o a d   =   n u l l ;  
 	 i f ( ! s . r e q u e s t O b j . p i c k u p )   {  
 	 	 s . r e q u e s t O b j . c h e c k e d   =   t r u e ;  
 	 	 s . r e q u e s t s I n P r o g r e s s - - ;  
 	 }  
 	 s . p o s t P r o c e s s R e q u e s t ( ) ;  
 }  
  
 J S R V C . p r o t o t y p e . p o s t P r o c e s s R e q u e s t   =   f u n c t i o n ( s o u r c e ,   d a t a )   {  
 	 v a r   s   =   t h i s ;  
 	 i f ( s . r e q u e s t O b j . p i c k u p   & &   s o u r c e ! = " p i c k u p " )   r e t u r n ;  
 	 i f ( s . r e q u e s t O b j . r a n d e v u   & &   ! s . e r r o r   & &   s . r e q u e s t O b j . t r a n s p o r t   = =   " P O S T " )   {  
 	 	 s . p r o c e s s R e q u e s t ( {  
 	 	 	 ' u r i ' :   ' / / j s - k i t . c o m / a p i / s e r v e r - a n s w e r . j s ' ,  
 	 	 	 ' r e f ' :   s . r e q u e s t O b j . r e f ,  
 	 	 	 ' e p b ' :   s . r e q u e s t O b j . e p b ,  
 	 	 	 ' p i c k u p ' :   t r u e ,  
 	 	 	 ' o n r e t u r n ' :   s . r e q u e s t O b j . o n r e t u r n ,  
 	 	 	 ' t a r g e t ' :   s . r e q u e s t O b j . t a r g e t } ) ;  
 	 	 r e t u r n ;  
 	 }  
 	 s . r e t u r n A n s w e r ( d a t a ) ;  
 	 i f ( ! s . r e q u e s t s I n P r o g r e s s )   {  
 	 	 i f ( s . t i m e o u t T i m e r )   c l e a r T i m e o u t ( s . t i m e o u t T i m e r ) ;  
 	 	 i f ( s . r e q u e s t s Q u e u e . l e n g t h   & &   ! s . e r r o r )  
 	 	 	 s . p r o c e s s R e q u e s t ( s . r e q u e s t s Q u e u e . p o p ( ) ) ;  
 	 }  
 }  
  
 J S R V C . p r o t o t y p e . e v e n t C a l l b a c k   =   f u n c t i o n ( e v e n t N a m e ,   r a n d e v u I d ,   s t a t u s ,   d a t a )   {  
 	 i f ( t h i s . r e q u e s t I d   ! =   r a n d e v u I d )   r e t u r n ;  
 	 t h i s . r e q u e s t s I n P r o g r e s s - - ;  
 	 i f ( t h i s . s c r i p t   & &   t h i s . s c r i p t . p a r e n t N o d e )   {  
 	 	 t h i s . s c r i p t . p a r e n t N o d e . r e m o v e C h i l d ( t h i s . s c r i p t ) ;  
 	 	 t h i s . s c r i p t   =   u n d e f i n e d ;  
 	 }  
 	 s w i t c h ( s t a t u s )   {  
 	 c a s e   " r e a d y " :  
 	 	 i f ( t h i s . e v e n t C t x )   {  
 	 	 	 J S K W $ E v e n t s . i n v a l i d a t e C o n t e x t ( t h i s . e v e n t C t x ) ;  
 	 	 	 t h i s . e v e n t C t x   =   u n d e f i n e d ;  
 	 	 }  
 	 	 t h i s . p o s t P r o c e s s R e q u e s t ( " p i c k u p " ,   d a t a ) ;  
 	 	 b r e a k ;  
 	 c a s e   " t i m e o u t " :  
 	 	 i f ( t h i s . e r r o r )   {  
 	 	 	 t h i s . r e t u r n A n s w e r ( d a t a ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . p r o c e s s R e q u e s t ( t h i s . r e q u e s t O b j ) ;  
 	 	 }  
 	 	 b r e a k ;  
 	 }  
 }  
  
 J S R V C . p r o t o t y p e . c a n c e l R e q u e s t   =   f u n c t i o n ( )   {  
 	 t h i s . e r r o r   =   ' c a n c e l e d ' ;  
 }  
  
  
  
 / *   C o n s t a n t s   * /  
 J S C C . D O M A I N   =   ( w i n d o w . l o c a t i o n . p r o t o c o l . s u b s t r ( 0 ,   4 )   ! =   ' h t t p '   ?   ' h t t p : '   :   ' ' )  
                             +   ' / / j s - k i t . c o m ' ;  
 J S C C . U R I   =   J S C C . D O M A I N   +   ' / c o m m e n t ' ;  
 J S C C . U R I _ A V A T A R   =   J S C C . D O M A I N   +   ' / a v a t a r / ' ;  
 J S C C . U R I _ I M A G E   =   J S C C . D O M A I N   +   ' / i m a g e / ' ;  
  
 / *   J a v a S c r i p t   C o m m e n t   C l a s s   * /  
 n e w   J S C C ( ) ;  
  
 / *   J S K i t G l o b a l   :   A p p   i s   r e a d y   * /  
 $ J S K i t G l o b a l . s e t C o m m e n t s A p p A v a i l a b l e ( ) ;  
  
 f u n c t i o n   J S C C ( t a r g e t ,   e x t r a )   {  
 	 t h i s . g e t   =   f u n c t i o n ( i d )   {   r e t u r n   d o c u m e n t . g e t E l e m e n t B y I d ( i d ) ;   }  
 	 v a r   i d N a m e   =   " j s - k i t - c o m m e n t s " ;  
 	 v a r   t a r g e t   =   a r g u m e n t s . l e n g t h   ?   a r g u m e n t s [ 0 ]   :   t h i s . g e t ( i d N a m e ) ;  
 	 i f   ( t a r g e t   & &   t a r g e t . j s k $ i n i t i a l i z e d )   r e t u r n ;  
  
 	 t h i s . c r   =   f u n c t i o n ( t a g )   {   r e t u r n   d o c u m e n t . c r e a t e E l e m e n t ( t a g ) ;   }  
 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 t h i s . u r i D o m a i n   =   J S C C . D O M A I N ;  
 	 t h i s . u r i A v a t a r   =   J S C C . U R I _ A V A T A R ;  
 	 t h i s . u r i I m a g e   =   J S C C . U R I _ I M A G E ;  
 	 t h i s . u r i   =   J S C C . U R I ;  
 	 t h i s . f i e l d D f l   =   { } ;  
 	 t h i s . T C   =   { } ;  
 	 t h i s . t m p I D   =   0 ;  
 	 t h i s . p a t h O v e r r i d e   =   " " ;  
 	 t h i s . u n i q   =   w l . p a t h n a m e ;  
 	 t h i s . o b j B y I d   =   { } ;  
 	 t h i s . u t m p l = { } ;  
 	 t h i s . c o n f i g   =   ( e x t r a ? e x t r a . c o n f i g : n u l l ) | | { } ;  
 	 t h i s . I M   =   t h i s . c o n f i g . n o l c   & &   e x t r a   & &   e x t r a . s a r g s   & &   e x t r a . s a r g s . s o u r c e = = ' p r o f i l e I M '   ?   ( e x t r a . s a r g s [ ' d e s t P r o f i l e ' ]   ?   ' f o r e i g n '   :   ' o w n ' )   :   f a l s e ;  
 	 t h i s . g e n   =   0 ;  
 	 t h i s . c t a g   =   n u l l ;  
 	 t h i s . c z i d x   =   3 0 0 ;  
 	 t h i s . s t r i p e c o u n t   =   2 ;  
 	 v a r   s e l f   =   t h i s ;  
  
 	 v a r   c l   =   w l . h a s h . m a t c h ( / ^ # ( j s i d - [ 0 - 9 ] + - ? [ 0 - 9 ] * ) $ / i ) ;  
 	 t h i s . c o m m e n t _ l o c a t i o n   =   c l   ?   c l [ 1 ]   :   u n d e f i n e d ;  
  
 	 t h i s . g e t D a t a   =   f u n c t i o n ( d o m a i n ,   m u l t i P a r a m s )   {  
 	 	 i f ( ! m u l t i P a r a m s . l e n g t h )   r e t u r n ;  
 	 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 	 v a r   r e q   =   {  
 	 	 	 u r i :   J S C C . U R I   +   ' s - d a t a . j s ' ,  
 	 	 	 r e f :   w l . p r o t o c o l   +   " / / "   +   d o m a i n   +   w l . p a t h n a m e ,  
 	 	 	 e p b :   J S K i t E P B . g e t A s H a s h ( { } ) ,  
 	 	 	 r e q u e s t :   t h i s . c o m m e n t _ l o c a t i o n   ?   { ' j s i d ' :   t h i s . c o m m e n t _ l o c a t i o n }   :   { } ,  
 	 	 	 v a r i a b l e R e q u e s t :   m u l t i P a r a m s ,  
 	 	 	 t r a n s p o r t :   ' G E T ' ,  
 	 	 	 t a r g e t :   $ J C A [ $ J C A . l e n g t h - 1 ] . t a r g e t  
 	 	 } ;  
 	 	 n e w   J S R V C ( r e q ) ;  
 	 }  
  
 	 t h i s . i s S t a n d a l o n e   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   ( t h i s . c o n f i g . s t a n d a l o n e   = =   ' y e s ' ) ;  
 	 }  
  
 	 t h i s . s c o r i n g E n a b l e d   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   ( ( t h i s . c o n f i g . s c o r i n g   ! =   ' n o ' )   & &   ( t h i s . s e r v e r O p t i o n s . s c o r i n g ) ) ;  
 	 }  
  
 	 i f ( t a r g e t )   {  
 	 	 t h i s . j c a I n d e x   =   $ J C A . l e n g t h ;  
 	 	 $ J C A . p u s h ( t h i s ) ;  
 	 	 t h i s . l a b e l H T M L   =   t a r g e t . g e t A t t r i b u t e ( " l a b e l " ) ;  
  
 	 	 v a r   c n   =   t a r g e t . c h i l d N o d e s ;  
 	 	 f o r ( v a r   n = 0 ; n   <   c n . l e n g t h ; n + + )    
 	 	 	 t h i s . u t m p l [ c n [ n ] . c l a s s N a m e ]   =   J S K i t L i b . g e t O u t e r H T M L ( c n [ n ] ) ;  
 	 	 i f ( c n . l e n g t h )   t a r g e t . i n n e r H T M L   =   " " ;  
 	 	 t a r g e t . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 t a r g e t . s t y l e . v i s i b i l i t y   =   " v i s i b l e " ;  
 	 	 v a r   u t s c   =   t h i s . u t m p l [ ' j s - s i n g l e C o m m e n t ' ] ;  
 	 	 i f ( u t s c )   t h i s . d t C o m m e n t   =   u t s c ;  
  
 	 	 / /   O v e r r i d e  
 	 	 v a r   j o v s   =   w i n d o w . J S K i t $ O v e r r i d e ;  
 	 	 i f ( j o v s )   {  
 	 	     f o r ( v a r   i   =   j o v s . l e n g t h - 1 ;   i > = 0 ;   i - - )   {  
 	 	 	 v a r   f N a m e   =   j o v s [ i ] [ 0 ] ;  
 	 	 	 v a r   f u n c   =   j o v s [ i ] [ 1 ] ;  
 	 	 	 t h i s [ f N a m e ]   =   f u n c ;  
 	 	     }  
 	 	 }  
 	 }   e l s e   {  
 	 	 i f ( ! d o c u m e n t . b o d y ) {  
 	 	 	 a l e r t ( " E n c l o s e   t h e   s c r i p t   i n   a   < B O D Y > < / B O D Y >   t a g ! " ) ;  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 	 v a r   e l s   =   d o c u m e n t . b o d y . g e t E l e m e n t s B y T a g N a m e ( i d N a m e ) ;  
 	 	 v a r   o W a y   =   f a l s e ;  
 	 	 i f ( e l s   & &   e l s . l e n g t h )   o W a y   =   t r u e ;  
 	 	 e l s e   e l s   =   d o c u m e n t . b o d y . g e t E l e m e n t s B y T a g N a m e ( " d i v " ) ;  
  
 	 	 v a r   m u l t i I   =   { } ;  
 	 	 v a r   m u l t i Q   =   { } ;  
 	 	 i f ( e l s   & &   e l s . l e n g t h )   {  
 	 	 	 f o r ( v a r   i = 0 ;   i   <   e l s . l e n g t h ; i + + )   {  
 	 	 	 	 i f ( o W a y   | |   e l s [ i ] . c l a s s N a m e . m a t c h ( / j s - k i t - c o m m e n t s / ) )   {  
 	 	 	 	 	 / /   C h e c k   t o   s e e   i f   t h i s   d i v   h a s   a l r e a d y   b e e n   p r o c e s s e d  
 	 	 	 	 	 i f ( e l s [ i ] . j s k $ i n i t i a l i z e d )    
 	 	 	 	 	 	 c o n t i n u e ;  
  
 	 	 	 	 	 v a r   c   =   n e w   J S C C ( e l s [ i ] ,   { ' c o n f i g ' :   { ' n o D a t a R e q u e s t ' :   t r u e } } ) ;  
 	 	 	 	 	 v a r   p   =   c . c o n f i g . p a t h ;  
 	 	 	 	 	 v a r   d   =   c . c o n f i g . d o m a i n ;  
  
 	 	 	 	 	 i f   ( ! m u l t i Q [ d ] )   {  
 	 	 	 	 	 	 m u l t i Q [ d ]   =   [ ] ;  
 	 	 	 	 	 	 m u l t i I [ d ]   =   0 ;  
 	 	 	 	 	 }  
 	 	 	 	 	 v a r   p a r a m s   =   { ' j x ' :   c . j c a I n d e x ,   ' p ' :   p ,   ' s r t ' :   c . p r e q . s r t ,  
 	 	 	 	 	 	 ' p s ' :   c . p r e q . p s ,   ' p n ' :   c . p r e q . p n ,   ' s p ' :   1 ,   ' g e n ' :   0 } ;    
 	 	 	 	 	 i f   ( c . p r e q . o r d   = =   ' d e s c ' )   p a r a m s . o r d   =   ' d e s c ' ;  
 	 	 	 	 	 i f   ( c . p r e q . t h r   ! =   ' y e s ' )   p a r a m s . p r s   =   ' f l a t ' ;  
 	 	 	 	 	 i f   ( c . c o n f i g . m o d e r a t e )   p a r a m s . m o d   =   1 ;  
 	 	 	 	 	 m u l t i Q [ d ] . p u s h ( p a r a m s ) ;  
  
 	 	 	 	 	 i f ( m u l t i I [ d ]   > =   1 )   {   / / t e m p o r a r y   c o n d i t i o n  
 	 	 	 	 	 	 t h i s . g e t D a t a ( d ,   m u l t i Q [ d ] ) ;  
 	 	 	 	 	 	 m u l t i Q [ d ]   =   [ ] ;  
 	 	 	 	 	 	 m u l t i I [ d ]   =   0 ;  
 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 m u l t i I [ d ] + + ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 J S K i t L i b . f m a p ( m u l t i Q ,   f u n c t i o n ( v ,   k ) {   i f   ( v )   s e l f . g e t D a t a ( k ,   v ) ;   } ) ;  
 	 	 	 i f ( $ J C A . l e n g t h )   r e t u r n ;  
 	 	 }  
 	 	 t h i s . j c a I n d e x   =   $ J C A . l e n g t h ;  
 	 	 $ J C A . p u s h ( t h i s ) ;  
 	 	 d o c u m e n t . w r i t e ( ' < d i v   i d = " ' + i d N a m e + ' " > < / d i v > ' ) ;  
 	 	 t a r g e t   =   t h i s . g e t ( i d N a m e ) ;  
 	 }  
 	 t a r g e t . j s k $ i n i t i a l i z e d   =   t r u e ;  
 	 t a r g e t . c l a s s N a m e   =   i d N a m e ;  
 	 t a r g e t . i d   =   " " ;  
  
 	 / /   H a n d l i n g   u s e r   c o n f i g u r a t i o n   s e t t i n g s  
 	 t h i s . c o n f i g   =   J S K i t L i b . r e a d C o n f i g ( " c o m m e n t s " ,  
 	 	 t a r g e t ,  
 	 	 t h i s . c o n f i g ,  
 	 	 ' p a t h ' ,  
 	 	 [ ' a v a t a r s ' ,   ' y e s ' ] ,  
 	 	 [ ' s t a n d a l o n e ' ,   ' n o ' ] ,  
 	 	 [ ' s c o r i n g ' ,   ' y e s ' ] ,  
 	 	 [ ' p a g i n a t e ' ,   5 0 ] ,  
 	 	 [ ' b a c k w a r d s ' ,   t h i s . c o n f i g . n o l c   & &   ! t h i s . I M   ?   ' y e s '   :   ' n o ' ] ,  
 	 	 [ ' d i s a b l e d ' ,   ' n o ' ] ,  
 	 	 ' d o m a i n ' ,  
 	 	 [ ' s o r t ' ,   [ ' d a t e ' , ' k a r m a ' , ' n a m e ' , ' s t a t u s ' , ' r a t i n g ' ] ] ,  
 	 	 [ ' t h r e a d ' ,   [ ' y e s ' , ' n o ' ] ] ,  
 	 	 ' a d m i n B g C o l o r ' ,  
 	 	 ' f l a s h C o l o r ' ,  
 	 	 ' m o d e r a t e ' ,  
 	 	 ' p e r m a l i n k ' ,  
 	 	 ' s k i n ' ,  
 	 	 ' n o a u t o e x p a n d ' ,  
 	 	 [ ' s m i l e s ' ,   ' n o ' ] ,  
 	 	 [ ' e d i t a b l e ' ,   ' n o ' ]  
 	 ) ;  
 	 t h i s . u n i q   =   t h i s . c o n f i g . p a t h ;  
 	 t h i s . p a t h O v e r r i d e   =   t h i s . c o n f i g . p a t h ;  
 	 t h i s . c o n f i g . t h r e a d   =   t h i s . c o n f i g . n o l c   & &   ! t h i s . I M   ?   ' n o '   :   t h i s . c o n f i g . t h r e a d ;  
 	 t h i s . c o n f i g . d o m a i n   =   t h i s . c o n f i g . m o d e r a t e   | |   t h i s . c o n f i g . d o m a i n ;  
 	 t h i s . c o n f i g . n o a u t o e x p a n d   =   t h i s . c o n f i g . n o a u t o e x p a n d   = =   ' y e s ' ;  
 	 i f ( t h i s . c o n f i g . p a g i n a t e   < =   0 )   t h i s . c o n f i g . p a g i n a t e   =   2 0 0 ;  
 	 i f ( t a r g e t . g e t A t t r i b u t e ( ' b a c k w a r d s ' ) )  
 	 	 t h i s . b a c k w a r d s   =   ( t h i s . c o n f i g . b a c k w a r d s   = =   ' y e s ' ) ;  
 	 e l s e   i f ( t a r g e t . g e t A t t r i b u t e ( ' p a g i n a t e ' ) )  
 	 	 t h i s . b a c k w a r d s   =   ! ! t h i s . c o n f i g . p a g i n a t e ;  
 	 e l s e  
 	 	 t h i s . b a c k w a r d s   =   ! ! t h i s . c o n f i g . n o l c   & &   ! t h i s . I M ;  
 	 t h i s . p r e q   =   {  
 	 	 s r t : t h i s . c o n f i g . s o r t ,  
 	 	 o r d : ( t h i s . b a c k w a r d s ? ' d e s c ' : ' a s c ' ) ,  
 	 	 t h r : t h i s . c o n f i g . t h r e a d ,  
 	 	 s p :   1 ,   p n :   5 ,   p s :   t h i s . c o n f i g . p a g i n a t e   } ;  
 	 i f ( ! t h i s . p r e q . p s )   t h i s . p r e q . p s   =   1 0 0 ;  
 	 t h i s . p r e q . p n   =   M a t h . r o u n d ( 5 0   /   t h i s . p r e q . p s ) ;  
 	 i f ( t h i s . p r e q . p n   <   2 )   t h i s . p r e q . p n   =   2 ;  
  
 	 s e l f . t a r g e t   =   t a r g e t ;  
  
 	 t h i s . r u n s c r   =   f u n c t i o n ( u r l ,   a r g s )   {  
 	 	 v a r   s c   =   t h i s . c r ( " s c r i p t " ) ;  
 	 	 s c . s e t A t t r i b u t e ( " c h a r s e t " ,   " u t f - 8 " ) ;  
 	 	 s c . s r c   =   u r l   +   ( a r g s ? " ? " + a r g s : " " ) ;  
 	 	 t h i s . t a r g e t . a p p e n d C h i l d ( s c ) ;  
 	 	 r e t u r n   f a l s e ;  
 	 }  
  
 	 t h i s . s e r v e r   =   f u n c t i o n ( e x t ,   d a t a ,   a j a x ,   r v c p a r a m s )   {  
 	 	 i f ( ( s e l f . s e r v e r F i l t e r   & &   ! s e l f . s e r v e r F i l t e r ( e x t ) )   | |   s e l f . c o n f i g . d i s a b l e d   = =   ' y e s ' )   r e t u r n ;  
  
 	 	 / /   e n s u r e   w i n d o w . l o c a t i o n   i s   c u r r e n t   ( r e : b l o g s p o t )  
 	 	 v a r   w l   =   w i n d o w . l o c a t i o n ;  
 	 	 v a r   p r m s   =   d a t a ;  
 	 	 J S K i t L i b . f m a p ( ( ( e x t r a | | { } ) [ ' s a r g s ' ] | | { } ) ,  
 	 	 	 f u n c t i o n ( v ,   k ) {   p r m s [ k ]   =   v ;   } ) ;  
 	 	 v a r   g e t A c t i o n   =   f u n c t i o n ( s c r )   {  
 	 	 	 r e t u r n   s c r . m a t c h ( s e l f . u r i D o m a i n )   ?   w l . p r o t o c o l   +   s c r :   w l . p r o t o c o l   +   s e l f . u r i   +   s c r ;  
 	 	 } ;  
 	 	 v a r   a c t i o n   =   g e t A c t i o n ( e x t ) ;  
 	 	 i f ( s e l f . c o n f i g . m o d e r a t e )   p r m s . m o d   =   ' 1 ' ;  
 	 	 p r m s   =   J S K i t L i b . a p p e n d E x t e r n a l P a r a m s ( " c o m m e n t s " ,   e x t ,   p r m s ) ;  
 	 	 v a r   r e q   =   {  
 	 	 	 u r i :   a c t i o n ,  
 	 	 	 r e f :   J S K i t L i b . g e t R e f ( s e l f ) ,  
 	 	 	 e p b :   J S K i t E P B . g e t A s H a s h ( { } ) ,  
 	 	 	 r e q u e s t :   p r m s ,  
 	 	 	 t a r g e t :   s e l f . t a r g e t ,  
 	 	 	 r a n d e v u :   ! ! a j a x  
 	 	 } ;  
 	 	 i f   ( r v c p a r a m s )   J S K i t L i b . f m a p ( r v c p a r a m s ,   f u n c t i o n ( v ,   k )   {   r e q [ k ]   =   v ;   } ) ;  
 	 	 n e w   J S R V C ( r e q ) ;  
 	 }  
  
 	 t h i s . g e t p a g e s   =   f u n c t i o n ( s p ,   a p )   {  
 	 	 v a r   p r e q   =   s e l f . p r e q ;  
 	 	 i f ( ! s p )   s p   =   p r e q . s p ;  
 	 	 s e l f . l o a d i n g   =   ( n e w   D a t e ( ) ) . v a l u e O f ( ) ;  
  
 	 	 v a r   p r m s   =   { " j x [ 0 ] " :   s e l f . j c a I n d e x ,  
 	 	 	 " p [ 0 ] " :   s e l f . c o n f i g . p a t h ,  
 	 	 	 " g e n [ 0 ] " :   s e l f . g e n ,  
 	 	 	 " s r t [ 0 ] " :   p r e q . s r t ,  
 	 	 	 " o r d [ 0 ] " :   p r e q . o r d ,  
 	 	 	 " s p [ 0 ] " :   s p ,  
 	 	 	 " p n [ 0 ] " :   p r e q . p n ,  
 	 	 	 " p s [ 0 ] " :   p r e q . p s } ;  
 	 	 i f ( p r e q . t h r ! = ' y e s ' )   p r m s [ ' p r s [ 0 ] ' ] = ' f l a t ' ;  
 	 	 i f ( a p )   J S K i t L i b . f m a p ( a p ,   f u n c t i o n ( v , k ) {   p r m s [ k ]   =   v   ; } ) ;  
 	 	 s e l f . s e r v e r ( " s - d a t a . j s " ,   p r m s ) ;  
 	 }  
  
 	 i f   ( ! t h i s . c o n f i g . n o D a t a R e q u e s t )   t h i s . g e t p a g e s ( ) ;  
 }  
  
 J S K i t L i b . a d d C s s ( ' '  
 +   ' . j s - W e l c o m e P a n e l   {   m a r g i n :   0 p x   0 p x   1 0 p x   0 p x ;   f o n t :   1 2 p x   A r i a l ;   t e x t - a l i g n :   l e f t ;   } '  
 +   ' . j s - W e l c o m e P a n e l B o t t o m   {   m a r g i n :   1 0 p x   0 p x   0 p x   0 p x ;   } '  
 +   ' . j s - W e l c o m e P a n e l T i t l e   {   p a d d i n g - l e f t :   7 p x ;   b o r d e r - b o t t o m :   1 p x   s o l i d   # d 1 b e a 4 ;   b a c k g r o u n d :   # e 4 d 0 b 3 ;   c o l o r :   # f f f ;   f o n t :   1 4 p x   A r i a l ;   f o n t - w e i g h t :   b o l d ;   l i n e - h e i g h t :   2 1 p x ;   } '  
 +   ' . j s - W e l c o m e P a n e l C l o s e   {   h e i g h t :   2 1 p x ;   w i d t h :   2 0 p x ;   f l o a t :   r i g h t ;   c u r s o r :   p o i n t e r ;   p o s i t i o n :   r e l a t i v e ;   t o p :   7 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = " / / j s - k i t . c o m / i m a g e s / w e l c o m e / c l o s e . p n g " ,   s i z i n g M e t h o d = " c r o p " ) '   :   ' b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / w e l c o m e / c l o s e . p n g ) ; ' )   +   '   } '  
 +   ' . j s - W e l c o m e P a n e l C o n t e n t   {   p a d d i n g :   1 8 p x   2 0 p x ;   b a c k g r o u n d - c o l o r :   # f f f a e 4 ;   c o l o r :   # 2 e 2 e 3 0 ;   l i n e - h e i g h t :   2 1 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' z o o m :   1 '   :   ' ' )   +   '   } '  
 +   ' . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a ,   . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : l i n k ,   . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : v i s i t e d ,   . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : h o v e r ,   . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : a c t i v e   {   t e x t - d e c o r a t i o n :   n o n e ;   c o l o r :   # 2 e 2 e 3 0 ;   f o n t :   1 2 p x   A r i a l ;   w h i t e - s p a c e :   n o w r a p ;   } '  
 +   ' . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : h o v e r ,   . j s - W e l c o m e P a n e l C o n t e n t B l o c k   a : a c t i v e   {   t e x t - d e c o r a t i o n :   u n d e r l i n e ;   } '  
 +   ' . j s - W e l c o m e P a n e l H e a d e r   {   f o n t :   1 6 p x   A r i a l ;   f o n t - w e i g h t :   b o l d ;   c o l o r :   # 2 e 2 e 3 0 ;   p a d d i n g :   0 p x ;   l i n e - h e i g h t :   2 0 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' z o o m :   1 '   :   ' ' )   +   '   } '  
 +   ' . j s - W e l c o m e P a n e l C o n t e n t B l o c k   {   f l o a t :   l e f t ;   p a d d i n g - b o t t o m :   5 p x ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' z o o m :   1 '   :   ' ' )   +   ' } '  
 +   ' . j s - W e l c o m e P a n e l C o n t e n t B l o c k   t a b l e   i m g   {   v e r t i c a l - a l i g n :   m i d d l e ;   } '  
 +   ' . j s - W e l c o m e P a n e l C t l s   {   f l o a t :   l e f t ;   t e x t - a l i g n :   c e n t e r ;   m a r g i n - t o p :   9 p x ;   l i n e - h e i g h t :   1 5 p x ;   } '  
 +   ' . j s - W e l c o m e P a n e l C t l s   a ,   . j s - W e l c o m e P a n e l C t l s   a : a c t i v e ,   . j s - W e l c o m e P a n e l C t l s   a : v i s i t e d ,   . j s - W e l c o m e P a n e l C t l s   a : h o v e r   {   c o l o r :   # 2 e 2 e 3 0 ;   f o n t :   1 1 p x   A r i a l ;   } '  
 +   ' . j s - W e l c o m e P a n e l A r r o w   {   h e i g h t :   1 2 p x ;   } '  
 +   J S K i t L i b . f m a p ( { I n f o :   ' i n f o r m a t i o n ' ,   R e g :   ' p e n c i l ' ,   P r o f i l e :   ' e d i t _ p r o f i l e ' ,   H e l p :   ' h e l p ' ,   C u s t o m :   ' b u l l e t _ w r e n c h ' ,   D a s h b o a r d :   ' d a s h b o a r d ' ,   T w i t t e r :   ' t w i t t e r ' ,   S u p p o r t :   ' s u p p o r t ' ,   W i d g e t s :   ' w i d g e t s ' ,   P a n e l :   ' a d m i n _ p a n e l '   } ,   f u n c t i o n ( v ,   k )   {  
 	 v a r   p a d d i n g T o p   =   ( k   = =   ' I n f o '   | |   k   = =   ' R e g '   ?   4   :   1 ) ;  
 	 v a r   p a d d i n g L e f t   =   ( k   = =   ' I n f o '   | |   k   = =   ' R e g '   ?   2 3   :   2 5 )   -   ( J S K i t L i b . i s I E ( )   ?   2   :   0 ) ;  
 	 r e t u r n   ' . j s - W e l c o m e I m g '   +   k   +   '   {   h e i g h t :   1 6 p x ;   l i n e - h e i g h t :   1 6 p x ;   p a d d i n g :   '   +   p a d d i n g T o p   +   ' p x   0 p x   0 p x   '   +   p a d d i n g L e f t   +   ' p x ;   f l o a t :   l e f t ;   '   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = " / / j s - k i t . c o m / i m a g e s / w e l c o m e / '   +   v   +   ' . p n g " ,   s i z i n g M e t h o d = " c r o p " ) ; '   :   ' b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / w e l c o m e / '   +   v   +   ' . p n g )   n o - r e p e a t   l e f t   c e n t e r ; ' )   +   '   } ' ;  
 } ) . j o i n ( ' ' )  
 ,   ' w e l c o m e ' ) ;  
  
 J S K i t L i b . a d d C s s ( " "  
 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - c o m m e n t I n p u t N a m e   {   m a r g i n - r i g h t :   1 1 0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ; "   :   " " )   +   " } "  
 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - c o m m e n t I n p u t E m a i l   {   m a r g i n - r i g h t :   1 1 0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ; "   :   " " )   +   " } "  
 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - c o m m e n t I n p u t U r l   {   m a r g i n - r i g h t :   1 1 0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ; "   :   " " )   +   " } "  
 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - A u t h A r e a W r a p   {   m a r g i n - r i g h t :   1 1 0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ; "   :   " " )   +   " } "  
 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - C C B u t t o n s   {   m a r g i n :   0 . 3 e m   0   0 . 5 e m   5 p x ;   w i d t h :   1 0 0 % ; "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ;   "   :   " " )   +   " } "  
 +   " . j s - a u t h S e l e c t o r   {   f l o a t :   l e f t ;   m a r g i n - b o t t o m :   5 p x ;   } "  
 +   " . j s - l o g o u t S p a n   {   d i s p l a y : n o n e ;   m a r g i n - l e f t :   5 p x ; "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ;   "   :   " m a r g i n - t o p :   3 p x ;   " )   +   " } " ,   " A u t h A r e a W r a p " ) ;  
  
 / /   O p t i o n a l l y   l e a v e   a l l   C S S   u p   t o   t e m p l a t e  
 i f   ( ! w i n d o w . $ J S K i t N o C o m m e n t C s s )   {  
 	 J S K i t L i b . a d d C s s ( ' '  
 	 +   " . j s - O l d C o m m e n t s   {   m a r g i n - b o t t o m :   1 p x ;   c l e a r : b o t h ; } "  
 	 +   " . j s - L e a v e C o m m e n t   {   m a r g i n :   3 p t   0 ;   } "  
 	 +   " . j s - C r e a t e C o m m e n t ,   . j s - E d i t C o m m e n t   {   t e x t - a l i g n :   l e f t ;   d i s p l a y :   n o n e ;   } "  
 	 +   " . j s - c o m m e n t I n p u t U r l   {   d i s p l a y :   n o n e ;   } "  
 	 +   " . j s - C C M o r e   {   p a d d i n g - l e f t :   3 p x   } "  
 	 +   " . j s - c o m m e n t O p t i o n s   {   f l o a t :   l e f t ;   } "  
 	 +   " . j s - c o m m e n t P u b O p t i o n s   {   f l o a t :   l e f t ;   p a d d i n g :   2 p x   5 p x ;   } "  
 	 +   " . j s - c o m m e n t Y a h o o S h a r e C h e c k b o x   {   f l o a t :   l e f t ;   m a r g i n :   "   +   ( J S K i t L i b . i s I E ( )   ?   " - 3 p x "   :   " 1 p x " )   +   "   0   0   5 p x ;   } "  
 	 +   " . j s - c o m m e n t Y a h o o S h a r e L a b e l   { m a r g i n :   1 p x   3 p x   0   3 p x ;   l i n e - h e i g h t :   1 3 p x ;   f l o a t :   l e f t ; } "  
 	 +   " . j s - c o m m e n t Y a h o o S h a r e L a b e l L o g o   { m a r g i n :   1 p x   0   0   0 ;   f l o a t :   l e f t ;   w i d t h :   4 9 p x ;   h e i g h t :   1 3 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   ' f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = " / / j s - k i t . c o m / i m a g e s / y a h o o / y o s l o g o . p n g " ,   s i z i n g M e t h o d = " c r o p " ) ; '   :   ' b a c k g r o u n d :   n o - r e p e a t   u r l ( / / j s - k i t . c o m / i m a g e s / y a h o o / y o s l o g o . p n g ) ; ' )   +   "   } "  
 	 +   " . j s - c o m m e n t F B S h a r e C h e c k b o x   {   f l o a t :   l e f t ;   m a r g i n :   "   +   ( J S K i t L i b . i s I E ( )   ?   " - 3 p x "   :   " 1 p x " )   +   "   0   0   5 p x ;   } "  
 	 +   " . j s - c o m m e n t F B S h a r e L a b e l   { m a r g i n :   1 p x   3 p x   0   3 p x ;   l i n e - h e i g h t :   1 3 p x ;   f l o a t :   l e f t ; } "  
 	 +   " . j s - c o m m e n t G F C S h a r e C h e c k b o x   {   f l o a t :   l e f t ;   m a r g i n :   "   +   ( J S K i t L i b . i s I E ( )   ?   " - 3 p x "   :   " 1 p x " )   +   "   0   0   5 p x ;   } "  
 	 +   " . j s - c o m m e n t G F C S h a r e L a b e l   { m a r g i n :   1 p x   3 p x   0   3 p x ;   l i n e - h e i g h t :   1 3 p x ;   f l o a t :   l e f t ; } "  
 	 +   " . j s - c o m m e n t T w i t t e r S h a r e C h e c k b o x   {   f l o a t :   l e f t ;   m a r g i n :   "   +   ( J S K i t L i b . i s I E ( )   ?   " - 3 p x "   :   " 1 p x " )   +   "   0   0   5 p x ;   } "  
 	 +   " . j s - c o m m e n t T w i t t e r S h a r e L a b e l   { m a r g i n :   1 p x   3 p x   0   3 p x ;   l i n e - h e i g h t :   1 3 p x ;   f l o a t :   l e f t ; } "  
 	 +   " . j s - c o m m e n t S u b m i t   {   t e x t - a l i g n :   r i g h t ;   } "  
 	 +   " . j s - C r e a t e C o m m e n t B g   {   m a r g i n :   1 e m ;   p a d d i n g :   0 . 5 e m ;   b o r d e r :   s o l i d   1 p x   # c 0 c 0 c 0 ;   t e x t - a l i g n :   l e f t ;   f l o a t :   l e f t ;   } "  
 	 +   " . j s - E d i t C o m m e n t   . j s - C r e a t e C o m m e n t B g   {   f l o a t :   n o n e ;   b o r d e r :   n o n e ;   p a d d i n g :   0 ;   } "  
 	 +   " . j s - C r e a t e C o m m e n t A r e a   {   - m o z - b o r d e r - r a d i u s :   7 p x ;   - w e b k i t - b o r d e r - r a d i u s :   7 p x ;   p a d d i n g :   5 p x   5 p x   5 p x   9 p x ;   } "  
 	 +   " . j s - C o m m e n t s A r e a   . j s - C r e a t e C o m m e n t A r e a   {   b a c k g r o u n d - c o l o r :   # c b c b c b ;   } "  
 	 +   " . j s - O l d C o m m e n t s   {   b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   } "  
 	 +   " . j s - C r e a t e C o m m e n t F i e l d s W r a p   {   m a r g i n - l e f t :   - 4 p x ;   b a c k g r o u n d - c o l o r :   # e c e c e c ;   b o r d e r :   s o l i d   1 p x   # b 0 b 0 b 0 ;   p a d d i n g :   4 p x ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   } "  
 	 +   ' . j s - C r e a t e C o m m e n t F i e l d s   { z o o m :   1 ;   c o l o r :   # 4 0 4 0 4 0 ;   b a c k g r o u n d - c o l o r :   # f 8 f 8 f 8 ;   p a d d i n g :   4 p x ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   } '  
 	 +   " . j s - P a g e N a v T o p   {   m a r g i n - b o t t o m :   3 p x ;   } "  
 	 +   " . j s - P a g e N a v B o t t o m   {   m a r g i n - t o p :   3 p x ;   c l e a r :   b o t h ;   } "  
 	 +   " . j s - P a g e N O t h e r   {   t e x t - d e c o r a t i o n :   n o n e ;   } "  
 	 +   " . j s - P a g e N C u r   {   f o n t - w e i g h t :   b o l d ;   } "  
 	 +   " . j s - P a g e A r r o w C u r   {   o p a c i t y :   0 . 3 ;   z o o m : 1 ;   f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( o p a c i t y = 3 0 ) ;   } "  
 	 +   " . j s - c o m m e n t F i e l d S u b j e c t   {   f o n t - w e i g h t :   b o l d ;   m a r g i n - b o t t o m :   5 p x ; } "  
 	 +   " . j s - c o m m e n t F i e l d L a b e l   {   m a r g i n - t o p :   5 p x ;   c l e a r : b o t h ;   m a r g i n - r i g h t :   0 . 5 e m ; } "  
 	 +   " . j s - p m F i e l d L a b e l   {   m a r g i n - t o p :   5 p x ;   c l e a r : b o t h ;   m a r g i n - r i g h t :   0 . 5 e m ;   t e x t - a l i g n :   l e f t ; } "  
 	 +   " . j s - c o m m e n t F i e l d N o t e   {   f o n t - f a m i l y :   V e r d a n a ;   f o n t - s i z e :   7 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   } "  
 	 +   " . j s - s i t e A d m i n   {   f o n t - w e i g h t :   b o l d ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t   {   z o o m :   1 ;   f o n t - s i z e :   8 p t ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   b o r d e r :   s o l i d   1 p x   # c 0 c 0 c 0 ;   t e x t - a l i g n :   l e f t ;   m a r g i n - b o t t o m :   - 1 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t B g   {   z o o m :   1 ;   p a d d i n g :   0 . 3 e m ;   p o s i t i o n :   r e l a t i v e ;   } "  
 	 +   ' . j s - s i n g l e C o m m e n t H e a d e r   {   c o l o r :   # 4 8 4 8 4 8 ;   m a r g i n :   3 p x   0 ;   } '  
 	 +   ' . j s - s i n g l e C o m m e n t B o d y   {   c l e a r :   b o t h ;   c o l o r :   # 4 0 4 0 4 0 ;   b a c k g r o u n d - c o l o r :   # f e f e f e ;   p a d d i n g :   4 p x   4 p x   4 p x   8 p x ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   } '  
 	 +   ' t a b l e . j s - s i n g l e C o m m e n t B o d y T   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   t e x t - a l i g n :   l e f t ;   f o n t - s i z e :   8 p t ;   c o l o r :   # 4 0 4 0 4 0 ;   } '  
 	 +   ' . j s - s i n g l e C o m m e n t Q u o t e   {   p o s i t i o n : r e l a t i v e ;   t o p :   4 p x ;   f o n t - f a m i l y :   " T i m e s   N e w   R o m a n " ;   f o n t - s i z e :   3 2 p x ;   l i n e - h e i g h t :   2 4 p x ;   p a d d i n g - r i g h t :   1 p x ;   d i s p l a y :   n o n e ;   } '  
 	 +   " . j s - s i n g l e C o m m e n t I N F O   {   c o l o r :   # 8 0 8 0 8 0 ;   f l o a t :   r i g h t ;   p a d d i n g :   3 p x ;   m a r g i n - l e f t :   2 e m ;   t e x t - a l i g n :   r i g h t ; } "  
 	 +   " . j s - s i n g l e C o m m e n t A v a t a r   {   f l o a t :   r i g h t ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t A v a t a r C e l l   {   t e x t - a l i g n :   r i g h t ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t T e x t   {   p a d d i n g - t o p :   "   +   ( J S K i t L i b . i s I E ( ) ? " 0 " : " 4 " )   +   " p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t N a m e   {   f o n t - w e i g h t :   b o l d ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t U r l   {   m a r g i n :   0 p x   0 p x   0 p x   2 p x ;   p a d d i n g :   0 p x ;   b o r d e r :   0 p x ;   w i d t h :   1 0 p x ;   h e i g h t :   1 0 p x ;   d i s p l a y :   n o n e ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t D a t e   {   f o n t - s i z e :   7 p t ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t O r i g i n   {   p o s i t i o n :   a b s o l u t e ;   d i s p l a y :   n o n e ;   b o t t o m :   0 . 3 e m ;   f o n t - s i z e :   7 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t K a r m a C o m M o d   {   c l e a r :   b o t h ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t K a r m a   {   f l o a t :   l e f t ;   f o n t - s i z e :   7 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   m a r g i n - r i g h t :   1 e m ;   p a d d i n g - t o p :   3 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t K a r m a S h o w   {   f l o a t :   l e f t ;   f o n t - s i z e :   7 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   m a r g i n - r i g h t :   2 e m ;   p a d d i n g - t o p :   3 p x ;   d i s p l a y :   n o n e ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t K a r m a S c o r e   {   d i s p l a y :   n o n e ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t C o m M o d   {   f l o a t :   l e f t ;   f o n t - s i z e :   7 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   d i s p l a y :   n o n e ;   p a d d i n g - t o p :   3 p x ;   m a r g i n - r i g h t :   1 e m ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t C t l s   {   f l o a t :   r i g h t ;   w h i t e - s p a c e :   n o w r a p ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u   {   f l o a t :   l e f t ;   m a r g i n :   - 4 p x   1 5 p x   0 p x   0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m :   1 ;   "   :   " " )   +   "   w h i t e - s p a c e :   n o w r a p ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u T i t l e   {   c u r s o r : p o i n t e r ;   p a d d i n g :   3 p x ;   w h i t e - s p a c e :   n o w r a p ;   c o l o r :   # 4 7 6 c b 8 ;   f o n t - s i z e :   1 1 p x ;   w i d t h :   1 0 0 % ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u T i t l e M O   {   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u T i t l e P r e s s e d   {   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u T i t l e E x p a n d M a r k e r   {   w i d t h :   1 6 p x ;   h e i g h t :   1 6 p x ;   m a r g i n :   2 p x   0 p x   0 p x   - 5 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u C o n t a i n e r   {   b o r d e r :   1 p x   s o l i d   # E 7 E 7 E 7 ;   b a c k g r o u n d - c o l o r :   # F F F F F F ;   c u r s o r : p o i n t e r ;   p o s i t i o n :   a b s o l u t e ;   m a r g i n - l e f t :   - 2 p x ;   - m o z - b o r d e r - r a d i u s :   4 p x ;   - w e b k i t - b o r d e r - r a d i u s :   4 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u C o n t a i n e r   t a b l e   {   b o r d e r :   2 p x   s o l i d   # D 6 E 2 E 9 ;   - m o z - b o r d e r - r a d i u s :   2 p x ;   - w e b k i t - b o r d e r - r a d i u s :   2 p x ; } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u R o o t C o n t a i n e r   {   m a r g i n :   0 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I t e m   { b o r d e r - t o p :   2 p x   s o l i d   # F F F F F F ;   b o r d e r - b o t t o m :   2 p x   s o l i d   # F F F F F F ;   l i n e - h e i g h t :   1 5 p x ; } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I t e m I c o n   {   w i d t h :   1 6 p x ;   h e i g h t :   1 6 p x ;   m a r g i n :   2 p x   6 p x ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I t e m T i t l e   {   m a r g i n :   5 p x   2 0 p x   4 p x   0 p x ;   c o l o r :   # 0 0 0 0 0 0 ;   f o n t - s i z e :   1 2 p x ;   f o n t - f a m i l y :   A r i a l ;   t e x t - d e c o r a t i o n :   n o n e ;   w h i t e - s p a c e :   n o w r a p ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I t e m E n d i n g   {   h e i g h t :   1 6 p x ;   m a r g i n :   2 p x ;   f o n t - s i z e :   1 4 p x ;   c o l o r :   # 0 0 0 0 0 0 ;   d i s p l a y :   i n l i n e ;   f o n t - f a m i l y :   A r i a l ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I t e m M O   {   b a c k g r o u n d - c o l o r :   # E D E D E D ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u D e l i m e t e r   {   m a r g i n :   2 p x   0 p x ;   h e i g h t :   1 p x ;   w i d t h :   1 0 0 % ;   b a c k g r o u n d - c o l o r :   # C C C C C C ;   f o n t - s i z e :   1 p x ;   w i d t h :   1 0 0 % ;   } "  
 	 +   " . j s - s i n g l e C o m m e n t M e n u I n p u t   {   l i n e - h e i g h t :   1 4 p x ;   f o n t :   1 2 p x   A r i a l ;   p a d d i n g :   0 p x ;   b o r d e r :   0 p x ;   h e i g h t :   1 4 p x ;   m a r g i n :   "   +   ( J S K i t L i b . i s I E ( )   ?   " 4 p x "   :   " 5 p x " )   +   "   0 p x ;   w i d t h :   1 2 0 p x ;   p o s i t i o n :   a b s o l u t e ;   } "  
 	 +   ' d i v . j s - s i n g l e C o m m e n t E d i t ,   d i v . j s - s i n g l e C o m m e n t R e p l y ,   d i v . j s - s i n g l e C o m m e n t D e l e t e ,   d i v . j s - s i n g l e C o m m e n t M o d e r a t e   {   b a c k g r o u n d :   r i g h t   t o p   u r l ( h t t p : / / j s - k i t . c o m / i m a g e s / b u t t o n - c l e a r . p n g )   n o - r e p e a t ;   h e i g h t :   1 6 p x ;   f o n t - s i z e :   8 p t ;   l i n e - h e i g h t :   9 p x ;   c o l o r :   # 4 0 4 0 4 0 ;   c u r s o r :   p o i n t e r ;   f l o a t :   l e f t ;   m a r g i n :   0   0 . 5 e m   0   4 p x ;   } '  
 	 +   ' d i v . j s - s i n g l e C o m m e n t E d i t   d i v ,   d i v . j s - s i n g l e C o m m e n t R e p l y   d i v ,   d i v . j s - s i n g l e C o m m e n t D e l e t e   d i v ,   d i v . j s - s i n g l e C o m m e n t M o d e r a t e   d i v   {   b a c k g r o u n d :   l e f t   t o p   u r l ( h t t p : / / j s - k i t . c o m / i m a g e s / b u t t o n - c l e a r . p n g )   n o - r e p e a t ;   h e i g h t :   1 6 p x ;   p a d d i n g :   2 p x   4 p x   0 p x   5 p x ;   p o s i t i o n :   r e l a t i v e ;   l e f t :   - 1 p x ;   f l o a t :   l e f t ;   } '  
 	 +   " . j s - s i n g l e C o m m e n t N o t i c e   {   c o l o r :   # f f 0 0 0 0 ;   f o n t - s i z e :   8 p t ;   } "  
 	 +   " . j s - c o m m e n t C o n t r o l   {   f l o a t :   l e f t ;   m a r g i n - r i g h t :   2 e m ;   } "  
 	 +   ' . j s - c o m m e n t F i e l d I n p u t   {   b o r d e r :   s o l i d   1 p x   # 7 f 9 9 b 9 ;   w i d t h : '   + ( J S K i t L i b . i s P r e I E 7 ( ) ? ' 9 8 % ' : ' 1 0 0 % ' ) + ' ; } '  
 	 +   ' . j s - c o m m e n t F i e l d I n p u t P r o f i l e   {   b o r d e r :   s o l i d   1 p x   # 7 f 9 9 b 9 ;   w i d t h : '   + ( J S K i t L i b . i s I E ( ) ? ' 9 8 % ' : ' 1 0 0 % ' ) + '   ! i m p o r t a n t ; } '  
 	 +   " . j s - C m t B u t t o n   {   m a r g i n - r i g h t :   0 . 5 e m   } "  
 	 +   " . j s - C C B u t t o n s   {   m a r g i n :   0 . 3 e m   0   0 . 5 e m   0   } "  
 	 +   " . j s - C C B u t t o n s   I N P U T   {   f o n t - s i z e :   8 p t ;   } "  
 	 +   " . j s - p o w e r e d B y   {   m a r g i n - t o p :   2 p t ;   m a r g i n - r i g h t :   2 p t ;   c o l o r :   # 8 0 8 0 8 0 ;   f o n t - s i z e :   7 p t ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   } "  
 	 +   " . j s - p o w e r e d B y   A   {   t e x t - d e c o r a t i o n :   n o n e ;   c o l o r :   # 8 0 8 0 a 0   } "  
 	 +   " . j s - a n t i s p a m B y   {   t e x t - a l i g n :   r i g h t ;   } "  
 	 +   " . j s - P r o g r e s s   {   p o s i t i o n :   a b s o l u t e ;   v i s i b i l i t y :   h i d d e n ;   r i g h t :   5 p x ;   t o p :   5 p x ;   w i d t h :   1 5 p x ;   h e i g h t :   1 5 p x ;   } "  
 	 +   " . j s - S e t t i n g s W i n d o w   {   p a d d i n g :   0 . 3 e m ;   b o r d e r :   s o l i d   1 p x   # c c c c c c ;   c o l o r :   # 4 0 4 0 4 0 ;   w h i t e - s p a c e :   n o r m a l ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   f o n t - s i z e :   s m a l l ;   z - i n d e x :   4 0 0 ;   } "  
 	 +   " . j s - S e t t i n g s W i n d o w N o l c   {   z - i n d e x :   1 4 4 0 0   } "  
 	 +   " . j s - S e t t i n g s W i n d o w H e a d e r   {   t e x t - a l i g n : c e n t e r ;   p a d d i n g :   5 p x   0 ;   m a r g i n - b o t t o m :   5 p x ;   b a c k g r o u n d - c o l o r :   # e 6 e 9 e c ;   f o n t - s i z e :   1 0 p t ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   c o l o r :   # 4 3 5 3 6 2 } "  
 	 +   " . j s - C o n t r o l B l o c k T e x t ,   . j s - C o n t r o l B l o c k T e x t D i s a b l e d   { f o n t - s i z e :   8 p t ;   t e x t - a l i g n :   l e f t ; } "  
 	 +   " . j s - C o n t r o l B l o c k B u t t o n   { f o n t - s i z e :   8 p t ; } "  
 	 +   " . j s - C o n t r o l B l o c k T e x t D i s a b l e d   { c o l o r :   # 8 0 8 0 8 0 } "  
                 +   " . j s - s h o w B o r d e r   { b o r d e r : r i d g e   2 p x   # a 0 a 0 a 0 ; } "  
 	 +   " . j s - h i d e B o r d e r   { b o r d e r : s o l i d   2 p x   # f e f e f e ; } "  
 	 +   " . j s - S e a r c h T i t l e   { m a r g i n - r i g h t :   5 p x ; } "  
 	 +   " . j s - S e a r c h W o r d s   { p a d d i n g :   0 p x ;   m a r g i n - r i g h t :   5 p x ;   b o r d e r - b o t t o m :   1 p x   d a s h e d   # 0 0 0 0 f f } "  
 	 +   " . j s - u p l o a d A v a t a r F o r m   { m a r g i n - t o p :   0 p x ; } "  
 	 +   " . j s - s i n g l e C o m m e n t C o n v e r s a t i o n H e a d   { p a d d i n g :   0 . 3 e m ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " m a r g i n - t o p :   3 6 p x   ! i m p o r t a n t ; "   :   " m a r g i n - t o p :   2 6 p x   ! i m p o r t a n t ; " )   +   " } "  
 	 +   " . j s - s i n g l e C o m m e n t C o n v e r s a t i o n C h i l d   { p a d d i n g :   0 . 3 e m ;   m a r g i n - t o p :   - 1 p x   ! i m p o r t a n t } "  
 	 +   " . j s - C o n v e r s a t i o n   { p a d d i n g :   0 . 3 e m ;   p o s i t i o n :   r e l a t i v e ;   t o p :   - 2 0 p x ;   d i s p l a y :   i n l i n e ;   } "  
 	 +   " . j s - C o n v e r s a t i o n W r a p p e r   {   h e i g h t :   0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " o v e r f l o w :   h i d d e n ; "   :   " " )   +   " } "  
 	 +   " . j s - T o r n P a g e T o p   {   m a r g i n - l e f t :   - 5 p x ;   m a r g i n - r i g h t :   - 5 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " h e i g h t :   6 p x ; "   :   " h e i g h t :   1 1 p x ;   m a r g i n - t o p :   - 5 p x ;   b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / t o r n P a p e r T . g i f )   n o - r e p e a t ; " )   +   "   } "  
 	 +   " . j s - T o r n P a g e B o t t o m   {   m a r g i n - l e f t :   - 5 p x ;   m a r g i n - r i g h t :   - 5 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " h e i g h t :   6 p x ; "   :   " h e i g h t :   1 1 p x ;   m a r g i n - b o t t o m :   - 5 p x ;   b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / t o r n P a p e r B . g i f )   n o - r e p e a t ; " )   +   "   } "  
 	 +   " . j s - T o r n P a g e T o p I m g   {   "   +   ( J S K i t L i b . i s I E ( )   ?   ( J S K i t L i b . i s P r e I E 7 ( )   ?   " p o s i t i o n :   a b s o l u t e ; "   :   " f l o a t :   l e f t ; " )   :   " " )   +   "   m a r g i n - t o p :   - 5 p x ;   h e i g h t :   1 1 p x ;   w i d t h :   1 0 0 % ;   } "  
 	 +   " . j s - T o r n P a g e B o t t o m I m g   {   "   +   ( J S K i t L i b . i s I E ( )   ?   ( J S K i t L i b . i s P r e I E 7 ( )   ?   " p o s i t i o n :   a b s o l u t e ; "   :   " f l o a t :   l e f t ; " )   :   " " )   +   "   m a r g i n - b o t t o m :   - 5 p x ;   h e i g h t :   1 1 p x ;   w i d t h :   1 0 0 % ;   } "  
 	 +   " . j s - T o r n P a g e D i v i d e r   {   m a r g i n - l e f t :   - 5 p x ;   m a r g i n - r i g h t :   - 5 p x ; "   +   ( J S K i t L i b . i s P r e I E 7 ( ) ? " " : " m a r g i n - b o t t o m :   - 1 p x ; " )   +   "   h e i g h t :   2 2 p x ;   b a c k g r o u n d - c o l o r :   # C B C B C B ;   } "  
 	 +   " . j s - T o r n P a g e D i v i d e r T o p   {   h e i g h t :   1 0 p x ;   b a c k g r o u n d - c o l o r :   # E C E C E C ;   b o r d e r :   s o l i d   1 p x   # b 0 b 0 b 0 ;   b o r d e r - t o p - w i d t h :   0 ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   m a r g i n - b o t t o m :   6 p x ;   } "  
 	 +   " . j s - T o r n P a g e D i v i d e r B o t t o m   {   h e i g h t :   1 0 p x ;   b a c k g r o u n d - c o l o r :   # E C E C E C ;   b o r d e r :   s o l i d   1 p x   # b 0 b 0 b 0 ;   b o r d e r - b o t t o m - w i d t h :   0 ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   } "  
 	 +   " . j s - c o m m e n t B o d y L a b e l   {   c l e a r :   b o t h ;   } "  
                 +   " . j s - C r e a t e C o m m e n t F i e l d s B a s e I n f o   {   f l o a t :   r i g h t ;   m a r g i n - b o t t o m   :   5 p x ;   w i d t h :   1 0 0 % ;   } "  
 	 +   " . j s - c o m m e n t C m t T e x t a r e a   {   c l e a r :   b o t h ;   } "  
 	 +   " . j s - c o m m e n t A v a t a r   {   p o s i t i o n :   r e l a t i v e ;   f l o a t :   r i g h t ;   m a r g i n - l e f t   :   - 1 0 2 p x ;   b o r d e r :   1 p x   s o l i d   # c 0 c 0 c 0 ;   w i d t h :   1 0 0 p x ;   h e i g h t : 1 0 0 p x ;   } "  
 	 +   " . j s - c o m m e n t A v a t a r A r e a   {   c l e a r :   b o t h ;   m a r g i n   :   5 p x   0 p x   1 0 p x   0 p x ;   } "  
 	 +   " . j s - C m t S p a m   {   b a c k g r o u n d :   u r l ( / / j s - k i t . c o m / i m a g e s / b i o - h a z a r d . g i f )   b o t t o m   r i g h t   r e p e a t - x ;   b a c k g r o u n d - c o l o r :   # f f f f e 0   ! i m p o r t a n t ;   c o l o r :   # 4 0 4 0 4 0 ;   } "  
 	 +   ( J S K i t L i b . i s I E ( )   ?   " . j s - C r e a t e C o m m e n t   {   z o o m :   1 ;   } "   :   " " )  
                 +   " . j s - i m a g e W r a p   {   w i d t h :   1 0 2 p x ;   h e i g h t :   1 0 2 p x ;   m a r g i n - b o t t o m :   3 p x ; } "  
                 +   " . j s - p r e v i e w I m a g e D e s c r   {   w i d t h :   1 0 2 p x ;   l e f t :   0 p x ;   b o t t o m :   0 p x ;   } "  
                 +   " . j s - p r e v i e w I m a g e   { p o s i t i o n :   r e l a t i v e ;   t e x t - a l i g n :   c e n t e r ;   m a r g i n :   4 p x ;   f l o a t :   l e f t ;   w i d t h :   1 0 2 p x ;   } "  
  
 	 +   " . j s - a l l - p r e v i e w I m a g e s   { p o s i t i o n :   r e l a t i v e ;   m a r g i n - t o p :   1 5 p x ;   b o r d e r - t o p :   1 p x   s o l i d   # e c e c e c ;   b o r d e r - b o t t o m :   1 p x   s o l i d   # e c e c e c ; } "  
 	 +   " . j s - u p l o a d I m a g e B u t t o n   {   f l o a t :   l e f t ;   c o l o r :   b l u e ;   c u r s o r :   p o i n t e r ;   } "  
 	 +   " . j s - p r e v i e w I m a g e T i t l e   {   b a c k g r o u n d - c o l o r :   # e c e c e c ;   f o n t - s i z e :   7 p t ;   f l o a t :   l e f t ; } "  
 	 +   " . j s - u p l o a d I m a g e I n p u t W r a p p e r 2   {   m a r g i n :   0 ;   p a d d i n g :   0 ;   p o s i t i o n :   a b s o l u t e ;   t o p :   0 p x ;   l e f t :   0 p x ; } "  
 	 +   " . j s - u p l o a d I m a g e I n p u t W r a p p e r 1   { p o s i t i o n :   r e l a t i v e ; } "  
 	 +   " . j s - u p l o a d G r e y D e s c r   {   c o l o r :   # c 0 c 0 c 0 ;   } "  
 	 +   " . j s - u p l o a d I m a g e I c o n   {   h e i g h t :   1 6 p x ;   v e r t i c a l - a l i g n :   " + ( J S K i t L i b . i s S a f a r i ( ) ? " s u b " : " m i d d l e " ) + " ;   m a r g i n - r i g h t :   5 p x ;   } "  
 	 ,   ' c m t ' ) ;  
 	 i f ( J S K i t L i b . i s O p e r a ( ) )   J S K i t L i b . a d d C s s ( " w b r : a f t e r { c o n t e n t : \ " \ \ 0 0 2 0 0 B \ " } " ,   ' w b r ' ) ;  
 	 e l s e   J S K i t L i b . a d d C s s ( " . j s - s i n g l e C o m m e n t T E X T { w o r d - w r a p : b r e a k - w o r d } " ,   ' w b r ' ) ;  
  
 	 J S K i t L i b . a d d C s s ( " "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - O l d C o m m e n t s W r a p   { z o o m : 1 ;   m a r g i n - b o t t o m :   1 p x ;   c l e a r :   b o t h ;   b a c k g r o u n d - c o l o r :   # c b c b c b ;   - m o z - b o r d e r - r a d i u s :   7 p x ;   - w e b k i t - b o r d e r - r a d i u s :   7 p x ;   p a d d i n g :   5 p x ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - O l d C o m m e n t s   {   b a c k g r o u n d - c o l o r :   # e c e c e c ;   b o r d e r :   s o l i d   1 p x   # b 0 b 0 b 0 ;   p a d d i n g :   4 p x ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - s i n g l e C o m m e n t   {   b o r d e r - s t y l e :   n o n e ;   m a r g i n :   0 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m : 1 ; "   :   " " )   +   " ;   b a c k g r o u n d :   t r a n s p a r e n t ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - P a g e N O t h e r   {   f o n t - w e i g h t :   b o l d ;   c o l o r :   # 0 0 6 6 c c ;   t e x t - d e c o r a t i o n :   n o n e ;   }   "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - P a g e N C u r   {   c o l o r :   # f e 9 6 0 0 ;   }   "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - O l d C o m m e n t s   . j s - C r e a t e C o m m e n t A r e a   {   b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - O l d C o m m e n t s   . j s - s i n g l e C o m m e n t N a m e   {   c o l o r :   # 0 0 6 6 c c ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - s i n g l e C o m m e n t B o d y   {   c l e a r :   b o t h ;   c o l o r :   # 4 0 4 0 4 0 ;   b a c k g r o u n d - c o l o r :   # f e f e f e ;   p a d d i n g :   4 p x   4 p x   4 p x   8 p x ;   - m o z - b o r d e r - r a d i u s - t o p l e f t :   6 p x ;   - w e b k i t - b o r d e r - t o p - l e f t - r a d i u s :   6 p x ;   - m o z - b o r d e r - r a d i u s - b o t t o m l e f t :   6 p x ;   - w e b k i t - b o r d e r - b o t t o m - l e f t - r a d i u s :   6 p x ;   "   +   ( J S K i t L i b . i s I E ( )   ?   " z o o m : 1 ; "   :   " " )   +   " } "  
 	 +   " . j s - C o m m e n t s S k i n - s m o o t h g r a y   . j s - s i n g l e C o m m e n t C t l s   {   f l o a t :   r i g h t ;   } "  
 	 ,   " c o m m e n t s - s k i n - s m o o t h g r a y " ) ;  
 	 J S K i t L i b . a d d C s s ( " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - s i n g l e C o m m e n t   {   f o n t - s i z e :   1 1 p x ;   f o n t - f a m i l y :   V e r d a n a ,   H e l v e t i c a ;   b o r d e r :   n o n e ;   z o o m :   0 ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - s i n g l e C o m m e n t C t l s   {   f l o a t :   r i g h t ;   w h i t e - s p a c e :   n o w r a p ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - s i n g l e C o m m e n t A v a t a r   {   p a d d i n g - b o t t o m :   1 e m   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - L e a v e C o m m e n t   {   t e x t - a l i g n :   c e n t e r ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - c o m m e n t C o n t r o l ,   . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - c o m m e n t T o o l ,   . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - p o w e r e d B y ,   . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - p o w e r e d B y   d i v   {   d i s p l a y :   i n l i n e ;   f l o a t :   n o n e ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - a n t i s p a m B y   {   d i s p l a y :   b l o c k ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - C r e a t e C o m m e n t B g   {   w i d t h :   3 0 e m ;   m a r g i n - t o p :   1 e m ;   m a r g i n - l e f t :   a u t o ;   m a r g i n - r i g h t :   a u t o ;   p a d d i n g :   0 . 5 e m ;   t e x t - a l i g n :   l e f t ;   f l o a t :   n o n e ;   b o r d e r :   n o n e ;   } "  
 	 +   " . j s - C o m m e n t s S k i n - h a l o s c a n   . j s - s i n g l e C o m m e n t B g   {   p a d d i n g :   0 e m   } "  
 	 ,   " c o m m e n t s - s k i n - h a l o s c a n " ) ;  
 }  
  
 J S C C . p r o t o t y p e . s e t D e f a u l t F i e l d   =   f u n c t i o n ( n a m e , v a l u e )   {  
 	 v a r   e p b v a l   =   J S K i t E P B . g e t V a l u e ( n a m e ) ;  
 	 t h i s . f i e l d D f l [ n a m e ] =   e p b v a l   = =   u n d e f i n e d   ?   v a l u e   :   e p b v a l ;  
 }  
  
 J S C C . p r o t o t y p e . a d d C h i l d   =   f u n c t i o n ( t o ,   w h a t )   {  
 	 i f   ( t y p e o f ( t o )   ! =   ' o b j e c t ' )  
 	 	 r e t u r n ;  
  
 	 i f ( a r g u m e n t s . l e n g t h   = =   3   & &   a r g u m e n t s [ 2 ] )  
 	 	 t o . i n s e r t B e f o r e ( w h a t ,   t o . f i r s t C h i l d ) ;  
 	 e l s e  
 	 	 t o . a p p e n d C h i l d ( w h a t ) ;  
 }  
  
 J S C C . p r o t o t y p e . a   =   f u n c t i o n ( )   {  
 	 v a r   a   =   t h i s . c r ( " a " ) ;  
 	 a . h r e f   =   " j a v a s c r i p t : v o i d ( 0 ) ; " ;  
 	 f o r ( v a r   t e x t   =   ' ' ,   i   =   0 ;   i   <   a r g u m e n t s . l e n g t h ;   i + + )  
 	 	 t e x t   + =   a r g u m e n t s [ i ] ;  
 	 a . i n n e r H T M L   + =   t e x t ;  
 	 r e t u r n   a ;  
 }  
  
 J S C C . p r o t o t y p e . t e x t   =   f u n c t i o n ( d i v ,   t e x t )   {  
 	 i f ( d i v . t a g N a m e   = =   " I N P U T " )   {  
 	 	 d i v . v a l u e   =   t e x t ;  
 	 }   e l s e   {  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( d i v ) ;  
 	 	 d i v . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( t e x t ) ) ;  
 	 }  
 	 r e t u r n   d i v ;  
 }  
  
 J S C C . p r o t o t y p e . d i v   =   f u n c t i o n ( i d )   {  
 	 v a r   d i v   =   t h i s . c r ( " d i v " ) ;  
 	 f o r ( v a r   i   =   1 ;   i   <   a r g u m e n t s . l e n g t h ;   i + + )   {  
 	 	 v a r   a r g   =   a r g u m e n t s [ i ] ;  
 	 	 s w i t c h ( t y p e o f ( a r g ) )   {  
 	 	 c a s e   " s t r i n g " :  
 	 	 	 t h i s . a d d C h i l d ( d i v ,   d o c u m e n t . c r e a t e T e x t N o d e ( a r g ) ) ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   " u n d e f i n e d " :  
 	 	 	 b r e a k ;  
 	 	 d e f a u l t :  
 	 	 c a s e   " o b j e c t " :  
 	 	 	 i f ( ! a r g )   b r e a k ;  
 	 	 	 t h i s . a d d C h i l d ( d i v ,   a r g ) ;  
 	 	 	 b r e a k ;  
 	 	 }  
 	 }  
 	 i f ( i d )   {  
 	 	 d i v . c l a s s N a m e   =   i d ;  
 	 	 v a r   i d T e x t   =   S t r i n g ( i d ) ;  
 	 	 i f ( i d T e x t . c h a r C o d e A t ( 3 )   <   9 1 )  
 	 	 	 t h i s . T C [ i d T e x t ]   =   d i v ;  
 	 }  
 	 r e t u r n   d i v ;  
 }  
  
 J S C C . p r o t o t y p e . d t C o m m e n t  
   =   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t B g " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t A v a t a r " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t I N F O " > '  
       +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t N a m e " > { N a m e } < / s p a n > '  
       +   ' < i m g   c l a s s = " j s - s i n g l e C o m m e n t U r l "   s r c = " / / j s - k i t . c o m / i m a g e s / i c o n 1 0 - e x t e r n a l - u r l . p n g "   / > '  
       +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t D a t e " > { D a t e } < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t R a t i n g "   s t y l e = " d i s p l a y : n o n e ; " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t T e x t " > { T e x t } < / d i v > '  
   +   ' < d i v   s t y l e = " c l e a r :   b o t h " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t N o t i c e " > { N o t i c e } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t P r e v i e w I m a g e " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t K a r m a C o m M o d " > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t M e n u " > < / d i v > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t K a r m a " > { L a b e l : L i k e   t h i s   c o m m e n t ? } '  
                   +   '   [ < a   c l a s s = " j s - s i n g l e C o m m e n t K a r m a Y " > { L a b e l : y e s } < / a > ] '  
                   +   '   [ < a   c l a s s = " j s - s i n g l e C o m m e n t K a r m a N " > { L a b e l : n o } < / a > ] '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a S c o r e " > ( { L a b e l : S c o r e } : '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V a l u e " > 0 < / s p a n >   { L a b e l : b y V o t e s } '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V o t e r s " > 0 < / s p a n > ) '  
           +   ' < / s p a n > '  
           +   ' < / d i v > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t K a r m a S h o w " > { L a b e l : C o m m u n i t y   a s s i g n e d   k a r m a   s c o r e } : '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V a l u e S h o w " > 0 < / s p a n >   { L a b e l : b y V o t e s } '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V o t e r s S h o w " > 0 < / s p a n > '  
           +   ' < / d i v > '  
       +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t C t l s " > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t R e p l y a b l e " > [ < a   c l a s s = " j s - s i n g l e C o m m e n t R e p l y " > { L a b e l : r e p l y } < / a > ] < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t D e l e t a b l e " >   [ < a   c l a s s = " j s - s i n g l e C o m m e n t D e l e t e " > { L a b e l : d e l e t e } < / a > ] < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t E d i t a b l e " >   [ < a   c l a s s = " j s - s i n g l e C o m m e n t E d i t " > { L a b e l : e d i t } < / a > ] < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t M o d e r a t a b l e " >   [ < a   c l a s s = " j s - s i n g l e C o m m e n t M o d e r a t e " > { L a b e l : m o d e r a t e } < / a > ] < / s p a n > '  
       +   ' < / d i v > '  
   +   ' < / d i v > '  
   +   ' < b r   c l e a r = " a l l "   / > '  
   +   ' < / d i v > '  
   +   ' < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C o m m e n t 2  
   =   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t B g " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t H e a d e r " > '  
   +   ' < d i v   s t y l e = " f l o a t :   l e f t ; " > '  
       +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t N a m e " > { N a m e } < / s p a n > '  
       +   ' < i m g   c l a s s = " j s - s i n g l e C o m m e n t U r l "   s r c = " / / j s - k i t . c o m / i m a g e s / i c o n 1 0 - e x t e r n a l - u r l . p n g "   / > '  
       +   '   { L a b e l : : d e p t h ? r e p l i e s : s a y s } : '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t D a t e "   s t y l e = " f l o a t :   r i g h t ; " > { A g e } < / d i v > '  
   +   ' < d i v   s t y l e = " c l e a r :   b o t h " > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t B o d y " > '  
   +   ' < t a b l e   b o r d e r = " 0 "   w i d t h = " 1 0 0 % "   c e l l s p a c i n g = " 0 "   c e l l p a d d i n g = " 0 "   c l a s s = " j s - s i n g l e C o m m e n t B o d y T " > '  
   +   ' < t r   s t y l e = " v e r t i c a l - a l i g n :   t o p " > < t d   c o l s p a n = " 2 "   s t y l e = " p a d d i n g - b o t t o m :   8 p x ; " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t R a t i n g "   s t y l e = " d i s p l a y : n o n e ; " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t T e x t " > < s p a n   c l a s s = " j s - s i n g l e C o m m e n t Q u o t e " > & # x 2 0 1 C ; < / s p a n > { T e x t } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t N o t i c e " > { N o t i c e } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t P r e v i e w I m a g e " > < / d i v > '  
   +   ' < / t d > < t d   c l a s s = " j s - s i n g l e C o m m e n t A v a t a r C e l l "   w i d t h = " { S O : m a x A v a t a r W i d t h + 4 } "   r o w s p a n = " 2 " > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t A v a t a r " > < / d i v > '  
   +   ' < / t d > < / t r > < t r > < t d   s t y l e = " v e r t i c a l - a l i g n :   b o t t o m " > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t M e n u " > < / d i v > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t K a r m a " > < s p a n > { L a b e l : L i k e   t h i s   c o m m e n t ? } < / s p a n > '  
                   +   '   [ < a   c l a s s = " j s - s i n g l e C o m m e n t K a r m a Y " > { L a b e l : y e s } < / a > ] '  
                   +   '   [ < a   c l a s s = " j s - s i n g l e C o m m e n t K a r m a N " > { L a b e l : n o } < / a > ] '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a S c o r e " > ( { L a b e l : S c o r e } : '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V a l u e " > 0 < / s p a n >   { L a b e l : b y V o t e s } '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V o t e r s " > 0 < / s p a n > ) '  
           +   ' < / s p a n > '  
           +   ' < / d i v > '  
           +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t K a r m a S h o w " > { L a b e l : C o m m u n i t y   a s s i g n e d   k a r m a   s c o r e } : '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V a l u e S h o w " > 0 < / s p a n >   { L a b e l : b y V o t e s } '  
           +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t K a r m a V o t e r s S h o w " > 0 < / s p a n > '  
           +   ' < / d i v > '  
   +   ' < / t d > < t d   s t y l e = " v e r t i c a l - a l i g n :   b o t t o m ; " > '  
       +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t C t l s " > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t R e p l y a b l e " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t R e p l y " > < d i v > { L a b e l : r e p l y } < / d i v > < / d i v > < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t D e l e t a b l e " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t D e l e t e " > < d i v > { L a b e l : d e l e t e } < / d i v > < / d i v > < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t E d i t a b l e " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t E d i t " > < d i v > { L a b e l : e d i t } < / d i v > < / d i v > < / s p a n > '  
           +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t M o d e r a t a b l e " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t M o d e r a t e " > < d i v > { L a b e l : m o d e r a t e } < / d i v > < / d i v > < / s p a n > '  
       +   ' < / d i v > '  
   +   ' < / t d > < / t r > < / t a b l e > '  
   +   ' < / d i v > ' 	 / /   B o d y  
   +   ' < / d i v > '  
   +   ' < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C o m m e n t 3  
   =   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t B g " > '  
   +   ' < d i v   c l a s s = " M e s s a g e C e l l " > '  
   +   ' < a   n a m e = " { I D } " > < / a > '  
   +   ' < d i v   c l a s s = " f o r m e r _ p " > < d i v   c l a s s = " j s - s i n g l e C o m m e n t A v a t a r " > < / d i v > '  
   +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t T e x t " > { T e x t } < / s p a n > < b r   / > '  
   +   ' < d i v   c l a s s = " j s - s i n g l e C o m m e n t P r e v i e w I m a g e " > < / d i v > '  
   +   ' < s p a n   c l a s s = " b y l i n e " > < s p a n   c l a s s = " j s - s i n g l e C o m m e n t N a m e " > { N a m e } < / s p a n > '  
   +   ' < i m g   c l a s s = " j s - s i n g l e C o m m e n t U r l "   s r c = " / / j s - k i t . c o m / i m a g e s / i c o n 1 0 - e x t e r n a l - u r l . p n g "   / >   '  
   +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t E d i t a b l e " > '  
   +   ' < a   h r e f = " "   c l a s s = " j s - s i n g l e C o m m e n t E d i t "   t i t l e = " E d i t   c o m m e n t " > '  
   +   ' < i m g   s r c = " / / j s - k i t . c o m / i m a g e s / h a l o - b u t t o n - e d i t . p n g "   t i t l e = " E d i t   c o m m e n t "   a l t = " E d i t   c o m m e n t "   b o r d e r = " 0 " > '  
   +   ' < / a > '  
   +   ' < / s p a n > '  
   +   ' < s p a n   c l a s s = " j s - s i n g l e C o m m e n t M o d e r a t a b l e " > '  
   +   ' < a   h r e f = " "   c l a s s = " j s - s i n g l e C o m m e n t D e l e t e "   t i t l e = " D e l e t e   c o m m e n t " > '  
   +   ' < i m g   s r c = " / / j s - k i t . c o m / i m a g e s / h a l o - b u t t o n - d e l e t e . p n g "   t i t l e = " D e l e t e   c o m m e n t "   a l t = " D e l e t e   c o m m e n t "   b o r d e r = " 0 " > '  
   +   ' < / a > '  
   +   ' < / s p a n > '  
   +   '   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t D a t e " > { D a t e } < / s p a n >   -   < s p a n   c l a s s = " j s - s i n g l e C o m m e n t D a t e " > { T i m e } < / s p a n >   |   < a   h r e f = " # { I D } "   t i t l e = " L i n k   t o   t h i s   c o m m e n t " > # < / a > '  
   +   ' < / s p a n > < / d i v > '  
   +   ' < / d i v > < / d i v > < d i v   s t y l e = " c l e a r :   b o t h ; " > < h r   / > < / d i v > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C r e a t e  
   =   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t B g " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d S u b j e c t " > { L a b e l : l e a v e C o m m e n t } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - A u t h A r e a W r a p " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : n i c k n a m e L a b e l } < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t N a m e "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t U r l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : u r l } < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t U r l "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t E m a i l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : e m a i l L a b e l } '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d N o t e " > { L a b e l : e m a i l N o t e } < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t E m a i l "   t y p e = " e m a i l "   S I Z E = 3 2   / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l   j s - c o m m e n t R a t i n g D i s p l a y " > { L a b e l : r a t i n g L a b e l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d R a t i n g   j s - c o m m e n t R a t i n g D i s p l a y " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : c o m m e n t L a b e l } < / d i v > '  
   +   ' < d i v > < t e x t a r e a   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t T e x t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t A v a t a r A r e a " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I m a g e A r e a " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e I n p u t " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > '  
       +   ' < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s u b m i t } " > '  
       +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
       +   ' < s p a n   c l a s s = " j s - C C M o r e " > [ < a   c l a s s = " j s - c o m m e n t M o r e " > { L a b e l : m o r e } < / a > ] < / s p a n > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( < a   h r e f = " h t t p : / / j s - k i t . c o m / c o m m e n t s ? w o w "   t a r g e t = " j s - k i t " > P o w e r e d   b y   J S - k i t < / a > ) < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( S p a m   f i l t e r i n g   b y   < a   h r e f = " h t t p : / / a k i s m e t . c o m / "   t a r g e t = " a k i s m e t " > A k i s m e t < / a > ) < / d i v > '  
   +   ' < / d i v > < b r   c l e a r = " a l l "   / > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C r e a t e 2  
   =   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t A r e a " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d S u b j e c t "   s t y l e = " m a r g i n :   0 " > { L a b e l : l e a v e C o m m e n t } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s W r a p " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t A v a t a r " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s B a s e I n f o " > '  
   +   ' < d i v   c l a s s = " j s - A u t h A r e a W r a p " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t N a m e " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : n i c k n a m e L a b e l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - a u t h C o n t a i n e r " > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t N a m e "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t U r l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : u r l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - a u t h C o n t a i n e r " > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t U r l "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t E m a i l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : e m a i l L a b e l } '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d N o t e " > { L a b e l : e m a i l N o t e } < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - a u t h C o n t a i n e r " > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t E m a i l "   t y p e = " e m a i l "   S I Z E = 3 2   / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t A v a t a r A r e a " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l   j s - c o m m e n t R a t i n g D i s p l a y " > { L a b e l : r a t i n g L a b e l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d R a t i n g   j s - c o m m e n t R a t i n g D i s p l a y " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l   j s - c o m m e n t B o d y L a b e l " > { L a b e l : c o m m e n t L a b e l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t C m t T e x t a r e a " > < t e x t a r e a   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t T e x t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I m a g e A r e a " > < / d i v > '  
   +   ' < / d i v > '   / /   F i e l d s  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > '  
       +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e B u t t o n " > '  
         +   ' < i m g   c l a s s = " j s - u p l o a d I m a g e I c o n "   s r c = " / / j s - k i t . c o m / i m a g e s / p i c t u r e _ a d d . p n g " > < / i m g > { L a b e l : a d d P i c T e x t } '  
       +   ' < / d i v > '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t P u b O p t i o n s " > < / d i v > '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t O p t i o n s " > < i n p u t   t y p e = " b u t t o n "   c l a s s = " j s - c o m m e n t M o r e "   v a l u e = " { L a b e l : o p t i o n s D } "   l e s s = " { L a b e l : o p t i o n s U } "   m o r e = " { L a b e l : o p t i o n s D } " > < / i n p u t > < / d i v > '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t S u b m i t " > '  
       +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
       +   ' < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s u b m i t } " > '  
   +   ' < / d i v > '  
   +   ' < d i v   s t y l e = " c l e a r :   b o t h " > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e I n p u t W r a p p e r 1 " > '  
       +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e I n p u t W r a p p e r 2 " > '  
           +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e I n p u t " > < / d i v > '  
       +   ' < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( < a   h r e f = " h t t p : / / j s - k i t . c o m / c o m m e n t s ? w o w "   t a r g e t = " j s - k i t " > P o w e r e d   b y   J S - k i t < / a > ) < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( S p a m   f i l t e r i n g   b y   < a   h r e f = " h t t p : / / a k i s m e t . c o m / "   t a r g e t = " a k i s m e t " > A k i s m e t < / a > ) < / d i v > '  
   +   ' < / d i v > '  
   +   ' < / d i v > < b r   c l e a r = " a l l "   / > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C r e a t e 3  
   =   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t B g " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d S u b j e c t " > { L a b e l : l e a v e C o m m e n t } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - A u t h A r e a W r a p " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : n i c k n a m e L a b e l } < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t N a m e "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t E m a i l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : e m a i l L a b e l } '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d N o t e " > { L a b e l : e m a i l N o t e } < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t E m a i l "   t y p e = " e m a i l "   S I Z E = 3 2   / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I n p u t U r l " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : u r l } < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t U r l "   S I Z E = 3 2   / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l   j s - c o m m e n t R a t i n g D i s p l a y " > { L a b e l : r a t i n g L a b e l } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d R a t i n g   j s - c o m m e n t R a t i n g D i s p l a y " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : c o m m e n t L a b e l } < / d i v > '  
   +   ' < d i v > < t e x t a r e a   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t T e x t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t A v a t a r A r e a " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t I m a g e A r e a " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - u p l o a d I m a g e I n p u t " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s u b m i t } " > '  
   +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
   +   ' < s p a n   c l a s s = " j s - C C M o r e " > [ < a   c l a s s = " j s - c o m m e n t M o r e " > { L a b e l : m o r e } < / a > ] < / s p a n > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( < a   h r e f = " h t t p : / / j s - k i t . c o m / c o m m e n t s ? w o w "   t a r g e t = " j s - k i t " > P o w e r e d   b y   J S - k i t < / a > ) < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p o w e r e d B y   j s - a n t i s p a m B y " > ( S p a m   f i l t e r i n g   b y   < a   h r e f = " h t t p : / / a k i s m e t . c o m / "   t a r g e t = " a k i s m e t " > A k i s m e t < / a > ) < / d i v > '  
   +   ' < / d i v > < b r   c l e a r = " a l l "   / > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t P r o f i l e C r e a t e  
   =   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t A r e a " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d S u b j e c t "   s t y l e = " m a r g i n :   0 " > { L a b e l : l e a v e C o m m e n t } < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s W r a p " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s " > '  
   +   ' < d i v   c l a s s = " j s - A u t h A r e a W r a p " > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p m F i e l d L a b e l " > { L a b e l : n i c k n a m e L a b e l } < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t P r o f i l e "   n a m e = " j s - C m t N a m e "   s i z e = " 3 2 "   m a x l e n g t h = " 1 0 0 " / > < / d i v > '  
   +   ' < d i v > '  
   +   ' < d i v   c l a s s = " j s - p m F i e l d L a b e l " > { L a b e l : e m a i l L a b e l } '  
       +   ' < d i v   c l a s s = " j s - c o m m e n t F i e l d N o t e " > { L a b e l : e m a i l N o t e } < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v > < i n p u t   c l a s s = " j s - c o m m e n t F i e l d I n p u t P r o f i l e "   n a m e = " j s - C m t E m a i l "   t y p e = " e m a i l "   S I Z E = 3 2   / > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < d i v   c l a s s = " j s - p m F i e l d L a b e l " > { L a b e l : c o m m e n t L a b e l } < / d i v > '  
   +   ' < d i v > < t e x t a r e a   c l a s s = " j s - c o m m e n t F i e l d I n p u t P r o f i l e "   n a m e = " j s - C m t T e x t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < / d i v > '   / /   F i e l d s  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t S u b m i t " > '  
   +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
   +   ' < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s u b m i t P M } " > '  
   +   ' < / d i v > '  
   +   ' < d i v   s t y l e = " c l e a r :   b o t h " > < / d i v > '  
   +   ' < / d i v > '  
   +   ' < / d i v > '  
   +   ' < / d i v > < b r   c l e a r = " a l l "   / > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t E d i t C o m m e n t  
   =   ' < d i v   c l a s s = " j s - E d i t C o m m e n t "   s t y l e = " d i s p l a y :   n o n e " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t B g " > '  
   +   ' < d i v > < t e x t a r e a   n a m e = " j s - C m t T e x t E d i t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t E d i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s a v e } " > '  
   +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l E d i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
   +   ' < / d i v > < / d i v > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t E d i t C o m m e n t 2  
   =   ' < d i v   c l a s s = " j s - E d i t C o m m e n t "   s t y l e = " d i s p l a y :   n o n e " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t A r e a " > '  
   +   ' < d i v   c l a s s = " j s - C r e a t e C o m m e n t F i e l d s W r a p " > '  
   +   ' < d i v > < t e x t a r e a   c l a s s = " j s - c o m m e n t F i e l d I n p u t "   n a m e = " j s - C m t T e x t E d i t "   R O W S = 4   C O L S = 3 2 > < / t e x t a r e a > < / d i v > '  
   +   ' < d i v   c l a s s = " j s - C C B u t t o n s " > '  
   +   ' < d i v   c l a s s = " j s - c o m m e n t S u b m i t " > '  
   +   ' < i n p u t   t y p e = " r e s e t "   n a m e = " j s - C m t c a n c e l E d i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : c a n c e l } " > '  
   +   ' < i n p u t   t y p e = " s u b m i t "   n a m e = " j s - C m t s u b m i t E d i t "   c l a s s = " j s - C m t B u t t o n "   V A L U E = " { L a b e l : s a v e } " > '  
   +   ' < / d i v > '  
   +   ' < d i v   s t y l e = " c l e a r :   b o t h " > < / d i v > '  
   +   ' < / d i v > < / d i v > < / d i v > < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . d t C o n v e r s a t i o n  
   =   ' < d i v   c l a s s = " j s - C o n v e r s a t i o n W r a p p e r " > '  
   +   ' < d i v   c l a s s = " j s - C o n v e r s a t i o n " > '  
   +   ' { L a b e l } < s p a n   c l a s s = " j s - C o n v e r s a t i o n N a m e " > < b > { N a m e } < / b > < / s p a n > '  
   +   ' < / d i v > '  
   +   ' < / d i v > '  
 ;  
  
 J S C C . p r o t o t y p e . l o c a l D a t e   =   f u n c t i o n ( t )   {  
 	 i f ( ! t )   r e t u r n   " " ;  
 	 v a r   d   =   n e w   D a t e ( t   *   1 0 0 0 ) ;  
 	 r e t u r n   d . t o L o c a l e D a t e S t r i n g ( ) ;  
 }  
  
 J S C C . p r o t o t y p e . l o c a l T i m e   =   f u n c t i o n ( t )   {  
 	 i f ( ! t )   r e t u r n   " " ;  
 	 v a r   d   =   n e w   D a t e ( t   *   1 0 0 0 ) ;  
 	 r e t u r n   d . t o L o c a l e T i m e S t r i n g ( ) ;  
 }  
  
 J S C C . p r o t o t y p e . l o c a l A g e   =   f u n c t i o n ( t )   {  
 	 i f ( ! t )   r e t u r n   " " ;  
 	 i f ( t )  
 	 v a r   d   =   n e w   D a t e ( t   *   1 0 0 0 ) ;  
 	 v a r   o f f s e t   =   d . g e t T i m e z o n e O f f s e t ( )   *   6 0 ;  
 	 v a r   d a y   =   M a t h . c e i l ( ( ( n e w   D a t e ( ) ) . v a l u e O f ( )   -   o f f s e t   *   1 0 0 0 )   /   8 6 4 0 0 0 0 0 )   *   8 6 4 0 0 ;  
 	 v a r   w h e n   =   M a t h . f l o o r ( ( d a y   -   t   +   o f f s e t )   /   8 6 4 0 0 ) ;  
 	 s w i t c h ( w h e n )   {  
 	 c a s e   0 :   w h e n   =   $ J C L ( " T o d a y " ) ;   b r e a k ;  
 	 c a s e   1 :   w h e n   =   $ J C L ( " Y e s t e r d a y " ) ;   b r e a k ;  
 	 d e f a u l t :  
 	 	 i f ( w h e n   >   0   & &   w h e n   <   6 )  
 	 	 	 w h e n   =   w h e n   +   $ J C L ( "   d a y s   a g o " ) ;  
 	 	 e l s e  
 	 	 	 w h e n   =   d . t o L o c a l e D a t e S t r i n g ( ) ;  
 	 }  
 	 r e t u r n   w h e n   +   " ,   "   +   d . t o L o c a l e T i m e S t r i n g ( ) ;  
 }  
  
 J S C C . p r o t o t y p e . J C L   =   f u n c t i o n ( v )   {  
 	 r e t u r n   $ J C L (  
 	 	 ( v   = =   ' l e a v e C o m m e n t ' )   ?   ( t h i s . l a b e l H T M L   | |   v )   :   v  
 	 ) ;  
 }  
  
 J S C C . p r o t o t y p e . g t m p l   =   f u n c t i o n ( t ,   m O b j )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   l o w e r c a s e   =   f u n c t i o n ( a ,   m )   {   r e t u r n   S t r i n g ( m ) . t o L o w e r C a s e ( ) ;   }  
 	 t   =   t . r e p l a c e ( / ^ [ ^ < ] * ( < [ \ s \ S ] * > ) [ ^ > ] * $ / ,   " $ 1 " ) ;  
 	 t   =   t . r e p l a c e ( / ( < [ \ / ] ? [ A - Z ] + ) / g ,   l o w e r c a s e ) ;  
 	 i f ( m O b j   & &   m O b j . I D )   t   =   t . r e p l a c e ( / ( < [ a - z ] + ) / ,   ' $ 1   i d = " '   +   m O b j . I D   +   ' " ' ) ;  
 	 t   =   t . r e p l a c e ( / { L a b e l : ( [ ^ : } ] + [ ^ } ] * ) } / g ,  
 	 	 f u n c t i o n ( a ,   m )   {   r e t u r n   s . J C L ( m ) ;   } ) ;  
 	 r e t u r n   t ;  
 }  
 J S C C . p r o t o t y p e . t m p l   =   f u n c t i o n ( t ,   o b j ,   d o n t P u t I d )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 t   =   s e l f . g t m p l ( t ,   d o n t P u t I d   ?   f a l s e   :   o b j ) ;  
 	 t   =   t . r e p l a c e ( / { A g e } / g ,   s e l f . l o c a l A g e ( o b j . T S ) ) ;  
 	 t   =   t . r e p l a c e ( / { D a t e } / g ,   s e l f . l o c a l D a t e ( o b j . T S ) ) ;  
 	 t   =   t . r e p l a c e ( / { T i m e } / g ,   s e l f . l o c a l T i m e ( o b j . T S ) ) ;  
 	 v a r   t e x t   =   S t r i n g ( o b j . T e x t ) ;  
 	 i f   ( ( o b j . s t a t u s   = =   ' M '   | |   o b j . s t a t u s   = =   ' H ' )  
 	 	 & &   ( t h i s . s e r v e r O p t i o n s . m m o d e   = =   ' p r e '   | |   t h i s . s e r v e r O p t i o n s . m m o d e   = =   ' o n h o l d '   | |   ( o b j . m s g t y p e   & &   o b j . m s g t y p e . m a t c h ( / T | P / ) ) ) )   {  
 	 	 t e x t   + =   ( t h i s . s e r v e r O p t i o n s . m t e x t   | |   ' ' ) ;  
 	 }  
 	 t e x t   =   t e x t . r e p l a c e ( / ^ [   \ s ] + | [   \ s ] + $ / ,   ' ' ) ;  
 	 t e x t   =   t e x t . r e p l a c e ( / \ n \ n + / g ,   ' \ n \ n ' ) ;  
 	 t e x t   =   t e x t . r e p l a c e ( / \ n / g ,   ' & n b s p ; < b r   / > ' ) ;  
 	 i f ( t e x t . i n d e x O f ( ' < ' )   = =   - 1 )  
 	 t e x t   =   t e x t . r e p l a c e ( / ( [ ^ & < > \ s ] { 1 2 } ) ( [ ^ & < > \ s ] { 1 2 } ) / g ,   ' $ 1 < w b r > < / w b r > $ 2 ' ) ;  
 	 t e x t   =   t e x t . r e p l a c e ( / { / g ,   ' & # 1 2 3 ; ' ) ;  
 	 t   =   t . r e p l a c e ( / { T e x t } / g ,   t e x t ) ;  
 	 t   =   t . r e p l a c e ( / { L a b e l : ( : ( [ a - z ] + ) \ ? ( [ ^ : } ] * ) : ( [ ^ } ] * ) ) ? ( [ ^ } ] * ) } / g ,  
 	 	 f u n c t i o n ( a , b , p , f , s , m ) {  
 	 	 	 i f ( p )   m   =   ( o b j [ p ] ? f : s ) + m ;  
 	 	 	 r e t u r n   $ J C L ( m ) ;  
 	 	 } ) ;  
 	 v a r   d   =   { " S O : " : t h i s . s e r v e r O p t i o n s , " " : o b j } ;  
 	 t   =   t . r e p l a c e ( / { ( [ A - Z ] + : ) ? ( [ A - Z a - z 0 - 9 ] + ) ( \ + \ d + ) ? } / g ,  
 	 	 f u n c t i o n ( a , t , m , p ) {   v a r   v   =   ( ( d [ t ] | | o b j ) [ m ] ) | | ' ' ;   i f ( p )   v   =   p a r s e I n t ( v )   +   p a r s e I n t ( p ) ;   r e t u r n   v ;   } ) ;  
 	 r e t u r n   t ;  
 }  
  
 J S C C . p r o t o t y p e . F R e f   =   f u n c t i o n ( c m t ,   t g t ,   f u n c N a m e )   {  
 	 i f ( ! c m t   | |   ! t g t )   r e t u r n ;  
  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   a r g s   =   a r g u m e n t s ;  
  
 	 t g t . h r e f   =   " " ;  
 	 t g t . o n c l i c k   =   f u n c t i o n ( )   {  
 	     t r y   {  
 	 	 v a r   a r r   =   [ ] ;  
 	 	 i f ( c m t )   a r r . p u s h ( c m t . i d ) ;  
 	 	 f o r ( v a r   i   =   3 ;   i   <   a r g s . l e n g t h ;   i + + )   a r r . p u s h ( a r g s [ i ] ) ;  
 	 	 s e l f [ f u n c N a m e ] . a p p l y ( s e l f ,   a r r ) ;  
 	     }   c a t c h ( e )   {   ;   }  
 	 	 r e t u r n   f a l s e ;  
 	 }  
 }  
 J S C C . p r o t o t y p e . s e t C o m m e n t S t y l e   =   f u n c t i o n ( c m t ,   c l a s s N a m e )   {  
 	 v a r   e l   =   c m t . c t l s [ ' j s - s i n g l e C o m m e n t B o d y ' ]   | |   c m t ;  
 	 i f ( e l )   J S K i t L i b . a d d C l a s s ( e l , c l a s s N a m e ) ;  
 }  
  
 J S C C . p r o t o t y p e . c m t S e t S p a m S t a t u s   =   f u n c t i o n ( c m t ,   s )   {  
 	 c m t . c o b j . s t a t u s   =   s   ?   ' S '   :   ' A ' ;  
 	 i f ( s )   {  
 	 	 t h i s . s e t C o m m e n t S t y l e ( c m t ,   " j s - C m t S p a m " ) ;  
 	 }   e l s e   {  
 	 	 c m t . s t y l e . b a c k g r o u n d C o l o r   =   " " ;  
 	 	 c m t . s t y l e . b a c k g r o u n d I m a g e   =   " " ;  
 	 	 c m t . s t y l e . c o l o r   =   ' ' ;  
 	 }  
 	 i f ( c m t . d o m I N F O )   c m t . d o m I N F O . s t y l e . b a c k g r o u n d C o l o r   =   s   ?   ' # f f f f e 0 '   :   " " ;  
 }  
  
 J S C C . p r o t o t y p e . c m t S e t O f f e n s i v e S t a t u s   =   f u n c t i o n ( c m t ,   s )   {  
 	 c m t . c o b j . s t a t u s   =   s   ?   ' O '   :   ' A ' ;  
 	 i f ( s )   {  
 	 	 t h i s . s e t C o m m e n t S t y l e ( c m t ,   " j s - C m t S p a m " ) ;  
 	 }   e l s e   {  
 	 	 c m t . s t y l e . b a c k g r o u n d C o l o r   =   " " ;  
 	 	 c m t . s t y l e . b a c k g r o u n d I m a g e   =   " " ;  
 	 	 c m t . s t y l e . c o l o r   =   ' ' ;  
 	 }  
 	 i f ( c m t . d o m I N F O )   c m t . d o m I N F O . s t y l e . b a c k g r o u n d C o l o r   =   s   ?   ' # f f f f e 0 '   :   " " ;  
 }  
  
 J S C C . p r o t o t y p e . b l o c k A c t i o n   =   f u n c t i o n ( a c t i o n )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   c i d   =   s . c t B l o c k . f o r I d ;  
 	 v a r   c m t   =   s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 s . h i d e S e t t i n g s W i n d o w ( ' c t B l o c k ' ) ;  
 	 s w i t c h ( a c t i o n )   {  
 	 c a s e   " a p p r o v e " :  
 	 	 s . c m t A p p r o v e ( c i d ) ;  
 	 	 b r e a k ;  
 	 c a s e   " a p p r o v e u s e r " :  
 	 	 s . c m t A p p r o v e U s e r ( c i d ) ;  
 	 	 b r e a k ;  
 	 c a s e   " d e l e t e " :  
 	 	 s . c m t D e l e t e ( c i d ,   ' d e l e t e ' ) ;  
 	 	 b r e a k ;  
 	 c a s e   " s p a m " :  
 	 	 s . c m t S e t S p a m S t a t u s ( c m t ,   t r u e ) ;  
 	 	 i f ( s . c o n f i g . m o d e r a t e )  
 	 	 	 s . p a t h O v e r r i d e   =   c m t . c o b j . p a t h ;  
 	 	 s . s e r v e r ( ' . j n k ' , { ' i d ' :   c i d ,   ' j x ' :   t h i s . j c a I n d e x ,   " j u n k " :   " y e s " } ) ;  
 	 	 s e t T i m e o u t ( f u n c t i o n ( )   {   / /   s c r e e n   d e l  
 	 	 	 s . c m t D e l e t e ( c i d ,   ' i g n o r e ' ) ;  
 	 	 } ,   1 0 0 0 ) ;  
 	 	 b r e a k ;  
 	 c a s e   " i p " :  
 	 c a s e   " u s e r " :  
 	 	 i f ( s . c o n f i g . m o d e r a t e )  
 	 	 	 s . p a t h O v e r r i d e   =   c m t . c o b j . p a t h ;  
 	 	 s . c m t D e l e t e ( c i d ,   ' b l o c k _ b y _ a c t i o n ' ,   a c t i o n ) ;  
 	 	 b r e a k ;  
 	 c a s e   " u n b a n " :  
 	 	 i f ( s . c o n f i g . m o d e r a t e )  
 	 	 	 s . p a t h O v e r r i d e   =   c m t . c o b j . p a t h ;  
 	 	 s . c m t D e l e t e ( c i d ,   a c t i o n ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . c m t B l o c k   =   f u n c t i o n ( c i d )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   c m t   =   s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 v a r   s t a t u s   =   c m t . c o b j . s t a t u s ;  
 	 v a r   m s g t y p e   =   c m t . c o b j . m s g t y p e   | |   ' ' ;  
 	 v a r   c m t r e a s o n ;  
 	 i f   ( s t a t u s   & &   s t a t u s = = ' S '   & &   c m t . c o b j . r e a s o n )   {  
 	 	 s w i t c h   ( c m t . c o b j . r e a s o n )   {  
 	 	 c a s e   ' B l o c k e d   b y   U s e r ' :  
 	 	 c a s e   ' U s e r ' :  
 	 	 	 c m t r e a s o n   =   ' U s e r ' ;  
 	 	 	 b r e a k ;  
 	 	 c a s e   ' I P ' :  
 	 	 c a s e   ' B l o c k e d   b y   I P ' :  
 	 	 	 c m t r e a s o n   =   ' I P ' ;  
 	 	 	 b r e a k ;  
 	 	 }  
 	 }  
 	 i f ( s . c t B l o c k )   {   s . h i d e S e t t i n g s W i n d o w ( ' c t B l o c k ' ) ;   r e t u r n ;   }  
 	 i f ( ! s . b l o c k D o m )   {   s . b l o c k D o m   =   { } ;   }  
 	 i f ( ! s . b l o c k D o m [ s t a t u s ] )   {   s . b l o c k D o m [ s t a t u s ]   =   { } ;   }  
 	 i f ( ! s . b l o c k D o m [ s t a t u s ] [ c m t r e a s o n ] )   {   v a r   j c a   =   ' $ J C A [ '   +   s . j c a I n d e x   +   ' ] . b l o c k A c t i o n ' ;  
 	 v a r   c b   =   f u n c t i o n ( a ,   d )   {  
 	 	 r e t u r n   ' "   c l a s s = " j s - C o n t r o l B l o c k B u t t o n "   ' + ( d   ?   ' d i s a b l e d = " o n " '   :   ' ' ) + ' "   o n c l i c k = " t h i s . b l u r ( ) ; ' + j c a + " ( ' " + a + ' \ ' ) ; r e t u r n   f a l s e ; "   / > < / s p a n > < / t d > < / t r > ' ; }  
 	 v a r   t r t h   =     ' < t r > < t d   s t y l e = " f o n t - s i z e :   9 p t ;   b a c k g r o u n d - c o l o r :   # 8 1 9 2 a 2 ;   c o l o r :   # f f f f f f ; " a l i g n = l e f t > < n o b r > ' ;  
 	 v a r   t r t d   =   ' < / n o b r > < / t d > < / t r > < t r > < t d   c l a s s = " j s - C o n t r o l B l o c k T e x t " > ' ;  
 	 v a r   t r t d d   =   ' < / n o b r > < / t d > < / t r > < t r > < t d   c l a s s = " j s - C o n t r o l B l o c k T e x t D i s a b l e d " > ' ;  
 	 v a r   t i n p   =   ' < s p a n   s t y l e = " f l o a t : r i g h t " > < i n p u t   t y p e = s u b m i t   v a l u e = " ' ;  
  
 	 v a r   m t r t   =   t r t d ,   a u m s g ,   a m m s g ;  
 	 s w i t c h ( s t a t u s )   {  
 	 c a s e   ' A ' :  
 	 	 m t r t   =   t r t d d ;  
 	 	 a u m s g   =   " T h i s   u s e r   h a s   a   t r u s t e d   s t a t u s " ;  
 	 	 a m m s g   =   " T h e   m e s s a g e   i s   n o t   b l o c k e d " ;  
 	 	 b r e a k ;  
 	 c a s e   ' S ' :  
 	 	 a u m s g   =   " A p p r o v e   t h i s   a n d   f u t u r e   m e s s a g e s   f r o m   t h i s   u s e r " ;  
 	 	 a m m s g   =   " T h i s   m e s s a g e   i s   n o t   s p a m   o r   j u n k " ;  
 	 	 b r e a k ;  
 	 c a s e   ' O ' :  
 	 	 a u m s g   =   " A p p r o v e   t h i s   m e s s a g e " ;  
 	 	 a m m s g   =   " T h i s   m e s s a g e   i s   n o t   s p a m   o r   j u n k " ;  
 	 d e f a u l t :   / /   M / H  
 	 	 a u m s g   =   " A p p r o v e   f u t u r e   m e s s a g e s   f r o m   t h i s   u s e r " ;  
 	 	 a m m s g   =   " A c c e p t   t h i s   m e s s a g e   a s   g o o d " ;  
 	 }  
  
 	 v a r   u n b a n t e x t   =   t r t h   +   ' U n b l o c k   t h i s   c o m m e n t e r '  
 	 	 +   t r t d   +   ' L i f t   b a n   f r o m   t h i s   u s e r / I P '  
 	 	 +   t i n p   +   ' U n b a n   U s e r ' + c b ( ' u n b a n ' ) ;  
  
 	 s . b l o c k D o m [ s t a t u s ] [ c m t r e a s o n ]   =   J S K i t L i b . h t m l ( ' < t a b l e   b o r d e r = " 0 "   c e l l p a d d i n g = " 4 "   c e l l s p a c i n g = " 0 " > '  
 	 +   ( s . s e r v e r O p t i o n s . m m o d e   ! =   ' o n h o l d '   ?   ' '   :   (  
 	 	 t r t h   +   ' A p p r o v e   u s e r '   +   t r t d   +   a u m s g  
 	 	 +   t i n p   +   ' A p p r o v e   u s e r '   +   c b ( ' a p p r o v e u s e r ' ) ) )  
 	 +   t r t h   +   ' A p p r o v e   m e s s a g e '  
 	 +   m t r t   +   a m m s g  
 	 +   t i n p   +   ' A p p r o v e   m e s s a g e '   +   c b ( ' a p p r o v e ' )  
 	 +   t r t h   +   ' D e l e t e   u n w a n t e d   c o m m e n t '  
 	 +   t r t d   +   ' G e t   r i d   o f   c o m m e n t   w i t h o u t   p r e j u d i c e '  
 	 +   t i n p   +   ' D e l e t e '   +   c b ( ' d e l e t e ' )  
 	 +   ( ( c m t r e a s o n   = =   ' U s e r '   | |   c m t r e a s o n   = =   ' I P ' )   ?  
 	 	 ' '   :  
 	 	 t r t h   +   ' F l a g   a s   S p a m   o r   J u n k '  
 	 	 +   t r t d   +   ' T r a i n   < a   h r e f = " h t t p : / / a k i s m e t . c o m " > A k i s m e t < / a >   t o   f l a g   s i m i l a r   c o m m e n t s   i n   t h e   f u t u r e '  
 	 	 +   t i n p   +   ' S p a m / J u n k '   +   c b ( ' s p a m ' ) )  
 	 +   ( ( c m t r e a s o n   = =   ' U s e r ' )   ?  
 	 	 u n b a n t e x t  
 	 	 :   t r t h   +   ' B l o c k   t h i s   c o m m e n t e r '  
 	 	 +   t r t d   +   ' M a k e   c o m m e n t s   f r o m   t h i s   u s e r   i n v i s i b l e   t o   o t h e r   u s e r s '  
 	 	 +   t i n p   +   ' B l o c k   U s e r ' + c b ( ' u s e r ' ) )  
 	 +   ( ( c m t r e a s o n   = =   ' I P ' )   ?  
 	 	 u n b a n t e x t  
 	 	 :   t r t h   +   ' B l o c k   c o m m e n t e r \ ' s   I P '  
 	 	 +   t r t d   +   ' M a k e   c o m m e n t s   f r o m   t h i s   I P   i n v i s i b l e   t o   o t h e r   u s e r s '  
 	 	 +   t i n p   +   ' B l o c k   I P ' + c b ( ' i p ' ) )  
 	 +   " < / t a b l e > " ) ;  
 	 }  
 	 s . s e t t i n g s W i n d o w ( ' c t B l o c k ' ,   c m t . d o m C t l s   | |   c m t . d o m I N F O ,   s . b l o c k D o m [ s t a t u s ] [ c m t r e a s o n ] ) ;  
 	 s . c t B l o c k . f o r I d   =   c i d ;  
 }  
 J S C C . p r o t o t y p e . c m t A p p r o v e   =   f u n c t i o n ( c i d )   {  
 	 v a r   c m t   =   t h i s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 i f ( c m t . c o b j . s t a t u s   = =   ' S ' )   {  
 	 	 t h i s . c m t S e t S p a m S t a t u s ( c m t ,   f a l s e ) ;  
 	 	 c m t . c o b j . s t a t u s   =   ' S ' ;   / /   c m t D e l e t e ' s   d e a l  
 	 }  
 	 i f ( c m t . c o b j . s t a t u s   = =   ' O ' )   {  
 	 	 t h i s . c m t S e t O f f e n s i v e S t a t u s ( c m t ,   f a l s e ) ;  
 	 	 c m t . c o b j . s t a t u s   =   ' O ' ;  
 	 }  
 	 t h i s . c m t D e l e t e ( c i d ,   ' m e s s a g e ' ) ;  
 }  
  
 J S C C . p r o t o t y p e . c m t A p p r o v e U s e r   =   f u n c t i o n ( c i d )   {  
 	 v a r   c m t   =   t h i s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 i f ( c m t . c o b j . s t a t u s   = =   ' S ' )   {  
 	 	 t h i s . c m t S e t S p a m S t a t u s ( c m t ,   f a l s e ) ;  
 	 	 c m t . c o b j . s t a t u s   =   ' S ' ;   / /   c m t D e l e t e ' s   d e a l  
 	 }  
 	 t h i s . c m t D e l e t e ( c i d ,   ' u s e r ' ) ;  
 }  
  
 J S C C . p r o t o t y p e . r o u t e M s g   =   f u n c t i o n ( f n a m e ,   a r g s )   {  
 	 v a r   m y R e f   =   J S K i t L i b . g e t R e f ( t h i s ) ;  
 	 v a r   a   =   [ t h i s ] ;  
 	 v a r   r t S h a r e d   =   { } ;  
 	 f o r ( v a r   i   =   0 ;   i   <   $ J C A . l e n g t h ;   i + + )   {  
 	 	 i f ( $ J C A [ i ] . j c a I n d e x   ! =   t h i s . j c a I n d e x  
 	 	 & &   J S K i t L i b . g e t R e f ( $ J C A [ i ] )   = =   m y R e f   & &  
 	 	 ! t h i s . I M   & &   ! $ J C A [ i ] . I M )  
 	 	 	 a . p u s h ( $ J C A [ i ] ) ;  
 	 }  
 	 f o r ( v a r   i   =   0 ;   i   <   a . l e n g t h ;   i + + )   {  
 	 	 v a r   e   =   a [ i ] ;  
 	 	 e . r t S h a r e d   =   r t S h a r e d ;  
 	 	 i f ( i )   e . s e r v e r F i l t e r   =   f u n c t i o n ( n )   {  
 	 	 	 r e t u r n   ( n   = =   ' s - d a t a . j s ' ) ;   }  
 	 	 e [ f n a m e ] . a p p l y ( e ,   a r g s ) ;  
 	 	 d e l e t e   e . s e r v e r F i l t e r ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . c m t D e l e t e   =   f u n c t i o n ( c i d ,   a p p r o v a l M o d e )   {  
 	 t h i s . r o u t e M s g ( " c m t D e l e t e A c t " ,   a r g u m e n t s ) ;  
 }  
  
 J S C C . p r o t o t y p e . c m t D e l e t e A c t   =   f u n c t i o n ( c i d ,   a p p r o v a l M o d e ,   a c t i o n )   {  
 	 v a r   c m t   =   t h i s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 i f ( ! c m t )   {  
 	 	 ( t h i s . o b j B y I d [ c i d ] | | { } ) . s t a t u s   =   ' D ' ;  
 	 	 t h i s . j s p g . d e l e t e I t e m ( c i d ) ;  
 	 	 t h i s . r e C a l c P a g e s ( ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 i f ( a r g u m e n t s . l e n g t h   = =   1 )   a p p r o v a l M o d e   =   ' d e l e t e ' ;  
  
 	 v a r   o l d S t a t u s   =   c m t . c o b j . s t a t u s ;  
          
 	 i f ( t h i s . c o n f i g . m o d e r a t e   | |   ( t h i s . c o n f i g . n o l c   & &   ! t h i s . I M ) )  
 	 	 t h i s . p a t h O v e r r i d e   =   c m t . c o b j . p a t h ;  
 	 i f ( t h i s . c o n f i g . n o l c   & &   ! t h i s . I M )  
 	 	 t h i s . c o n f i g . d o m a i n   =   c m t . c o b j . d o m a i n ;  
 	 v a r   p r m s   =   { ' i d ' :   c i d ,   ' j x ' :   t h i s . j c a I n d e x } ;  
 	 i f ( t h i s . i n l i n e M o d e r a t i o n )   p r m s . i n l n   =   1 ;  
 	 s w i t c h ( a p p r o v a l M o d e )   {  
 	 c a s e   ' m e s s a g e ' :  
 	 	 i f ( t h i s . c o n f i g . p e r m a l i n k )   p r m s . p e r m a l i n k   =   t h i s . c o n f i g . p e r m a l i n k ;  
 	 	 i f   ( ! t h i s . i n l i n e M o d e r a t i o n )   {  
 	 	 	 t h i s . p r e H a n d l e r D e l e t e ( c m t ) ;  
 	 	 }  
 	 	 i f ( o l d S t a t u s   = =   ' S ' )   {  
 	 	 	 p r m s . j u n k   =   ' n o ' ;  
 	 	 	 t h i s . s e r v e r ( ' . j n k ' ,   p r m s ) ;  
 	 	 	 c m t . c o b j . a c t i o n   =   ' u n b a n ' ;  
 	 	 }   e l s e   i f ( o l d S t a t u s   = =   ' O ' )   {  
 	 	 	 t h i s . s e r v e r ( ' - a p p r . c g i ' ,   p r m s ) ;  
 	 	 }   e l s e   {  
 	 	 	 p r m s . a p r   =   ' m e s s a g e ' ;  
 	 	 	 t h i s . s e r v e r ( ' . d e l ' ,   p r m s ) ;  
 	 	 }  
 	 	 i f   ( t h i s . i n l i n e M o d e r a t i o n )   t h i s . p o s t H a n d l e r M o d e r a t e ( c i d ) ;  
 	 	 b r e a k ;  
 	 c a s e   ' u s e r ' :  
 	 	 i f   ( ! t h i s . i n l i n e M o d e r a t i o n )   {  
 	 	 	 t h i s . p r e H a n d l e r D e l e t e ( c m t ) ;  
 	 	 }  
 	 	 p r m s . a p r   =   ' u s e r ' ;  
 	 	 i f ( o l d S t a t u s   = =   ' S ' )   p r m s . j u n k   =   ' n o ' ;  
 	 	 t h i s . s e r v e r ( ' . d e l ' ,   p r m s ) ;  
 	 	 i f   ( t h i s . i n l i n e M o d e r a t i o n )   t h i s . p o s t H a n d l e r M o d e r a t e ( c i d ) ;  
 	 	 b r e a k ;  
 	 c a s e   ' d e l e t e ' :  
 	 	 t h i s . p r e H a n d l e r D e l e t e ( c m t ) ;  
 	 	 d e l e t e   p r m s . i n l n ;  
 	 	 t h i s . s e r v e r ( ' . d e l ' ,   p r m s ) ;  
 	 	 b r e a k ;  
 	 c a s e   ' b l o c k _ b y _ a c t i o n ' :  
 	 	 t h i s . p r e H a n d l e r D e l e t e ( c m t ) ;  
 	 	 p r m s . b y   =   a c t i o n ;  
 	 	 t h i s . s e r v e r ( ' . b l k ' ,   p r m s ) ;  
 	 	 c m t . c o b j . a c t i o n   =   ' b a n ' ;  
 	 	 b r e a k ;  
 	 c a s e   ' u n b a n ' :  
 	 	 i f   ( ! t h i s . i n l i n e M o d e r a t i o n )   {  
 	 	 	 t h i s . p r e H a n d l e r D e l e t e ( c m t ) ;  
 	 	 }  
 	 	 i f ( t h i s . c o n f i g . p e r m a l i n k )   p r m s . p e r m a l i n k   =   t h i s . c o n f i g . p e r m a l i n k ;  
 	 	 p r m s . u n b a n   =   1 ;  
 	 	 t h i s . s e r v e r ( ' - a p p r . c g i ' ,   p r m s ) ;  
 	 	 c m t . c o b j . a c t i o n   =   ' b a n ' ;  
 	 	 i f   ( t h i s . i n l i n e M o d e r a t i o n )   t h i s . p o s t H a n d l e r M o d e r a t e ( c i d ) ;  
 	 	 b r e a k ;  
 	 c a s e   ' i g n o r e ' :  
 	 	 / *   J u s t   d e l e t e   f r o m   s c r e e n   * /  
 	 d e f a u l t :  
 	 	 t h i s . r e m o v e C o m m e n t ( c m t ,   t r u e ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p r e H a n d l e r D e l e t e   =   f u n c t i o n ( c m t )   {  
 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " c o m m e n t s _ s e r v e r R e q u e s t _ d e l e t i n g " ,   t h i s . j c a I n d e x ,   c m t . c o b j . I D ) ;  
 }  
  
 J S C C . p r o t o t y p e . p o s t H a n d l e r D e l e t e   =   f u n c t i o n ( c m t )   {  
 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " c o m m e n t s _ s e r v e r R e q u e s t _ d e l e t e d " ,   t h i s . j c a I n d e x ,   c m t . c o b j . I D ) ;  
 }  
  
 J S C C . p r o t o t y p e . r e m o v e C o m m e n t   =   f u n c t i o n ( c m t ,   u s e R e c u r s i o n )   {  
 	 v a r   c o b j   =   c m t . c o b j ;  
 	 v a r   d e l e t e d P a g e I d x   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( c o b j . I D ) ;  
 	 i f ( c o b j . P a r e n t I D   & &   t h i s . o b j B y I d [ c o b j . P a r e n t I D ] )   {  
 	 	 v a r   p r n   =   t h i s . o b j B y I d [ c o b j . P a r e n t I D ] ;  
 	 	 t h i s . j s p g . i n v a l i d a t e I t e m V i e w ( c o b j . P a r e n t I D ) ;  
 	 	 v a r   p a r e n t P a g e I d x   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( c o b j . P a r e n t I D ) ;  
 	 	 t h i s . j s p g . i n v a l i d a t e P a g e s V i e w ( p a r e n t P a g e I d x ,   d e l e t e d P a g e I d x - p a r e n t P a g e I d x ) ;  
 	 }   e l s e   {  
 	 	 i f ( d e l e t e d P a g e I d x   & &   c o b j . P a r e n t I D )   t h i s . j s p g . i n v a l i d a t e P a g e s V i e w ( d e l e t e d P a g e I d - 1 ,   1 ) ;  
 	 }  
 	 i f ( c o b j . c e d g e )   {  
 	 	 v a r   c u r I t e m I d x   =   t h i s . j s p g . g e t I t e m I d x B y I d ( c o b j . I D ) ;  
 	 	 i f ( ( c o b j . c e d g e = = 1   & &   ! t h i s . I M   & &   t y p e o f   c u r I t e m I d x ! = ' u n d e f i n e d ' )   | |   ( c o b j . c e d g e = = 2   & &   t y p e o f   c u r I t e m I d x ! = ' u n d e f i n e d ' ) )   {  
 	 	 	 v a r   i t e m I d x D   =   c o b j . c e d g e = = 1   ?   1   :   - 1 ;  
 	 	 	 v a r   i t e m s   =   t h i s . j s p g . g e t I t e m s ( c u r I t e m I d x + i t e m I d x D ,   1 ) ;  
 	 	 	 i f ( i t e m s . l e n g t h   & &   i t e m s [ 0 ] )   i t e m s [ 0 ] . o b j . c e d g e   + =   c o b j . c e d g e ;  
 	 	 }  
 	 }  
 	 v a r   s e l f   =   t h i s ;  
 	 i f ( t h i s . I M )   {  
 	 	 v a r   c n t   =   0 ;  
 	 	 v a r   d e l e t e d P a g e I t e m s   =   t h i s . j s p g . g e t P a g e I t e m s ( d e l e t e d P a g e I d x ) ;  
 	 	 J S K i t L i b . f m a p ( d e l e t e d P a g e I t e m s ,   f u n c t i o n ( V ) {  
 	 	 	 i f ( V . o b j . s t a t u s ! = ' D '   & &   V . o b j . s t a t u s ! = ' D T '   & &   V . o b j . c o n v e r s a t i o n = = c o b j . c o n v e r s a t i o n )   c n t + + ;  
 	 	 } ) ;  
 	 	 i f ( c n t > 1 )   {  
 	 	 	 i f ( c m t . c o b j . h a s C n v s )   {  
 	 	 	 	 c m t . c o b j . s t a t u s   =   ' D T ' ;  
 	 	 	 	 t h i s . j s p g . i n v a l i d a t e I t e m V i e w ( c o b j . I D ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 t h i s . j s p g . d e l e t e I t e m ( c m t . c o b j . I D ) ;  
 	 	 	 }  
 	 	 }   e l s e   i f ( c n t < = 1 ) {  
 	 	 	 J S K i t L i b . f m a p ( d e l e t e d P a g e I t e m s ,   f u n c t i o n ( V ) {  
 	 	 	 	 	 i f ( V . o b j . c o n v e r s a t i o n = = c o b j . c o n v e r s a t i o n )   s e l f . j s p g . d e l e t e I t e m ( V . o b j . I D ) ;  
 	 	 	 } ) ;  
 	 	 }  
 	 }   e l s e   {  
 	 	 t h i s . j s p g . d e l e t e I t e m ( c o b j . I D ) ;  
 	 	 t h i s . r e C a l c P a g e s ( ) ;  
 	 }  
 	 t h i s . c t a g   =   n u l l ;  
 	 v a r   p a g e N o   =   t h i s . c u r P a g e ;  
 	 t h i s . c u r P a g e   =   0 ;  
 	 t h i s . d i s p l a y P a g e ( p a g e N o ,   f u n c t i o n ( i m m e d ) {  
 	 	 	 i f ( i m m e d )   {  
 	 	 	 	 i f ( u s e R e c u r s i o n   & &   t h i s . j s p g . g e t I t e m B y I d ( c m t . c o b j . I D ) )   {  
 	 	 	 	 	 s e l f . r e m o v e C o m m e n t ( c m t ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . p o s t H a n d l e r M o d e r a t e   =   f u n c t i o n ( c i d )   {  
 	 v a r   c m t   =   t h i s . j s p g . g e t I t e m B y I d ( c i d ) . d i v ;  
 	 c m t . c o b j . s t a t u s   =   ' A ' ;  
 	 t h i s . j s p g . i n v a l i d a t e I t e m V i e w ( c i d ) ;  
 	 v a r   p a g e N o   =   t h i s . c u r P a g e ;  
 	 t h i s . c u r P a g e   =   0 ;  
 	 t h i s . d i s p l a y P a g e ( p a g e N o ) ;  
 }  
  
 J S C C . p r o t o t y p e . c r e a t e C o m m e n t A s H T M L   =   f u n c t i o n ( o b j )   {  
 	 i f ( o b j . s t a t u s   = =   ' D ' )   r e t u r n   ' ' ;  
 	 i f ( t h i s . o b j p p c )   t h i s . o b j p p c ( o b j ) ;  
 	 r e t u r n   t h i s . t m p l ( t h i s . d t C o m m e n t ,   o b j ) ;  
 }  
  
 J S C C . p r o t o t y p e . m a r k O f f e n s i v e   =   f u n c t i o n ( c i d )   {  
 	 i f ( c o n f i r m ( $ J C L ( " i s J u n k V o t e " ) ) )   {  
 	 	 i f   ( ( t h i s . a d m i n M o d e )   & &   ( ! t h i s . i n l i n e M o d e r a t i o n ) )   {  
 	 	 	 t h i s . c m t D e l e t e ( c i d ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . s e r v e r ( ' - m a r k . o f f ' , { ' i d ' :   c i d } ) ;  
 	 	 }  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . s h o w P r o f i l e   =   f u n c t i o n ( a v ,   o b j ,   p r o f i l e L e v e l )   {  
 	 i f ( ( ! o b j . p r o f i l e   & &   ! o b j . P r o f i l e U R L )   | |   ! t h i s . s e r v e r O p t i o n s . s h o w P r o f i l e   | |   $ J S K i t G l o b a l . i s P r o f i l e L o a d e d   = =   " n o " )   r e t u r n ;  
 	 i f ( o b j . P r o f i l e U R L )   {  
 	 	 w i n d o w . l o c a t i o n   =   o b j . P r o f i l e U R L ;  
 	 	 r e t u r n ;  
 	 }  
 	 a v . c m t T a r g e t   =   t h i s . t a r g e t ;  
 	 a v . t a r g e t R e f   =   J S K i t L i b . g e t R e f ( t h i s ) ;  
 	 i f   ( t y p e o f ( $ J S K i t G l o b a l . i s P r o f i l e L o a d e d )   = =   " u n d e f i n e d " )   {  
 	 	 $ J S K i t G l o b a l . i s P r o f i l e L o a d e d   =   " n o " ;  
 	 	 w i n d o w . j s k $ p r o f $ t g t   =   a v ;  
 	 	 t h i s . s e r v e r ( t h i s . u r i D o m a i n   +   ' / a p i / p r o f i l e / g e t ' ,  
 	 	 	 { ' t a r g e t ' :   ' j s k $ p r o f $ t g t ' ,   ' p r o f i l e ' :   o b j . p r o f i l e } ,   u n d e f i n e d ,   { " o n r e t u r n " :   f u n c t i o n ( )   {   $ J S K i t G l o b a l . i s P r o f i l e L o a d e d   =   " y e s " ;   } } ) ;  
 	 }   e l s e   J S K W $ o p e n P r o f i l e ( o b j . p r o f i l e ,   a v ,   p r o f i l e L e v e l ) ;    
 }  
  
 J S C C . p r o t o t y p e . f i x C o m m e n t   =   f u n c t i o n ( c m t ,   o b j ,   p a g e I d x ,   g l o b a l I d x ,   i t e m s O n P a g e )   {  
 	 v a r   s e l f   =   t h i s ;  
  
 	 s e l f . o b j B y I d [ o b j . I D ]   =   o b j ;  
 	 i f ( o b j . s t a t u s   = =   ' D ' )   {  
 	 	 c m t . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 i f ( o b j . d e p t h )   {  
 	 	 c m t . s t y l e . m a r g i n L e f t   =   t h i s . l e v e l 4 m a r g i n ( o b j . d e p t h )  
 	 }   e l s e   {  
 	 	 o b j . d e p t h   =   0 ;  
 	 }  
  
 	 v a r   c t l s   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   c m t ) ;  
 	 c m t . c t l s   =   c t l s ;  
 	 c m t . c o b j   =   o b j ;  
 	 v a r   i m g A r e a   =   c m t . c t l s [ " j s - s i n g l e C o m m e n t P r e v i e w I m a g e " ] ;  
 	 i f   ( i m g A r e a   & &   c m t . c o b j . i m g s   & &   c m t . c o b j . i m g s . l e n g t h   & &   s e l f . c o n f i g . u p l o a d I m a g e s ) {    
 	 	 s e l f . a d d C h i l d ( i m g A r e a , s e l f . c r e a t e I m a g e s ( c m t . c o b j . i m g s ) ) ;  
 	 	 i m g A r e a . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 }  
  
 	 v a r   j s c   =   f u n c t i o n ( t ) { r e t u r n   c t l s [ ' j s - s i n g l e C o m m e n t ' + t ] }  
  
 	 v a r   s t r i p e   =   j s c ( ' B o d y ' )   | |   j s c ( ' ' ) ;  
 	 s t r i p e . c l a s s N a m e   + =   "   j s - s i n g l e C o m m e n t D e p t h "   +   ( o b j . d e p t h   | |   0 ) ;  
 	 i f ( ! ( c m t . s t y l e . d i s p l a y . m a t c h ( / n o n e / ) ) ) {  
 	 	 s t r i p e . c l a s s N a m e   + =   "   j s - c o m m e n t - s t r i p e - "   +   ( ( g l o b a l I d x   %   t h i s . s t r i p e c o u n t )   +   1 ) ;  
 	 }  
  
 	 i f ( s e l f . I M   & &   t y p e o f ( o b j . c o n v e r s a t i o n ) = = ' n u m b e r ' )   {  
 	 	 i f ( o b j . h a s C n v s )   {  
 	 	 	 t h i s . a p p e n d C o n v e r s a t i o n ( c m t ,   o b j . c o n v e r s a t i o n ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . a p p e n d C o n v e r s a t i o n C h i l d ( c m t ) ;  
 	 	 }  
 	 }  
  
 	 / *   H a n d l e   a v a t a r s   * /  
 	 i f ( o b j . s t a t u s ! = ' D T '   & &   o b j . s t a t u s ! = ' D D ' )   s e l f . p l a c e A v a t a r ( o b j ,   j s c ( ' A v a t a r ' ) ) ;  
  
 	 / *   H a n d l e   i f   r a t i n g s   a r e   p r e s e n t   * /  
 	 i f   ( o b j . R a t i n g   >   0   & &   (   !   t h i s . i s S t a n d a l o n e ( ) )   )   {  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	 v a r   a c t i o n   =   f u n c t i o n ( )   {  
 	 	 	 i f   ( j s c ( ' R a t i n g ' ) )   {  
 	 	 	 	 j s c ( ' R a t i n g ' ) . a p p e n d C h i l d ( s e l f . c r e a t e M i n i S t a r O b j e c t ( o b j . R a t i n g ,   1 0 ) ) ;  
 	 	 	 	 j s c ( ' R a t i n g ' ) . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 	 	 v a r   c l e a r   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
 	 	 	 	 c l e a r . s t y l e . c l e a r   =   ' l e f t ' ;  
 	 	 	 	 j s c ( ' R a t i n g ' ) . a p p e n d C h i l d ( c l e a r ) ;  
 	 	 	 }  
 	 	 }  
 	 	 $ J S K i t G l o b a l . t r y R a t i n g s A p p O b j e c t A c t i o n ( t h i s . u n i q ,   a c t i o n ) ;  
 	 }   e l s e   {  
 	 	 i f   ( j s c ( ' R a t i n g ' ) )   {  
 	 	 	 j s c ( ' R a t i n g ' ) . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 }  
 	 }  
  
 	 i f   ( j s c ( ' U r l ' )   & &   o b j . U r l )   {   j s c ( ' U r l ' ) . s t y l e . d i s p l a y   =   ' ' ;   }  
  
 	 v a r   s a   =   j s c ( " N a m e " ) ;  
 	 i f ( s a )   {  
 	 	 s e l f . r e r e n d e r N a m e ( c m t ) ;  
 	 	 i f ( o b j . a d m i n )   s a . c l a s s N a m e   =   s a . c l a s s N a m e   +   "   j s - s i t e A d m i n " ;  
 	 }  
 	 v a r   p l   =   j s c ( " P r o f i l e L i n k a b l e " ) ;  
 	 i f ( p l )   {  
 	 	 i f ( ! ( o b j . p r o f i l e   & &   ! t h i s . c o n f i g . n o l c ) )  
 	 	 	 p l . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 }  
  
 	 i f ( ! t h i s . s c o r i n g E n a b l e d ( )  
 	 | |   o b j . y o u r s   | |   ! o b j . k a r m a   | |   ( o b j . m s g t y p e   & &   o b j . m s g t y p e . m a t c h ( / T | P / )   & &   ! t h i s . s e r v e r O p t i o n s . t r a c k b a c k r e p l y )   | |   t h i s . c o n f i g . n o l c )   {  
 	 	 v a r   k A   =   j s c ( " K a r m a " ) ;  
 	 	 i f ( k A )   k A . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 }  
 	 v a r   k S   =   j s c ( " K a r m a S c o r e " ) ;  
 	 i f ( k S   & &   o b j . k a r m a )   {  
 	 	 v a r   k V a l   =   j s c ( " K a r m a V a l u e " ) ;  
 	 	 v a r   k V o t   =   j s c ( " K a r m a V o t e r s " ) ;  
 	 	 i f ( o b j . k a r m a . v o t e s )   {  
 	 	 	 s e l f . t e x t ( k V a l ,   o b j . k a r m a . s c o r e ) ;  
 	 	 	 s e l f . t e x t ( k V o t ,   o b j . k a r m a . v o t e s T e x t ) ;  
 	 	 	 k S . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 }  
 	 	 v a r   k Y   =   j s c ( " K a r m a Y " ) ;  
 	 	 i f ( k Y )   {  
 	 	 	 k Y . h r e f   =   " " ;  
 	 	 	 k Y . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 	 o b j . k a r m a . r e c o m p u t e S c o r e ( 1 ) ;  
 	 	 	 	 s e l f . t e x t ( k V a l ,   o b j . k a r m a . s c o r e ) ;  
 	 	 	 	 s e l f . t e x t ( k V o t ,   o b j . k a r m a . v o t e s T e x t ) ;  
 	 	 	 	 k S . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 	 	 t h i s . b l u r ( ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 }  
 	 	 v a r   k N   =   j s c ( " K a r m a N " ) ;  
 	 	 i f ( k N )   {  
 	 	 	 k N . h r e f   =   " " ;  
 	 	 	 k N . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 	 o b j . k a r m a . r e c o m p u t e S c o r e ( - 1 ) ;  
 	 	 	 	 s e l f . t e x t ( k V a l ,   o b j . k a r m a . s c o r e ) ;  
 	 	 	 	 s e l f . t e x t ( k V o t ,   o b j . k a r m a . v o t e s T e x t ) ;  
 	 	 	 	 k S . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 	 	 t h i s . b l u r ( ) ;  
 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 }  
 	 	 }  
 	 }  
 	 v a r   k S S   =   j s c ( " K a r m a S h o w " ) ;  
 	 i f ( k S S   & &   o b j . k a r m a   & &   o b j . y o u r s   & &   o b j . k a r m a . v o t e s )   {  
 	 	 k S S . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 v a r   k V a l   =   j s c ( " K a r m a V a l u e S h o w " ) ;  
 	 	 v a r   k V o t   =   j s c ( " K a r m a V o t e r s S h o w " ) ;  
 	 	 s e l f . t e x t ( k V a l ,   o b j . k a r m a . s c o r e ) ;  
 	 	 s e l f . t e x t ( k V o t ,   o b j . k a r m a . v o t e s T e x t ) ;  
 	 }  
  
 	 i f ( t h i s . s e r v e r O p t i o n s . c o m m o d   & &   ! o b j . y o u r s   & &   ! t h i s . c o n f i g . n o l c   & &   ( ! o b j . m s g t y p e   | |   ! o b j . m s g t y p e . m a t c h ( / T | P / )   | |   t h i s . s e r v e r O p t i o n s . t r a c k b a c k r e p l y ) ) {  
 	 	 v a r   c m O   =   j s c ( " C o m M o d " ) ;  
 	 	 i f ( c m O ) {  
 	 	 	 c m O . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 	 c m M   =   j s c ( " C o m M o d M a r k " ) ;  
 	 	 	 i f ( c m M )   {  
 	 	 	 	 c m M . h r e f   =   " " ;  
 	 	 	 	 c m M . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 	 	 s e l f . m a r k O f f e n s i v e ( o b j . I D ) ;  
 	 	 	 	 	 r e t u r n   f a l s e ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }  
  
 	 i f ( t h i s . c o n f i g . n o l c   | |   t h i s . c o n f i g . m o d e r a t e )   {  
 	 	 v a r   c P   =   j s c ( " O r i g i n " ) ;  
 	 	 i f ( c P )   {  
 	 	 	 c P . s t y l e . d i s p l a y   =   " i n l i n e " ;  
 	 	 }  
 	 }  
         / *   F I X M E ( ? )   L e v ,   t h i s . s e r v e r O p t i o n s   a r e   n o t   d e f i n e d   i n   m o d e r a t i o n   m o d e  
               b u t   t h e   r e s u l t   i s   l i k e l y   a s   d e s i r e d ,   i . e .   a d m i n   c a n   s t i l l   r e p l y   * /  
 	 i f   ( t h i s . s e r v e r O p t i o n s . m m o d e   = =   " p a u s e "   | |   ( o b j . m s g t y p e   & &   o b j . m s g t y p e . m a t c h ( / T | P / )   & &   ! t h i s . s e r v e r O p t i o n s . t r a c k b a c k r e p l y )   | |   ( t h i s . c o n f i g . n o l c   & &   ( ! t h i s . I M   | |   o b j . y o u r s ) ) )   {  
 	 	 v a r   r b   =   j s c ( " R e p l y a b l e " ) ;  
 	 	 i f ( r b )   r b . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 }  
  
 	 t h i s . F R e f ( c m t ,   j s c ( ' E d i t ' ) ,   ' S h o w C o m m e n t D i a l o g ' ,   { i s E d i t i n g :   t r u e } ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " R e p l y " ) ,   " S h o w C o m m e n t D i a l o g " ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " D e l e t e " ) ,   " c m t D e l e t e " ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " B l o c k " ) ,   " c m t B l o c k " ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " M o d e r a t e " ) ,   " c m t B l o c k " ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " A p p r o v e " ) ,   " c m t A p p r o v e " ) ;  
 	 t h i s . F R e f ( c m t ,   j s c ( " A p p r o v e U s e r " ) ,   " c m t A p p r o v e U s e r " ) ;  
  
 	 v a r   a u   =   j s c ( " A p p r o v e U s e r " ) ;  
 	 i f   ( a u   & &   t h i s . s e r v e r O p t i o n s . m m o d e   ! =   " o n h o l d " )  
 	 	 a u . s t y l e . d i s p l a y   =   " n o n e " ;  
  
 	 v a r   h i d e C t l   =   j s c ( ' E d i t a b l e ' ) ;  
 	 i f   ( h i d e C t l   & &   ( t h i s . c o n f i g . e d i t a b l e   ! =   ' y e s '   | |   t h i s . c o n f i g . n o l c   | |   ( ! ( t h i s . a d m i n M o d e   | |   J S K i t E P B . i s A d m i n ( t h i s . p a t h O v e r r i d e ) ) ) ) )  
 	 	 h i d e C t l . s t y l e . d i s p l a y   =   ' n o n e ' ;  
  
 	 v a r   h i d e C t l   =   j s c ( " D e l e t a b l e " ) ;  
 	 i f ( h i d e C t l   & &   ( ( ! o b j . y o u r s   & &   ! t h i s . I M   & &   ! J S K i t E P B . i s A d m i n ( t h i s . p a t h O v e r r i d e ) )   | |   ( t h i s . a d m i n M o d e   & &   ! t h i s . c o n f i g . n o l c ) ) )  
 	 	 h i d e C t l . s t y l e . d i s p l a y   =   " n o n e " ;  
  
 	 v a r   h i d e C t l   =   j s c ( " M o d e r a t a b l e " ) ;  
 	 i f ( h i d e C t l   & &   ( ! t h i s . a d m i n M o d e   | |   t h i s . c o n f i g . n o l c ) )  
 	 	 h i d e C t l . s t y l e . d i s p l a y   =   " n o n e " ;  
  
 	 c m t . b g   =   j s c ( ' B g ' ) ;  
 	 c m t . b g . s t y l e . z I n d e x   =   t h i s . c z i d x   -   ( p a g e I d x   %   t h i s . c z i d x ) ;  
 	 c m t . d o m I N F O   =   j s c ( ' I N F O ' ) ;  
 	 c m t . d o m C t l s   =   j s c ( ' C t l s ' )   | |   j s c ( ' C o n t r o l s ' ) ;  
  
 	 i f ( o b j . i s E m b r y o n i c )   {  
 	 	 / *   W a i t i n g   f o r   p e r m a n e n t   I D   * /  
 	 	 i f ( c m t . d o m C t l s )   c m t . d o m C t l s . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 }  
  
 	 i f ( o b j . s t a t u s   = =   ' S ' )  
 	 	 t h i s . c m t S e t S p a m S t a t u s ( c m t ,   t r u e ) ;  
  
 	 i f ( o b j . s t a t u s   = =   ' O ' )  
 	 	 t h i s . c m t S e t O f f e n s i v e S t a t u s ( c m t ,   t r u e ) ;  
  
 	 i f ( o b j . a d m i n )   {  
 	 	 J S K i t L i b . a d d C l a s s ( c m t ,   " j s - c o m m e n t B y A d m i n " ) ;  
 	 	 i f ( t h i s . c o n f i g . a d m i n B g C o l o r )   {  
 	 	 	 c m t . s t y l e . b a c k g r o u n d C o l o r   =   t h i s . c o n f i g . a d m i n B g C o l o r ;  
 	 	 }  
 	 }  
  
 	 i f ( o b j . s t a t u s   = =   ' D T ' )   {  
 	 	 i f ( c m t . d o m I N F O )   c m t . d o m I N F O . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 i f ( c m t . d o m C t l s )   c m t . d o m C t l s . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 }  
 	 i f ( o b j . s t a t u s   = =   ' D D ' )   {  
 	 	 i f ( c m t . d o m C t l s )   c m t . d o m C t l s . s t y l e . d i s p l a y   =   ' n o n e ' ;  
 	 	 t h i s . p l a c e P r o c e s s A v a t a r ( j s c ( ' A v a t a r ' ) ) ;  
 	 }  
 	 i f ( j s c ( " M e n u " ) )   {  
 	 	 i f ( ! o b j . m e n u )    
 	 	 	 o b j . m e n u   =   s e l f . a d d M e n u ( c m t ,   o b j ) ;  
 	 	 i f ( o b j . m e n u )    
 	 	 	 j s c ( " M e n u " ) . a p p e n d C h i l d ( o b j . m e n u ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . l e v e l 2 m a r g i n   =   f u n c t i o n ( l e v e l )   {  
 	 i f ( l e v e l   <   2 0 )   r e t u r n   " 1 0 p x " ;  
 	 i f ( l e v e l   <   4 0 )   r e t u r n   " 4 p x " ;  
 	 r e t u r n   " 0 p x " ;  
 }  
 J S C C . p r o t o t y p e . l e v e l 4 m a r g i n   =   f u n c t i o n ( l e v e l )   {  
 	 i f ( l e v e l   < =   2 0 )   r e t u r n   ( 1 0   *   l e v e l )   +   ' p x ' ;  
 	 i f ( l e v e l   < =   4 0 )   r e t u r n   ( 2 0 0   +   4   *   l e v e l )   +   ' p x ' ;  
 	 r e t u r n   ' 2 8 0 p x ' ;  
 }  
 J S C C . p r o t o t y p e . c m t I n D i v   =   f u n c t i o n ( d i v ,   o b j ,   f i n c b )   {  
 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " s m i l e y s - n e w C o m m e n t I n D i v " ,   o b j ) ;  
 	 i f   ( ! o b j . i s E d i t i n g )   {  
 	 	 v a r   c I d x ,   i n s B e f o r e   =   f a l s e ;  
 	 	 i f ( t h i s . p r e q . o r d   = =   ' d e s c ' )   {  
 	 	 	 v a r   f i t e m   =   t h i s . j s p g . g e t F i r s t I t e m ( ) ;  
 	 	 	 i f ( f i t e m )   {  
 	 	 	 	 c I d x   =   f i t e m . o b j . I D ;  
 	 	 	 	 i n s B e f o r e   =   t r u e ;  
 	 	 	 }  
 	 	 }  
 	 	 i f ( t h i s . p r e q . t h r   ! =   ' y e s ' )   {  
 	 	 	 o b j . N o t i c e   =   $ J C L ( ' c o m m e n t M o v e N o t i c e ' ) ;  
 	 	 	 c I d x   =   o b j . P a r e n t I D   | |   c I d x ;  
 	 	 	 d e l e t e   o b j . P a r e n t I D ;  
 	 	 	 d e l e t e   o b j . d e p t h ;  
 	 	 }  
 	 	 o b j . c e d g e   =   3 ;  
 	 	 i f ( o b j . P a r e n t I D )   {  
 	 	 	 o b j . c e d g e   =   0 ;  
 	 	 	 v a r   p r n   =   t h i s . o b j B y I d [ o b j . P a r e n t I D ] ;  
 	 	 	 v a r   t d   =   ( p r n   & &   p r n . d e p t h )   ?   p r n . d e p t h   :   0 ;  
 	 	 	 i f ( p r n )   {  
 	 	 	 	 i f ( ! o b j . d e p t h )   {  
 	 	 	 	 	 p r n . t h r e a d . p u s h ( o b j ) ;  
 	 	 	 	 	 o b j . d e p t h   =   1   +   t d ;  
 	 	 	 	 }  
 	 	 	 	 i f ( t h i s . I M   & &   t y p e o f ( p r n . c o n v e r s a t i o n ) = = ' n u m b e r ' )   o b j . c o n v e r s a t i o n   =   p r n . c o n v e r s a t i o n ;  
 	 	 	 	 c I d x   =   t h i s . g e t L a s t R e p l y ( o b j . P a r e n t I D ) . o b j . I D ;  
 	 	 	 	 i n s B e f o r e   =   f a l s e ;  
 	 	 	 	 v a r   c u r I t e m   =   t h i s . j s p g . g e t I t e m B y I d ( c I d x ) ;  
 	 	 	 	 i f ( c u r I t e m   & &   c u r I t e m . o b j . c e d g e > 1 )   {  
 	 	 	 	 	 o b j . c e d g e   =   2 ;  
 	 	 	 	 	 c u r I t e m . o b j . c e d g e   - =   2 ;    
 	 	 	 	 	 v a r   p a r e n t P a g e I d x   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( o b j . P a r e n t I D ) ;  
 	 	 	 	 	 v a r   i n s e r t e d P a g e I d x   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( c I d x ) ;  
 	 	 	 	 	 t h i s . j s p g . i n v a l i d a t e P a g e s V i e w ( p a r e n t P a g e I d x ,   i n s e r t e d P a g e I d x - p a r e n t P a g e I d x + 1 ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	  
 	 	 i f ( t h i s . I M )   {  
 	 	 	 f o r ( v a r   i = 0 ;   i < t h i s . c o n v e r s a t i o n s . l e n g t h ;   i + + )   {  
 	 	 	 	 i f ( t h i s . c o n v e r s a t i o n s [ i ] . c u r r e n t )   {  
 	 	 	 	 	 o b j . c o n v e r s a t i o n   =   i ;  
 	 	 	 	 	 b r e a k ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 i f ( t y p e o f ( o b j . c o n v e r s a t i o n ) ! = ' n u m b e r ' )   {  
 	 	 	 	 t h i s . c o n v e r s a t i o n s . p u s h ( { ' d i r e c t i o n ' : ' o u t ' } ) ;  
 	 	 	 	 o b j . w a i t C o n v e r s a t i o n   =   { c n v s I d x :   t h i s . c o n v e r s a t i o n s . l e n g t h - 1 } ;  
 	 	 	 }  
 	 	 }  
 	  
 	 	 t h i s . j s p g . a d d N e w I t e m ( o b j ,   c I d x ,   i n s B e f o r e ) ;  
 	 }  
 	 v a r   p n   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( o b j . I D ) ;  
 	 v a r   i t e m   =   t h i s . j s p g . g e t I t e m B y I d ( o b j . I D ) ;  
 	 i f   ( o b j . i s E d i t i n g )   {  
 	 	 i t e m . o b j . T e x t   =   o b j . T e x t ;  
 	 	 i t e m . o b j . g o e s I n t o   =   o b j . g o e s I n t o ;  
 	 	 t h i s . j s p g . i n v a l i d a t e I t e m V i e w ( o b j . I D ) ;  
 	 }  
 	 i f ( p n + 1 = = t h i s . c u r P a g e )   t h i s . c u r P a g e   =   0 ;  
 	 v a r   s e l f   =   t h i s ;  
 	 t h i s . d i s p l a y P a g e ( p n + 1 ,   f u n c t i o n ( i m m e d )   {  
 	 	 i f ( i m m e d )   {  
 	 	 	 i f ( ! i t e m . d i v )   {  
 	 	 	 	 s e l f . c m t I n D i v ( u n d e f i n e d ,   o b j ,   f i n c b ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 f i n c b . a p p l y ( t h i s ,   [ i t e m . d i v ] ) ;  
 	 	 	 }  
 	 	 }  
 	 	 d e l e t e   i t e m . o b j . i s E d i t i n g ;  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . s e t O p a c i t y   =   f u n c t i o n ( d i v ,   v a l )   {  
 	 i f ( d i v )   {  
 	 	 d i v . s t y l e . o p a c i t y   =   v a l ;  
 	 	 d i v . s t y l e . f i l t e r   =   ' a l p h a ( o p a c i t y :   '   +   M a t h . r o u n d ( v a l   *   1 0 0 )   +   ' ) ' ;  
 	 }   e l s e   {  
 	 	 i f ( d o c u m e n t . b o d y . f i l t e r s )  
 	 	 	 r e t u r n   ' z o o m : 1 ; f i l t e r : p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a ( o p a c i t y = '   +   M a t h . r o u n d ( v a l   *   1 0 0 )   +   ' ) ; ' ;  
 	 	 e l s e  
 	 	 	 r e t u r n   ' o p a c i t y :   '   +   v a l   +   ' ; ' ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . f l a s h   =   f u n c t i o n ( c m t )   {  
 	 i f ( ! c m t )   r e t u r n ;  
  
 	 v a r   s e l f   =   t h i s ;  
 	 c m t . s c r o l l I n t o V i e w ( t r u e ) ;  
 	 v a r   b g   =   c m t . b g ;  
  
 	 t r y   {  
 	 	 b g . s t y l e . b a c k g r o u n d C o l o r   =   s e l f . c o n f i g . f l a s h C o l o r   | |   " # f f f f 0 0 " ;  
 	 	 s e l f . s e t O p a c i t y ( b g ,   0 ) ;  
 	 }   c a t c h ( e )   {   r e t u r n ;   }  
  
 	 c m t . c n t D o w n   =   3 . 1 4   /   2 ;  
 	 c m t . c n t M o d e   =   0 ;  
  
 	 c m t . i n t v l   =   s e t I n t e r v a l ( f u n c t i o n ( )   {  
 	 	 c m t . c n t D o w n   - =   c m t . c n t M o d e   ?   0 . 5   :   0 . 3 ;  
 	 	 i f ( c m t . c n t D o w n   >   0 )   {  
 	 	 	 i f ( c m t . c n t M o d e )  
 	 	 	 	 v a r   c   =   M a t h . s i n ( c m t . c n t D o w n ) ;  
 	 	 	 e l s e  
 	 	 	 	 v a r   c   =   M a t h . c o s ( c m t . c n t D o w n ) ;  
 	 	 	 s e l f . s e t O p a c i t y ( b g ,   c ) ;  
 	 	 }   e l s e   i f ( c m t . c n t M o d e )   {  
 	 	 	 c l e a r I n t e r v a l ( c m t . i n t v l ) ;  
 	 	 	 c m t . i n t v l   =   n u l l ;  
 	 	 	 b g . s t y l e . b a c k g r o u n d C o l o r   =   " " ;  
 	 	 	 s e l f . s e t O p a c i t y ( b g ,   1 ) ;  
 	 	 }   e l s e   {  
 	 	 	 c m t . c n t M o d e   =   1 ;  
 	 	 	 c m t . c n t D o w n   =   3 . 1 4   /   2 ;  
 	 	 }  
 	 } ,   1 0 0 ) ;  
 }  
  
 J S C C . p r o t o t y p e . f o l d I n p u t F i e l d s   =   f u n c t i o n ( e ,   a c c ,   f )   {  
     i f ( e . g e t A t t r i b u t e )   {  
 	 v a r   n a m e   =   e . g e t A t t r i b u t e ( ' N A M E ' ) ;  
 	 i f ( n a m e   & &   ( n a m e . s u b s t r ( 0 ,   6 )   = =   ' j s - C m t ' ) )   {  
 	 	 v a r   s h o r t N a m e   =   n a m e . s u b s t r ( 6 ) ;  
 	 	 a c c   =   f . c a l l ( t h i s ,   e ,   a c c ,   s h o r t N a m e )   | |   a c c ;  
 	 }  
     }  
     v a r   c n   =   e . c h i l d N o d e s ;  
     i f ( c n )   {  
 	 v a r   c l e n   =   c n . l e n g t h ;  
 	 f o r ( v a r   i   =   0 ;   i   <   c l e n ;   i + + )  
 	 	 a c c   =   t h i s . f o l d I n p u t F i e l d s ( c n [ i ] ,   a c c ,   f ) ;  
     }  
     r e t u r n   a c c ;  
 }  
  
 J S C C . p r o t o t y p e . i n p u t F i e l d s M s g   =   f u n c t i o n ( c t l ,   c m t O b j ,   p T e x t )   {  
 	 r e t u r n   t h i s . f o l d I n p u t F i e l d s ( c t l ,   [ ] ,   f u n c t i o n ( e ,   a ,   n a m e ) {  
 	 	 i f   ( e . j s k $ n o t _ s p e c i f i e d )   r e t u r n ;  
 	 	 v a r   i s T e x t   =   / ^ T e x t ( E d i t ) ? $ / . t e s t ( n a m e ) ;  
 	 	 v a r   t e x t   =   i s T e x t   ?   p T e x t   :   e . v a l u e ;  
 	 	 a . p u s h ( { " N a m e " :   " j s - C m t "   +   n a m e ,   " V a l u e " :   t e x t } ) ;  
 	 	 i f ( i s T e x t   & &   t h i s . s e r v e r O p t i o n s . h t m l M o d e )  
 	 	 	 t e x t   =   t e x t . r e p l a c e ( / < [ \ / ] ? [ a - z ] { 1 , 3 } ( \ s + ( h r e f ) = [ ^ > ] + ) ? > / g ,   ' ' ) ;  
 	 	 / / t e x t   =   t e x t . r e p l a c e ( / & / g ,   ' & a m p ; ' ) . r e p l a c e ( / < / g ,   ' & l t ; ' ) . r e p l a c e ( / > / g ,   ' & g t ; ' ) ;  
 	 	 c m t O b j [ n a m e ]   =   t e x t ;  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . c m t I n P l a c e   =   f u n c t i o n ( c o b j ,   f i n c b )   {  
 	 v a r   d i v   =   t h i s . T C [ " j s - O l d C o m m e n t s " ] ;  
 	 v a r   s h a r   =   t h i s . r t S h a r e d ;  
 	 i f ( s h a r )   {  
 	 	 i f ( s h a r . g o e s I n t o )   s h a r . g o e s I n t o . p u s h ( t h i s ) ;  
 	 	 e l s e   s h a r . g o e s I n t o   =   [ t h i s ] ;  
 	 	 c o b j . g o e s I n t o   =   s h a r . g o e s I n t o ;  
 	 }  
 	 i f   ( ! c o b j . i s E d i t i n g )   {  
 	 	 t h i s . t m p I D + + ;  
 	 	 c o b j . I D   =   " j s t - "   +   t h i s . t m p I D ;  
 	 	 c o b j . i s E m b r y o n i c   =   t r u e ;  
 	  
 	 	 c o b j . s t a t u s   =   ' A ' ;  
 	 	 i f ( t h i s . s e r v e r O p t i o n s . s h o w P r o f i l e )   c o b j . p r o f i l e   =   t h i s . s e r v e r O p t i o n s . p r o f i l e ;  
 	 	 i f ( t h i s . a v a t a r s M a n a g e m e n t )   {  
 	 	 	 v a r   a v t   =   t h i s . a v a t a r s M a n a g e m e n t . g e t A c t i v e A v a t a r ( ) ;  
 	 	 	 i f   ( a v t )   {  
 	 	 	 	 c o b j . a v a t a r   =   a v t . n a m e ;  
 	 	 	 	 c o b j . a v a t a r W i d t h   =   a v t . w i d t h ;  
 	 	 	 	 c o b j . a v a t a r H e i g h t   =   a v t . h e i g h t ;  
 	 	 	 }  
 	 	 }  
 	 	 c o b j . t h r e a d   =   [ ] ;  
 	 	 c o b j . d e p t h   =   0 ;  
 	 	 c o b j . a d m i n   =   t h i s . a d m i n M o d e ;  
 	 	 v a r   d   =   n e w   D a t e ( ) ;  
 	 	 c o b j . T S   =   M a t h . r o u n d ( d . v a l u e O f ( )   /   1 0 0 0 ) ;  
 	 }   e l s e   {  
 	 	 c o b j . T e x t   =   c o b j . T e x t E d i t ;  
 	 	 d e l e t e   c o b j . T e x t E d i t ;  
   	 }  
 	 c o b j . j c a I n d e x   =   t h i s . j c a I n d e x ;  
 	 t h i s . c m t I n D i v ( d i v ,   c o b j ,   f u n c t i o n ( c m t )   {  
 	 	 i f ( c m t )   t h i s . f l a s h ( c m t ) ;  
 	 	 f i n c b . a p p l y ( t h i s ,   [ c m t ] ) ;  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . S h o w C o m m e n t D i a l o g   =   f u n c t i o n ( m s g I d ,   e x t r a )   {  
 	 m s g I d   =   m s g I d   | |   ' ' ;  
 	 t h i s . f o r M s g   =   t h i s . o b j B y I d [ m s g I d ] ;  
 	 e x t r a   =   e x t r a   | |   { } ;  
  
 	 v a r   i s R e p l y   =   ! ! m s g I d ;  
 	 v a r   c c t   =   t h i s . T C [ " j s - L e a v e C o m m e n t " ] ;  
  
 	 / *   R e m o v e   d i a l o g   f r o m   s i g h t   * /  
 	 t h i s . C o m m e n t C a n c e l l e d ( ) ;  
  
 	 i f ( t h i s . g e t S k i n ( ) ! = ' s m o o t h g r a y ' ) {  
 	 	 t h i s . o n A d d I m g B u t t o n ( t h i s . i m g S h o w ) ;  
 	 }  
  
 	 v a r   c c d   =   t h i s . T C [ e x t r a . i s E d i t i n g   ?   " j s - E d i t C o m m e n t "   :   " j s - C r e a t e C o m m e n t " ] ;  
 	 i f   ( e x t r a . i s E d i t i n g )   {  
 	 	 t h i s . T C [ ' j s - C m t T e x t E d i t ' ] . v a l u e   =   t h i s . f o r M s g . o r i g i n a l T e x t   | |   J S K i t L i b . h t m l U n q u o t e ( t h i s . f o r M s g . T e x t . r e p l a c e ( / < w b r > < \ / w b r > / g ,   ' ' ) ) ;  
 	 	 i s R e p l y   =   f a l s e ;  
 	 	 i f   ( ! t h i s . s e r v e r O p t i o n s . w y s i w y g )   {  
 	 	 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " s m i l e y s - b e f o r e P o s t N e w C o m m e n t " ,   t h i s . T C [ ' j s - C m t T e x t E d i t ' ] ) ;  
 	 	 }  
 	 }  
 	 t h i s . r e p l y F o r I d   =   ( i s R e p l y   ?   m s g I d   :   ' ' ) ;  
  
 	 v a r   p l a c e D i a l o g   =   f u n c t i o n ( i m m e d i a t e ,   a p l )   {  
 	 	 i f   ( ! a p l )   a p l   =   [ t h i s . T C [ " j s - C o m m e n t s A r e a " ] ,   t h i s . T C [ " j s - C o m m e n t s A r e a " ] . f i r s t C h i l d ] ;  
 	 	 i f ( m s g I d ) {  
 	 	 	 a p l [ 0 ] . i n s e r t B e f o r e ( c c d ,   a p l [ 1 ] ) ;  
 	 	 }   e l s e   i f   ( t h i s . b a c k w a r d s )   {  
 	 	 	 a p l [ 0 ] . i n s e r t B e f o r e ( c c d ,   t h i s . T C [ ' j s - W e l c o m e P a n e l ' ]   ?   a p l [ 1 ] . n e x t S i b l i n g   :   a p l [ 1 ] ) ;  
 	 	 }   e l s e   {  
 	 	 	 t h i s . a d d C h i l d ( a p l [ 0 ] ,   c c d ) ;  
 	 	 }  
 	 	 i f   ( e x t r a . i s E d i t i n g )   J S K i t L i b . h i d e ( a p l [ 1 ] ) ;  
  
 	 	 i f ( t h i s . b a c k w a r d s   & &   m s g I d )  
 	 	 	 c c t . s t y l e . v i s i b i l i t y   =   " h i d d e n " ;  
 	 	 e l s e  
 	 	 	 c c t . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 c c d . s t y l e . d i s p l a y   =   " b l o c k " ;  
 	 	 t r y   {  
 	 	 	 v a r   n a m e _ s u f f i x   =   ( e x t r a . i s E d i t i n g   ?   ' E d i t '   :   ' ' ) ;  
 	 	 	 v a r   t e x t   =   t h i s . T C [ " j s - C m t T e x t "   +   n a m e _ s u f f i x ] ;  
 	 	 	 / *   T i n y M C E   s u p p o r t   ( A )   * /  
 	 	 	 i f ( ! t e x t . i d )   t e x t . i d   =   " j s - C m t T e x t "   +   n a m e _ s u f f i x   +   " - "   +   t h i s . j c a I n d e x ;  
 	 	 	 i f ( ! t e x t . r i c h E d i t o r   & &   t h i s . s e r v e r O p t i o n s . w y s i w y g )   t r y   {  
 	 	 	 	 v a r   s   =   t h i s ;    
 	 	 	 	 v a r   a d d M C E C t r l   =   f u n c t i o n ( ) {  
 	 	 	 	 	 i f ( s . t m c e . f o r e i g n )   t i n y M C E . s e t t i n g s   =   s . t m c e . c f g ;  
 	 	 	 	 	 t i n y M C E . e x e c C o m m a n d ( ' m c e A d d C o n t r o l ' ,   f a l s e ,   t e x t . i d ) ;  
 	 	 	 	 	 t e x t . r i c h E d i t o r   =   t r u e ;  
 	 	 	 	 	 i f ( t e x t . m c e L o a d e d C t x )   {  
 	 	 	 	 	 	 J S K W $ E v e n t s . i n v a l i d a t e C o n t e x t ( t e x t . m c e L o a d e d C t x ) ;  
 	 	 	 	 	 	 t e x t . m c e L o a d e d C t x   =   n u l l ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 	 i f ( w i n d o w . t i n y M C E )   {  
 	 	 	 	 	 i f ( t i n y M C E . g e t I n s t a n c e B y I d ( t e x t . i d )   = =   n u l l )   a d d M C E C t r l ( ) ;  
 	 	 	 	 }   e l s e   t e x t . m c e L o a d e d C t x   =   J S K W $ E v e n t s . r e g i s t e r E v e n t C a l l b a c k ( u n d e f i n e d ,   a d d M C E C t r l ,   " m c e L o a d e d " ) ;  
 	 	 	 }   c a t c h ( e )   { }  
  
 	 	 	 v a r   s u b   =   t h i s . T C [ " j s - C m t s u b m i t "   +   n a m e _ s u f f i x ] ;  
 	 	 	 v a r   c a n   =   t h i s . T C [ " j s - C m t c a n c e l "   +   n a m e _ s u f f i x ] ;  
 	 	 	 v a r   p r e v   =   f u n c t i o n ( e ) { J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;   J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;   r e t u r n   f a l s e ; }  
  
 	 	 	 i f ( J S K i t L i b . i s O p e r a ( ) )   {  
 	 	 	 	 v a r   o n k e y   =   f u n c t i o n ( ) { } ;  
 	 	 	 }   e l s e   i f ( J S K i t L i b . i s I E ( ) )   {  
 	 	 	 	 v a r   o n k e y   =   f u n c t i o n ( d , f ) { d . o n k e y d o w n = f } ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 v a r   o n k e y   =   f u n c t i o n ( d , f ) { d . o n k e y p r e s s = f } ;  
 	 	 	 }  
  
 	 	 	 / *   c o m b i n e d   r a t i n g s   * /  
 	 	 	 v a r   c o m m e n t R a t i n g E l e m e n t s   =   J S K i t L i b . g e t E l e m e n t s B y C l a s s ( c c d ,   " j s - c o m m e n t R a t i n g D i s p l a y " ) ;  
 	 	 	 v a r   c o m m e n t R a t i n g D i s p l a y   =   ' n o n e ' ;  
 	 	 	 t h i s . s u b m i t R a t i n g   =   f a l s e ;  
 	 	 	 i f   ( t h i s . h a s R a t i n g s A p p O b j e c t ( )   & &   (   !   i s R e p l y ) )   {  
   	 	 	 	 i f   ( t h i s . T C [ " j s - c o m m e n t F i e l d R a t i n g " ] )   {  
   	 	 	 	 	 t h i s . e m b e d R a t i n g s A p p O b j e c t ( t h i s . T C [ " j s - c o m m e n t F i e l d R a t i n g " ] ) ;  
   	 	 	 	 	 c o m m e n t R a t i n g D i s p l a y   =   ' ' ;  
 	 	 	 	 	 t h i s . s u b m i t R a t i n g   =   t r u e ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 f o r   ( v a r   i = 0 ;   i   <   c o m m e n t R a t i n g E l e m e n t s . l e n g t h ;   i + + )   {  
 	 	 	 	 c o m m e n t R a t i n g E l e m e n t s [ i ] . s t y l e . d i s p l a y   =   c o m m e n t R a t i n g D i s p l a y ;  
 	 	 	 }  
  
  
 	 	 	 v a r   f l d s   =   t h i s . f o l d I n p u t F i e l d s ( c c d ,   [ ] ,  
 	 	 	 f u n c t i o n ( e ,   a ,   n a m e )   {  
 	 	 	 	 v a r   d f l   =   t h i s . f i e l d D f l [ n a m e ] ;  
 	 	 	 	 i f ( d f l )   {  
 	 	 	 	 	 i f ( e . j s k $ s e t d f l )  
 	 	 	 	 	 	 e . j s k $ s e t d f l ( d f l ) ;  
 	 	 	 	 	 e l s e   i f ( ! e . v a l u e )  
 	 	 	 	 	 	 e . v a l u e   =   d f l ;  
 	 	 	 	 }  
 	 	 	 	 v a r   a c l e n   =   a . l e n g t h ;  
 	 	 	 	 i f ( e . r i c h E d i t o r )   {  
 	 	 	 	 	 i f   ( e . v a l u e )   {  
 	 	 	 	 	 	 e . v a l u e   =   e . v a l u e . r e p l a c e ( / ^ \ n \ n + / ,   ' ' ) ;  
 	 	 	 	 	 	 e . v a l u e   =   e . v a l u e . r e p l a c e ( / \ n \ n + / g ,   ' < / p > < p > ' ) ;  
 	 	 	 	 	 	 i f ( ! e . v a l u e . m a t c h ( / ^ < p > ( \ n | . ) * < \ / p > $ / ) )   e . v a l u e   =   ' < p > '   +   e . v a l u e   +   ' < / p > ' ;  
 	 	 	 	 	 }  
 	 	 	 	 	 v a r   o   =   {   f o c u s :   f u n c t i o n ( )   {  
 	 	 	 	 	 	 v a r   s e t u p F o c u s i n g   =   f u n c t i o n ( e d )   {  
 	 	 	 	 	 	 	 v a r   f o c u s   =   f u n c t i o n ( ) { t i n y M C E . e x e c C o m m a n d ( ' m c e F o c u s ' , f a l s e , t e x t . i d ) ; } ;  
 	 	 	 	 	 	 	 v a r   d e l a y F o c u s   =   f u n c t i o n ( ) { s e t T i m e o u t ( f o c u s ,   1 0 ) } ;  
 	 	 	 	 	 	 	 i f ( ! e x t r a . n o f o c u s )   {  
 	 	 	 	 	 	 	 	 i f ( e d . i n i t i a l i z e d )   f o c u s ( ) ;  
 	 	 	 	 	 	 	 	 e l s e   e d . o n I n i t . a d d ( d e l a y F o c u s ) ;  
 	 	 	 	 	 	 	 } ;  
 	 	 	 	 	 	 	 v a r   k e y H a n d l e r   =   f u n c t i o n ( e d ,   e )   {    
 	 	 	 	 	 	 	 	 i f ( e . k e y C o d e   ! =   9 )   r e t u r n   t r u e ;  
 	 	 	 	 	 	 	 	 w i n d o w . f o c u s ( ) ;  
 	 	 t r y   {  
 	 	 	 	 	 	 	 	 a [ a c l e n + ( e . s h i f t K e y ? - 1 : 1 ) ] . f o c u s ( ) ;  
 	 	 }   c a t c h ( e x )   {   ;   }  
 	 	 	 	 	 	 	 	 r e t u r n   p r e v ( e ) ;  
 	 	 	 	 	 	 	 } ;  
 	 	 	 	 	 	 	 i f   ( J S K i t L i b . i s I E ( ) )   e d . o n K e y D o w n . a d d ( k e y H a n d l e r ) ;   e l s e   e d . o n K e y P r e s s . a d d ( k e y H a n d l e r ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 	 v a r   e d   =   t i n y M C E . g e t I n s t a n c e B y I d ( t e x t . i d ) ;  
 	 	 	 	 	 	 i f ( e d )   {  
 	 	 	 	 	 	 	 s e t u p F o c u s i n g ( e d ) ;  
 	 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 	 v a r   t   =   s e t I n t e r v a l ( f u n c t i o n ( )   {  
 	 	 	 	 	 	 	 	 v a r   e d   =   t i n y M C E . g e t I n s t a n c e B y I d ( t e x t . i d ) ;  
 	 	 	 	 	 	 	 	 i f ( e d )   {   c l e a r I n t e r v a l ( t ) ;   s e t u p F o c u s i n g ( e d ) ;   }  
 	 	 	 	 	 	 	 } ,   1 0 0 ) ;  
 	 	 	 	 	 	 }  
 	 	 	 	 	 }   } ;  
 	 	 	 	 	 i f ( a c l e n )   o n k e y ( a [ a c l e n - 1 ] ,   f u n c t i o n ( e )   {    
 	 	 	 	 	 	 e   =   e   | |   w i n d o w . e v e n t ;    
 	 	 	 	 	 	 i f ( e . k e y C o d e   = =   9   & &   ! e . s h i f t K e y )   {    
 	 	 	 	 	 	 	 t h i s . b l u r ( ) ;  
 	 	 	 	 	 	 	 o . f o c u s ( ) ;    
 	 	 	 	 	 	 	 r e t u r n   p r e v ( e ) ;    
 	 	 	 	 	 	 }  
 	 	 	 	 	 } ) ;  
 	 	 	 	 	 a . p u s h ( o ) ;  
 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 a . p u s h ( e ) ;  
 	 	 	 	 }  
 	 	 	 } ) ;  
  
 	 	 	 v a r   o k d   =   f u n c t i o n ( o f f s e t )   {   r e t u r n   f u n c t i o n ( e )   {  
 	 	 	 	 e   =   e   | |   w i n d o w . e v e n t ;  
 	 	 	 	 i f ( e . k e y C o d e   ! =   9 )   r e t u r n   t r u e ;  
 	 	 	 	 t h i s . b l u r ( ) ;  
 	 	 	 	 f l d s [ o f f s e t + ( e . s h i f t K e y ? ( f l d s . l e n g t h - 2 ) : 0 ) ] . f o c u s ( ) ;  
 	 	 	 	 r e t u r n   p r e v ( e ) ;  
 	 	 	 }   }  
  
 	 	 	 o n k e y ( f l d s [ f l d s . l e n g t h - 1 ] ,   o k d ( 0 ) ) ;  
 	 	 	 o n k e y ( f l d s [ 0 ] ,   o k d ( 1 ) ) ;  
  
 	 	 	 / /   P l a c e   i n i t i a l   f o c u s .  
 	 	 	 i f ( ! e x t r a . n o f o c u s )   {  
 	 	 	 	 f o r ( v a r   i   =   0 ;   i   <   f l d s . l e n g t h ;   i + + )  
 	 	 	 	 	 i f ( ! f l d s [ i ] . v a l u e   | |   f l d s [ i ] . t y p e   = =   ' s u b m i t ' )   {  
 	 	 	 	 	 	 f l d s [ i ] . f o c u s ( ) ;  
 	 	 	 	 	 	 b r e a k ;  
 	 	 	 	 	 }  
 	 	 	 	 s u b . s c r o l l I n t o V i e w ( f a l s e ) ;  
 	 	 	 }  
 	 	 }   c a t c h ( e )   {   }  
 	 } ;  
 	 i f ( ! m s g I d )   {  
 	 	 p l a c e D i a l o g . a p p l y ( t h i s , [ t r u e ] ) ;  
 	 }   e l s e   {  
 	 	 i f   ( e x t r a . i s E d i t i n g )   {  
 	 	 	 v a r   i t e m   =   t h i s . j s p g . g e t I t e m B y I d ( m s g I d ) ;  
 	 	 	 i t e m . o b j . i s E d i t i n g   =   t r u e ;  
 	 	 	 t h i s . e d i t i n g C m t   =   i t e m . d i v . c t l s [ ' j s - s i n g l e C o m m e n t T e x t ' ] ;  
 	 	 }   e l s e   {  
 	 	 	 v a r   i t e m   =   t h i s . g e t L a s t R e p l y ( m s g I d ) ;  
 	 	 }  
 	 	 v a r   p n   =   t h i s . j s p g . g e t P a g e B y I t e m I d ( i t e m . o b j . I D ) ;  
 	 	 t h i s . d i s p l a y P a g e ( p n + 1 ,   f u n c t i o n ( i m m e d )   {  
 	 	 	 	 i f ( i m m e d )   {  
 	 	 	 	 	 i f   ( e x t r a . i s E d i t i n g )   {  
 	 	 	 	 	 	 p l a c e D i a l o g . a p p l y ( t h i s ,   [ t r u e ,   [ t h i s . e d i t i n g C m t . p a r e n t N o d e ,   t h i s . e d i t i n g C m t ] ] ) ;  
 	 	 	 	 	 }   e l s e   {  
 	 	 	 	 	 	 v a r   p I t e m   =   t h i s . j s p g . g e t I t e m B y I d ( i t e m . o b j . I D ) ;  
 	 	 	 	 	 	 p l a c e D i a l o g . a p p l y ( t h i s ,   [ t r u e ,   [ p I t e m . d i v . p a r e n t N o d e ,   p I t e m . d i v . n e x t S i b l i n g ] ] ) ;  
 	 	 	 	 	 }  
 	 	 	 	 }  
 	 	 	 } ) ;  
 	 }  
 	 r e t u r n   f a l s e ;  
 }  
  
 J S C C . p r o t o t y p e . C o m m e n t C a n c e l l e d   =   f u n c t i o n ( )   {  
 	 i f ( t h i s . t m c e   & &   ( t h i s . s e r v e r O p t i o n s . m e d i a   | |   t h i s . s e r v e r O p t i o n s . s m i l e y ) )    
 	 	 t h i s . t m c e . c f g . c l o s e P o p u p s ( ) ;  
 	 v a r   c c t   =   t h i s . T C [ " j s - L e a v e C o m m e n t " ] ;  
 	 v a r   c c d   =   [ t h i s . T C [ " j s - E d i t C o m m e n t " ] ,   t h i s . T C [ " j s - C r e a t e C o m m e n t " ] ] ;  
 	 i f   ( c c t )   {  
 	 	 c c t . s t y l e . v i s i b i l i t y   =   " " ;  
 	 	 c c t . s t y l e . d i s p l a y   =   " " ;  
 	 }  
 	 v a r   n a m e _ s u f f i x   =   ( t h i s . e d i t i n g C m t   ?   ' E d i t '   :   ' ' ) ;  
 	 v a r   t e x t   =   t h i s . T C [ " j s - C m t T e x t "   +   n a m e _ s u f f i x ] ;  
 	 i f ( t e x t   & &   t e x t . r i c h E d i t o r )   {  
 	 	 t r y   {  
 	 	 t i n y M C E . e x e c C o m m a n d ( ' m c e R e m o v e C o n t r o l ' ,   f a l s e ,   t e x t . i d ) ;  
 	 	 }   c a t c h ( e )   {   ;   } ;  
 	 	 t e x t . r i c h E d i t o r   =   f a l s e ;  
 	 	 i f ( t e x t . m c e L o a d e d C t x )   {  
 	 	 	 J S K W $ E v e n t s . i n v a l i d a t e C o n t e x t ( t e x t . m c e L o a d e d C t x ) ;  
 	 	 	 t e x t . m c e L o a d e d C t x   =   n u l l ;  
 	 	 }  
 	 }  
 	 v a r   s   =   t h i s ;  
 	 J S K i t L i b . f m a p ( c c d ,   f u n c t i o n ( e l ,   i ) {  
 	 	 e l   & &   e l . p a r e n t N o d e   & &   e l . p a r e n t N o d e . r e m o v e C h i l d ( e l ) ;  
 	 } ) ;  
 	 i f   ( t h i s . e d i t i n g C m t )   {  
 	 	 J S K i t L i b . s h o w ( t h i s . e d i t i n g C m t ) ;  
 	 	 d e l e t e   t h i s . e d i t i n g C m t ;  
 	 }  
 	 r e t u r n   f a l s e ;  
 }  
  
 J S C C . p r o t o t y p e . s m i l e T a g   =   f u n c t i o n ( s m i l e )   {  
 	 v a r   p r o t o   =   ( / ^ ( h t t p ) ( . * ) / i . t e s t ( t h i s . u r i D o m a i n )   ?   ' '   :   ' h t t p : ' ) ;    
 	 r e t u r n   ' < i m g   s r c = " '   +   p r o t o   +   t h i s . u r i D o m a i n   +   ' / e x t r a / t i n y _ m c e / p l u g i n s / e m o t i o n s / i m g / s m i l e y - '   +   s m i l e . f i l e   +   ' "   t i t l e = " '   +   s m i l e . t i t l e   +   ' "   b o r d e r = " 0 "   a l t = " '   +   s m i l e . t i t l e   +   ' "   / > ' ;  
 }  
  
 J S C C . p r o t o t y p e . t e x t S m i l e s 2 G r a p h i c a l   =   f u n c t i o n ( t e x t ,   r e v e r s e )   {  
 	 v a r   s   =   t h i s ;  
 	 i f ( w i n d o w . t i n y M C E )   t i n y M C E . s e t t i n g s . s m i l e y   =   f a l s e ;  
 	 v a r   f l a g   =   t r u e ;  
 	 v a r   o r i g   =   t e x t ;  
 	 J S K i t L i b . f m a p ( s . s m i l e s ,   f u n c t i o n ( e l ,   i ) {  
 	 	 t e x t   =   r e v e r s e   ?   t e x t . r e p l a c e ( e l . r e g e x p T a g ,   '   '   +   i   +   '   ' )   :   t e x t . r e p l a c e ( e l . r e g e x p T e x t ,   f u n c t i o n ( $ 0 ,   $ 1 ) { r e t u r n   ( $ 1   ?   $ 0   :   s . s m i l e T a g ( e l ) ) ; } ) ;  
 	 	 i f ( w i n d o w . t i n y M C E   & &   f l a g   & &   ( t e x t   ! = =   o r i g ) )   {  
 	 	 	 t i n y M C E . s e t t i n g s . s m i l e y   =   t r u e ;  
 	 	 	 f l a g   =   f a l s e ;  
 	 	 }  
 	 } ) ;  
 	 r e t u r n   t e x t ;  
 }  
  
 J S C C . p r o t o t y p e . t h i r d P a r t y I m p o r t   =   f u n c t i o n ( K V L M s g )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   t e x t   =   J S K i t L i b . s t r i p T a g s ( K V L M s g [ ' j s - C m t T e x t ' ] ) ;  
 	 v a r   p e r m a l i n k   =   K V L M s g [ ' p e r m a l i n k ' ]   | |   s . c o n f i g . p e r m a l i n k ;  
 	 v a r   r e g   =   R e g E x p ( " ^ h t t p ( . ) ? : / / ( . * ? ) / " ) ;  
 	 v a r   m   =   r e g . e x e c ( p e r m a l i n k ) ;  
 	 v a r   d o m a i n   =   ( m   & &   m . l e n g t h > 1 )   ?   m [ 2 ]   :   s . c o n f i g . d o m a i n ;  
 	 v a r   s h a r e _ d a t a   =   {  
 	 	 	 ' d o m a i n ' :   d o m a i n ,  
 	 	 	 ' p e r m a l i n k ' :   p e r m a l i n k ,  
 	 	 	 ' T e x t ' :   t e x t  
 	 } ;  
 	 v a r   c r e a t e T a r g e t D i v   =   f u n c t i o n ( )   {  
 	 	 v a r   t g t ;  
 	 	 t g t   =   ' d i v - s h a r i n g - '   +   M a t h . r a n d o m ( ) ;  
 	 	 v a r   d i v   =   d o c u m e n t . c r e a t e E l e m e n t ( ' D I V ' ) ;  
 	 	 d i v . i d   =   d i v . n a m e   =   t g t ;  
 	 	 d i v . s t y l e . d i s p l y   =   ' n o n e ' ;  
 	 	 d i v . s t y l e . h e i g h t   =   0 ;  
 	 	 d i v . s t y l e . w i d t h   =   0 ;  
 	 	 s . t a r g e t . a p p e n d C h i l d ( d i v ) ;  
 	 	 r e t u r n   t g t ;  
 	 }  
 	 i f ( s . s e r v e r O p t i o n s . f a c e b o o k _ a p i _ k e y   & &   K V L M s g [ ' j s - C m t F B S h a r e ' ] = = ' o n ' )   {  
 	 	 v a r   j s k $ f b   =   n e w   J S K i t F B ( J S K i t L i b . g e t R e f ( s ) ,  
 	 	 	 c r e a t e T a r g e t D i v ( ) ,  
 	 	 	 s . s e r v e r O p t i o n s . f a c e b o o k _ a p i _ k e y ,  
 	 	 	 s . s e r v e r O p t i o n s . f a c e b o o k _ x d _ r e c e i v e r ,   u n d e f i n e d ,  
 	 	 	 { ' t e m p l a t e ' :   s . s e r v e r O p t i o n s . f a c e b o o k _ t e m p l a t e ,  
 	 	 	 ' c o m m e n t _ d a t a ' :   s h a r e _ d a t a } ) ;  
 	 }  
 	 i f ( s . s e r v e r O p t i o n s . g f c _ s i t e   & &   K V L M s g [ ' j s - C m t G F C S h a r e ' ] = = ' o n ' )   {  
 	 	 v a r   j s k $ g f c   =   n e w   J S K i t G F C ( J S K i t L i b . g e t R e f ( s ) ,  
 	 	 	 c r e a t e T a r g e t D i v ( ) ,  
 	 	 	 s . s e r v e r O p t i o n s . g f c _ s i t e ,  
 	 	 	 f u n c t i o n ( ) {  
 	 	 	 	 t h i s . s h a r e d a t a   =   s h a r e _ d a t a ;  
 	 	 	 	 t h i s . s h a r e C o m m e n t ( ) ;  
 	 	 	 } ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . C o m m e n t S u b m i t t e d   =   f u n c t i o n ( )   {  
 	 v a r   p r n   =   t h i s . f o r M s g ;  
 	 v a r   i s E d i t i n g   =   p r n   & &   p r n . i s E d i t i n g ;  
  
 	 i f   ( ! i s E d i t i n g   & &   ! t h i s . T C [ ' j s - C m t N a m e ' ] . v a l u e )   {  
 	 	 a l e r t ( $ J C L ( ' n i c k n a m e R e q u i r e d ' ) ) ;  
 	 	 r e t u r n ;  
 	 }  
 	  
 	 / *   T i n y M C E   s u p p o r t   ( B )   * /  
 	 v a r   n a m e _ s u f f i x   =   ( i s E d i t i n g   ?   ' E d i t '   :   ' ' ) ;  
 	 v a r   t e x t   =   t h i s . T C [ " j s - C m t T e x t "   +   n a m e _ s u f f i x ] ;  
 	 v a r   t e x t V a l u e ;  
 	 i f ( t e x t . r i c h E d i t o r )   {  
 	 	 t i n y M C E . t r i g g e r S a v e ( f a l s e ,   f a l s e ) ;  
 	 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " s m i l e y s - b e f o r e P o s t N e w C o m m e n t " ,   t e x t ) ;  
 	 	 t e x t V a l u e   =   S t r i n g ( t e x t . v a l u e ) .  
                                                                 r e p l a c e ( / ( < \ / p > ) [ \ r \ n ] + ( < p > ) / g ,   ' $ 1 $ 2 ' ) .  
 	 	 	 	 r e p l a c e ( / < p > / g ,   ' \ n ' ) . r e p l a c e ( / < \ / p > / g ,   ' ' ) . r e p l a c e ( / < b r \ s ? \ / ? > / g ,   ' \ n ' ) ;  
 	 }   e l s e   {  
 	 	 t e x t V a l u e   =   S t r i n g ( t e x t . v a l u e ) . r e p l a c e ( / & / g ,   ' & a m p ; ' ) ;  
 	 }  
  
 	 v a r   t e x t M s g   =   e n c o d e U R I C o m p o n e n t ( t e x t V a l u e ) ;  
  
 	 i f ( ! t e x t M s g   | |   ! t e x t M s g . l e n g t h )   {  
 	 	 a l e r t ( $ J C L ( " t o o S h o r t " ) ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 v a r   m c l   =   t h i s . s e r v e r O p t i o n s . m a x C o m m e n t L e n g t h   | |   3 0 0 0 ;  
 	 i f ( t e x t . v a l u e . l e n g t h   >   m c l )   {  
 	 	 a l e r t ( $ J C L ( " t o o L o n g " , { " m a x C o m m e n t L e n g t h " : m c l } ) ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 i f   ( t h i s . a d m i n F i r s t M s g M o d e )   {  
 	 	 v a r   c m t E m a i l   =   t h i s . T C [ ' j s - C m t E m a i l ' ] ;  
 	 	 i f   ( c m t E m a i l )   {  
 	 	 	 v a r   c m t E m a i l D e f M s g   =   $ J C L ( " e m a i l F i r s t N o t e " ) ;  
 	 	 	 i f   ( c m t E m a i l . v a l u e   = =   c m t E m a i l D e f M s g   | |   c m t E m a i l . v a l u e . i n d e x O f ( ' @ ' )   <   0 )   {  
 	 	 	 	 i f   ( c o n f i r m ( $ J C L ( " e m a i l R e q u i r e d " ) ) )   {  
 	 	 	 	 	 c m t E m a i l . v a l u e   =   c m t E m a i l D e f M s g ;  
 	 	 	 	 	 c m t E m a i l . s t y l e . c o l o r   =   ' # F F 0 0 0 0 ' ;  
 	 	 	 	 	 c m t E m a i l . s t y l e . f o n t W e i g h t   =   " b o l d " ;  
 	 	 	 	 	 r e t u r n ;  
 	 	 	 	 }  
 	 	 	 }   e l s e   {  
 	 	 	 	 i f   ( ! c o n f i r m ( c m t E m a i l . v a l u e   +   "   "   +   $ J C L ( " e m a i l C o n f i r m a t i o n " ) ) )   {  
 	 	 	 	 	 r e t u r n ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 }  
 	 }  
 	  
 	 v a r   f o r m   =   t h i s . T C [ i s E d i t i n g   ?   " j s - E d i t C o m m e n t "   :   " j s - C r e a t e C o m m e n t " ] ;  
  
                 v a r   a v t   =   t h i s . a v a t a r s M a n a g e m e n t   ?   ( t h i s . a v a t a r s M a n a g e m e n t . g e t A c t i v e A v a t a r ( )   | |   ' n o ' )   :   n u l l ;  
 	 v a r   p e r m a l i n k   =   t h i s . c o n f i g . p e r m a l i n k ;  
 	 v a r   m o d e r a t e   =   t h i s . c o n f i g . m o d e r a t e ;  
  
 	 v a r   t m p O b j   =   { y o u r s : t r u e } ;  
 	 i f ( p r n )   {  
 	 	 i f   ( i s E d i t i n g )   {  
 	 	 	 t m p O b j . I D   =   p r n . I D ;  
 	 	 }   e l s e   {  
 	 	 	 t m p O b j . P a r e n t I D   =   p r n . I D ;  
 	 	 }  
 	 	 t m p O b j . p a t h   =   p r n . p a t h ;  
 	 	 i f ( p r n . p e r m a l i n k )   {  
 	 	 	 t m p O b j . p e r m a l i n k   =   p r n . p e r m a l i n k ;  
 	 	 	 p e r m a l i n k   =   p r n . p e r m a l i n k ;  
 	 	 }  
 	 }  
  
 	 v a r   m e s s a g e   =   t h i s . i n p u t F i e l d s M s g ( f o r m ,   t m p O b j ,   t e x t V a l u e ) ;  
  
 	 / *   c o m b i n e d   r a t i n g s   * /  
 	 i f   ( t h i s . s u b m i t R a t i n g )   {  
 	 	 r a t i n g   =   t h i s . g e t R a t i n g s A p p O b j e c t ( ) . u s e r R a t i n g ;  
 	 	 m e s s a g e . p u s h ( { ' N a m e ' :   ' j s - C m t R a t i n g ' ,   ' V a l u e ' :   r a t i n g } ) ;  
 	 	 t m p O b j . R a t i n g   =   r a t i n g ;  
 	 }  
 	 i f ( p r n   & &   ! i s E d i t i n g )   {  
 	 	 m e s s a g e . p u s h ( { ' N a m e ' :   ' j s - C m t P a r e n t I D ' ,   ' V a l u e ' :   p r n . I D } ) ;  
 	 	 i f ( t h i s . I M = = ' o w n '   & &   p r n . p r o f i l e )   {  
 	 	 	 m e s s a g e . p u s h ( { ' N a m e ' :   ' d e s t P r o f i l e ' ,   ' V a l u e ' :   p r n . p r o f i l e } ) ;  
 	 	 }  
 	 }  
 	 i f ( p e r m a l i n k )   m e s s a g e . p u s h ( { ' N a m e ' :   ' p e r m a l i n k ' ,   ' V a l u e ' :   p e r m a l i n k } ) ;  
 	 i f   ( ! i s E d i t i n g )   {  
 	 	 i f ( a v t )   m e s s a g e . p u s h ( { ' N a m e ' :   ' a v a t a r ' ,   ' V a l u e ' :   ( a v t . n a m e   ?   a v t . n a m e   :   a v t ) } ) ;  
 	 }   e l s e   {  
 	 	 t m p O b j . i s E d i t i n g   =   t r u e ;  
 	 }  
  
 	 i f ( m o d e r a t e )   t h i s . p a t h O v e r r i d e   =   t h i s . f o r M s g . p a t h ;  
  
 	 v a r   K V L C m t   =   t h i s . g e t K V L i s t F r o m M s g ( m e s s a g e ) ;  
 	 / /   A P I :   s u b s c r i b e r   e x p e c t s   ( C o n s t r u c t e d M e s s a g e O b j e c t [ ,   F o r m D O M ] )  
 	 t r y   {  
 	 	 J S K i t A P I . a s k p u b l i c . c a l l ( t h i s ,   " c o m m e n t - s u b m i t " ,  
 	 	 	 K V L C m t ,   f o r m ) ;  
 	 }   c a t c h ( e )   {  
 	 	 r e t u r n ;  
 	 }  
  
 	 t h i s . C o m m e n t C a n c e l l e d ( ) ;  
 	 t h i s . r o u t e M s g ( " a t t a c h C o m m e n t " ,  
 	 	 [ t m p O b j ,   m e s s a g e ,   t e x t M s g . l e n g t h   >   1 7 0 0 ] ) ;  
  
 	 i f   ( t h i s . T C [ ' j s - C m t T e x t '   +   n a m e _ s u f f i x ] )   {  
 	 	 t h i s . T C [ ' j s - C m t T e x t '   +   n a m e _ s u f f i x ] . v a l u e   =   ' ' ;  
 	 }  
 	 i f ( t h i s . c l e a r I m g s )   t h i s . c l e a r I m g s ( ) ;  
 	 t h i s . t h i r d P a r t y I m p o r t ( K V L C m t ) ;  
 }  
  
 J S C C . p r o t o t y p e . a t t a c h C o m m e n t   =   f u n c t i o n ( t m p O b j ,   t m p M s g ,   l o n g M s g )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   c m t O b j   =   t h i s . c l o n e O b j ( t m p O b j ) ;  
 	 i f ( s . i m a g e s )   c m t O b j . i m g s   =   s . i m a g e s ;  
 	 v a r   m s g   =   J S K i t L i b . f m a p ( t m p M s g ,   f u n c t i o n ( e ) { r e t u r n   e } ) ;  
  
 	 i f ( c m t O b j . P a r e n t I D   & &   ! t h i s . o b j B y I d [ c m t O b j . P a r e n t I D ] )   {  
 	 	 t h i s . j s p g . i n v a l i d a t e ( ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 v a r   r t S h a r e d   =   t h i s . r t S h a r e d ;  
 	 v a r   s u b m i t M s g   =   f u n c t i o n ( )   {  
 	 	 i f ( r t S h a r e d . s e n t )   r e t u r n ;  
 	 	 r t S h a r e d . s e n t   =   t r u e ;  
 	 	 / *   K i c k   i n   m e s s a g e   s u b m i s s i o n   * /  
 	 	 m s g . p u s h ( { ' N a m e ' :   ' t i d ' ,   ' V a l u e ' :   c m t O b j . I D } ) ;  
 	 	 s . p r e p a r e I m g D a t a ( m s g ) ;  
 	 	 v a r   s r c   =   ( c m t O b j . i s E d i t i n g   ?   ' . e d i t '   :   ' . p u t ' ) ;  
 	 	 v a r   p r m s   =   t h i s . g e t K V L i s t F r o m M s g ( m s g ) ;  
 	 	 t h i s . s e r v e r ( s r c ,   p r m s ,   l o n g M s g ) ;  
 	 }  
  
 	 t h i s . c m t I n P l a c e ( c m t O b j ,   f u n c t i o n ( )   {  
 	 	 t h i s . c o n t r o l s . r e v e a l ( ) ;  
 	 	 t h i s . r e C a l c P a g e s ( ) ;  
 	 	 s u b m i t M s g . c a l l ( t h i s ) ;  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . g e t K V L i s t F r o m M s g   =   f u n c t i o n ( m s g )   {  
 	 v a r   p r m s   =   { } ;  
 	 J S K i t L i b . f m a p ( m s g ,   f u n c t i o n ( v )   {   p r m s [ v . N a m e ]   =   v . V a l u e ;   } ) ;  
 	 r e t u r n   p r m s ;  
 }  
  
 J S C C . p r o t o t y p e . c l o n e O b j   =   f u n c t i o n ( f )   {  
 	 v a r   t   =   { } ;  
 	 f o r ( v a r   p   i n   f )   t [ p ]   =   f [ p ] ;  
 	 r e t u r n   t ;  
 }  
  
 J S C C . p r o t o t y p e . g e t R a t i n g s A p p O b j e c t   =   f u n c t i o n ( )   {  
 	 r e t u r n   t h i s . i s S t a n d a l o n e ( )   ?   n u l l   :   $ J S K i t G l o b a l . g e t R a t i n g s A p p O b j e c t ( t h i s . u n i q ) ;  
 }  
  
 J S C C . p r o t o t y p e . h a s R a t i n g s A p p O b j e c t   =   f u n c t i o n ( )   {  
 	 r e t u r n   t h i s . g e t R a t i n g s A p p O b j e c t ( )   ?   t r u e   :   f a l s e ;  
 }  
  
 J S C C . p r o t o t y p e . e m b e d R a t i n g s A p p O b j e c t   =   f u n c t i o n ( n o d e )   {  
 	 / /   O n e   t i m e  
 	 i f   (   !   t h i s . e m b e d R a t i n g s A p p O b j e c t C o m p l e t e d )   {  
 	 	 $ J S K i t G l o b a l . c o p y R a t i n g s A p p O b j e c t ( t h i s . u n i q ,   n o d e ) ;  
 	 	 t h i s . e m b e d R a t i n g s A p p O b j e c t C o m p l e t e d   =   t r u e ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . c r e a t e M i n i S t a r O b j e c t   =   f u n c t i o n ( r a t i n g ,   s c a l e )   {  
  
 	 v a r   r a o   =   t h i s . g e t R a t i n g s A p p O b j e c t ( ) ;  
 	 v a r   f u l l S t a r   =   r a o . m i n i F u l l S t a r [ ' u s e r ' ] ;  
 	 v a r   e m p t y S t a r   =   r a o . m i n i E m p t y S t a r [ ' u s e r ' ] ;  
 	 v a r   s t a r W i d t h   =   r a o . m i n i S t a r W i d t h   +   ' p x ' ;  
 	 v a r   s t a r H e i g h t   =   r a o . m i n i S t a r H e i g h t   +   ' p x ' ;  
  
 	 v a r   s e t I m a g e   =   f u n c t i o n ( s t a r ,   i m a g e U R L )   {  
 	 	 i f ( s t a r . i m a g e U R L   = =   i m a g e U R L )  
 	 	 	 r e t u r n ;   / /   A l r e a d y   s e t   a n d   w e   k n o w   i t  
  
 	 	 s t a r . i m a g e U R L   =   i m a g e U R L ;  
  
 	 	 i f ( d o c u m e n t . b o d y . f i l t e r s )   {  
 	 	 	 s t a r . r u n t i m e S t y l e . f i l t e r  
 	 	 	 	 =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = ' "  
 	 	 	 	 +   i m a g e U R L   +   " ' ,   s i z i n g M e t h o d = ' c r o p ' ) "  
 	 	 }   e l s e   {  
 	 	 	 s t a r . s t y l e . b a c k g r o u n d I m a g e   =   ' u r l ( '   +   i m a g e U R L   +   ' ) ' ;  
 	 	 }  
 	 }  
  
 	 v a r   o b j   =   d o c u m e n t . c r e a t e E l e m e n t ( ' d i v ' ) ;  
  
 	 / *   I n c r e m e n t   b y   F u l l   S t a r   R a t i n g s   * /  
 	 f o r   ( v a r   i = 2 ;   i   < =   s c a l e ;   i   + =   2 )   {  
  
 	 	 v a r   s t a r   =   t h i s . c r ( ' d i v ' ) ;  
  
 	 	 s t a r . s t y l e . c s s F l o a t       =   ' l e f t ' ;  
 	 	 s t a r . s t y l e . s t y l e F l o a t   =   ' l e f t ' ;  
 	 	 s t a r . s t y l e . w i d t h         =   s t a r W i d t h ;  
 	 	 s t a r . s t y l e . h e i g h t       =   s t a r H e i g h t ;  
  
 	 	 s e t I m a g e ( s t a r ,   ( r a t i n g   > =   i   ?   f u l l S t a r   :   e m p t y S t a r ) ) ;  
  
 	 	 o b j . a p p e n d C h i l d ( s t a r ) ;  
 	 }  
  
 	 r e t u r n   o b j ;  
 }  
  
 J S C C . p r o t o t y p e . r e r e n d e r N a m e   =   f u n c t i o n ( c m t )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   c t l s   =   c m t . c t l s ;  
 	 v a r   j s c   =   f u n c t i o n ( t ) { r e t u r n   c t l s [ ' j s - s i n g l e C o m m e n t ' + t ] } ;  
 	 v a r   s n   =   j s c ( " N a m e " ) ;  
 	 i f ( s n   & &   c m t . c o b j . p r o f i l e   & &   s e l f . s e r v e r O p t i o n s . s h o w P r o f i l e  
 	 & &   ! ( c m t . c o b j . m s g t y p e   & &   c m t . c o b j . m s g t y p e . m a t c h ( / T | P / ) ) )   {  
 	 	 s n . s t y l e . t e x t D e c o r a t i o n   =   ' u n d e r l i n e ' ;  
 	 	 s n . s t y l e . c u r s o r   =   ' p o i n t e r ' ;  
 	 	 s n . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 s e l f . s h o w P r o f i l e ( s n ,   c m t . c o b j ,   s e l f . s e r v e r O p t i o n s . p r o f i l e L e v e l ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
 	 v a r   s u   =   j s c ( " U r l " ) ;  
 	 i f ( s u   & &   c m t . c o b j . U r l   & &   s e l f . s e r v e r O p t i o n s . e x t r a F i e l d U R L  
 	 & &   ! ( c m t . c o b j . m s g t y p e   & &   c m t . c o b j . m s g t y p e . m a t c h ( / T | P / ) ) )   {  
 	 	 s u . s t y l e . c u r s o r   =   ' p o i n t e r ' ;  
 	 	 s u . s e t A t t r i b u t e ( ' t i t l e ' ,   c m t . c o b j . U r l ) ;  
 	 	 s u . s t y l e . d i s p l a y   =   ' i n l i n e ' ;  
 	 	 s u . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 w i n d o w . o p e n ( c m t . c o b j . U r l ,   ' _ b l a n k ' ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . g o t P e r m a n e n t I d   =   f u n c t i o n ( t m p i d ,   m s g I d )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   c o b j   =   t h i s . o b j B y I d [ t m p i d ] ;  
 	 v a r   c m t   =   t h i s . j s p g . g e t I t e m B y I d ( t m p i d ) . d i v ;  
 	 d e l e t e   s e l f . o b j B y I d [ t m p i d ] ;  
 	 d e l e t e   c o b j . i s E m b r y o n i c ;  
 	 c o b j . I D   =   m s g I d ;  
 	 c m t . i d   =   m s g I d ;  
 	 t h i s . j s p g . i n v a l i d a t e I t e m V i e w ( m s g I d ) ;  
 	 s e l f . o b j B y I d [ m s g I d ]   =   c o b j ;  
 	 v a r   a u x   =   a r g u m e n t s . l e n g t h   >   2   ?   a r g u m e n t s [ 2 ]   :   { } ;  
 	 v a r   p r o p s   =   { ' T e x t ' :   c o b j ,   ' s t a t u s ' :   c o b j ,  
 	 	 ' m t e x t ' :   s e l f . s e r v e r O p t i o n s ,  
 	 	 ' m m o d e ' :   s e l f . s e r v e r O p t i o n s } ;  
 	 f o r ( v a r   p n a m e   i n   p r o p s )   {  
 	 	 i f ( a u x . h a s O w n P r o p e r t y ( p n a m e ) )   {  
 	 	 	 p r o p s [ p n a m e ] [ p n a m e ]   =   a u x [ p n a m e ] ;  
 	 	 }  
 	 }  
 	 i f   ( a u x . T e x t )   {  
 	 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( ' s m i l e y s - l o a d C o m m e n t s W i d g e t ' ,   c o b j ,   s e l f . j c a I n d e x ) ;  
 	 }  
 	 i f ( s e l f . s e r v e r O p t i o n s . s h o w P r o f i l e   & &   ! s e l f . s e r v e r O p t i o n s . p r o f i l e   & &   a u x . p r o f i l e )   {  
 	 	 s e l f . s e r v e r O p t i o n s . p r o f i l e   =   a u x . p r o f i l e ;  
 	 	 c o b j . p r o f i l e   =   a u x . p r o f i l e ;  
 	 }  
 	 v a r   c n v s O b j   =   { } ;  
 	 c n v s O b j . N a m e   =   c o b j . N a m e ;  
 	 i f ( a u x . a v a t a r )   {  
 	 	 c o b j . a v a t a r   =   a u x . a v a t a r ;  
 	 	 c o b j . a v a t a r W i d t h   =   a u x . a v a t a r W i d t h ;  
 	 	 c o b j . a v a t a r H e i g h t   =   a u x . a v a t a r H e i g h t ;  
 	 	 c n v s O b j . a v a t a r   =   a u x . a v a t a r ;  
 	 	 c n v s O b j . a v a t a r W i d t h   =   a u x . a v a t a r W i d t h ;  
 	 	 c n v s O b j . a v a t a r H e i g h t   =   a u x . a v a t a r H e i g h t ;  
 	 	 s e l f . p l a c e A v a t a r ( c o b j ) ;  
 	 }  
 	 i f   ( a u x . g r a v a t a r I d )   {  
 	 	 c o b j . G r a v a t a r I D   =   a u x . g r a v a t a r I d ;    
 	 	 s e l f . p l a c e A v a t a r ( c o b j ) ;  
 	 }  
 	 i f ( a u x . d e s t N a m e ) {  
 	 	 c o b j . d e s t N a m e   =   a u x . d e s t N a m e ;  
 	 	 c n v s O b j . d e s t N a m e   =   a u x . d e s t N a m e ;  
 	 }  
 	 i f ( a u x . d e s t a v a t a r )   {  
 	 	 c o b j . d e s t a v a t a r   =   a u x . d e s t a v a t a r ;  
 	 	 c o b j . d e s t a v a t a r W i d t h   =   a u x . d e s t a v a t a r W i d t h ;  
 	 	 c o b j . d e s t a v a t a r H e i g h t   =   a u x . d e s t a v a t a r H e i g h t ;  
 	 	 c n v s O b j . d e s t a v a t a r   =   a u x . d e s t a v a t a r ;  
 	 	 c n v s O b j . d e s t a v a t a r W i d t h   =   a u x . d e s t a v a t a r W i d t h ;  
 	 	 c n v s O b j . d e s t a v a t a r H e i g h t   =   a u x . d e s t a v a t a r H e i g h t ;  
 	 }  
 	 i f ( t h i s . I M   & &   c o b j . w a i t C o n v e r s a t i o n )   {  
 	 	 c n v s O b j . d i r e c t i o n   =   " o u t " ;  
 	 	 t h i s . c o n v e r s a t i o n s [ c o b j . w a i t C o n v e r s a t i o n . c n v s I d x ]   =   c n v s O b j ;  
 	 	 c o b j . c o n v e r s a t i o n   =   c o b j . w a i t C o n v e r s a t i o n . c n v s I d x ;  
 	 	 c o b j . w a i t C o n v e r s a t i o n   =   f a l s e ;  
 	 	 c o b j . h a s C n v s   =   f a l s e ;  
 	 }  
 	 i f ( c m t . d o m C t l s )   c m t . d o m C t l s . s t y l e . v i s i b i l i t y   =   " " ;  
 	 i f ( t h i s . j s p g . g e t P a g e B y I t e m I d ( m s g I d ) = = t h i s . c u r P a g e - 1 )   {  
 	 	 v a r   p a g e N o   =   t h i s . c u r P a g e ;  
 	 	 t h i s . c u r P a g e   =   0 ;  
 	 	 t h i s . d i s p l a y P a g e ( p a g e N o ) ;  
 	 }  
 }  
  
 f u n c t i o n   J S R e p l y M S G I d ( t m p i d ,   m s g I d )   {  
 	 t r y   {  
 	 	 v a r   c m t   =   d o c u m e n t . g e t E l e m e n t B y I d ( t m p i d ) ;  
 	 	 v a r   c o b j   =   c m t . c o b j ;  
 	 	 i f ( c o b j . g o e s I n t o )   {  
 	 	 	 v a r   a r g s   =   a r g u m e n t s ;  
 	 	 	 J S K i t L i b . f m a p ( c o b j . g o e s I n t o ,  
 	 	 	 	 f u n c t i o n ( s ) { s . g o t P e r m a n e n t I d . a p p l y ( s , a r g s ) } ) ;  
 	 	 }   e l s e   {  
 	 	 	 v a r   s e l f   =   $ J C A [ c o b j . j c a I n d e x ] ;  
 	 	 	 s e l f . g o t P e r m a n e n t I d ( t m p i d ,   m s g I d ) ;  
 	 	 }  
 	 }   c a t c h ( e ) { }  
 }  
  
 f u n c t i o n   J S D e l e t e M S G I d ( m s g I d ,   j c a I n d e x ,   d e l e t e d C o u n t )   {  
 	 t r y   {  
 	 	 v a r   c m t   =   d o c u m e n t . g e t E l e m e n t B y I d ( m s g I d ) ;  
 	 	 i f ( c m t )   {  
 	 	 	 v a r   s e l f   =   $ J C A [ j c a I n d e x ] ;  
 	 	 	 i f ( c m t . c o b j . a c t i o n )  
 	 	 	 	 J S K W $ E v e n t s . s y n c B r o a d c a s t ( " c o m m e n t s _ s e r v e r R e q u e s t _ "   +   c m t . c o b j . a c t i o n ) ;  
 	 	 	 i f ( d e l e t e d C o u n t > 1 ) {  
 	 	 	 	 s e l f . t a g   =   n u l l ;  
 	 	 	 	 s e l f . j s p g . i n v a l i d a t e ( ) ;  
 	 	 	 	 v a r   p a g e N o   =   s e l f . c u r P a g e ;  
 	 	 	 	 s e l f . c u r P a g e   =   0 ;  
 	 	 	 	 s e l f . d i s p l a y P a g e ( p a g e N o ) ;  
 	 	 	 }   e l s e   {  
 	 	 	 	 s e l f . p o s t H a n d l e r D e l e t e ( c m t ) ;  
 	 	 	 }  
 	 	 }  
 	 }   c a t c h ( e ) { }  
 }  
  
 f u n c t i o n   J S C C K a r m a ( c O b j ,   s e l f )   {  
 	 v a r   k O b j   =   {   p :   c O b j . k a r m a P   | |   0 ,   n :   c O b j . k a r m a N   | |   0   } ;  
 	 t h i s . s c o r e   =   k O b j . p   -   k O b j . n ;  
 	 t h i s . v o t e s   =   k O b j . p   +   k O b j . n ;  
 	 t h i s . c O b j   =   c O b j ;  
 	 t h i s . s e l f   =   s e l f ;  
 	 t h i s . v o t e 2 t e x t ( ) ;  
 	 r e t u r n   t h i s ;  
 }  
 J S C C K a r m a . p r o t o t y p e . v o t e 2 t e x t   =   f u n c t i o n ( )   {  
 	 t h i s . v o t e s T e x t   =   t h i s . v o t e s   +   '   '  
 	 	 	 +   ( ( t h i s . v o t e s   = =   1 )   ?   $ J C L ( " v o t e " )   :   $ J C L ( " v o t e s " ) ) ;  
 }  
  
 J S C C K a r m a . p r o t o t y p e . r e c o m p u t e S c o r e   =   f u n c t i o n ( s c o r e A d j u s t m e n t )   {  
 	 v a r   n o w   =   n e w   D a t e ( ) ;  
 	 i f ( t h i s . v o t e d A l r e a d y )   {  
 	 	 t h i s . s c o r e   - =   t h i s . m y V o t e ;  
 	 }   e l s e   {  
 	 	 t h i s . v o t e s   + =   1 ;  
 	 	 t h i s . v o t e d A l r e a d y   =   t r u e ;  
 	 	 v a r   k O b j   =   t h i s ;  
 	 	 s e t T i m e o u t ( f u n c t i o n ( )   {  
 	 	 	 v a r   a c t i o n   =   k O b j . m y V o t e   >   0   ?   ' + '   :   ' - ' ;  
 	 	 	 k O b j . s e l f . s e r v e r ( ' - k a r m a ' ,   { ' i d ' :   k O b j . c O b j . I D ,  
 	 	 	 	 	 ' a c t i o n ' :   a c t i o n } ) ;  
 	 	 	 } ,   2 0 0 0 ) ;  
 	 }  
 	 t h i s . s c o r e   + =   s c o r e A d j u s t m e n t ;  
 	 t h i s . m y V o t e   =   s c o r e A d j u s t m e n t ;  
 	 t h i s . v o t e 2 t e x t ( ) ;  
 }  
  
 J S C C . p r o t o t y p e . d i v P a g e s   =   f u n c t i o n ( s o ,   i t e m s )   {  
 	 v a r   s r v   =   s o . p a g e s ;  
 	 t h i s . c u r P a g e   =   0 ;  
 	 v a r   s e l f   =   t h i s ;  
 	 i f ( ! t h i s . j s p g )   {  
 	 	 t h i s . j s p g   =   n e w   J S P G C ( i t e m s . l e n g t h ,   t h i s . p r e q . p s ) ;  
 	 	 t h i s . j s p g . d a t a R e q u e s t   =   f u n c t i o n ( p a g e I d x ,   p g ,   c b )   {  
 	 	 	 v a r   p a g e N o   =   p a g e I d x + 1 ;  
 	 	 	 i f ( ! p g . t a r g e t )   p g . t a r g e t   =   s e l f . c r ( ' d i v ' ) ;  
 	 	 	 v a r   t g t   =   p g . t a r g e t ;  
 	 	 	 i f ( t g t . p a r e n t N o d e )   t g t . p a r e n t N o d e . r e m o v e C h i l d ( t g t ) ;  
 	 	 	 s e l f . d a t a L o a d e r   =   f u n c t i o n ( )   {  
 	 	 	 	 s e l f . c u r P a g e   =   0 ;  
 	 	 	 	 s e l f . d i s p l a y P a g e ( p a g e N o ,   f u n c t i o n ( i m m e d ) {   c b . a p p l y ( s e l f ,   [ u n d e f i n e d ,   i m m e d ] ) } ) ;  
                                                                 }  
 	 	 	 i f ( s e l f . p r e q . p n   <   1 0 )  
 	 	 	 	 s e l f . p r e q . p n   + =   5 ;  
 	 	 	 s e l f . g e t p a g e s ( p a g e N o   -   M a t h . c e i l ( s e l f . p r e q . p n   /   2 ) ) ;  
 	 	 	 r e t u r n   c b ( s e l f . t e x t ( t g t ,   $ J C L ( " L o a d i n g . . . " ) ) ,   f a l s e ) ;  
 	 	 	 } ;  
 	 	 t h i s . j s p g . d a t a V i s u a l i z a t o r   =   f u n c t i o n ( s I d x ,   a r r ,   p g ,   c b )   {  
 	 	 	 i f ( ! p g . t a r g e t )   p g . t a r g e t   =   s e l f . c r ( ' d i v ' ) ;  
 	 	 	 v a r   t g t   =   p g . t a r g e t ;  
 	 	 	 i f ( t g t . p a r e n t N o d e )   t g t . p a r e n t N o d e . r e m o v e C h i l d ( t g t ) ;  
 	 	 	 v a r   i t e m s O n P a g e   =   a r r . l e n g t h ;  
 	 	 	 v a r   c n v s   =   [ ] ;  
 	 	 	 v a r   c n   =   J S K i t L i b . f m a p ( a r r , f u n c t i o n ( V , K ) {  
 	 	 	 	 i f ( ! V . h t m l )   {  
 	 	 	 	 	 v a r   o l d N   =   V . o b j . N a m e ;  
 	 	 	 	 	 V . o b j . N a m e   =   ( s e l f . I M   & &   V . o b j . y o u r s )   ?   ' M e '   :   o l d N ;  
 	 	 	 	 	 v a r   o l d T   =   V . o b j . T e x t ;  
 	 	 	 	 	 i f ( V . o b j . s t a t u s = = ' D T ' )   V . o b j . T e x t   =   ' D e l e t e d ' ;  
 	 	 	 	 	 i f   ( V . o b j . U r l   & &   ! V . o b j . U r l . m a t c h ( / ^ h t t p s ? : \ / \ / / )   )   {  
 	 	 	 	 	 	 V . o b j . U r l   =   " h t t p : / / "   +   V . o b j . U r l ;  
 	 	 	 	 	 }  
 	 	 	 	 	 V . h t m l   =   s e l f . c r e a t e C o m m e n t A s H T M L ( V . o b j ) ;  
 	 	 	 	 	 V . o b j . N a m e   =   o l d N ;  
 	 	 	 	 	 V . o b j . T e x t   =   o l d T ;  
 	 	 	 	 	 d e l e t e   V . d i v ;  
 	 	 	 	 }  
 	 	 	 	 V . d i v   =   J S K i t L i b . h t m l ( V . h t m l ) ;  
 	 	 	 	 V . d i v . i d   =   V . o b j . I D ;  
 	 	 	 	 V . o b j . h a s C n v s   =   ! c n v s [ V . o b j . c o n v e r s a t i o n ] ;  
 	 	 	 	 c n v s [ V . o b j . c o n v e r s a t i o n ]   =   t r u e ;  
 	 	 	 	 s e l f . f i x C o m m e n t ( V . d i v ,   V . o b j ,   K ,   K + s I d x ,   i t e m s O n P a g e ) ;  
 	 	 	 	 r e t u r n   V ;  
 	 	 	 } ) ;  
 	 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( t g t ) ;  
 	 	 	 s e l f . p a g e H e a d e r ( t g t ,   s I d x ,   a r r ,   i t e m s O n P a g e ) ;  
 	 	 	 f o r ( v a r   i = 0 ;   i < c n . l e n g t h ;   i + + )   {  
 	 	 	 	 t g t . a p p e n d C h i l d ( c n [ i ] . d i v ) ;  
 	 	 	 	 i f ( ! s e l f . I M   & &   ( ! s e l f . a d m i n M o d e   | |   s e l f . i n l i n e M o d e r a t i o n )   & &   i < c n . l e n g t h - 1   & &   s e l f . g e t S k i n ( ) = = ' s m o o t h g r a y '   & &   c n [ i ] . o b j . c e d g e > 1 )   {  
 	 	 	 	 	 v a r   c r d i v   =   f u n c t i o n ( c l a s s N a m e )   {  
 	 	 	 	 	 	 v a r   d i v   =   s e l f . c r ( " d i v " ) ;  
 	 	 	 	 	 	 d i v . c l a s s N a m e   =   c l a s s N a m e ;  
 	 	 	 	 	 	 r e t u r n   d i v ;  
 	 	 	 	 	 } ;  
 	 	 	 	 	 v a r   d i v   =   c r d i v ( " j s - T o r n P a g e D i v i d e r " ) ;  
 	 	 	 	 	 v a r   d i v T   =   c r d i v ( " j s - T o r n P a g e D i v i d e r T o p " ) ;  
 	 	 	 	 	 v a r   d i v B   =   c r d i v ( " j s - T o r n P a g e D i v i d e r B o t t o m " ) ;  
 	 	 	 	 	 d i v . a p p e n d C h i l d ( d i v T ) ;  
 	 	 	 	 	 d i v . a p p e n d C h i l d ( d i v B ) ;  
 	 	 	 	 	 t g t . a p p e n d C h i l d ( d i v ) ;  
 	 	 	 	 }  
 	 	 	 }  
 	 	 	 s e l f . p a g e F o o t e r ( t g t ,   s I d x ,   a r r ,   i t e m s O n P a g e ) ;  
 	 	 	 r e t u r n   c b ( t g t ,   t r u e ) ;  
 	 	 } ;  
 	 }  
 	 t h i s . j s p g . n e w D a t a ( s r v . t c ,   s r v . s p - 1 ,   i t e m s ) ;  
 }  
  
 J S C C . p r o t o t y p e . p a g e H e a d e r   =   f u n c t i o n ( t a r g e t ,   g l o b a l I n d e x ,   i t e m s ,   i t e m s O n P a g e )   {  
 	 i f ( t h i s . g e t S k i n ( ) = = ' s m o o t h g r a y '   & &   i t e m s O n P a g e > 0   & &   i t e m s . l e n g t h > 0   & &   ( ! t h i s . a d m i n M o d e   | |   t h i s . i n l i n e M o d e r a t i o n ) )   {  
 	 	 v a r   o b j   =   i t e m s [ 0 ] . o b j ;  
 	 	 i f ( o b j . c e d g e ! = 3   & &   o b j . c e d g e ! = 1 )   {  
 	 	 	 v a r   d i v   =   t h i s . c r ( " d i v " ) ;  
 	 	 	 d i v . c l a s s N a m e   =   " j s - T o r n P a g e T o p " ;  
 	 	 	 i f ( J S K i t L i b . i s I E ( ) )   {  
 	 	 	 	 v a r   i m g   =   t h i s . c r ( " i m g " ) ;  
 	 	 	 	 i m g . c l a s s N a m e   =   " j s - T o r n P a g e T o p I m g " ;  
 	 	 	 	 i m g . s r c   =   " / / j s - k i t . c o m / i m a g e s / t o r n P a p e r T . g i f " ;  
 	 	 	 	 d i v . a p p e n d C h i l d ( i m g ) ;  
 	 	 	 }  
 	 	 	 t a r g e t . a p p e n d C h i l d ( d i v ) ;  
 	 	 }  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p a g e F o o t e r   =   f u n c t i o n ( t a r g e t ,   g l o b a l I n d e x ,   i t e m s ,   i t e m s O n P a g e )   {  
 	 i f ( t h i s . g e t S k i n ( ) = = ' s m o o t h g r a y '   & &   i t e m s O n P a g e > 0   & &   i t e m s . l e n g t h = = i t e m s O n P a g e   & &   ( ! t h i s . a d m i n M o d e   | |   t h i s . i n l i n e M o d e r a t i o n ) )   {  
 	 	 v a r   o b j   =   i t e m s [ i t e m s O n P a g e - 1 ] . o b j ;  
 	 	 i f ( o b j . c e d g e ! = 3   & &   o b j . c e d g e ! = 2 )   {  
 	 	 	 v a r   d i v   =   t h i s . c r ( " d i v " ) ;  
 	 	 	 d i v . c l a s s N a m e   =   " j s - T o r n P a g e B o t t o m " ;  
 	 	 	 i f ( J S K i t L i b . i s I E ( ) )   {  
 	 	 	 	 v a r   i m g   =   t h i s . c r ( " i m g " ) ;  
 	 	 	 	 i m g . c l a s s N a m e   =   " j s - T o r n P a g e B o t t o m I m g " ;  
 	 	 	 	 i m g . s r c   =   " / / j s - k i t . c o m / i m a g e s / t o r n P a p e r B . g i f " ;  
 	 	 	 	 d i v . a p p e n d C h i l d ( i m g ) ;  
 	 	 	 }  
 	 	 	 t a r g e t . a p p e n d C h i l d ( d i v ) ;  
 	 	 }  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . h t m l P a g i n a t e   =   f u n c t i o n ( t h r e a d )   {  
 	 r e t u r n   t h i s . h t m l P a g i n a t o r ( t h r e a d ,   [ ] ) ;  
 }  
  
 J S C C . p r o t o t y p e . h t m l P a g i n a t o r   =   f u n c t i o n ( t h r e a d ,   a r r )   {  
 	 v a r   t l   =   t h r e a d . l e n g t h ;  
 	 f o r ( v a r   i   =   0 ;   i   <   t l ;   i + + )   {  
 	 	 v a r   o b j   =   t h r e a d [ i ] ;  
 	 	 v a r   p r e s e n t   =   ( o b j . s t a t u s   = =   ' D ' )   ?   0   :   1 ;  
 	 	 i f ( p r e s e n t )   {  
 	 	 	 a r r . p u s h ( o b j ) ;  
 	 	 }  
 	 	 t h i s . h t m l P a g i n a t o r ( o b j . t h r e a d ,   a r r ) ;  
 	 }  
 	 r e t u r n   a r r ;  
 }  
  
 / /   P a r t   o f   e x t e r n a l l y   u s e a b l e   A P I  
 J S C C . p r o t o t y p e . r e r e n d e r   =   f u n c t i o n ( )   {  
 	 v a r   p a g e T o D i s p l a y   =   t h i s . c u r P a g e ;  
 	 t h i s . c u r P a g e   =   0 ;  
 	 t h i s . j s p g . i n v a l i d a t e P a g e s V i e w ( p a g e T o D i s p l a y - 1 ,   1 ) ;  
 	 t h i s . d i s p l a y P a g e ( p a g e T o D i s p l a y ) ;  
 }  
  
 J S C C . p r o t o t y p e . s e t P a t h   =   f u n c t i o n ( p a t h )   {  
 	 t h i s . p a t h O v e r r i d e   =   p a t h ;          
 }  
  
 J S C C . p r o t o t y p e . d i s p l a y P a g e   =   f u n c t i o n ( p a g e N o ,   c b )   {  
  
 	 i f ( t h i s . l o a d i n g   & &   ! c b )   {  
 	 	 v a r   n t   =   ( n e w   D a t e ( ) ) . v a l u e O f ( ) ;  
 	 	 i f ( ( n t   -   t h i s . l o a d i n g )   >   5 0 0 0 )   {  
 	 	 	 t h i s . g e n + + ;  
 	 	 }   e l s e     {  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 }  
  
 	 i f ( p a g e N o   <   1 )  
 	 	 r e t u r n ;  
  
 	 i f ( p a g e N o   >   t h i s . j s p g . p a g e C o u n t )  
 	 	 p a g e N o   =   t h i s . j s p g . p a g e C o u n t ;  
  
 	 v a r   i m m e d i a t e   =   t r u e ;  
  
 	 i f ( t h i s . c u r P a g e   ! =   p a g e N o )   {  
 	 	 t r y   {  
 	 	 	 t h i s . C o m m e n t C a n c e l l e d ( ) ;  
 	 	 	 i f ( t h i s . c u r P a g e )   {  
 	 	 	 	 v a r   p   =   t h i s . j s p g . g e t P a g e ( t h i s . c u r P a g e   -   1 ) ;  
 	 	 	 	 i f ( p   & &   p . t a r g e t   & &   p . t a r g e t . p a r e n t N o d e )  
 	 	 	 	 	 p . t a r g e t . p a r e n t N o d e . r e m o v e C h i l d ( p . t a r g e t ) ;  
 	 	 	 }  
 	 	 }   c a t c h ( e )   {   }  
 	 	 t h i s . c u r P a g e   =   p a g e N o ;  
 	 	 v a r   o c   =   t h i s . T C [ " j s - O l d C o m m e n t s " ] ;  
 	 	 v a r   s e l f   =   t h i s ;  
 	 	 v a r   p c b   =   f u n c t i o n ( p ,   i m m e d )   {  
 	 	 	 i f ( p )   {  
 	 	 	 	 o c . a p p e n d C h i l d ( p ) ;  
 	 	 	 	 p . s t y l e . d i s p l a y   =   ' ' ;  
 	 	 	 }  
 	 	 	 i f ( i m m e d   & &   c b )   c b . a p p l y ( s e l f ,   [ i m m e d ] ) ;  
 	 	 } ;  
 	 	 v a r   n e w P a g e   =   t h i s . j s p g . g e t P a g e V i s u a l i z a t i o n ( t h i s . c u r P a g e - 1 ,   p c b ) ;  
 	 	 i m m e d i a t e   =   f a l s e ;  
 	 }  
  
 	 v a r   o c w   =   t h i s . T C [ " j s - O l d C o m m e n t s W r a p " ] ;  
                 i f   ( t h i s . j s p g . i t e m s C o u n t   ! =   0 )  
                 {  
                     J S K i t L i b . s h o w ( o c w ) ;  
                 }  
                 e l s e  
                 {  
                     J S K i t L i b . h i d e ( o c w ) ;  
                 }  
  
 	 t h i s . r e P a g e N a v i g a t o r ( t h i s . c u r P a g e - 1 ) ;  
 	 i f ( i m m e d i a t e   & &   c b )   c b . a p p l y ( t h i s ,   [ i m m e d i a t e ] ) ;  
 }  
  
 J S C C . p r o t o t y p e . c u t S e a r c h L i n e   =   f u n c t i o n ( t e x t )   {  
 	 r e t u r n   ( t e x t . l e n g t h   >   1 5 )   ?   t e x t . s l i c e ( 0 , 1 5 )   +   " . . . "   :   t e x t ;  
 }  
  
 J S C C . p r o t o t y p e . S e a r c h L i n e   =   f u n c t i o n ( )   {  
 	 v a r   s e l f   =   t h i s ; 	  
 	 v a r   s E x i t   =   s e l f . c r ( ' s p a n ' ) ;  
 	 v a r   t i t l e   =   s e l f . c r ( ' s p a n ' ) ;  
 	 t i t l e . c l a s s N a m e   =   ' j s - S e a r c h T i t l e ' ;  
 	 t i t l e . i n n e r H T M L   =   ' < b > ' + $ J C L ( " Y o u   s e a r c h e d   f o r " ) + ' : < / b > ' ;  
 	 s E x i t . a p p e n d C h i l d ( t i t l e ) ;  
 	 v a r   l i n e   =   s e l f . c r ( ' s p a n ' ) ;  
 	 l i n e . c l a s s N a m e   =   ' j s - S e a r c h W o r d s ' ;  
 	 t e x t   =   s e l f . c u t S e a r c h L i n e ( s e l f . s e a r c h S t r i n g ) ;  
 	 l i n e . i n s e r t B e f o r e ( d o c u m e n t . c r e a t e T e x t N o d e ( t e x t ) , l i n e . f i r s t C h i l d ) ;  
 	 s E x i t . a p p e n d C h i l d ( l i n e ) ;  
 	 v a r   d e l   =   s e l f . c r ( ' i n p u t ' ) ;  
 	 d e l . t y p e   =   ' b u t t o n ' ;  
 	 d e l . v a l u e   =   $ J C L ( ' C l e a r   S e a r c h ' ) ;  
 	 s E x i t . a p p e n d C h i l d ( d e l ) ;  
 	 v a r   o b j = {  
 	 	   ' c o n t a i n e r E l e m e n t ' : 	   	 s E x i t ,  
 	 	   ' f i e l d ' :   	 	 	 l i n e ,  
 	 	   ' i t e m O b j e c t ' :   	 	 	 s e l f ,  
 	 	   ' t y p e ' : 	 	 	 ' S e a r c h ' ,  
 	 	   ' P r o p e r t y ' :   	 	 	 ' s e a r c h S t r i n g ' ,  
 	 	   ' t i t l e ' : 	 	 	 $ J C L ( " Y o u   s e a r c h e d   f o r " ) + ' :   ' ,  
 	 	   ' m o d e ' :   	 	 	 ' f u l l '  
 	 	 } ;  
 	 o b j . j s i p e $ s t a r t   =   f u n c t i o n ( ) {  
 	 	 d e l . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 l i n e . s t y l e . b o r d e r   =   " 0 p x " ;  
 	 	 t i t l e . s t y l e . d i s p l a y   =   " n o n e " ;  
 	 	 r e t u r n   t r u e ;  
 	 }  
 	 o b j . j s k $ o n _ s u b m i t _ e x i t   =   f u n c t i o n ( v a l u e ) {  
 	 	 s e l f . s e a r c h S t r i n g   =   v a l u e ; 	  
 	 	 s e l f . v i e w C o n t r o l ( { n a m e :   " s e a r c h " } ) ;  
 	 }  
 	 l i n e . w a s E d i t e d   =   f u n c t i o n ( v a l u e ) {  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( l i n e ) ;  
 	 	 l i n e . a p p e n d C h i l d ( d o c u m e n t . c r e a t e T e x t N o d e ( s e l f . c u t S e a r c h L i n e ( v a l u e ) ) ) ;  
 	 	 d e l . s t y l e . d i s p l a y   =   " " ;  
 	 	 l i n e . s t y l e . b o r d e r B o t t o m   =   " " ;  
 	 	 t i t l e . s t y l e . d i s p l a y   =   " " ;  
 	 }  
 	 d e l . o n c l i c k   =   f u n c t i o n ( ) {  
 	 	 t h i s . n a m e = " d e l - l i n e " ;  
 	 	 s e l f . v i e w C o n t r o l ( t h i s ) ;  
 	 }  
 	 v a r   j s i p e   =   n e w   J S I P E ( o b j ) ;  
 	 r e t u r n   s E x i t ;  
 }  
  
 J S C C . p r o t o t y p e . n a v S y m   =   {   " p r e v " :   " & l a r r ; " ,   " n e x t " :   " & r a r r ; "   } ;  
  
 J S C C . p r o t o t y p e . r e P a g e N a v i g a t o r   =   f u n c t i o n ( p a g e I d x )   {  
 	 v a r   n a v   =   ' ' ;  
 	 v a r   d i s p l a y   =   t h i s . s e a r c h S t r i n g   ?   " "   :   " n o n e " ;  
 	 i f ( t h i s . j s p g . p a g e C o u n t   >   1 ) {  
 	 	 d i s p l a y   =   " " ;  
 	 	 n a v   =   t h i s . p a g e N a v i g a t o r ( t h i s . j s p g . p a g e C o u n t ,   t h i s . c u r P a g e ) ;  
 	 }  
 	 v a r   n v s   =   [ ' T o p ' , ' B o t t o m ' ] ;  
 	 f o r ( v a r   i   =   0 ;   i   <   n v s . l e n g t h ;   i + + )   {  
 	 	 v a r   b a r   =   t h i s . T C [ ' j s - P a g e N a v '   +   n v s [ i ] ] ;  
 	 	 b a r . i n n e r H T M L   =   n a v   ?   ' < d i v > '   +   n a v   +   ' < / d i v > '   :   ' ' ;  
 	 	 b a r . o n s e l e c t s t a r t   =   f u n c t i o n ( )   {   r e t u r n   f a l s e ;   }  
 	 	 b a r . s t y l e . d i s p l a y   =   d i s p l a y ;  
 	 	 i f ( i )   b a r . s t y l e . d i s p l a y   =   ( ( p a g e I d x = = u n d e f i n e d   | |   ( t h i s . j s p g . g e t P a g e I t e m s C n t ( p a g e I d x )   < =   5 ) )   ?   ' n o n e '   :   ' ' ) ;  
 	 	 i f ( t h i s . s e a r c h S t r i n g )   t h i s . a d d C h i l d ( b a r ,   t h i s . S e a r c h L i n e ( ) ,   t r u e ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p a g e N a v i g a t o r   =   f u n c t i o n ( p a g e s ,   c u r )   {  
 	 v a r   s e l f   =   t h i s ;  
 	 v a r   a r r   =   [ $ J C L ( ' P a g e :   ' ) ] ;  
 	 v a r   f   =   f u n c t i o n ( i ,   t x t ,   c m t ,   c l s ,   c f )   {  
 	 	 r e t u r n   ' < a   h r e f = " # ' + c m t + ' "   o n c l i c k = " '   +   ( c f   | |   ' $ J C A [ ' + s e l f . j c a I n d e x + ' ] . d i s p l a y P a g e ( ' + i + ' ) ; ' )   +   '   r e t u r n   f a l s e ; "   o n m o u s e o v e r = " w i n d o w . s t a t u s = ' + " ' " + c m t + " ' " + ' ;   r e t u r n   f a l s e ; "   o n m o u s e o u t = " w i n d o w . s t a t u s = \ ' \ ' ;   r e t u r n   t r u e ; "   c l a s s = " j s - P a g e N O t h e r ' + ( c l s ? '   ' + c l s : ' ' ) + ' " > '   +   t x t   +   ' < / a >   ' ;   }  
 	 a r r . p u s h ( f ( c u r   -   1 ,   t h i s . n a v S y m . p r e v ,   $ J C L ( ' P r e v i o u s   p a g e ' ) ,  
 	 	 ' j s - P a g e A r r o w '   +   ( ( c u r   = =   1 ) ? '   j s - P a g e A r r o w C u r ' : ' ' ) ) ) ;  
 	 f o r ( v a r   i   =   1 ;   i   < =   p a g e s ;   i + + )   {  
 	 	 i f ( ( i   = =   4   | |   i   = =   3 )   & &   ( c u r   -   i )   >   3 )   {  
 	 	 	 i   =   M a t h . f l o o r ( ( c u r   -   i )   /   2   +   i ) ;  
 	 	 	 a r r . p u s h ( f ( i ,   ' & h e l l i p ; ' ,   ' P a g e - '   +   i ) ) ;  
 	 	 	 i   =   c u r   -   ( ( p a g e s   -   c u r   >   3   | |   c u r   = =   p a g e s )   ?   2   :   1 ) ;  
 	 	 }  
 	 	 i f ( ( i   = =   c u r   +   3 )   & &   ( p a g e s   -   c u r )   >   4 )   {  
 	 	 	 i   =   M a t h . f l o o r ( ( p a g e s   -   c u r )   /   2   +   c u r ) ;  
 	 	 	 a r r . p u s h ( f ( i ,   ' & h e l l i p ; ' ,   ' P a g e - '   +   i ) ) ;  
 	 	 	 i   =   p a g e s   -   1 ;  
 	 	 }  
 	 	 i f ( i   = =   c u r )   {  
 	 	 	 a r r . p u s h ( f ( i ,   i ,   ' P a g e - '   +   i ,   " j s - P a g e N C u r " ,   ' $ J C A [ ' + s e l f . j c a I n d e x + ' ] . j s p g . i n v a l i d a t e ( ) ;   $ J C A [ ' + s e l f . j c a I n d e x + ' ] . r e r e n d e r ( ) ; ' ) ) ;  
 	 	 }   e l s e   {  
 	 	 	 a r r . p u s h ( f ( i ,   i ,   ' P a g e - '   +   i ) ) ;  
 	 	 }  
 	 }  
 	 a r r . p u s h ( f ( c u r   +   1 ,   t h i s . n a v S y m . n e x t ,   $ J C L ( ' N e x t   p a g e ' ) ,  
 	 	 ' j s - P a g e A r r o w '   +   ( ( p a g e s   = =   c u r ) ? '   j s - P a g e A r r o w C u r ' : ' ' ) ) ) ;  
 	 r e t u r n   a r r . j o i n ( ' ' ) ;  
 }  
  
 J S C C . p r o t o t y p e . h i d e S e t t i n g s W i n d o w   =   f u n c t i o n ( w n a m e )   {  
 	 i f ( t h i s [ w n a m e ] )   t h i s . s e t t i n g s W i n d o w ( w n a m e ) ;  
 }  
  
 J S C C . p r o t o t y p e . s h o w P r o g r e s s   =   f u n c t i o n ( w n a m e ,   o n )   {  
 	 i f ( t h i s [ w n a m e ] )   t h i s [ w n a m e ] . s h o w P r o g r e s s ( o n ) ;  
 }  
  
 J S C C . p r o t o t y p e . s e t t i n g s W i n d o w   =   f u n c t i o n ( w n a m e ,   a t D i v ,   h t m l )   {  
 	 v a r   s   =   t h i s ;  
 	 i f ( s [ w n a m e ] )   {  
 	 	 i f ( ! s . s W H i d e a b l e )   r e t u r n ;  
 	 	 s [ w n a m e ] . p a r e n t N o d e . r e m o v e C h i l d ( s [ w n a m e ] ) ;  
 	 	 d e l e t e   s [ w n a m e ] ;  
 	 	 r e t u r n ;  
 	 }  
 	 v a r   n o h i d e   =   f u n c t i o n ( )   {  
 	 	 s . s W H i d e a b l e   =   f a l s e ;  
 	 	 i f ( s . s w s H i d t )   c l e a r T i m e o u t ( s . s w s H i d t ) ;  
 	 	 s . s w s H i d t   =   s e t T i m e o u t ( f u n c t i o n ( ) { s . s W H i d e a b l e = t r u e } ,   1 0 0 ) ;  
 	 }  
 	 v a r   d i v   =   t h i s . c r ( " d i v " ) ;  
 	 d i v . c l a s s N a m e   =   " j s - S e t t i n g s W i n d o w " ;  
 	 i f   ( s . c o n f i g . n o l c )   J S K i t L i b . a d d C l a s s ( d i v ,   " j s - S e t t i n g s W i n d o w N o l c " ) ;  
 	 d i v . s t y l e . b a c k g r o u n d   =   ' # F F F F F F   u r l ( ' + t h i s . u r i D o m a i n  
 	 	 	 	 + ' / i m a g e s / b g - h e a d e r - g r a y . p n g )   b o t t o m   r e p e a t - x ' ;  
 	 d i v . o n c l i c k   =   n o h i d e ;  
 	 d i v . o n s e l e c t s t a r t   =   f u n c t i o n ( )   {   r e t u r n   f a l s e ;   }  
 	 i f ( t y p e o f ( h t m l )   = =   ' s t r i n g ' )   {  
 	 	 d i v . i n n e r H T M L   =   h t m l ;  
 	 }   e l s e   {  
 	 	 i f ( ! h t m l . d r o p W i d t h )   d i v . s t y l e . w i d t h   =   ' 2 0 e m ' ;  
 	 	 d i v . a p p e n d C h i l d ( h t m l ) ;  
 	 }  
  
 	 i f   ( w n a m e   = =   ' c t W n d '   & &   s . T C [ ' j s - W e l c o m e P a n e l ' ] )   {  
 	 	 v a r   a o h   =   s . c r ( ' d i v ' ) ;  
 	 	 a o h . c l a s s N a m e   =   ' j s - S e t t i n g s W i n d o w H e a d e r ' ;  
 	 	 s . t e x t ( a o h ,   $ J C L ( ' A d m i n i s t r a t o r   O p t i o n s ' ) ) ;  
 	 	 d i v . a p p e n d C h i l d ( a o h ) ;  
 	 	 v a r   w p   =   s . T C [ ' j s - W e l c o m e P a n e l ' ] ;  
 	 	 v a r   l i n k s   =   J S K i t L i b . h t m l ( ' '  
 	 	 	 +   ' < t a b l e   b o r d e r = 0   c e l l p a d d i n g = 4   a l i g n = c e n t e r   w i d t h = " 2 2 0 "   s t y l e = " w h i t e - s p a c e :   n o w r a p " > '  
 	 	 	 +   ' < t r   v a l i g n = " t o p " > < t d   c l a s s = " j s - W e l c o m e O p e n P a n e l " > < d i v   c l a s s = " j s - W e l c o m e I m g P a n e l " > < a   h r e f = " j a v a s c r i p t : v o i d ( 0 ) ; " > '   +   $ J C L ( J S K i t L i b . v i s i b l e ( w p )   ?   ' c l o s e W e l c o m e '   :   ' o p e n W e l c o m e ' )   +   ' < / a > < / d i v > < / t d > < / t r > '  
 	 	 	 +   ' < t r > < t d   c l a s s = " j s - W e l c o m e C o n t a c t " > < d i v   c l a s s = " j s - W e l c o m e I m g S u p p o r t " > < a   h r e f = " j a v a s c r i p t : v o i d ( 0 ) ; " > '   +   $ J C L ( ' c o n t a c t S u p p o r t ' )   +   ' < / a > < / d i v > < / t d > < / t r > '  
 	 	 	 +   ' < / t a b l e > ' ) ;  
 	 	 v a r   t c   =   J S K i t L i b . m a p C l a s s 2 O b j e c t ( { } ,   l i n k s ) ;  
 	 	 d i v . a p p e n d C h i l d ( l i n k s ) ;  
 	 	 t c [ ' j s - W e l c o m e O p e n P a n e l ' ] . o n c l i c k   =   f u n c t i o n ( )   {  
 	 	 	 J S K i t L i b . t o g g l e ( w p ) ;  
 	 	 	 s . t e x t ( t h i s . l a s t C h i l d . l a s t C h i l d ,   $ J C L ( J S K i t L i b . v i s i b l e ( w p )   ?   ' c l o s e W e l c o m e '   :   ' o p e n W e l c o m e ' ) ) ;  
 	 	 } ;  
 	 	 t c [ ' j s - W e l c o m e C o n t a c t ' ] . o n c l i c k   =   f u n c t i o n ( ) { l o c a t i o n . h r e f   =   s . u r i D o m a i n   +   ' / c o m m e n t s / q a . h t m l ' ; } ;  
 	 }  
  
 	 v a r   p g r   =   t h i s . c r ( ' d i v ' ) ;  
 	 p g r . c l a s s N a m e   =   " j s - P r o g r e s s " ;  
 	 v a r   u r l   =   t h i s . u r i D o m a i n   +   ' / i m a g e s / p r o g r e s s - w g . p n g ' ;  
 	 i f ( d o c u m e n t . b o d y . f i l t e r s )   {  
                                 p g r . r u n t i m e S t y l e . f i l t e r   =   " p r o g i d : D X I m a g e T r a n s f o r m . M i c r o s o f t . A l p h a I m a g e L o a d e r ( s r c = "   +   u r l   +   " ,   s i z i n g M e t h o d = c r o p ) " ;  
               	 }   e l s e   p g r . s t y l e . b a c k g r o u n d I m a g e   =   ' u r l ( '   +   u r l   +   ' ) ' ;  
 	 d i v . a p p e n d C h i l d ( p g r ) ;  
 	 d i v . s h o w P r o g r e s s   =   f u n c t i o n ( o n )   {  
 	 	 i f ( ! o n )   {  
 	 	 	 i f ( d i v . p I n t v l )   c l e a r I n t e r v a l ( d i v . p I n t v l ) ;  
 	 	 	 d i v . p I n t v l   =   n u l l ;  
 	 	 	 p g r . s t y l e . v i s i b i l i t y     =   ' h i d d e n ' ;  
 	 	 	 r e t u r n ;  
 	 	 }   e l s e   i f ( d i v . p I n t v l )   r e t u r n ;  
 	 	 v a r   f   =   f u n c t i o n ( )   {  
 	 	 	 p g r . v i s o n   =   ! p g r . v i s o n ;  
 	 	 	 p g r . s t y l e . v i s i b i l i t y   =   p g r . v i s o n  
 	 	 	 	 ?   ' v i s i b l e '   :   ' h i d d e n ' ;  
 	 	 }  
 	 	 f ( ) ;  
 	 	 d i v . p I n t v l   =   s e t I n t e r v a l ( f ,   5 0 0 ) ;  
 	 }  
  
 	 s [ w n a m e ]   =   d i v ;  
 	 v a r   s w h   =   t h i s . c r ( " d i v " ) ;  
 	 s w h . c l a s s N a m e   =   " j s - S e t t i n g s W i n d o w H e a d e r " ;  
 	 t h i s . t e x t ( s w h ,   $ J C L ( w n a m e   = =   ' c t W n d '   ?   " V i e w   O p t i o n s "   :   " M o d e r a t i o n " ) ) ;  
 	 d i v . i n s e r t B e f o r e ( s w h ,   d i v . f i r s t C h i l d ) ;  
 	 d i v . s t y l e . p o s i t i o n   =   " a b s o l u t e " ;  
  
 	 v a r   j s d   =   n e w   J S D L ( d i v ,   [ s w h ] ) ;  
 	 d o c u m e n t . b o d y . a p p e n d C h i l d ( d i v ) ;  
 	 d i v . s t y l e . l e f t   =   j s d . g e t E l m A b s P o s ( a t D i v ,   f a l s e ) . x   +   " p x " ;  
 	 d i v . s t y l e . t o p   =     j s d . g e t E l m A b s P o s ( a t D i v ,   f a l s e ) . y   +   a t D i v . o f f s e t H e i g h t   +   " p x " ;  
  
 	 t r y   {  
 	 	 i f   ( d o c u m e n t . b o d y . c l i e n t W i d t h   <   j s d . g e t E l m A b s P o s ( a t D i v ,   f a l s e ) . x   +   d i v . o f f s e t W i d t h )  
 	 	 	 d i v . s t y l e . l e f t   =   d o c u m e n t . b o d y . c l i e n t W i d t h   -   d i v . o f f s e t W i d t h   -  
                                                 	 ( p a r s e I n t ( d i v . s t y l e . m a r g i n L e f t )   | |   0 )   -  
                                                                 ( p a r s e I n t ( d i v . s t y l e . m a r g i n R i g h t )   | |   0 )   +   " p x " ;  
 	 }   c a t c h ( e )   { ; }  
 	  
 	 v a r   i f r W r ;  
 	 i f ( J S K i t L i b . g e t B r o w s e r ( )   = =   ' g e c k o '   & &   ! a t D i v . n o t S h o w I f r )   {  
                                 i f r W r   =   t h i s . c r ( " d i v " ) ;  
                                 i f r W r . i d   =   " j s k - y I f r " ;  
                                 v a r   y I f r   =   t h i s . c r ( " i f r a m e " ) ;  
                                 y I f r . s t y l e . p o s i t i o n   =   " a b s o l u t e " ;  
                                 y I f r . s t y l e . t o p   =   0 ;  
                                 y I f r . s t y l e . l e f t   =   0 ;  
                                 y I f r . s t y l e . z I n d e x   =   - 1 ;  
                                 y I f r . s t y l e . d i s p l a y   =   " b l o c k " ;  
                                 y I f r . s t y l e . h e i g h t   =   d i v . o f f s e t H e i g h t   +   " p x " ;  
                                 y I f r . s t y l e . w i d t h   =   d i v . o f f s e t W i d t h   +   " p x " ;  
                                 y I f r . s c r o l l i n g   =   " n o " ;  
                                 y I f r . f r a m e B o r d e r   =   " 0 " ;  
                                 i f r W r . a p p e n d C h i l d ( y I f r ) ;  
                                 d i v . a p p e n d C h i l d ( i f r W r ) ;  
 	 }  
 	 d i v . j s k $ o n _ s t a r t _ d r a g   =   f u n c t i o n ( ) { i f ( i f r W r )   i f r W r . s t y l e . d i s p l a y   =   " n o n e " } ;  
 	 d i v . j s k $ o n _ s t o p _ d r a g   =   f u n c t i o n ( ) { i f ( i f r W r )   i f r W r . s t y l e . d i s p l a y   =   " " } ;  
 	 n o h i d e ( ) ;  
 }  
  
 J S C C . p r o t o t y p e . g e t I m a g e s   =   f u n c t i o n ( i d )   {  
 	 v a r   a r g   =   { r n d :   i d ,   j x :   t h i s . j c a I n d e x } ;  
 	 t h i s . s e r v e r ( t h i s . u r i D o m a i n   +   ' / a p i / i m a g e s / p i c k - a t t a c h m e n t s . j s ' ,   a r g ) ;  
 }  
  
 J S C C . p r o t o t y p e . p r e p a r e I m g D a t a   =   f u n c t i o n ( m s g )   {  
 	 i f ( t h i s . i m a g e s ) {  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( t h i s . i m g A r e a ) ;  
 	 	 J S K i t L i b . m a p ( f u n c t i o n ( e l e m ,   i ) {  
 	 	 	 J S K i t L i b . f m a p ( [ ' i m g ' , ' o r i g ' , ' w i d t h ' , ' h e i g h t ' , ' d e s c r ' , ' m i m e ' ] ,  
 	 	 	 	 f u n c t i o n ( E )   {   m s g . p u s h ( { ' N a m e ' :   ' j s - C m t a t t a c h F i l e _ ' + i + ' _ ' + E ,   ' V a l u e ' :   e l e m [ E ] } ) }  
 	 	 	 ) ;  
 	 	 } , t h i s . i m a g e s ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p a r s e I m g D a t a   =   f u n c t i o n ( o b j )   {  
 	 v a r   r e   =   / a t t a c h F i l e _ ( \ d + ) _ ( \ w + ) / ;  
 	 v a r   i m g s   =   [ ] ;  
 	 f o r   ( v a r   i   i n   o b j ) {  
 	 	 v a r   k e y s   =   r e . e x e c ( i ) ;  
 	 	 i f   ( k e y s )   {  
                                                 i f   ( ! i m g s [ k e y s [ 1 ] ] )   i m g s [ k e y s [ 1 ] ]   =   { } ;  
                                                 i m g s [ k e y s [ 1 ] ] [ k e y s [ 2 ] ]   =   o b j [ i ] ;  
 	 	 }  
 	 }  
 	 r e t u r n   i m g s ;  
 }  
  
 J S C C . p r o t o t y p e . c r e a t e I m a g e s   =   f u n c t i o n ( i m g s ,   i s P r e v i e w ) {  
 	 v a r   s   =   t h i s ;  
 	 v a r   d = f u n c t i o n ( ) { r e t u r n   s . d i v . a p p l y ( s , a r g u m e n t s ) ; }  
  
 	 v a r   c o n t e n t   =   i s P r e v i e w   ?   d ( )   :  
 	 	             d ( " j s - a l l - p r e v i e w I m a g e s " , d ( " j s - p r e v i e w I m a g e T i t l e " ,   $ J C L ( ' p i c T i t l e ' ) ) ,  
 	 	 	 J S K i t L i b . h t m l ( ' < d i v   s t y l e = " c l e a r : b o t h ; " > < / d i v > ' ) ) ;  
  
 	 v a r   c r I m g   =   f u n c t i o n ( e l e m ,   i ) {  
 	 	 v a r   i m g   =   d ( " j s - p r e v i e w I m a g e " ) ;  
 	 	 v a r   t h u m b   =   s . c r ( " i m g " ) ;  
 	 	 e l e m . d e s c r   =   e l e m . d e s c r   | |   ' ' ;  
 	 	 t h u m b . s r c   =   s . u r i D o m a i n + " / b l o b / " + e l e m . i m g ;  
 	 	 J S K i t L i b . s e t S t y l e ( t h u m b ,   " b o r d e r :   1 p x   s o l i d   " + ( ( i s P r e v i e w ) ? " # 0 0 6 6 c c " : " # e c e c e c " ) + " ;   p a d d i n g :   2 p x ; "  
 	 	 	 	 	 + "   w i d t h :   " + e l e m . w i d t h + " p x ;   h e i g h t :   " + e l e m . h e i g h t + " p x ;   c u r s o r :   p o i n t e r ; "    
 	 	 	 	 	 + "   p o s i t i o n :   r e l a t i v e ;   t o p :   " + ( ( 9 6 - e l e m . h e i g h t ) / 2 ) + " p x ; " ) ;  
 	 	 t h u m b . o n c l i c k   =   f u n c t i o n ( )   {   w i n d o w . o p e n ( s . u r i D o m a i n + " / b l o b / " + e l e m . o r i g ) ;   }  
 	 	 v a r   t e x t   =   d ( " j s - p r e v i e w I m a g e D e s c r " ) ;  
 	 	 v a r   w r a p   =   d ( " j s - i m a g e W r a p " ) ;  
 	 	 s . a d d C h i l d ( w r a p ,   t h u m b ) ;  
 	 	 s . a d d C h i l d ( i m g ,   w r a p ) ;  
 	 	 i f   ( i s P r e v i e w )   {  
 	 	 	 v a r   w a s E d i t e d   =   f u n c t i o n ( ) {  
 	 	 	 	 i f ( e l e m . d e s c r   ! =   " "   )   J S K i t L i b . r e m o v e C l a s s ( t e x t , " j s - u p l o a d G r e y D e s c r " ) ;  
 	 	 	 	 e l s e   J S K i t L i b . a d d C l a s s ( t e x t , " j s - u p l o a d G r e y D e s c r " ) ;  
 	 	 	 }  
 	 	 	 v a r   j s i p e   =   n e w   J S I P E 2 ( { o b j :   e l e m ,  
 	 	 	 	 	 	 p r o p e r t y :   ' d e s c r ' ,  
 	 	 	 	 	 	 t i t l e :   ' D e s c r i p t i o n ' ,  
 	 	 	 	 	 	 d e f a u l t T e x t :   ' A d d   c a p t i o n ' ,  
 	 	 	 	 	 	 w i d t h :   ' 9 0 p x ' ,  
 	 	 	 	 	 	 m a x L e n g t h :   8 0 ,  
 	 	 	 	 	 	 j s k $ w a s E d i t e d :   w a s E d i t e d  
 	 	 	 } ) ;  
 	 	 	 t e x t . a p p e n d C h i l d ( j s i p e . d i v ) ;  
 	 	 	 v a r   o n E d i t B t n C l i c k   =   f u n c t i o n ( e ) {    
 	 	 	 	 i f ( j s i p e . e d i t M o d e )   j s i p e . e d i t M o d e ( ) ;  
 	 	 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e   | |   w i n d o w . e v e n t ) ;    
 	 	 	 }  
 	 	 	 v a r   o n D e l e t e B t n C l i c k   =   f u n c t i o n ( e ) {  
 	 	 	 	 i m g . p a r e n t N o d e . r e m o v e C h i l d ( i m g ) ;  
 	 	 	 	 i f ( i m g s   & &   i m g s [ i ] )   i m g s . s p l i c e ( i ,   1 ) ;  
 	 	 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e   | |   w i n d o w . e v e n t ) ;  
 	 	 	 } 	 	  
 	 	 	 v a r   e d i t B t n       =   s . c r I m g C t r l ( " e d i t " ,       { t o p :   " 6 0 p x " ,   l e f t :   " 1 5 p x " } ,   o n E d i t B t n C l i c k ) ;  
 	 	 	 v a r   d e l e t e B t n   =   s . c r I m g C t r l ( " d e l e t e " ,   { t o p :   " 6 0 p x " ,   l e f t :   " 5 7 p x " } ,   o n D e l e t e B t n C l i c k ) ;  
 	 	 	 v a r   d i s p l a y M o d e   =   f u n c t i o n ( m o d e ) {  
 	 	 	 	 e d i t B t n . s t y l e . d i s p l a y   =   m o d e ;  
                                                                 d e l e t e B t n . s t y l e . d i s p l a y   =   m o d e ;  
 	 	 	 }  
 	 	 	 i m g . o n m o u s e o v e r   =   f u n c t i o n ( e )   {   d i s p l a y M o d e ( " i n l i n e " ) ;   }  
 	 	 	 i m g . o n m o u s e o u t   =   f u n c t i o n ( e )   {   d i s p l a y M o d e ( " n o n e " ) ;   }  
 	 	 	 s . a d d C h i l d ( i m g ,   e d i t B t n ) ;  
 	 	 	 s . a d d C h i l d ( i m g ,   d e l e t e B t n ) ;  
 	 	 	 i f ( e l e m . d e s c r   = =   " " )   J S K i t L i b . a d d C l a s s ( t e x t , " j s - u p l o a d G r e y D e s c r " ) ;  
 	 	 }   e l s e   {  
 	 	 	 t e x t . i n n e r H T M L   =   e l e m . d e s c r . r e p l a c e ( / < / g , " & l t ; " ) . r e p l a c e ( / > / g , " & g t ; " ) ;  
 	 	 }  
 	 	 t h u m b . t i t l e   =   J S K i t L i b . h t m l U n q u o t e ( e l e m . d e s c r ) ;  
 	 	 s . a d d C h i l d ( i m g ,   t e x t ) ;  
 	 	 s . a d d C h i l d ( c o n t e n t ,   i m g ) ;  
 	 }  
 	 J S K i t L i b . m a p ( c r I m g , i m g s ) ;  
 	 s . a d d C h i l d ( c o n t e n t ,   J S K i t L i b . h t m l ( ' < d i v   s t y l e = " c l e a r : b o t h ; " > < / d i v > ' ) ) ;  
  
 	 r e t u r n   c o n t e n t ;  
 }  
  
 J S C C . p r o t o t y p e . c r I m g C t r l   =   f u n c t i o n ( t y p e ,   p o s i t i o n ,   o n C l i c k )   {  
 	 v a r   b t n   =   t h i s . c r ( " d i v " ) ;  
 	 v a r   c t r l B t n   =   {   w i d t h   :   " 3 0 p x " ,   h e i g h t   :   " 3 0 p x " ,   i m g W i d t h   :     " 3 0 p x " ,   i m g H e i g h t   :   " 3 0 p x "   } ;  
 	 J S K i t L i b . s e t S t y l e ( b t n ,   " d i s p l a y : n o n e ;   b a c k g r o u n d : t r a n s p a r e n t ;   p o s i t i o n : a b s o l u t e ;   f l o a t : l e f t ;   p a d d i n g : 0 ;   m a r g i n : 0 ;   "  
 	 	 +   " w i d t h : "   +   c t r l B t n . w i d t h   +   " ;   h e i g h t : "   +   c t r l B t n . h e i g h t   +   " ;   c u r s o r :   p o i n t e r ; "  
 	 	 +   " t o p : "   +   p o s i t i o n . t o p   +   " ;   l e f t : "   +   p o s i t i o n . l e f t ) ;  
 	 b t n . t i t l e   =   $ J C L ( t y p e   +   " I m a g e " ) ;  
 	 b t n . o n c l i c k   =   o n C l i c k ;  
 	 i m g U r l   =   t h i s . u r i D o m a i n   +   " / i m a g e s / "   +   " a v a t a r - "   +   t y p e   +   " . p n g " ;  
 	 J S K i t L i b . a d d P N G ( b t n ,   i m g U r l ) ;  
  
 	 r e t u r n   b t n ;  
 }  
  
  
 J S C C . p r o t o t y p e . a d d I m a g e   =   f u n c t i o n ( i m g )   {  
 	 i f ( t h i s . l b l i C h a n g e )   t h i s . l b l i C h a n g e ( 0 ) ;  
 	 i f   ( t y p e o f ( i m g )   = =   " o b j e c t " ) {  
 	 	 i f ( i m g . e r r o r   = =   " b i g i m g " )   {  
 	 	 	 a l e r t ( $ J C L ( ' b i g I m a g e ' ) ) ;  
 	 	 	 r e t u r n ;  
 	 	 }  
 	 	 i f   ( t h i s . i m a g e s )   t h i s . i m a g e s . p u s h ( i m g )  
 	 	 e l s e   t h i s . i m a g e s   =   [ i m g ] ;  
 	 	 i f   ( ! t h i s . i m g A r e a )   r e t u r n ;  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( t h i s . i m g A r e a ) ;  
 	 	 v a r   c o n t e n t   =   t h i s . c r e a t e I m a g e s ( t h i s . i m a g e s ,   t r u e ) ;  
 	 	 t h i s . a d d C h i l d ( t h i s . i m g A r e a ,   c o n t e n t ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . v i e w C o n t r o l   =   f u n c t i o n ( s e l )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   a p   =   {   " u s r " :   " y e s " } ;  
 	 s w i t c h ( s e l . n a m e )   {  
 	 c a s e   " j s s - s r t " :  
 	 	 v a r   n e w S o r t B y   =   s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ;  
 	 	 i f ( n e w S o r t B y   = =   s . p r e q . s r t )   r e t u r n   t r u e ;  
 	 	 s . p r e q . s r t   =   n e w S o r t B y ;  
 	 	 s . s h o w P r o g r e s s ( ' c t W n d ' ,   t r u e ) ;  
 	 	 b r e a k ;  
 	 c a s e   " j s s - r e v " :  
 	 	 v a r   n e w O r d e r   =   s e l . s e l e c t e d I n d e x ? ' d e s c ' : ' a s c ' ;  
 	 	 i f ( s . p r e q . o r d   = =   n e w O r d e r )   r e t u r n   t r u e ;  
 	 	 s . p r e q . o r d   =   n e w O r d e r ;  
 	 	 s . s h o w P r o g r e s s ( ' c t W n d ' ,   t r u e ) ;  
 	 	 b r e a k ;  
 	 c a s e   " j s s - p r s " :  
 	 	 v a r   n e w P r s   =   s e l . o p t i o n s [ s e l . s e l e c t e d I n d e x ] . v a l u e ;  
 	 	 i f ( n e w P r s   = =   s . p r e q . t h r )   r e t u r n   t r u e ;  
 	 	 s . p r e q . t h r   =   n e w P r s ;  
 	 	 s . s h o w P r o g r e s s ( ' c t W n d ' ,   t r u e ) ;  
 	 	 b r e a k ;  
                 c a s e   " s e a r c h " :  
                                 a p . s r c h   =   s . s e a r c h S t r i n g ;  
                                 b r e a k ;  
                 c a s e   " d e l - l i n e " :  
                                 b r e a k ;  
 	 d e f a u l t :   r e t u r n   f a l s e ;  
 	 }  
 	 s . d a t a L o a d e r   =   f u n c t i o n ( )   {  
 	 	 t h i s . s h o w P r o g r e s s ( ' c t W n d ' ,   f a l s e ) ;  
 	 	 t h i s . c u r P a g e   =   0 ;  
 	 	 t h i s . d i s p l a y P a g e ( 1 ) ;   }  
 	 i f ( t h i s . c u r P a g e )   {  
 	 	 v a r   p   =   t h i s . j s p g . g e t P a g e ( t h i s . c u r P a g e   -   1 ) ;  
 	 	 i f ( p   & &   p . t a r g e t   & &   p . t a r g e t . p a r e n t N o d e )  
 	 	 	 p . t a r g e t . p a r e n t N o d e . r e m o v e C h i l d ( p . t a r g e t ) ;  
 	 }  
 	 s . c t a g   =   n u l l ;  
 	 s . g e t p a g e s ( 0 ,   a p ) ;  
 	 r e t u r n   t r u e ;  
 }  
  
 J S C C . p r o t o t y p e . s p l i t A v a t a r D i m   =   f u n c t i o n ( s o ,   d i m )   {  
 	 v a r   r e   =   / ( \ d + ) x ( \ d + ) / ;  
 	 v a r   v l = r e . e x e c ( d i m )   | |   [ ' 9 6 x 9 6 ' ,   ' 9 6 ' ,   ' 9 6 ' ] ;  
 	 s o . m a x A v a t a r W i d t h   =   p a r s e I n t ( v l [ 1 ] ) ;  
 	 s o . m a x A v a t a r H e i g h t   =   p a r s e I n t ( v l [ 2 ] ) ;  
 }  
  
 J S C C . p r o t o t y p e . c a l c A v a t a r D i m   =   f u n c t i o n   ( W i d t h ,   H e i g h t ,   A v a t a r )   {  
 	 v a r   s o   =   t h i s . s e r v e r O p t i o n s ;  
 	 v a r   M W   =   s o . m a x A v a t a r W i d t h ;  
 	 v a r   M H   =   s o . m a x A v a t a r H e i g h t ;  
 	 i f ( ( M W > = 9 6 ) & & ( M H > = 9 6 ) & & ( W i d t h < = 1 0 0 ) & & ( H e i g h t < = 1 0 0 ) ) {  
 	 	 r e t u r n   { ' w i d t h ' :   W i d t h , ' h e i g h t ' :   H e i g h t , ' n a m e ' :   A v a t a r } ;  
 	 }   e l s e   i f ( ( M W < W i d t h ) | | ( M H < H e i g h t ) ) {  
 	 	 v a r   D W   =   ( M W < W i d t h )   ?   M W / W i d t h   :   1 ;  
 	 	 v a r   D H   =   M H < H e i g h t   ?   M H / H e i g h t   :   1 ;  
 	 	 v a r   D   =   D W   <   D H   ?   D W   :   D H ;  
 	 	 D W   =   M a t h . r o u n d ( W i d t h * D + 0 . 0 0 0 0 0 1 ) ;  
 	 	 D H   =   M a t h . r o u n d ( H e i g h t * D + 0 . 0 0 0 0 0 1 ) ;  
 	 	 N a m e   =   A v a t a r . s u b s t r ( 0 , A v a t a r . l e n g t h - 4 ) + ' - ' + D W . t o S t r i n g ( ) + ' x ' + D H . t o S t r i n g ( ) + A v a t a r . s u b s t r ( A v a t a r . l e n g t h - 4 ) ;  
 	 	 r e t u r n   { ' w i d t h ' :   D W ,   ' h e i g h t ' :   D H , ' n a m e ' :   N a m e } ;  
 	 }   e l s e   {  
 	 	 r e t u r n   { ' w i d t h ' :   W i d t h , ' h e i g h t ' :   H e i g h t , ' n a m e ' :   A v a t a r } ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p l a c e G r a v a t a r   =   f u n c t i o n ( o b j ,   d i v )   {  
  
 	 i f   ( t h i s . c o n f i g . g r a v a t a r s   ! =   ' y e s ' )   {   r e t u r n ;   }  
  
 	 i f   ( o b j . G r a v a t a r I D )   {  
  
 	 	 v a r   i m g   =   t h i s . c r ( ' i m g ' ) ;  
 	 	 i m g . s t y l e . w i d t h   =   t h i s . c o n f i g . g r a v a t a r _ s i z e   +   ' p x ' ;  
 	 	 i m g . s t y l e . h e i g h t   =   t h i s . c o n f i g . g r a v a t a r _ s i z e   +   ' p x ' ;  
 	 	 i m g . s r c   =   ' h t t p : / / w w w . g r a v a t a r . c o m / a v a t a r . p h p ? '    
 	 	 	 +   ' g r a v a t a r _ i d = '   +   o b j . G r a v a t a r I D  
 	 	 	 +   ' & d e f a u l t = '   +   t h i s . c o n f i g . g r a v a t a r _ d e f a u l t  
 	 	 	 +   ' & r a t i n g = '   +   t h i s . c o n f i g . g r a v a t a r _ r a t i n g  
 	 	 	 +   ' & s i z e = '   +   t h i s . c o n f i g . g r a v a t a r _ s i z e ;  
  
 	 	 J S K i t L i b . r e m o v e C h i l d r e n ( d i v ) ;  
 	 	 d i v . s t y l e . w i d t h   =   i m g . s t y l e . w i d t h ;  
 	 	 d i v . a p p e n d C h i l d ( i m g ) ;  
  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . p l a c e A v a t a r   =   f u n c t i o n ( o b j ,   d i v )   {  
 	 d i v   =   d i v   | |   o b j . a v a t a r P l a c e ;  
 	 i f ( ! d i v )   r e t u r n ;  
  
 	 i f ( t h i s . c o n f i g . a v a t a r s   ! =   ' y e s ' )   {  
 	 	 t h i s . p l a c e G r a v a t a r ( o b j ,   d i v ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 i f ( ! o b j . a v a t a r )   {  
 	 	 o b j . a v a t a r P l a c e   =   d i v ;  
 	 	 r e t u r n ;  
 	 }  
 	 v a r   i m g   =   t h i s . c r ( ' i m g ' ) ;  
 	 i m g . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	 v a r   W H   =   t h i s . c a l c A v a t a r D i m ( o b j . a v a t a r W i d t h , o b j . a v a t a r H e i g h t , o b j . a v a t a r ) ;  
 	 v a r   i m g u r l   =   J S K i t A v a t a r s . p r o t o t y p e . a v a t a r U R L . c a l l ( { u r i A v a t a r :   t h i s . u r i D o m a i n   +   ' / b l o b / ' } ,   W H [ ' n a m e ' ] ) ;  
  
 	 i m g . s t y l e . w i d t h   =   W H [ ' w i d t h ' ]   +   ' p x ' ;  
 	 i m g . s t y l e . h e i g h t   =   W H [ ' h e i g h t ' ]   +   ' p x ' ;  
 	 i m g . s r c   =   i m g u r l ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( d i v ) ;  
 	 J S K i t L i b . a d d P N G ( d i v ,   i m g u r l ) ;  
 	 d i v . s t y l e . w i d t h   =   W H [ ' w i d t h ' ]   +   ' p x ' ;  
 	 d i v . a p p e n d C h i l d ( i m g ) ;  
  
 	 v a r   s e l f   =   t h i s ;  
 	 i f ( o b j . p r o f i l e   & &   t h i s . s e r v e r O p t i o n s . s h o w P r o f i l e )   {  
 	 	 d i v . s t y l e . c u r s o r   =   ' p o i n t e r ' ;  
 	 	 d i v . o n c l i c k   =   f u n c t i o n ( e )   {  
 	 	 	 J S K i t L i b . s t o p E v e n t P r o p a g a t i o n ( e ) ;  
 	 	 	 J S K i t L i b . p r e v e n t D e f a u l t E v e n t ( e ) ;  
 	 	 	 s e l f . s h o w P r o f i l e ( d i v ,   o b j ,   s e l f . s e r v e r O p t i o n s . p r o f i l e L e v e l ) ;  
 	 	 	 r e t u r n   f a l s e ;  
 	 	 }  
 	 }  
 	 r e t u r n   d i v ;  
 }  
  
 J S C C . p r o t o t y p e . p l a c e P r o c e s s A v a t a r   =   f u n c t i o n ( d i v )   {  
 	 i f ( ! d i v )   r e t u r n ;  
 	 v a r   i m g   =   t h i s . c r ( " i m g " ) ;  
 	 i m g . s t y l e . v i s i b i l i t y   =   ' h i d d e n ' ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( d i v ) ;  
 	 J S K i t L i b . a d d P N G ( d i v ,   t h i s . u r i D o m a i n   +   ' / i m a g e s / p r o g r e s s - w g . p n g ' ) ;  
 	 d i v . s t y l e . w i d t h   =   " 1 5 p x " ;  
 	 d i v . s t y l e . h e i g h t   =   " 1 5 p x " ;  
 	 d i v . a p p e n d C h i l d ( i m g ) ;  
 }  
  
 J S C C . p r o t o t y p e . r e p l a c e A v a t a r s   =   f u n c t i o n ( a v a t a r s )   {  
                 i f   ( t h i s . a v a t a r s M a n a g e m e n t )   t h i s . a v a t a r s M a n a g e m e n t . r e p l a c e A v a t a r s ( a v a t a r s ) ;  
 }  
  
 J S C C . p r o t o t y p e . r e f r e s h C o m m e n t s   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 s . d e l e t e W e l c o m e P a n e l ( ) ;  
 	 s . j s p g . i n v a l i d a t e ( ) ;  
 	 i f   ( s . c u r P a g e   = =   1 )   s . c u r P a g e   =   0 ;  
 	 s . d i s p l a y P a g e ( 1 ,   f u n c t i o n ( )   {  
 	 	 i f   ( s . a v a t a r s M a n a g e m e n t )   {  
 	 	 	 v a r   a v a t a r s   =   s . s e r v e r O p t i o n s . a v a t a r s   | |   [ ] ;  
 	 	 	 s . a v a t a r s M a n a g e m e n t . r e f r e s h A v a t a r s ( t r u e ,   a v a t a r s . r e v e r s e ( ) ) ;  
 	 	 }  
 	 	 s . p r e v e n t A n o n y m o u s C o m m e n t s ( ) ;  
 	 	 s . m a k e W e l c o m e P a n e l ( ) ;  
 	 	 s . S h o w C o m m e n t D i a l o g ( s . r e p l y F o r I d ) ;  
 	 } ) ;  
 }  
  
 J S C C . p r o t o t y p e . p r e v e n t A n o n y m o u s C o m m e n t s   =   f u n c t i o n ( )   {    
 	 v a r   s   =   t h i s ;  
 	 v a r   c m t T e x t   =   s . T C [ ' j s - C m t T e x t ' ] ;    
 	 v a r   c m t E m a i l   =   s . T C [ ' j s - C m t E m a i l ' ] ;  
 	 v a r   c m t U p l o a d   =   ( s . a v a t a r s M a n a g e m e n t )   ?   s . a v a t a r s M a n a g e m e n t . u p l o a d C o n t r o l   :   u n d e f i n e d ;  
 	 v a r   d i s a b l e C t r l s   =   [ c m t T e x t ,   s . T C [ ' j s - C m t s u b m i t ' ] ,   s . T C [ ' j s - C m t N a m e ' ] ,   c m t E m a i l ,   c m t U p l o a d ,   s . i m g U p l o a d ] ;  
 	 v a r   l o c k C t r l s   =   [ s . T C [ ' j s - C m t s u b m i t ' ] ,   c m t U p l o a d ] ;  
 	 v a r   i m g A r e a   =   s . T C [ ' j s - c o m m e n t I m a g e A r e a ' ] ;  
 	 v a r   s o   =   s . s e r v e r O p t i o n s ;  
 	 v a r   a n o n y m C o n d   =   s . a n o n y m o u s C m t   & &   ! ( s . o p e n I D   | |   ( s o . f a c e b o o k L o g i n   & &   s o . f a c e b o o k )   | |  
 	 ( s o . y a h o o L o g i n   & &   s o . y a h o o )   | |   ( s o . g f c L o g i n   & &   s o . g f c )  
 	 | |   ( s o . t w i t t e r L o g i n   & &   s o . t w i t t e r ) ) ;  
  
 	 J S K i t L i b . f m a p ( d i s a b l e C t r l s ,   f u n c t i o n ( V ) {   i f   ( V )   V . d i s a b l e d   =   ( a n o n y m C o n d )   ?   t r u e   :   f a l s e ;   } ) ;  
 	 J S K i t L i b . f m a p ( l o c k C t r l s ,   f u n c t i o n ( V ) {   i f   ( V )   V . b t n L o c k e d   =   ( a n o n y m C o n d )   ?   " t r u e "   :   n u l l ;   } ) ;  
 	 i f   ( i m g A r e a )   i m g A r e a . d i s a b l e U p l o a d   =   a n o n y m C o n d ;  
 	 i f   ( c m t T e x t )   {   c m t T e x t . v a l u e   =   ( a n o n y m C o n d )   ?   $ J C L ( ' r e q u i r e A u t h ' )   :   " " ;   }  
 	 i f   ( c m t E m a i l   & &   a n o n y m C o n d )   c m t E m a i l . v a l u e   =   " " ;  
 }    
  
 J S C C . p r o t o t y p e . s e t T h i r d P a r t y S h a r e   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   p o   =   s . T C [ " j s - c o m m e n t P u b O p t i o n s " ] ;  
 	 i f ( ! p o )   r e t u r n ;  
 	 J S K i t L i b . r e m o v e C h i l d r e n ( p o ) ;  
 	 v a r   c h a n g e _ f u n   =   f u n c t i o n ( )   {  
 	 	 t h i s . v a l u e   =   t h i s . c h e c k e d   ?   " o n "   :   " o f f " ;  
 	 } ;  
 	 v a r   c r E l   =   f u n c t i o n ( l t y p e ,   l n a m e )   {  
 	 	 v a r   p u b l i s h   =   s . s e r v e r O p t i o n s [ l t y p e ] . p u b l i s h ; 	  
 	 	 v a r   i n p   =   s . c r ( " i n p u t " ) ;  
 	 	 i n p . c l a s s N a m e   =   " j s - c o m m e n t " + l n a m e + " S h a r e C h e c k b o x " ;  
 	 	 i n p . t y p e   =   " c h e c k b o x " ;  
 	 	 i n p . d e f a u l t C h e c k e d   =   ! ! p u b l i s h ;  
 	 	 i n p . c h e c k e d   =   ! ! p u b l i s h ;  
 	 	 i n p . v a l u e   =   i n p . c h e c k e d   ?   " o n "   :   " o f f " ;  
 	 	 i n p . n a m e   =   ' j s - C m t ' + l n a m e   + ' S h a r e ' ;  
 	 	 i n p . o n c h a n g e   =   c h a n g e _ f u n ;  
 	 	 v a r   d i v t x t   =   s . c r ( " d i v " ) ;  
 	 	 d i v t x t . c l a s s N a m e   =   " j s - c o m m e n t " + l n a m e + " S h a r e L a b e l " ;  
 	 	 v a r   t x t   =   d o c u m e n t . c r e a t e T e x t N o d e ( $ J C L ( ' s h a r e ' + l n a m e ) ) ;  
 	 	 d i v t x t . a p p e n d C h i l d ( t x t ) ;  
 	 	 p o . a p p e n d C h i l d ( i n p ) ;  
 	 	 p o . a p p e n d C h i l d ( d i v t x t ) ;  
 	 } ;  
 	 i f ( s . s e r v e r O p t i o n s . y a h o o )   {  
 	 	 c r E l ( " y a h o o " , " Y a h o o " ) ;  
 	 	 v a r   l b l   =   s . c r ( " d i v " ) ;  
 	 	 l b l . c l a s s N a m e   =   " j s - c o m m e n t Y a h o o S h a r e L a b e l L o g o " ;  
 	 	 p o . a p p e n d C h i l d ( l b l ) ;  
 	 }  
 	 i f ( s . s e r v e r O p t i o n s . f a c e b o o k   & &   s . s e r v e r O p t i o n s . f a c e b o o k _ a p i _ k e y )   {  
 	 	 c r E l ( " f a c e b o o k " , " F B " ) ;  
 	 }  
 	 i f ( s . s e r v e r O p t i o n s . g f c )   {  
 	 	 c r E l ( " g f c " , " G F C " ) ;  
 	 }  
 	 i f ( s . s e r v e r O p t i o n s . t w i t t e r )   {  
 	 	 c r E l ( " t w i t t e r " , " T w i t t e r " ) ;  
 	 }  
 }  
  
 J S C C . p r o t o t y p e . c r e a t e J S K A u t h   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   c a l c S t a r t P o s i t i o n   =   f u n c t i o n ( ) {  
 	 	 v a r   d o c   =   ( d o c u m e n t . c o m p a t M o d e   = =   " B a c k C o m p a t " )   ?   d o c u m e n t . b o d y   :   d o c u m e n t . d o c u m e n t E l e m e n t ;  
 	 	 v a r   s c r o l l   =   J S D L . p r o t o t y p e . g e t C u r S c r o l l ( ) ;  
 	 	 r e t u r n   {  
 	 	 	 x   :   s c r o l l . s c r o l l _ l e f t   +   M a t h . r o u n d ( ( d o c . c l i e n t W i d t h   -   3 0 0 ) / 2 ) ,  
 	 	 	 y   :   s c r o l l . s c r o l l _ t o p   +   M a t h . r o u n d ( ( d o c . c l i e n t H e i g h t   -   2 0 0 ) / 2 )  
 	 	 } ;      
 	 } ;  
  
 	 v a r   c a l c A u t h O p t i o n s   =   f u n c t i o n ( )   {  
 	 	 r e t u r n   J S K i t L i b . f o l d l ( [ " r e g i s t e r " ,   " l o g i n " ,   " h a l o s c a n " ,   " o p e n i d " ] ,   [ " b l o g s p o t " ,   " f a c e b o o k " ,   " y a h o o " ,   " g f c " ,   " t w i t t e r " ] ,   f u n c t i o n ( m e t h o d ,   c o n t a i n e r )   {  
 	 	 	 i f   ( s . s e r v e r O p t i o n s [ m e t h o d   +   " L o g i n " ]   & &   ! s . s e r v e r O p t i o n s [ m e t h o d ] )   c o n t a i n e r . p u s h ( m e t h o d ) ;  
                 	 } ) ;  
 	 }  
 	 i f ( s . j s k a u t h )   s . j s k a u t h . d e s t r o y ( ) ; 	  
 	 s . j s k a u t h   =   n e w   J S K A u t h ( {  
 	 	 m o d e :   " p o p u p " ,  
 	 	 a u t h O p t i o n s :   c a l c A u t h O p t i o n s ( ) ,  
 	 	 s t a r t P o s i t i o n :   c a l c S t a r t P o s i t i o n ,  
 	 	 w i t h B a c k d r o p :   " t r u e " ,  
 	 	 l o g i n S t a t u s :   ! ! ( s . o p e n I D   | |   s . s e r v e r O p t i o n s . f a c e b o o k   | |   s . s e r v e r O p t i o n s . y a h o o   | |   s . s e r v e r O p t i o n s . g f c   | |   s . s e r v e r O p t i o n s . t w i t t e r ) ,  
 	 	 r e f :   J S K i t L i b . g e t R e f ( s ) ,  
 	 	 r v c T a r g e t :   s . t a r g e t ,  
 	 	 f a c e b o o k _ a p i _ k e y :   s . s e r v e r O p t i o n s . f a c e b o o k _ a p i _ k e y ,  
 	 	 f a c e b o o k _ x d _ r e c e i v e r :   s . s e r v e r O p t i o n s . f a c e b o o k _ x d _ r e c e i v e r ,  
 	 	 g f c _ s i t e :   s . s e r v e r O p t i o n s . g f c _ s i t e  
 	 	 } ,   s . T C [ ' j s - A u t h A r e a W r a p ' ] ) ;  
 }  
  
  
 J S C C . p r o t o t y p e . w r a p J S K A u t h   =   f u n c t i o n ( )   {  
 	 v a r   s   =   t h i s ;  
 	 v a r   t c   =   s . T C ;  
  
 	 i f   ( s . c o n f i g . n o l c )   r e t u r n ;    
 	 i f   ( ! t c [ ' j s - A u t h A r e a W r a p ' ] )   {  
 	 	 v a r   i t e m s   =   [ ' j s - c o m m e n t O p e n I D ' ,   ' j s - c o m m e n t I n p u t O p e n I D ' ,   ' j s - C m t O p e n I D ' ,   ' j s - O p e n I D E r r o r ' ] ;  
 	 	 J S K i t L i b . f m a p ( i t e m s ,   f u n c t i o n ( i t e m )   {  
 	 	 	 i f   ( t c [ i t e m ] )   t c [ i t e m ] . p a r e n t N o d e . r e m o v e C h i l d ( t c [ i t e m ] ) ;  
 	 	 } ) ;  
 	 	 r e t u r n ;  
 	 }  
  
 	 v a r   a u t h A r e a T m p l   =  
 	 ' < d i v > '   +  
 	 	 ' < d i v   c l a s s = " j s - c o m m e n t F i e l d L a b e l " > { L a b e l : l e a v e C o m m e n t A s } < / d i v > '   +  
 	 	 ' < d i v   c l a s s = " j s - a u t h S e l e c t o r " > '   +    
 	 	 	 ' < s p a n   c l a s s = " j s - l o g o u t S p a n " > [ < a   c l a s s = " j s - c o m m e n t O p e n I D L o g o u t " > { L a b e l : l o g o u t } < / a > ] < / s p a n > '   +  
 	 	 ' < / d i v > '   +  
 	 	 ' < d i v   c l a s s = " j s - a u t h A r e a " > < / d i v > '   +  
 	 ' < / d i v > ' ;  
  
 	 J S K i t L i b . f m a p ( [ ' N a m e ' ,   ' E m a i l ' ,   ' T e x t ' ] ,   f u n c t i o n ( t y p e ) {  
 	 	 i f   ( t c [ ' j s - C m t '   +   t y p e ] )   t c [ ' j s - C m t '   +   t y p e ] . c l a s s N a m e   =   " j s - c o m m e n t F i e l d I n p u t " ;  
 	 } ) ;  
  
 	 i f   ( t c [ ' j s - c o m m e n t I n p u t O p e n I D ' ] )   t c [ ' j s - c o m m e n t I n p u t O p e n I D ' ] . s t y l e . d i s p l a y   =   " n o n e " ;  
  
 	 v a r   a u t h A r e a C o n t a i n e r   =   J S K i t L i b . h t m l ( s . g t m p l ( a u t h A r e a T m p l ) ) ;  
 	 t c [ ' j s - A u t h A r e a W r a p ' ] . a p p e n d C h i l d ( a u t h A r e a C o n t a i n e r ) ;  
 	 J S K i t L i b . m a p C l a s s 2 O b j e c t ( t c ,   a u t h A r e a C o n t a i n e r ) ;  
  
 	 v a r   n o r m a l i z e O p e n I D   =   f u n c t i o n ( o i d )   {  
 	 	 v a r   m   =   o i d . m a t c h ( / ^ h t t p s ? : \ / \ / ( [ a - z 0 - 9 \ . \ - ] + ? ) . j s - k i t . c o m \ / $ / ) ;  
 	 	 i f ( m )   r e t u r n   { t y p e :   " j s k i t " ,   l o g i n :   m [ 1 ] } ;  
 	 	 r e t u r n   { t y p e :   " o p e n i d " ,   l o g i n :   o i d . r e p l a c e ( / h t t p s ? : \ / \ / ( . * ? ) \ / $ / ,   ' $ 1 ' ) } ;  
 	 }  
  
 	 v a r   c a l c L o g i n     =   f u n c t i o n ( l o g i n )   {  
 	 	 i f   ( l o g i n   = =   " g u e s t " )   r e t u r n ;  
 	 	 v a r   g e t P o s t F i x   =   f u n c t i o n ( t y p e )   {  
 	 	 	 v a r   r ;  
 	 	 	 s w i t c h ( t y p e )   {  
 	 	 	 c a s e   " f a c e b o o k " :   r   =   "   @   F a c e b o o k " ;   b r e a k ;  
 	 	 	 c a s e   " y a h o o " :   r   =   "   @   Y a h o o " ;   b r e a k ;  
 	 	 	 c a s e   " g f c " :   r   =   "   @   G o o g l e   F r i e n d   C o n n e c t " ;   b r e a k ;  
 	 	 	 c a s e   " t w i t t e r " :   r   =   "   @   T w i t t e r " ;   b r e a k ;  
 	 	 	 d e f a u l t :   r   =   " " ;  
 	 	 	 }  
 	 	 	 r e t u r n   r ;  
 	 	 }  
 	 	 v a r   s o l l   =   s . s e r v e r O p t i o n s . l a s t L o g i n ;  
 	 	 i f ( s o l l   & &   ( s o l l . t y p e   ! =   " y a h o o "   | |   s . s e r v e r O p t i o n s . y a h o o )  
 	 	 & &   ( s o l l . t y p e   ! =   " g f c "   | |   s . s e r v e r O p t i o n s . g f c )  
 	 	 & &   ( s o l l . t y p e   ! =   " f a c e b o o k "   | |   s . s e r v e r O p t i o n s . f a c e b o o k )  
 	 	 & &   ( s o l l . t y p e   ! =   " t w i t t e r "   | |   s . s e r v e r O p t i o n s . t w i t t e r ) )   {  
 	 	 	 v a r   n o r m L o g i n   =  
 	 	 	 	 s o l l . t y p e   = =   " o p e n i d "   ?  
 	 	 	 	 n o r m a l i z e O p e n I D ( s o l l . l o g i n ) . l o g i n   :   s o l l . l o g i n ;  
 	 	 	 r e t u r n   n o r m L o g i n  
 	 	 	 	 +   g e t P o s t F i x ( s o l l . t y p e ) ;  
 	 	 }  
 	 	 v a r   r s l t ;  
 	 	 v a r   f   =   f u n c t i o n ( l t y p e )   {  
 	 	 	 r e t u r n   ( s . s e r v e r O p t i o n s [ l t y p e ]   & &  
 	 	 	 	 s . s e r v e r O p t i o n s [ l t y p e + ' L o g i n ' ] )   ?  
 	 	 	 	 s . s e r v e r O p t i o n s [ l t y p e ] . n a m e   +   g e t P o s t F i x ( l t y p e )   :   u n d e f i n e d ;  
 	 	 }  
 	 	 r s l t   =   r s l t   | |   f ( ' f a c e b o o k ' )   | |   f ( ' y a h o o ' )   | |   f ( ' g f c ' )   | |   f ( ' t w i t t e r ' ) ;  
 	 	 r e t u r n   ( r s l t   ?   r s l t   +   ( l o g i n   ?   "   /   "   +   l o g i n   :   " " )   :   l o g i n   ) ;  
 	 }  
  
 	 v a r   b u i l d A u t h O p t i o n s   =   f u n c t i o n ( l o g i n ) {   r e t u r n (  
 	 	 [ { v a l u e   :   ( l o g i n   = =   " g u e s t "   ?   " o p t - a n o n y m o u s "   :   " o p t - u s e r " ) ,      
 	 	 t e x t     :   c a l c L o g i n ( l o g i n )   | |   $ J C L ( ' g u e s t ' ) } ,  
 	 	 { v a l u e   :   " r e g i s t e r " ,  
 	 	 t e x t     :   $ J C L ( ' n e w J S K i t P r o f i l e ' ) } ,  
 	 	 { v a l u e   :   " l o g i n " ,    
 	 	 t e x t     :   $ J C L ( ' e x i s t i n g J S K i t P r o f i l e ' ) } ,  
 	 	 { v a l u e   :   " h a l o s c a n " ,  
 	 	 t e x t     :   $ J C L ( ' e x i s t i n g H a l o s c a n P r o f i l e ' ) } ,  
 	 	 { v a l u e   :   " o p e n i d " ,  
 	 	 t e x t     :   $ J C L ( ' u s i n g O p e n I D ' ) } ,  
 	 	 { v a l u e   :   " b l o g s p o t " ,  
 	 	 g u a r d :   f u n c t i o n ( ) { r e t u r n   s . s e r v e r O p t i o n s . b l o g s p o t L o g i n   ?   1 : 0 ; } ,  
 	 	 t e x t     :   $ J C L ( ' b l o g s p o t U R L ' ) } ,  
 	 	 { v a l u e   :   " f a c e b o o k " ,  
 	 	 g u a r d :   f u n c t i o n ( ) { r e t u r n   s . s e r v e r O p t i o n s . f a c e b o o k   | |   ! s . s e r v e r O p t i o n s . f a c e b o o k L o g i n   ?   0 : 1 ; } ,  
 	 	 t e x t     :   $ J C L ( ' c o n n e c t F a c e b o o k ' ) } ,  
 	 	 { v a l u e   :   " y a h o o " ,  
 	 	 g u a r d :   f u n c t i o n ( ) { r e t u r n   s . s e r v e r O p t i o n s . y a h o o   | |   ! s . s e r v e r O p t i o n s . y a h o o L o g i n   ?   0 : 1 ; } ,  
 	 	 t e x t     :   $ J C L ( ' c o n n e c t Y a h o o ' ) } ,  
 	 	 { v a l u e   :   " g f c " ,  
 	 	 g u a r d :   f u n c t i o n ( ) { r e t u r n   s . s e r v e r O p t i o n s . g f c   | |   ! s . s e r v e r O p t i o n s . g f c L o g i n   ?   0 : 1 ; } ,  
 	 	 t e x t     :   $ J C L ( ' c o n n e c t G F C ' ) } ,  
 	 	 { v a l u e   :   " t w i t t e r " ,  
 	 	 g u a r d :   f u n c t i o n ( ) { r e t u r n   s . s e r v e r O p t i o n s . t w i t t e r   | |   ! s . s e r v e r O p t i o n s . t w i t t e r L o g i n   ?   0 : 1 ; } ,  
 	 	 t e x t     :   $ J C L ( ' c o n n e c t T w i t t e r ' ) }  
 	 ] ) ;  
 	 } ;  
 	 v a r   o p t i o n s   =   b u i l d A u t h O p t i o n s ( s . o p e n I d ) ;  
  
 	 v a r   o n S u c c e s s L o g i n A c t i o n   =   f u n c t i o n ( e v e n t N a m e ,   d a t a )   {  
 	 	 s . s e r v e r O p t i o n s . l a s t L o g i n   =   {  
 	 	 	 ' t y p e ' :   ' o p e n i d ' ,  
 	 	 	 ' l o g i n ' :   d a t a [ ' y o u r s ' ] [ ' o p e n i d - t i e ' ] } ;  
 	 	 s . o p e n I D   =   d a t a [ ' y o u r s ' ] [ ' o p e n i d - t i e ' ] ; 	  
 	 	 s h o w A c t u a l I n f o (  
 	 	 	 d a t a [ ' y o u r s ' ] [ ' o p e n i d - t i e ' ] ,  