// encoding: utf-8
/*@cc_on/*@if(@_jscript_version<5.7)try{document.execCommand('BackgroundImageCache',0,1)}catch(e){}/*@end@*/

// ***** jqreq *****
Req(
  'fontsizer',
  'autovalidate',
  'labelizor',
  'equalizeheights',
  'x/ifixpng',
  'imgpop',
  
  function(){
    var $ = jQuery;
    
    $('body').addClass('heightfixed');
    
    $('.pgmain .wrap, .pgextra1 .wrap, .pgextra2 .wrap, .pgextra3 .wrap').equalizeHeights();
    
    // labelize search input
    $('#qstr').labelizor();
    
    if (!window.EPLICA_loggedin)
    {

      // pngfix for IE6
      if ($.browser.msie && $.browser.version < 7) {
        $('img[src$=".png"]').ifixpng();
      }
      
      //zebra tables
      $('div.article table').each(function() {
          $(this).find('tr:even').addClass('alt');
        });
      
      //popup in articles
      $('div.article div.imgbox a:has(img)')
          .each(function() {
            var imgsrc = $(this).find('img').attr('src').replace(/\/[^\/]+\/([^\/]+)$/, '/large/$1');
            $(this).attr('href', imgsrc)
          }) 
          .imgPopper({
              curtainColor : '#000000',
              curtainOpacity : '0.75'
            });

          
    }
    
    //remove flicker trick
    $('#noflickerCSS').remove();

    // fontsizer
    $('div.pagestyle').fontsizer();

    // validate all forms
    $('form').autoValidate();
        
  }
);
// **** /jqreq *****
