// <![CDATA[

( function( $ )
{
    
    var _roundedElements = [
        {
            e : '#header-top',
            o : 'bottom-left bottom-right'
        },
        '#header-bottom, #header-banner',
        'DIV.tx-flvplayer-pi1, OBJECT, EMBED',
        'DIV#right-col H6, DIV#right-col UL',
        'DIV#content H2, DIV.flex-content',
        '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'
    ];
    
    // 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 );
            
            // If it is not an object (aka string).
            } else {
            
                // Simply call $.fn.corners on it.
                $( el ).corners();
            }
        }
    }
    
    // When the DOM has loaded (not the images).
    $( document ).ready( function()
    {
        if( !$.browser.msie ) {
            
            // Round the corners of some elements.
            _roundElements( _roundedElements );
        }
        
        var errors = $( 'DIV.tx-mailformplus-errors UL' );
        
        if( !errors.children().length ) {
            
            errors.parent().remove();
        }
    } );
    
    
} )( jQuery );

// ]]>

