jQuery(document).ready( function() {  

   brand_counts = jQuery("#brands div").length;
   brand_width = 940/brand_counts - 8;
   jQuery("#brands div").css('width',brand_width+'px');
   

   jQuery("#brands div").each(function() {
     jQuery(this).hover(
          function(){ 
            jQuery(this).css('background-color', '#FFFFFF');
          },
          function(){
            jQuery(this).css('background-color', '#E3E5EC');
          }  
       );
   
   });
   

 
   jQuery("#first").hover(function(){
       jQuery("#begin").css('background', 'url("../site/img/menu_firsthov.jpg")  no-repeat 0% 0px');

          
          
      },function(){
          jQuery("#begin").css('background', 'url("../site/img/menu_first.jpg")  no-repeat 0% 0px');
      });

	jQuery("#last").hover(function(){
          jQuery("#end").css('background', 'url("../site/img/menu_lasthov.jpg")  no-repeat 100% 0px');
      },function(){
          jQuery("#end").css('background', 'url("../site/img/menu_last.jpg")  no-repeat 100% 0px');
      });

   
   
   jQuery("#Form_Form_action_process").hover(
          function(){ 
            jQuery(this).css('background-image', 'url("../site/img/obr_hover.jpg")');
          },
          function(){
            jQuery(this).css('background-image', 'url("../site/img/obr.jpg")');
          }
       );

   jQuery(".right tr").each(function(){
      jQuery(this).find("td:last").css({borderRight: '0px'});
   
   });
   
       
       
});


function setPrintCSS(){
          if (document.getElementsByTagName){
            x = document.getElementsByTagName('link');
          }else if (document.all){
            x = document.all.tags('link');
          }else{
            return;
          }
          for(var i=0;i<x.length;i++){
            if(x[i].media=='print'){
              x[i].media = 'all';
            }else{
              x[i].href = '';
            }
          }
        }
        if(document.location.hash=='#print'){
          window.onload = setPrintCSS;
        }
