﻿var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());(function(a){var b=a.scrollTo=function(d,g,e){a(window).scrollTo(d,g,e)};b.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>="1.3"?0:1};b.window=function(d){return a(window).scrollable()};a.fn.scrollable=function(){return this.map(function(){var d=this,g=!d.nodeName||a.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!g){return d}var e=(d.contentWindow||d).document||d.ownerDocument||d;return a.browser.safari||e.compatMode=="BackCompat"?e.body:e.documentElement})};a.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=a.extend({},b.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var j=this,l=a(j),h=f,m,i={},n=l.is("html,body");switch(typeof h){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(h)){h=c(h);break}h=a(h,this);case"object":if(h.is||h.style){m=(h=a(h)).offset()}}a.each(d.axis.split(""),function(g,p){var o=p=="x"?"Left":"Top",q=o.toLowerCase(),k="scroll"+o,t=j[k],u=p=="x"?"Width":"Height";if(m){i[k]=m[q]+(n?0:t-l.offset()[q]);if(d.margin){i[k]-=parseInt(h.css("margin"+o))||0;i[k]-=parseInt(h.css("border"+o+"Width"))||0}i[k]+=d.offset[q]||0;if(d.over[q]){i[k]+=h[u.toLowerCase()]()*d.over[q]}}else{i[k]=h[q]}if(/^\d+$/.test(i[k])){i[k]=i[k]<=0?0:Math.min(i[k],s(u))}if(!g&&d.queue){if(t!=i[k]){r(d.onAfterFirst)}delete i[k]}});r(d.onAfter);function r(g){l.animate(i,e,d.easing,g&&function(){g.call(this,f,d)})}function s(g){var p="scroll"+g;if(!n){return j[p]}var o="client"+g,q=j.ownerDocument.documentElement,k=j.ownerDocument.body;return Math.max(q[p],k[p])-Math.min(q[o],k[o])}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){var d=location.href.replace(/#.*/,"");var b=a.localScroll=function(e){a("body").localScroll(e)};b.defaults={duration:1000,axis:"y",event:"click",stop:true,target:window,reset:true};b.hash=function(f){if(location.hash){f=a.extend({},b.defaults,f);f.hash=false;if(f.reset){var e=f.duration;delete f.duration;a(f.target).scrollTo(0,f);f.duration=e}c(0,location,f)}};a.fn.localScroll=function(f){f=a.extend({},b.defaults,f);return f.lazy?this.bind(f.event,function(h){var g=a([h.target,h.target.parentNode]).filter(e)[0];if(g){c(h,g,f)}}):this.find("a,area").filter(e).bind(f.event,function(g){c(g,this,f)}).end().end();function e(){return !!this.href&&!!this.hash&&this.href.replace(this.hash,"")==d&&(!f.filter||a(this).is(f.filter))}};function c(i,l,m){var k=l.hash.slice(1),j=document.getElementById(k)||document.getElementsByName(k)[0];if(!j){return}if(i){i.preventDefault()}var g=a(m.target);if(m.lock&&g.is(":animated")||m.onBefore&&m.onBefore.call(m,i,j,g)===false){return}if(m.stop){g.stop(true)}if(m.hash){var h=j.id==k?"id":"name",f=a("<a> </a>").attr(h,k).css({position:"absolute",top:a(window).scrollTop(),left:a(window).scrollLeft()});j[h]="";a("body").prepend(f);location=l.hash;f.remove();j[h]=k}g.scrollTo(j,m).trigger("notify.serialScroll",[j])}})(jQuery);/*
 * jQuery blockUI plugin
 * Version 2.33 (29-MAR-2010)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
(function(a){if(/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery)||/^1.1/.test(a.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+a.fn.jquery);return}a.fn._fadeIn=a.fn.fadeIn;var i=function(){};var h=document.documentMode||0;var n=a.browser.msie&&((a.browser.version<8&&!h)||h<8);var f=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!h;a.blockUI=function(p){g(window,p)};a.unblockUI=function(p){l(window,p)};a.growlUI=function(u,r,t,q,s){var p=a('<div class="growlUI '+q+'"></div>');if(u){p.append("<h1>"+u+"</h1>")}if(r){p.append("<h2>"+r+"</h2>")}if(t==undefined){t=3000}a.blockUI({message:p,fadeIn:700,fadeOut:1000,centerY:false,timeout:t,showOverlay:false,onUnblock:s,css:a.blockUI.defaults.growlCSS})};a.fn.block=function(p){return this.unblock({fadeOut:0}).each(function(){if(a.css(this,"position")=="static"){this.style.position="relative"}if(a.browser.msie){this.style.zoom=1}g(this,p)})};a.fn.unblock=function(p){return this.each(function(){l(this,p)})};a.blockUI.version=2,33;a.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:"0.6",cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:"0.6",cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var j=null;var k=[];function g(x,K){var C=(x==window);var I=K&&K.message!==undefined?K.message:undefined;K=a.extend({},a.blockUI.defaults,K||{});K.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,K.overlayCSS||{});var v=a.extend({},a.blockUI.defaults.css,K.css||{});var N=a.extend({},a.blockUI.defaults.themedCSS,K.themedCSS||{});I=I===undefined?K.message:I;if(C&&j){l(window,{fadeOut:0})}if(I&&typeof I!="string"&&(I.parentNode||I.jquery)){var J=I.jquery?I[0]:I;var w={};a(x).data("blockUI.history",w);w.el=J;w.parent=J.parentNode;w.display=J.style.display;w.position=J.style.position;if(w.parent){w.parent.removeChild(J)}}var P=K.baseZ;var F=(a.browser.msie||K.forceIframe)?a('<iframe class="blockUI" style="z-index:'+(P++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+K.iframeSrc+'"></iframe>'):a('<div class="blockUI" style="display:none"></div>');var G=a('<div class="blockUI blockOverlay" style="z-index:'+(P++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var H,L;if(K.theme&&C){L='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+P+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(K.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(K.theme){L='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+P+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(K.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(C){L='<div class="blockUI blockMsg blockPage" style="z-index:'+P+';display:none;position:fixed"></div>'}else{L='<div class="blockUI blockMsg blockElement" style="z-index:'+P+';display:none;position:absolute"></div>'}}}H=a(L);if(I){if(K.theme){H.css(N);H.addClass("ui-widget-content")}else{H.css(v)}}if(!K.applyPlatformOpacityRules||!(a.browser.mozilla&&/Linux/.test(navigator.platform))){G.css(K.overlayCSS)}G.css("position",C?"fixed":"absolute");if(a.browser.msie||K.forceIframe){F.css("opacity","0.0")}var E=[F,G,H],p=C?a("body"):a(x);a.each(E,function(){this.appendTo(p)});if(K.theme&&K.draggable&&a.fn.draggable){H.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var y=n&&(!a.boxModel||a("object,embed",C?null:x).length>0);if(f||y){if(C&&K.allowBodyStretch&&a.boxModel){a("html,body").css("height","100%")}if((f||!a.boxModel)&&!C){var M=o(x,"borderTopWidth"),D=o(x,"borderLeftWidth");var B=M?"(0 - "+M+")":0;var A=D?"(0 - "+D+")":0}a.each([F,G,H],function(z,Q){var R=Q[0].style;R.position="absolute";if(z<2){C?R.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+K.quirksmodeOffsetHack+') + "px"'):R.setExpression("height",'this.parentNode.offsetHeight + "px"');C?R.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):R.setExpression("width",'this.parentNode.offsetWidth + "px"');if(A){R.setExpression("left",A)}if(B){R.setExpression("top",B)}}else{if(K.centerY){if(C){R.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}R.marginTop=0}else{if(!K.centerY&&C){var S=(K.css&&K.css.top)?parseInt(K.css.top):0;var t="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+S+') + "px"';R.setExpression("top",t)}}}})}if(I){if(K.theme){H.find(".ui-widget-content").append(I)}else{H.append(I)}if(I.jquery||I.nodeType){a(I).show()}}if((a.browser.msie||K.forceIframe)&&K.showOverlay){F.show()}if(K.fadeIn){var q=K.onBlock?K.onBlock:i;var r=(K.showOverlay&&!I)?q:i;var u=I?q:i;if(K.showOverlay){G._fadeIn(K.fadeIn,r)}if(I){H._fadeIn(K.fadeIn,u)}}else{if(K.showOverlay){G.show()}if(I){H.show()}if(K.onBlock){K.onBlock()}}b(1,x,K);if(C){j=H[0];k=a(":input:enabled:visible",j);if(K.focusInput){setTimeout(d,20)}}else{c(H[0],K.centerX,K.centerY)}if(K.timeout){var O=setTimeout(function(){C?a.unblockUI(K):a(x).unblock(K)},K.timeout);a(x).data("blockUI.timeout",O)}}function l(r,u){var t=(r==window);var p=a(r);var q=p.data("blockUI.history");var v=p.data("blockUI.timeout");if(v){clearTimeout(v);p.removeData("blockUI.timeout")}u=a.extend({},a.blockUI.defaults,u||{});b(0,r,u);var s;if(t){s=a("body").children().filter(".blockUI").add("body > .blockUI")}else{s=a(".blockUI",r)}if(t){j=k=null}if(u.fadeOut){s.fadeOut(u.fadeOut);setTimeout(function(){m(s,q,u,r)},u.fadeOut)}else{m(s,q,u,r)}}function m(r,p,s,q){r.each(function(t,u){if(this.parentNode){this.parentNode.removeChild(this)}});if(p&&p.el){p.el.style.display=p.display;p.el.style.position=p.position;if(p.parent){p.parent.appendChild(p.el)}a(q).removeData("blockUI.history")}if(typeof s.onUnblock=="function"){s.onUnblock(q,s)}}function b(q,r,u){var t=r==window,p=a(r);if(!q&&(t&&!j||!t&&!p.data("blockUI.isBlocked"))){return}if(!t){p.data("blockUI.isBlocked",q)}if(!u.bindEvents||(q&&!u.showOverlay)){return}var s="mousedown mouseup keydown keypress";q?a(document).bind(s,u,e):a(document).unbind(s,e)}function e(q){if(q.keyCode&&q.keyCode==9){if(j&&q.data.constrainTabKey){var r=k;var s=!q.shiftKey&&q.target==r[r.length-1];var p=q.shiftKey&&q.target==r[0];if(s||p){setTimeout(function(){d(p)},10);return false}}}if(a(q.target).parents("div.blockMsg").length>0){return true}return a(q.target).parents().children().filter("div.blockUI").length==0}function d(p){if(!k){return}var q=k[p===true?k.length-1:0];if(q){q.focus()}}function c(q,z,A){var u=q.parentNode,v=q.style;var r=((u.offsetWidth-q.offsetWidth)/2)-o(u,"borderLeftWidth");var w=((u.offsetHeight-q.offsetHeight)/2)-o(u,"borderTopWidth");if(z){v.left=r>0?(r+"px"):"0"}if(A){v.top=w>0?(w+"px"):"0"}}function o(q,r){return parseInt(a.css(q,r))||0}})(jQuery);(function(b){b.fn.autoResize=function(c){var a=b.extend({onResize:function(){},animate:true,animateDuration:150,animateCallback:function(){},extraSpace:20,limit:1000},c);this.filter("textarea").each(function(){var d=b(this).css({resize:"none","overflow-y":"hidden"}),l=d.height(),e=(function(){var g=["height","width","lineHeight","textDecoration","letterSpacing"],f={};b.each(g,function(i,k){f[k]=d.css(k)});return d.clone().removeAttr("id").removeAttr("name").css({position:"absolute",top:0,left:-9999}).css(f).attr("tabIndex","-1").insertBefore(d)})(),j=null,h=function(){e.height(0).val(b(this).val()).scrollTop(10000);var f=Math.max(e.scrollTop(),l)+a.extraSpace,g=b(this).add(e);if(j===f){return}j=f;if(f>=a.limit){b(this).css("overflow-y","");return}a.onResize.call(this);a.animate&&d.css("display")==="block"?g.stop().animate({height:f},a.animateDuration,a.animateCallback):g.height(f)};d.unbind(".dynSiz").bind("keyup.dynSiz",h).bind("keydown.dynSiz",h).bind("change.dynSiz",h)});return this}})(jQuery);(function(j,o,l){var m="hashchange",r=document,p,q=j.event.special,s=r.documentMode,n="on"+m in o&&(s===l||s>7);function k(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}j.fn[m]=function(a){return a?this.bind(m,a):this.trigger(m)};j.fn[m].delay=50;q[m]=j.extend(q[m],{setup:function(){if(n){return false}j(p.start)},teardown:function(){if(n){return false}j(p.stop)}});p=(function(){var a={},g,d=k(),b=function(h){return h},c=b,f=b;a.start=function(){g||e()};a.stop=function(){g&&clearTimeout(g);g=l};function e(){var i=k(),h=f(d);if(i!==d){c(d=i,h);j(o).trigger(m)}else{if(h!==d){location.href=location.href.replace(/#.*/,"")+h}}g=setTimeout(e,j.fn[m].delay)}j.browser.msie&&!n&&(function(){var h,i;a.start=function(){if(!h){i=j.fn[m].src;i=i&&i+k();h=j('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){i||c(k());e()}).attr("src",i||"javascript:0").insertAfter("body")[0].contentWindow;r.onpropertychange=function(){try{if(event.propertyName==="title"){h.document.title=r.title}}catch(t){}}}};a.stop=b;f=function(){return k(h.location.href)};c=function(z,w){var y=h.document,x=j.fn[m].domain;if(z!==w){y.title=r.title;y.open();x&&y.write('<script>document.domain="'+x+'"</script>');y.close();h.location.hash=z}}})();return a})()})(jQuery,this);$(window).load(function(){$("#footer").fadeOut("slow");var a=(location.hash==="")?"#cosa-facciamo":location.hash;var d=$(a).outerHeight(true)+$("#header").outerHeight(true)+$("#top-menu").outerHeight(true)+((location.hash==="#contatti")?70:0);$("#footer").css({position:"absolute",top:d}).fadeIn("slow");$.localScroll.hash({target:"#content",axis:"x",queue:true,duration:1000});$("#top-menu").localScroll({target:"#content",axis:"x",duration:1000,hash:true});$("#footer-links").localScroll({target:"#content",axis:"x",duration:1000,hash:true});c(true);$("#form-contatti").validate({rules:{name:{required:true},surname:{required:true},email:{required:true,email:true},message:{required:true},recaptcha_response_field:{required:true}},messages:{name:{required:"Inserisci il tuo nome"},surname:{required:"Inserisci il tuo cognome"},email:{required:"Inserisci il tuo indirizzo mail",email:"Indirizzo mail non valido"},message:{required:"Inserisci il testo del messaggio"},recaptcha_response_field:{required:"Richiesto !"}},submitHandler:function(g){$("#captcha-mean-wrapper").fadeOut("fast");if(e()){Recaptcha.destroy();Recaptcha.create("6Lfoz7oSAAAAAAm5UpUUmQ8W0tN1xOyrZya2C-b7","recaptcha_image",{theme:"custom"});var f={Name:$("#name",g).val(),Surname:$("#surname",g).val(),Email:$("#email",g).val(),Message:$("#message",g).val()};$.ajax({type:"POST",url:"/Contatti/InviaMailDiContatto",contentType:"application/json; charset=utf-8",data:JSON.stringify(f),beforeSend:function(){$("<div></div>").attr("id","spinner").hide().appendTo("div#www").fadeTo("slow","0.6")},complete:function(){$("#spinner").fadeOut("slow",function(){$(this).remove()})},success:function(h){if(h=="success"){g.reset();$.growlUI("Grazie per averci contattato !","Prederemo in esame la tua richiesta quanto prima.",7000,"success")}else{$.growlUI("Oppss ! Errore !!!","Purtroppo l'invio della richiesta ha avuto esito negativo. Riprova tra qualche minuto !",8000,"error")}},error:function(){$.growlUI("Oppss ! Errore !!!","Purtroppo l'invio della richiesta ha avuto esito negativo. Riprova tra qualche minuto !",8000,"error")}})}}});$("div.input-field-wrapper").focusin(function(){$(this).attr("class","input-field-wrapper-focus")}).focusout(function(){$(this).attr("class","input-field-wrapper")});$("input.input-field").focusin(function(){$(this).attr("class","input-field-focus")}).focusout(function(){$(this).attr("class","input-field")});$("div#textarea-wrapper").focusin(function(){$(this).attr("class","textarea-wrapper-focus")}).focusout(function(){$(this).attr("class","")});$("textarea#message").focusin(function(){$(this).attr("class","textarea-focus")}).focusout(function(){$(this).attr("class","")});$("textarea#message").autoResize();$("textarea#message").keydown();function e(){if($("#captcha-error").size()>0){$("#captcha-error").remove()}challengeField=Recaptcha.get_challenge();responseField=Recaptcha.get_response();var f=$.ajax({type:"POST",url:"/Recaptcha/Validate",data:"recaptcha_challenge_field="+challengeField+"&recaptcha_response_field="+responseField,async:false}).responseText;if(f=="success"){return true}else{$("<label></label>").attr("id","captcha-error").html("Non hai indovinato le parole nell'immagine. Riprova !").hide().prependTo("div#controllo-captcha").show("slow");c(false);Recaptcha.focus_response_field();return false}}$(".click-reload-captcha").click(function(){c(false);Recaptcha.focus_response_field();return false});$("div#www input").focusin(function(){$("#captcha-mean-wrapper").fadeOut("fast")});function c(f){if(($("#captcha-error").size()>0)&&(f)){$("#captcha-error").remove()}$("<div></div>").attr("id","spinner-captcha").hide().appendTo("div#captcha-image-wrapper").fadeTo("fast","0.6");Recaptcha.destroy();Recaptcha.create("6Lfoz7oSAAAAAAm5UpUUmQ8W0tN1xOyrZya2C-b7","recaptcha_image");$("#spinner-captcha").fadeOut("slow",function(){$(this).remove()})}var b=$("#captcha-mean-wrapper");$("#captcha-mean-link").click(function(){b.toggle();return false});$("span.ui-icon-circle-close ").click(function(){b.hide()})});$(window).hashchange(function(){$("#footer").fadeOut("slow");$.localScroll.hash({target:"#content",axis:"x",queue:true,duration:1000});var a=$(location.hash).outerHeight(true)+$("#header").outerHeight(true)+$("#top-menu").outerHeight(true);$("#footer").css({position:"absolute",top:a}).fadeIn("slow")});
