

function checkForm(form){  
  if ((!checkTelNumber(form.telNum))&&(!checkMailNoAlert(form.email))){
    alert("Zadejte prosím jeden ze svých kontaktních údajů.");
    form.email.focus();
    return false;
  }
  if ((form.zprava.value=="")||(form.zprava.value=="Text")){
    alert("Před odesláním formuláře je nutné napsat nějaký text.");
    form.zprava.focus();
    return false;
  } 
  return true;
}

function checkMailNoAlert(obj){
  re = new RegExp("^[^@]+@[^.]+\..+$");
  if (!re.test(obj.value)){
    obj.focus();
    return false;
  }else
    return true;
}

function checkTelNumber(obj){
  re = new RegExp("^[+]?[()/0-9. -]{9,}$");
  if (!re.test(obj.value)){
    obj.focus();
    return false;
  }else
    return true;
}
	
  
$(document).ready(function() { 
    
    $(function() {
      if ($('a.galleryImg').length > 0 )  {
  			$('a.galleryImg').lightBox();
  			$('a.galleryImg2').lightBox();
			}
			
			if ($('.gal_line').length){
			  /* for (var i=0; i<4 ; i++)
            $('.gal_line > .img_'+i).css({'display':'none'});     */
      }
      $('.link_show_all_img').click(function(){
         $('.link_show_all_img').fadeIn('slow');
         $('.dn').fadeOut('slow');
         $(this).fadeOut('slow');
         $(this).parent().parent().children(".img_gallery").fadeIn('slow',function(){
            $('html,body').scrollTop($(this).parent().offset().top);
         });
          
         return false;
      });
			
		});


}); 
