
function links(id){var link=document.getElementById(id).getElementsByTagName("a");for(var i=0;i<link.length;i++)
link[i].setAttribute("target","_blank");}
function close(){slowFadeOut("#alert",500);slowFadeOut("#alpha",500);setTimeout('document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alert"));',500);setTimeout('document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alpha"));',500);}
function send(){if(document.getElementById("alert")!=undefined){document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alert"));document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alpha"));}
var contact_nome=document.getElementById("contact_nome");var contact_email=document.getElementById("contact_email");var emailEXP=new RegExp("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$");var contact_telefono=document.getElementById("contact_telefono");var contact_msg=document.getElementById("contact_msg");var result=true;if(contact_nome.value==""||contact_email.value==""||!contact_email.value.match(emailEXP)||contact_telefono.value==""||contact_msg.value==""){var body=document.getElementsByTagName("body").item(0);var alpha=document.createElement("div");var alert=document.createElement("div");alpha.setAttribute('id','alpha');alert.setAttribute('id','alert');body.appendChild(alpha);body.appendChild(alert);document.getElementById("alert").onclick=close;document.getElementById("alpha").onclick=close;alert.innerHTML="<b style='font-size: 18px'>Messaggio non inviato</b><br/><br/>";if(contact_nome.value=="")
alert.innerHTML+="Inserire il nome<br/>";if(contact_email.value==""||!contact_email.value.match(emailEXP))
alert.innerHTML+="Inserire una email valida<br/>";if(contact_telefono.value=="")
alert.innerHTML+="Inserire un numero di telefono<br/>";if(contact_msg.value=="")
alert.innerHTML+="Inserire il testo del messaggio<br/>";alert.innerHTML+="<br/><span></span>";slowShow("#alert",1000);slowShow("#alpha",1000);result=false;}
return result;}
Cufon.replace('h1,h2,h3,h4,h5,h6,#photos li span,.coda-slider p.loading, p em span, #navigation ul li a');$(function(){$("#ico").hover(function(){$("span",this).fadeOut('slow');},function(){$("span",this).fadeIn("fast");});});function slowShow(x,y){$(x).hide();$(x).hide(function(){$(x).fadeIn(y);return false;});}
function slowHide(x,y){$(x).hide(y);return false;}
function slowFadeOut(x,y){$(x).fadeOut(y);return false;}
function award(x,y){if(document.getElementById(x)!=undefined){links(x);$('#'+x).css('display','block');$('#'+x).hover(function(){$(this).animate({right:'0'},200);},function(){$(this).animate({right:y},400);});};}
$(document).ready(function(){$(".gallery").stop().animate({"opacity":"1"},"slow");$(".gallery").hover(function(){$(this).stop().animate({"opacity":"0.3"},"slow");},function(){$(this).stop().animate({"opacity":"1"},"slow");});$('#photos ul').kwicks({max:628,spacing:0,duration:1500});$("#gallery a").stop().animate({"opacity":"1"},"slow");$("#gallery a").hover(function(){$(this).stop().animate({"opacity":"0.4"},"slow");},function(){$(this).stop().animate({"opacity":"1"},"slow");});$("#photos ul li a img").stop().animate({"opacity":"1"},"slow");$("#photos ul li a img").hover(function(){$(this).stop().animate({"opacity":"0.4"},"slow");},function(){$(this).stop().animate({"opacity":"1"},"slow");});$('#coda-slider').codaSlider();$('#photos').cycle({fx:'fade',timeout:7000,next:'#photos'});$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'indianbrahma',show_title:false,gallery_markup:''});if(document.getElementById("send")!=undefined)
document.getElementById("send").onclick=send;if(document.getElementById("alert")!=undefined){slowShow("#alert",1000);slowShow("#alpha",1000);document.getElementById("alert").onclick=close;document.getElementById("alpha").onclick=close;}
links('networks');$('textarea').css('resize','none');$('.blank').attr('target','_blank');$('head').append('<link rel="stylesheet" type="text/css" href="/css/css3.css" />');$('#cssdesignawards a').attr('target','_blank');$(function(){$("#cssdesignawards").hover(function(){$("span",this).fadeOut('slow');$("b",this).fadeIn("fast");},function(){$("span",this).fadeIn("fast");$("b",this).fadeOut('slow');});});});
