var IE=/*@cc_on!@*/false;function cookie(x){if(document.cookie==""){var cookie=document.getElementById("cookie");var warning=document.createElement("div");var div=document.createElement("div");warning.setAttribute('id','warning');warning.appendChild(div);cookie.appendChild(warning);div.innerHTML=x}}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 newsletter(){if(document.getElementById("alert")!=undefined){document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alert"));document.getElementsByTagName("body").item(0).removeChild(document.getElementById("alpha"))}var newsletter_email=document.getElementById("newsletter_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 result=true;if(newsletter_email.value==""||!newsletter_email.value.match(emailEXP)){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'>"+document.getElementById("alerttext").getElementsByTagName("span")[0].firstChild.nodeValue+"</b><br/><br/>";if(newsletter_email.value==""||!newsletter_email.value.match(emailEXP))alert.innerHTML+=document.getElementById("alerttext").getElementsByTagName("span")[2].firstChild.nodeValue+"<br/>";alert.innerHTML+="<br/><span></span>";slowShow("#alert",1000);slowShow("#alpha",1000);result=false}return result}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'>"+document.getElementById("alerttext").getElementsByTagName("span")[0].firstChild.nodeValue+"</b><br/><br/>";if(contact_nome.value=="")alert.innerHTML+=document.getElementById("alerttext").getElementsByTagName("span")[1].firstChild.nodeValue+"<br/>";if(contact_email.value==""||!contact_email.value.match(emailEXP))alert.innerHTML+=document.getElementById("alerttext").getElementsByTagName("span")[2].firstChild.nodeValue+"<br/>";if(contact_telefono.value=="")alert.innerHTML+=document.getElementById("alerttext").getElementsByTagName("span")[3].firstChild.nodeValue+"<br/>";if(contact_msg.value=="")alert.innerHTML+=document.getElementById("alerttext").getElementsByTagName("span")[4].firstChild.nodeValue+"<br/>";alert.innerHTML+="<br/><span></span>";slowShow("#alert",1000);slowShow("#alpha",1000);result=false}return result}function resetbutton(){var select=document.getElementById('form').getElementsByTagName("select");for(var i=0;i<select.length;i++)select[i].selectedIndex=0;var check=document.getElementById('form').getElementsByTagName("input");for(var i=0;i<check.length;i++)check[i].checked=false;if(document.getElementById("gruppo_residenziale_e_commerciale").getAttribute("class")=='no'){slowShow("#gruppo_residenziale_e_commerciale",1000);document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("class","ok");document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("style","display: block;")}if(document.getElementById("gruppo_residenziale").getAttribute("class")=='no'){slowShow("#gruppo_residenziale",1000);document.getElementById("gruppo_residenziale").setAttribute("class","ok");document.getElementById("gruppo_residenziale").setAttribute("style","display: block;")}}$(function(){$('a[href*=#]').click(function(){if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){var $target=$(this.hash);$target=$target.length&&$target||$('[name='+this.hash.slice(1)+']');if($target.length){var targetOffset=$target.offset().top;$('html,body').animate({scrollTop:targetOffset},1000);return false}}})});$(function(){$("#nav a").not(".active").hover(function(){$("b",this).fadeIn("slow")},function(){$("b",this).fadeOut('fast')})});function loadPage(){var i=this.selectedIndex;if(i>0){var url=this.options[i].value;window.location.href=url}}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 categoria(){var categoria=this.value.charAt(0);if(categoria==1){if(document.getElementById("gruppo_residenziale_e_commerciale").getAttribute("class")=='no'){slowShow("#gruppo_residenziale_e_commerciale",1000);document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("class","ok");document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("style","display: block;")}if(document.getElementById("gruppo_residenziale").getAttribute("class")=='no'){slowShow("#gruppo_residenziale",1000);document.getElementById("gruppo_residenziale").setAttribute("class","ok");document.getElementById("gruppo_residenziale").setAttribute("style","display: block;")}}if(categoria==2){if(document.getElementById("gruppo_residenziale_e_commerciale").getAttribute("class")=='no'){slowShow("#gruppo_residenziale_e_commerciale",1000);document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("class","ok");document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("style","display: block;")}slowFadeOut("#gruppo_residenziale",1000);document.getElementById("gruppo_residenziale").setAttribute("class","no")}if(categoria==3){slowFadeOut("#gruppo_residenziale_e_commerciale",1000);document.getElementById("gruppo_residenziale_e_commerciale").setAttribute("class","no");slowFadeOut("#gruppo_residenziale",1000);document.getElementById("gruppo_residenziale").setAttribute("class","no")}}var date=new Date();date.setTime(date.getTime()+(24*60*60*1000));var path={path:'/',expires:date};var options={path:'/',expires:10};function searchType2(){slowFadeOut(".searchType",200);setTimeout(function(){slowShow(".searchType2",200)},200);setTimeout(function(){slowShow("#sendControl",200)},200);$.cookie('form',true,path);resetbutton()}function searchType(){slowFadeOut(".searchType2",200);setTimeout(function(){slowShow(".searchType",200)},200);$.cookie('form',null,options);resetbutton()}$(document).ready(function(){$("#contact_msg").css('resize','none');$("#advanced").click(function(){searchType2();return false});$(".sendreset input").click(function(){searchType()});if(document.cookie!=""){$('#advanced').css('display','block');$('#sendform').css('margin-top','10px')}if($.cookie('form')!=undefined){$('.searchType').hide();$('.searchType2').css('display','block');$('#sendControl').css('display','block')}else{$('.searchType2').hide();$('.searchType').css('display','block')}slowShow(".searchRight .photo",1000);$('.searchRight .photo').cycle({fx:'fade',timeout:6000});$(".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")});$(".table1 a img.imgup").stop().animate({"opacity":"1"},"slow");$(".table1 a").hover(function(){$(this).find("img.imgup").stop().animate({"opacity":"0"},"slow")},function(){$(this).find("img.imgup").stop().animate({"opacity":"1"},"slow")});$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'light_square',show_title:false,gallery_markup:''});if(document.getElementById("cssdesignawards-small")!=undefined)links("cssdesignawards-small");if(document.getElementById("flag")!=undefined){document.getElementById("lang").setAttribute('style','display: block;');document.getElementById("flag").onchange=loadPage}if(document.getElementById("categoria")!=undefined)document.getElementById("categoria").onchange=categoria;if(document.getElementById("send")!=undefined)document.getElementById("send").onclick=send;if(document.getElementById("newsletter")!=undefined)document.getElementById("newsletter").onclick=newsletter;if(document.getElementById("alert")!=undefined){slowShow("#alert",1000);slowShow("#alpha",1000);document.getElementById("alert").onclick=close;document.getElementById("alpha").onclick=close}if(document.getElementById("map")!=undefined){$(function(){$("#map").gMap({markers:[{latitude:43.882181,longitude:10.759306}],zoom:10})})}});Cufon.replace('#nav a,h1,h2,h3,h4,h5,h6,#sendform input,#content #text ul.cols li b');if(!IE){var head=document.getElementsByTagName("head").item(0);var style=document.createElement("style");style.setAttribute('type','text/css');style.setAttribute('media','all');style.appendChild(document.createTextNode("#content #text input[type='submit'], .form input, .form textarea, #content input[type='text'], #content input[type='password'] { -moz-border-radius: 3px; -webkit-border-radius: 3px; } #content #text input[type='submit'], .form input[type='submit'], .sendform input { -moz-box-shadow: 2px 2px 10px rgba(0, 0, 0, .3); -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, .3); -goog-ms-box-shadow: 2px 2px 10px rgba(0, 0, 0, .3); box-shadow: 2px 2px 10px rgba(0, 0, 0, .3); } #content #text input[type='submit']:hover, .form input[type='submit']:hover { -moz-box-shadow: none; -webkit-box-shadow: none; -goog-ms-box-shadow: none; box-shadow: none; } #alert { -moz-box-shadow: 2px 2px 20px rgba(0, 0, 0, .5); -webkit-box-shadow: 2px 2px 20px rgba(0, 0, 0, .5); -goog-ms-box-shadow: 2px 2px 20px rgba(0, 0, 0, .5); box-shadow: 2px 2px 20px rgba(0, 0, 0, .5); }"));head.appendChild(style)}
// http://www.minifyjavascript.com/
