jQuery(document).ready(function(){ 


/* zvyrazneni radku tabulky po najeti - kategorie POBOCKY */
   jQuery('#content table.table tr').hover(function() {
      jQuery(this).find("td").addClass("hover");
   }, function() {
      jQuery(this).find("td").removeClass("hover");
   }); 

   
   

   jQuery("#imagePanel table a").live('click', function(){
      jQuery(this).lightBox();
      return false;
   });    
           
           
       // nastavi obsahu na vysku nejvyssiho sloupce v layoutu
             var leftHeight = jQuery("#pageContentLeft").innerHeight();
             var leftHeightNew = leftHeight - 110;             
             var centerHeight = jQuery("#contentPanel").innerHeight();  

             if ( leftHeight > centerHeight)
             {
                  jQuery("#contentPanel").height(leftHeightNew);     
             }
             
             
               
     
           
/************* ZNACKY *********************/
                 
                                                  
      jQuery(".brandItem").prepend("<div class=brandDecor>  <div class=item-gloss> </div><div class=top_left> </div><div class=top_right> </div><div class=bottom_left> </div><div class=bottom_right> </div> </div>");
 
      jQuery(".brandItem").hover(function(){
      
                var sirkaLoga = jQuery("img",this).innerWidth();
                var sirkaLoga2 = sirkaLoga-120;  
                var easing = 'linear';
                var callback = function(){ jQuery(this).stop().animate({ left: "0px" }) };
                var delay = 800;               

                var duration = sirkaLoga2*20;             

      jQuery(this).find("img").stop().delay(delay).animate({ left: "-"+sirkaLoga2+"px" },{
                easing: easing,
                duration: duration,
                complete: callback}); 
      }, function() {
          jQuery(this).find("img").stop(true,false).animate({ left: "0px" });

      });
   

  /* ****** zasednuti znacek.. IE8 jebe ********/
   

    /* predpis pro IE8, kvuli odstraneni podminky. vysledek stejny. ie8sux !! */
       jQuery('.ie8sux ').find(".brandLink").hover(function() { 
            jQuery(this).parent().siblings().find("img").stop().fadeTo(500,0.5); 
      }, function() { 
            jQuery(this).parent().siblings().find("img").stop().fadeTo(500,1); 
      }); 
            
    /****/
       jQuery('.brandItem').hover(function() { 
            jQuery(this).siblings('.brandItem').stop().fadeTo(500,0.5); 
      }, function() { 
            jQuery(this).siblings('.brandItem').stop().fadeTo(500,1); 
      });

   
   
       jQuery(function() {
          jQuery('#rotate')
          .before('<div id="pager">') 
         .cycle({ 
             fx:     'fade', 
             speed:  'slow', 
             timeout: 3000, 
             pager:  '#pager'
         });
       });
       
        
});
