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