$(document).ready(function() {

$('.slide-home,.slide-home-intro').cycle({
   fx:     'fade', 
    timeout: 5000,
	 speed: 800,
	 fit:1,
	 prev: '#slide-prev',
	 next: '#slide-next'
}); 
$('#slide-news').cycle({ 
   fx:     'scrollVert', 
    timeout: 8000,
	 speed: 800,
	 fit:1
}); 

$("a[rel^='prettyPhoto']").prettyPhoto();


$(".menu-tip").hover(function(){
$(".intro-tip div").hide();
$(".intro-tip #"+$(this).attr("rel")).fadeIn('fast');
},function(){
$(".intro-tip #"+$(this).attr("rel")).fadeOut('fast');	
	
});

});

function switch_lang(ln){
window.location.assign("/"+ln+"/main.php");
}

function validaform(){

var email = $("#newslettermail").val();
	if(isValidEmailAddress(email)) {
		return true
	} else {
		$("#newslettermail").val('').focus();
		return false;
	}
 return false;
 }
 
function isValidEmailAddress(emailAddress) {
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
return pattern.test(emailAddress);
}



 
