// <![CDATA[

( function( $ )
{
    
    return ;
    
    if( $.browser.msie && $.browser.version.substr( 0, 1 ) < 7 ) {
        
        return;
    }
    
    var _roundedElements = [
        {
            e : '#header-top',
            o : 'bottom-left bottom-right'
        },
        '#header-bottom, #header-banner',
        'DIV.tx-flvplayer-pi1, OBJECT, EMBED',
        'DIV#right-col H2, DIV#right-col H6, DIV#right-col UL',
        'DIV#content H2, .flex-content',
        'DIV.tx-loginboxmacmade-pi1',
        'DIV.menu_level2-header, UL#menu_level2',
        'DIV.news-latest-item, DIV.news-latest-gotoarchive, DIV.news-list-item',
        'DIV.news-latest-item-prog, DIV.news-latest-gotoarchive-prog',
        'DIV.news-list-item-prog, DIV.news-list-gotoarchive-prog',
        'DIV.tx-xcatmenu-pi1 H3, DIV.tx-xcatmenu-pi1 UL',
        'DIV.news-single-item-body, DIV.news-single-backlink',
        'DIV.flick_player',
        'DIV.tx-dropdownsitemap-pi1, DIV.tx-dropdownsitemap-pi1 DIV.expAll',
        'DIV.tx-sendpage-pi1',
        'DIV.tx-indexedsearch',
        'DIV.contact_mail',
        'DIV.tx-thmailformplus-pi1 LEGEND, DIV.tx-thmailformplus-pi1 FIELDSET, DIV.tx-mailformplus-errors',
        'DIV.tx-mailform-fields',
        '#content-left-1col-menu .tx-srfeuserregister-pi1, #content-left-1col-menu .tx-felogin-pi1',
        '#content-left-1col-menu UL, #content-left-1col-menu .txtcontent',
        '#content-left UL, #content-left .txtcontent, #content-left .indent P',
        '#content-right P.bodytext, #content-right UL, #content-right .txtcontent',
        '.news-single-item',
        'DIV.tx-ufmc-pi1-member',
        '#informations'
    ];
    
    // Add rounded corners to the given elements.
    function _roundElements( elements )
    {
        // For each elements in the given array.
        for( var i = 0; i < elements.length; i++ ) {
            
            // Store the element itself.
            var el = elements[ i ];
            
            // If the element is an object(  "{ e: foo, o: bar}" ).
            if( typeof el === 'object' ) {
                
                // Pass its options ( el.o ) to the $.fn.corners.
                $( el.e ).corners( el.o );
                
                // $( el.e ).css( 'backgroundColor', 'red' );
            
            // If it is not an object (aka string).
            } else {
            
                // Simply call $.fn.corners on it.
                $( el ).corners();
                
                // $( el ).css( 'backgroundColor', 'red' );
            }
        }
        
        var $special = $( '#content-left P.bodytext, #content-left-1col-menu P, #content-left-1col-menu .indent' );
        
        $special.css( { backgroundColor: '#FFF' } );
        
        if( !$special.closest( 'TABLE' ).length ) {
            
            $special.corners();
        }
    }
    
    // When the DOM has loaded (not the images).
    $( document ).ready( function()
    {
        if( jQuery.support.leadingWhitespace ) {
        
            // Round the corners of some elements.
            _roundElements( _roundedElements );
        }
        
        var errors = $( 'DIV.tx-mailformplus-errors UL' );
        
        if( !errors.length ) {
        
            return;
        }
        
        if( !errors.children().length ) {
            
            errors.parent().remove();
        }
    } );
    
    
} )( jQuery );

// ]]>
