$(function(){$("#id_key").focus(function(event){if($(this).val()==='cerca nel sito: '){$(this).val('');}});$("#id_key").blur(function(event){if($(this).val()===''){$(this).val('cerca nel sito: ');}})});function manage_cookie(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=$.extend({},options);if(value===null||value===undefined){options.expires=-1;}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();options.expires.setDate(t.getDate()+days);}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''));}
options=value||{};var result,decode=options.raw?function(s){return s;}:decodeURIComponent;return(result=new RegExp('(?:^|; )'+encodeURIComponent(key)+'=([^;]*)').exec(document.cookie))?decode(result[1]):null;}
function equalHeight(group){tallest=0;group.each(function(){thisHeight=$(this).height();if(thisHeight>tallest){tallest=thisHeight;}});group.height(tallest+255);}
$(function(){$.fn.rotate=function(){var container=$(this);var totale=container.find("div").size();var current=0;var i=setInterval(function(){if(current>=totale)current=0;container.find("div").filter(":eq("+current+")").show().end().not(":eq("+current+")").hide();current++;},5000);return container;};equalHeight($(".column"));$(".bannertop-sx").rotate();$(".bannertop-dx").rotate();$(".bannerbottom-sx").rotate();$(".bannerbottom-dx").rotate();$(".centro-dx-1").rotate();window.setInterval(function(){var $el=$("div.sublogo");if($el.data('fase')==null||$el.data('fase')==2){$el.css('background-color','#E3001A');$el.data('fase',1);}else{$el.css('background-color','#000000');$el.data('fase',2);}},500);});
