
    function bubble_show(bubble){
      $('.bubble_klient').hide();
      $(bubble).show();
    }

    $(document).keydown(function(event){
            if (event.keyCode == '37') {
              if($('a.left').size()>0)
                 window.location = $('a.left').attr("href");
             }
            if (event.keyCode == '39') {
              if($('a.right').size()>0)
               window.location = $('a.right').attr("href");
             }
    });


  $(document).ready(function (){
    
    $('#slider a:not(.right,.left)').css('display','none');
    $('#slider a:first').css('display','block');
    
  
  });

	$(window).load(function (){
		   
      function onBefore() { 
          $('#slider .description').html(this.rel);
      }

		  if($(".img.colorbox").size() <= 1){
        $("#nav_left").css('display','none');$("#nav_right").css('display','none');
      } 
    
      $('.bubble_klient').hide();
      
      $('a.colorbox').click(function(){
        
        $('a.colorbox').colorbox({opacity:'0.5', close: 'Zavřít', rel:'group',
          onComplete:function(){ 
            $("#cboxClose").css('top','-20px').css('right','10px'); 
            if($(".img.colorbox").size() > 1){
              $("#cboxPrevious").css('display','block');$("#cboxNext").css('display','block');
            };

            
          }
         });
        
      });
      
      
      $('.image_box_content').cycle({ 
          fx: 'scrollHorz', 
          timeout: 3000,
          speed:500,
          pause:5000,
          before: onBefore,
          prev:   '#nav_left', 
          next:   '#nav_right' 
      });
  
      $('#slide').cycle({ 
          fx: 'scrollHorz', 
          timeout: 5000,
          speed:500,
          pause:5000,
          before: onBefore,
          prev:   '#slider .left', 
          next:   '#slider .right' 
      });
   
         

                            
    
  });
    


