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