// encoding: utf-8
/*@cc_on/*@if(@_jscript_version<5.7)try{document.execCommand('BackgroundImageCache',0,1)}catch(e){}/*@end@*/

// ***** jqreq *****
Req(
  'eutils',
  'roundcorners',
  'equalizeheights',
  'autovalidate',
  'tabswitcher',
  
  function(){
    var $ = jQuery,
        homePage = $('body.home')[0];

    if (!window.EPLICA_loggedin)
    {
      $(homePage)
          .find('.white-strip')
              .prepend('<div class="topfader" />')
          .end()
          .find('.shadebox .boxbody')
              .equalizeHeights()
        ;

      $('.tabpane')
          .addClass('tabpane-active')
          //.find('.boxbody').equalizeHeights().end()
          .makeTabbox()
              .tabSwitcher({
                  cssHide: true
                });


      $('.article table')
          .addClass('roundbox-active')
          .roundCorners({
              prefix: 'tablec_ tablec_',
              out:    1
            })
          .each(function(){
              var newRow = $('tr:last', this).clone().addClass('bottomrow');
              $('>*', newRow).html('&nbsp;');
              $('tbody', this).append( newRow );
            });

      $('.framebox .boxbody')
          .equalizeHeights();

      $('.snav > .boxhead, .pgextra1 .boxhead, .framebox .boxhead')
          .roundCorners({
              prefix: 'roundc_ roundc_',
              out:    1
            });


    }

    //remove flicker trick
    $('#noflickerCSS')
        .remove();


    if (!homePage)
    {
      $('.pgmain, .pgextra1 .wrap, .pgextra2 .wrap')
          .equalizeHeights();
    }

    // validate all forms
    $('form')
        .autoValidate();

  }
);
// **** /jqreq *****
