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