Event.onReady(function(){var m=navigator.userAgent.match(/(Firefox|Chrome|Safari|Opera|MSIE)/i),uaClass='';if(m)uaClass=m[1].toLowerCase();if(I('ba_widgets'))Event.addLive('ba_widgets','input','click',function(){this.select()});if(I('aggiornare_upd'))if(I('upd_'+uaClass))$('#aggiornare_upd_tabs a').each(function($a){var id=$a.href.split('#')[1],$upd=I(id);$a.addEvent('click',function(event){$('#aggiornare_upd div.upd').each(function($updi){if($upd!=$updi)$updi.addClass('close')});$('#aggiornare_upd_tabs a').each(function($ai){if($a!=$ai)$ai.removeClass('open')});$upd.removeClass('close');$a.addClass('open');return event.stop()}).css({borderTopLeftRadius:6,borderTopRightRadius:6});if($upd.id!=('upd_'+uaClass)){$upd.addClass('close')}else $a.addClass('open')});if(!Agent.trident)$('#foot a, #right_menu a').each(function($a){$a.addEvent('mouseenter',function(){this.morph({styles:{color:[ACTUAL,'#FFFFFF','#009999'],backgroundColor:[ACTUAL,'#222222','#111111']},time:0.5,stop:1})}).addEvent('mouseleave',function(){this.morph({styles:{color:[ACTUAL,'#CC3300'],backgroundColor:[ACTUAL,'#000000']},time:0.3,stop:1})})});if(I('head_icons'))Require.module('tooltips',function(){$('#head_icons a').each(function($a){new Tooltip({target:$a,content:$a.title,offsetY:26,className:'head-icons'});var $img=$('img',$a)[0];$a.addEvent('mouseover',function(){$img.morph({css:{top:['px',ACTUAL,-16]},time:0.5,effect:EE.outCubic,stop:true})}).addEvent('mouseout',function(){$img.morph({css:{top:['px',ACTUAL,0]},time:0.5,effect:EE.outCubic,stop:true})})})});if(I('footer_jiki'))$('#footer_sandrolain, #footer_jiki').each(function($a){var top=$a.css('top').toInt();$a.addEvent('mouseover',function(){this.morph({css:{top:['px',ACTUAL,top-10]},time:0.5,effect:EE.outCubic,stop:true})}).addEvent('mouseout',function(){this.morph({css:{top:['px',ACTUAL,top]},time:0.3,effect:EE.outCubic,stop:true})})});if(I('comments_form'))$('#comments_form form',true).addEvent('submit',function(event){var id=I('comment_content_id').val(),name=I('comment_name').val(),email=I('comment_email').val(),url=I('comment_url').val(),text=I('comment_text').val();if(name&&email&&text){Ajax.get({url:BASE_URL+'/index.php?mdu=blog/ajax-comments-post',post:{id:id,name:name,email:email,url:url,comment:text},onSuccess:function(t){var result=t.parseJSON();if(result&&result.success){I('comment_name').val('');I('comment_email').val('');I('comment_url').val('');I('comment_text').val('');I('comments_result').replaceChilds(['div',{className:'message confirm'},'Commento salvato.',['br'],'Il tuo commento verrà pubblicato appena validato da un amministatore.'])}else I('comments_result').replaceChilds(['div',{className:'message warning'},'Controlla che i dati inseriti siano validi.'])},onFailure:function(t){I('comments_result').replaceChilds(['div',{className:'message error'},'Non è stato possibile salvare il commento. Si prega di riprovare.'])}})}else I('comments_result').replaceChilds(['div',{className:'message warning'},'Nome, indirizzo email e commento sono obbligatori.']);return event.stop()});if(I('landing_socials'))Require.module('socials',function(){Socials.init();I('landing_socials').addEvent('click',function(){Socials.open()})});Require.module(['show','lightshow'],function(){LightShow.init()})})
