$(document).ready(function(){ 
 $(".foto .fotka").show(); //Show Banner
	  $(".foto .popisek").animate({ opacity: 0.70 }, 1 ); //Set Opacity
	  $(".foto .popisek2").animate({ opacity: 0.80 }, 1 ); //Set Opacity
	  
	  $("a.zavri").click(function(){
    $(".fotka .popisek").slideToggle(); //Toggle the description (slide up and down)
    $(".fotka .popisek2").slideToggle(); //Toggle the description (slide up and down)
    $("a.zavri").toggleClass("show"); //Toggle the class name of "show" (the hide/show tab)
});

	$('#navi').cycle({
		fx: 'fade',
		speed: 1550,
		timeout: 300
		/*speed:       500, 
    	timeout:     0, 
    	pager:      '#nav', 
    	pagerEvent: 'click'*/
	});

	$('#foto').cycle({
		fx: 'fade',
		speed: 800,
		timeout: 8000
		/*speed:       500, 
    	timeout:     0, 
    	pager:      '#nav', 
    	pagerEvent: 'click'*/
	});

	$('#galer').cycle({
		fx:     'fade', 
   		speed:  1550, 
        timeout: 0, 
        next:   '#next2', 
        prev:   '#prev2',
        after: onAfter  
        /*timeout: 5000
		speed:       500, 
    	timeout:     0, 
    	pager:      '#navi', 
    	pagerEvent: 'click'*/
	});

	$('#fotok').cycle({
		fx: 'fade',
		speed: 1550,
		timeout: 6850
		/*speed:       500, 
    	timeout:     0, 
    	pager:      '#nav', 
    	pagerEvent: 'click'*/
	});
});


		
function onAfter(curr,next,opts) {
	var caption = (opts.currSlide + 1) + ' / ' + opts.slideCount;
	$('#caption').html(caption);
}
		
		
	
  $(document).ready(function(){
    
    $("a.foto").click(function () {
      $("a.anim").toggle("normal");
    });    
	
 
  
 
    
    $("a.realizace").click(function () {
      $("a.anim2").toggle("normal");
    });    

 
    
    $("a.klienti").click(function () {
      $("a.anim3").toggle("normal");
    });    

  });
  
  
  function formular() {
				
					
					jmeno = document.getElementById('jmeno');
					
					if(jmeno.value == "")
					{
						alert('Please fill in your name!');
						return false;
					}
					
					
					var emailRegex = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/;
					var mail = form.mail.value;
					
					if(mail == "") {
    				  alert('You must enter e-mail address!');
    				  return false;
    				}
    				if(mail != "")
    				{
    					if(!mail.match(emailRegex)) {
    				
  						alert('E-mail address is not valid!');
  						return false
  						}
  						
    				}
    				
    				what = document.getElementById('what');
    				
    				
    				
					if(what.value == "")
					{
						alert('Please fill in your interests!');
						return false;
					}
					
					if(what.value.lenght < 10)
					{
						alert('Text in your interests is too short!');
						return false;						
					}

    				
  					
  					

				
				}

   
 

