;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);$(document).ready(function(){var li=0;var nPartner=$('.elencoPartner').find('li').length-1;function scrollPrev(){li=li-1;if(li>=0){var anchor='li:eq('+li+')';$('div.wrapperPartner').scrollTo(anchor,800,{axis:'x'});}else{li=0;}}
function scrollNext(){li=li-0+1;if(li<=nPartner){var anchor='li:eq('+li+')';$('div.wrapperPartner').scrollTo(anchor,800,{axis:'x'});}else{li=0;var anchor='li:eq('+li+')';$('div.wrapperPartner').scrollTo(anchor,2,{axis:'x'});}}
$('#buttScrollPrev').click(function(event){event.preventDefault();clearInterval(tPartner);scrollPrev();});$('#buttScrollNext').click(function(event){event.preventDefault();clearInterval(tPartner);scrollNext();});$('div.wrapperPartner').scrollTo('li:eq(0)',800,{axis:'x'});var tPartner=setInterval(function(){scrollNext();},2800);});(function($){$.dimensions={version:'@VERSION'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())
+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')
+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}
return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);(function($){var Range=function(x1,y1,x2,y2){this.x1=x1;this.x2=x2;this.y1=y1;this.y2=y2;};Range.prototype.contains=function(range){return(this.x1<=range.x1&&range.x2<=this.x2)&&(this.y1<=range.y1&&range.y2<=this.y2);};Range.prototype.transform=function(x,y){return new Range(this.x1+x,this.y1+y,this.x2+x,this.y2+y);};$.fn.positionBy=function(args){var date1=new Date();if(this.length==0){return this;}
var args=$.extend({target:null,targetPos:null,elementPos:null,x:null,y:null,positions:null,addClass:false,force:false,container:window,hideAfterPosition:false},args);if(args.x!=null){var tLeft=args.x;var tTop=args.y;var tWidth=0;var tHeight=0;}else{var $target=$($(args.target)[0]);var tWidth=$target.outerWidth();var tHeight=$target.outerHeight();var tOffset=$target.offset();var tLeft=tOffset.left;var tTop=tOffset.top;}
var tRight=tLeft+tWidth;var tBottom=tTop+tHeight;return this.each(function(){var $element=$(this);if(!$element.is(':visible')){$element.css({left:-3000,top:-3000}).show();}
var eWidth=$element.outerWidth();var eHeight=$element.outerHeight();var position=[];var next=[];position[0]=new Range(tRight,tTop,tRight+eWidth,tTop+eHeight);next[0]=[1,7,4];position[1]=new Range(tRight,tBottom-eHeight,tRight+eWidth,tBottom);next[1]=[0,6,4];position[2]=new Range(tRight,tBottom,tRight+eWidth,tBottom+eHeight);next[2]=[1,3,10];position[3]=new Range(tRight-eWidth,tBottom,tRight,tBottom+eHeight);next[3]=[1,6,10];position[4]=new Range(tLeft,tBottom,tLeft+eWidth,tBottom+eHeight);next[4]=[1,6,9];position[5]=new Range(tLeft-eWidth,tBottom,tLeft,tBottom+eHeight);next[5]=[6,4,9];position[6]=new Range(tLeft-eWidth,tBottom-eHeight,tLeft,tBottom);next[6]=[7,1,4];position[7]=new Range(tLeft-eWidth,tTop,tLeft,tTop+eHeight);next[7]=[6,0,4];position[8]=new Range(tLeft-eWidth,tTop-eHeight,tLeft,tTop);next[8]=[7,9,4];position[9]=new Range(tLeft,tTop-eHeight,tLeft+eWidth,tTop);next[9]=[0,7,4];position[10]=new Range(tRight-eWidth,tTop-eHeight,tRight,tTop);next[10]=[0,7,3];position[11]=new Range(tRight,tTop-eHeight,tRight+eWidth,tTop);next[11]=[0,10,3];position[12]=new Range(tRight-eWidth,tTop,tRight,tTop+eHeight);next[12]=[13,7,10];position[13]=new Range(tRight-eWidth,tBottom-eHeight,tRight,tBottom);next[13]=[12,6,3];position[14]=new Range(tLeft,tBottom-eHeight,tLeft+eWidth,tBottom);next[14]=[15,1,4];position[15]=new Range(tLeft,tTop,tLeft+eWidth,tTop+eHeight);next[15]=[14,0,9];if(args.positions!==null){var pos=args.positions[0];}else if(args.targetPos!=null&&args.elementPos!=null){var pos=[];pos[0]=[];pos[0][0]=15;pos[0][1]=7;pos[0][2]=8;pos[0][3]=9;pos[1]=[];pos[1][0]=0;pos[1][1]=12;pos[1][2]=10;pos[1][3]=11;pos[2]=[];pos[2][0]=2;pos[2][1]=3;pos[2][2]=13;pos[2][3]=1;pos[3]=[];pos[3][0]=4;pos[3][1]=5;pos[3][2]=6;pos[3][3]=14;var pos=pos[args.targetPos][args.elementPos];}
var ePos=position[pos];var fPos=pos;if(!args.force){$window=$(window);var sx=$window.scrollLeft();var sy=$window.scrollTop();var container=new Range(sx,sy,sx+$window.width(),sy+$window.height());var stack;if(args.positions){stack=args.positions;}else{stack=[pos];}
var test=[];while(stack.length>0){var p=stack.shift();if(test[p]){continue;}
test[p]=true;if(!container.contains(position[p])){if(args.positions===null){stack=jQuery.merge(stack,next[p]);}}else{ePos=position[p];break;}}}
$element.parents().each(function(){var $this=$(this);if($this.css('position')!='static'){var abs=$this.offset();ePos=ePos.transform(-abs.left,-abs.top);return false;}});var css={left:ePos.x1,top:ePos.y1};if(args.hideAfterPosition){css['display']='none';}
$element.css(css);if(args.addClass){$element.removeClass('positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 '
+'positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 '
+'positionBy12 positionBy13 positionBy14 positionBy15').addClass('positionBy'+p);}});};})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)
this.insertBefore(document.createElement(html),this.firstChild);});}
return this;};})(jQuery);$(function(){$('ul.jd_menu').jdMenu();});(function($){function addEvents(ul){var settings=$.data($(ul).parents().andSelf().filter('ul.jd_menu')[0],'jdMenuSettings');$('> li',ul).bind('mouseenter.jdmenu mouseleave.jdmenu',function(evt){$(this).toggleClass('jdm_hover');var ul=$('> ul',this);if(ul.length==1){clearTimeout(this.$jdTimer);var enter=(evt.type=='mouseenter');var fn=(enter?showMenu:hideMenu);this.$jdTimer=setTimeout(function(){fn(ul[0],settings.onAnimate,settings.isVertical);},enter?settings.showDelay:settings.hideDelay);}}).bind('click.jdmenu',function(evt){var ul=$('> ul',this);if(ul.length==1&&(settings.disableLinks==true||$(this).hasClass('accessible'))){showMenu(ul,settings.onAnimate,settings.isVertical);return false;}
if(evt.target==this){var link=$('> a',evt.target).not('.accessible');if(link.length>0){var a=link[0];if(!a.onclick){window.open(a.href,a.target||'_self');}else{$(a).trigger('click');}}}
if(settings.disableLinks||(!settings.disableLinks&&!$(this).parent().hasClass('jd_menu'))){$(this).parent().jdMenuHide();evt.stopPropagation();}}).find('> a').bind('focus.jdmenu blur.jdmenu',function(evt){var p=$(this).parents('li:eq(0)');if(evt.type=='focus'){p.addClass('jdm_hover');}else{p.removeClass('jdm_hover');}}).filter('.accessible').bind('click.jdmenu',function(evt){evt.preventDefault();});}
function showMenu(ul,animate,vertical){var ul=$(ul);if(ul.is(':visible')){return;}
ul.bgiframe();var li=ul.parent();ul.trigger('jdMenuShow').positionBy({target:li[0],targetPos:(vertical===true||!li.parent().hasClass('jd_menu')?1:3),elementPos:0,hideAfterPosition:true});if(!ul.hasClass('jdm_events')){ul.addClass('jdm_events');addEvents(ul);}
li.addClass('jdm_active').siblings('li').find('> ul:eq(0):visible').each(function(){hideMenu(this);});if(animate===undefined){ul.show();}else{animate.apply(ul[0],[true]);}}
function hideMenu(ul,animate){var ul=$(ul);$('.bgiframe',ul).remove();ul.filter(':not(.jd_menu)').find('> li > ul:eq(0):visible').each(function(){hideMenu(this);}).end();if(animate===undefined){ul.hide()}else{animate.apply(ul[0],[false]);}
ul.trigger('jdMenuHide').parents('li:eq(0)').removeClass('jdm_active jdm_hover').end().find('> li').removeClass('jdm_active jdm_hover');}
$.fn.jdMenu=function(settings){var settings=$.extend({showDelay:200,hideDelay:1200,disableLinks:false},settings);if(!$.isFunction(settings.onAnimate)){settings.onAnimate=undefined;}
return this.filter('ul.jd_menu').each(function(){$.data(this,'jdMenuSettings',$.extend({isVertical:$(this).hasClass('jd_menu_vertical')},settings));addEvents(this);});};$.fn.jdMenuUnbind=function(){$('ul.jdm_events',this).unbind('.jdmenu').find('> a').unbind('.jdmenu');};$.fn.jdMenuHide=function(){return this.filter('ul').each(function(){hideMenu(this);});};$(window).bind('click.jdmenu',function(){$('ul.jd_menu ul:visible').jdMenuHide();});})(jQuery);var os=navigator.userAgent;for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if((a.getAttribute("href").indexOf("arial")!=-1)&&(os.indexOf("Windows NT 6.0")>-1)){a.href="/assicurazioni/css/font_calibri.css";}}function seguiLink(obj){var link=obj[obj.selectedIndex].value;document.getElementById('entra').href=link;var sito=obj[obj.selectedIndex].text;if(sito=="Genertellife"){document.getElementById('link_cod_pers').href='https://www.genertellife.it/vitaweb/w3gArte.do?w3gArteAppName=arteApp1&amp;idItem=234&amp;idSezione=233';document.getElementById('link_cod_pers').innerHTML="Hai perso i codici d'accesso Genertel<em>life</em>?";}if(sito=="Genertel"){document.getElementById('link_cod_pers').href='/assicurazioni/recupero_chiave.jhtml';document.getElementById('link_cod_pers').innerHTML="Hai perso i codici d'accesso Genertel?";}}function ajax_back(id,content){$.get(content,function(data){$('#'+id).html(data);});}function visualizza(label,id,content){if(document.getElementById){if(document.getElementById(id).style.display=='none'){ajax_back(id,content);document.getElementById(id).style.display='block';label.innerHTML="nascondi informazioni";}else{document.getElementById(id).style.display='none';label.innerHTML="maggiori informazioni";}}}
function visualizza2(id,content){$("#throbber").show();$("#"+id).load(content);$("#throbber").hide();}
function visualizza3(label,id){if(document.getElementById){if(document.getElementById(id).style.display=='none'){document.getElementById(id).style.display='block';label.innerHTML="nascondi informazioni";}else{document.getElementById(id).style.display='none';label.innerHTML="maggiori informazioni";}}}
function visualizzacfp(ris,id,iddiv){$(".pulsantiera > div > div").removeClass("on").addClass("off");$("#"+ris+" ."+id+" > div").removeClass("off").addClass("on");$(".scrolltext > div").css("display","none");$("#"+ris+" ."+iddiv).css("display","block");}
chiuso=true;chiusoesterno=false;$(document).ready
(function()
{$("body").click
(function(event)
{var clickTarget=$(event.target).attr('class');if(!chiusoesterno&&!chiuso&&(event.target.id!='condividipanel'||clickTarget!='socialbook first'||clickTarget!='socialbook'||clickTarget!='titolo'||clickTarget!='linksocial'))chiusoesterno=true;else
{if(!chiuso)
{if(clickTarget!='socialbook'&&clickTarget!='socialbook first'&&clickTarget!='linksocial'&&clickTarget!='titolo')
{$("#condividipanel").fadeTo("slow",0).hide();chiuso=true;}}
if(clickTarget!='socialbook'&&clickTarget!='socialbook first'&&clickTarget!='linksocial'&&clickTarget!='titolo')chiusoesterno=false;}})});function visualizzacondividi(){if(chiuso){$("#condividipanel").fadeTo("slow",1).show();chiuso=false;}
else
{$("#condividipanel").fadeTo("slow",0).hide();chiuso=true;}}
chiusopre=true;chiusoesternopre=false;$(document).ready
(function()
{$("body").click
(function(event)
{var clickTarget=$(event.target).attr('class');if(!chiusoesternopre&&!chiusopre&&(event.target.id!='premipanel'))chiusoesternopre=true;else
{if(!chiusopre)
{if(clickTarget!='premiimg')
{$("#premipanel").fadeTo("slow",0).hide();chiusopre=true;}}
if(clickTarget!='premiimg')chiusoesternopre=false;}})});function visualizzapremi(){if(chiuso){$("#premipanel").fadeTo("slow",1).show();chiusopre=false;}
else
{$("#premipanel").fadeTo("slow",0).hide();chiusopre=true;}}
$(document).ready(function(){var gtelAuto="javascript:;";var gtelMoto="javascript:;";var gtelFurgoni="javascript:;";var gtelAltri="javascript:;";var gtelCasa="javascript:;";var gtelViaggi="javascript:;";var gtelfProtezione="javascript:;";var gtelfRisparmio="javascript:;";var gtelfPensione="javascript:;";var gtelfInvestimento="javascript:;";var openHeightGnrtl="218px";var closeHeightGnrtl="218px";var slidHeightGnrtl="44px";var openHeightGnrtlf="218px";var closeHeightGnrtlf="218px";var slidHeightGnrtlf="70px";var nProd="6";var durationA=200;var durationB=200;var percGnrtl=2.9;var percGnrtlf=2.2;var theStateofThings1="off";var theStateofThings2="off";var theStateofThings3="off";var theStateofThings4="off";var theStateofThings5="off";
function changeLiStatus(whichOne,whichUl,add){var prodottoE1="#prodotto"+whichUl+whichOne;prodottoE1=$(prodottoE1);if(prodottoE1.hasClass("off")){prodottoE1.removeClass("off");prodottoE1.addClass(add);}if(prodottoE1.hasClass("slid")){prodottoE1.removeClass("slid");prodottoE1.addClass(add);}if(prodottoE1.hasClass("on")){prodottoE1.removeClass("on");prodottoE1.addClass(add);}}
function showContent(whichOne,whichUl){var prodottoE1="#prodotto"+whichUl+whichOne;boxEQ=$(prodottoE1+"> .boxeq");titE1=$(prodottoE1+"> h2");introaE1=$(prodottoE1+"> p.introA");introbE1=$(prodottoE1+"> p.introB");linksE1=$(prodottoE1+"> ul.links");preventivoaE1=$(prodottoE1+"> a.preventivoA");preventivobE1=$(prodottoE1+"> a.preventivoB");imgE1=$(prodottoE1+"> span.imgOff > img");spanE1=$(prodottoE1+"> span.imgOff");prodottoE1=$(prodottoE1);titE1.removeClass("tit");titE1.addClass("titOn");boxEQ.animate({opacity:'show'},durationB);introbE1.animate({opacity:'show'},durationB);introaE1.hide();introbE1.animate({opacity:'show'},durationB);linksE1.animate({opacity:'show'},durationB);preventivoaE1.animate({opacity:'show'},durationB);var scaleW=imgE1.attr("id")+"px";if(scaleW!="undefinedpx"){if(whichUl=="Gnrtl")spanE1.css({'padding-bottom':'10px'});imgE1.animate({width:scaleW},100);}}
function hideContent(whichOne,whichUl){var prodottoE1="#prodotto"+whichUl+whichOne;boxEQ=$(prodottoE1+"> .boxeq");myPerc=eval("perc"+whichUl);titE1=$(prodottoE1+"> h2");introaE1=$(prodottoE1+"> p.introA");introbE1=$(prodottoE1+"> p.introB");linksE1=$(prodottoE1+"> ul.links");preventivoaE1=$(prodottoE1+"> a.preventivoA");preventivobE1=$(prodottoE1+"> a.preventivoB");imgE1=$(prodottoE1+"> span.imgOff > img");spanE1=$(prodottoE1+"> span.imgOff");titE1.removeClass("titOn");titE1.addClass("tit");introaE1.animate({opacity:'show'},durationB);boxEQ.animate({opacity:'hide'},durationB); introbE1.animate({opacity:'hide'},durationB);linksE1.hide();preventivoaE1.hide();var scaleW=imgE1.attr("id")/myPerc+"px";if(whichUl=="Gnrtl")spanE1.css({'padding-bottom':'0'});if(scaleW!="undefinedpx")imgE1.animate({width:scaleW},100);}
function openProd(whichOne,whichUl){var prodottoE1="#prodotto"+whichUl+whichOne;prodottoE1=$(prodottoE1);prodottoE1.stop();prodottoE1.animate({height:eval("openHeight"+whichUl)},{duration:durationA,easing:"linear",complete:function(){changeLiStatus(whichOne,whichUl,"on");}});showContent(whichOne,whichUl);}
function closeProd(whichOne,whichUl){var prodottoE1="#prodotto"+whichUl+whichOne;prodottoE1=$(prodottoE1);prodottoE1.stop();prodottoE1.animate({height:eval("closeHeight"+whichUl)},{duration:durationA,easing:"linear",complete:function(){changeLiStatus(whichOne,whichUl,"off");}});hideContent(whichOne,whichUl);}
function slideProd(whichOne,whichUl){$(".baloon").css('display', 'none');var prodottoE1="#prodotto"+whichUl+whichOne;prodottoE1=$(prodottoE1);prodottoE1.stop();prodottoE1.animate({height:eval("slidHeight"+whichUl)},{duration:durationA,easing:"linear",complete:function(){changeLiStatus(whichOne,whichUl,"slid");}});hideContent(whichOne,whichUl);}
function toggleProd(whichOne,whichUl,whichAction){var prodottoE1="#prodotto"+whichUl+whichOne;prodottoE1=$(prodottoE1);if(whichAction=="open"){for(var i=1;i<=nProd;i++){if(i<whichOne)slideProd(i,whichUl);if(i>whichOne)closeProd(i,whichUl);}
openProd(whichOne,whichUl);}
if(whichAction=="close"){openProd("1",whichUl);for(var i=2;i<=nProd;i++){closeProd(i,whichUl);}}}
function imgWorkAround(){$("#prodottiGnrtlfMenu img").add($("#prodottiGnrtlMenu img")).each(function(n){$(this).css({'width':'auto'});$(this).attr({id:$(this).width()});});toggleProd("1","Gnrtl","open");toggleProd("1","Gnrtlf","open");}
if((jQuery.browser.safari||jQuery.browser.chrome)&&document.readyState!="complete"){var tWebKit=setTimeout(function(){imgWorkAround()},1500);}else{imgWorkAround();}

$("#btGtellifeAssistenza3").bind("click",function(event){event.preventDefault();
$(".menuAssistenza").hide();
$("#popUpGtellifeAssistenza").show();});
$("#btGtelSinistri").bind("click",function(event){event.preventDefault();$(".menuAssistenza").hide();
$("#popUpGtelAssistenza").show()});
$("#btGtelDenunciaOnline").bind("click",function(event){event.preventDefault();
$(".menuAssistenza").hide();$("#popUpGtelSinistri").show();});
$(".menuAssistenza a.chiudi").bind("click",function(event){event.preventDefault();
$(".menuAssistenza").hide()});
$(".menuAssistenza a.chiudi").bind("click",function(event){event.preventDefault();
$(".menuAssistenza").hide()});
$(".menuAssistenza a.chiudi").bind("click",function(event){event.preventDefault();
$(".menuAssistenza").hide()});
$("#prodottoGnrtl1").bind("click",function(){document.location.href=gtelAuto;});
$("#prodottoGnrtl2").bind("click",function(){document.location.href=gtelMoto;});
$("#prodottoGnrtl3").bind("click",function(){document.location.href=gtelFurgoni;});
$("#prodottoGnrtl4").bind("click",function(){document.location.href=gtelAltri;});
$("#prodottoGnrtl5").bind("click",function(){document.location.href=gtelCasa;});
$("#prodottoGnrtl6").bind("click",function(){document.location.href=gtelViaggi;});
$("#prodottoGnrtlf1").bind("click",function(){document.location.href=gtelfProtezione;});
$("#prodottoGnrtlf2").bind("click",function(){document.location.href=gtelfRisparmio;});
$("#prodottoGnrtlf3").bind("click",function(){document.location.href=gtelfPensione;});
$("#prodottoGnrtlf4").bind("click",function(){document.location.href=gtelfInvestimento;});
$("#prodottiGnrtlMenu > li").each(function(n){$(this).bind("click",function(event){toggleProd(n+1,"Gnrtl","open")});});
$("#prodottiGnrtlfMenu > li").each(function(n){$(this).bind("click",function(event){toggleProd(n+1,"Gnrtlf","open")});});
//$("#prodottiGnrtlMenu").bind("mouseleave",function(){toggleProd("0","Gnrtl","close")});
//$("#prodottiGnrtlfMenu").bind("mouseleave",function(){toggleProd("0","Gnrtlf","close")});
});



$(document).ready(function(){$("#comefareperLB").click(function(event){if(event.target.id=='comefareperLB')closeLightBox();});$("#comefareperLB_op").click(function(event){if(event.target.id=='comefareperLB_op')closeLightBox();});$("ul.comefarexDomande a").bind("click",function(event){event.preventDefault();var whichDom=$(this).attr("href");whichDom=whichDom.substring(4);setLightBox(whichDom);openLightBox();});$("div#comefareperLBBody dt a").bind("click",function(event){event.preventDefault();var whichDom=$(this).attr("id");whichDom=whichDom.substring(4);setLightBox(whichDom);});$("#comefareperLBClose").click(function(event){closeLightBox();});});function setLightBox(whichDom){var whichDomToShow=$("#dom"+whichDom);var whichRisToShow=$("#ris"+whichDom);$("#comefareperLBBody dd.on").removeClass("on").addClass("off");$("#comefareperLBBody dt.on").removeClass("on").addClass("off");whichDomToShow.removeClass("off").addClass("on");whichRisToShow.removeClass("off").addClass("on");}
function closeLightBox(){$("select").show();$("#comefareperLB, #comefareperLB_op").hide();setLightBox("01");}
function openLightBox(){$("select").hide();getPageSize();getPageScroll();var lightboxTop=arrayPageScroll[1]+((arrayPageSize[3]-477)/2);if(lightboxTop<arrayPageScroll[1]){lightboxTop=arrayPageScroll[1];}
$("#comefareperLBBody").css({top:lightboxTop+'px'});$("#comefareperLB_op").hide().css({width:'100%',height:arrayPageSize[1]+'px'}).fadeTo("slow",0.75).show();$("#comefareperLB").hide().css({width:'100%',height:arrayPageSize[1]+'px'}).show();}
var arrayPageScroll="";function getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};var arrayPageSize="";function getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};(function($){var defaultOptions={ajax:true,delay:0,image:"/assicurazioni/img/throbber.gif",parent:"",wrap:""};$().ajaxStop(function(){_throbberHide($(".throbber_ajax"));});_throbberShow=function(options,jelement){var jparent;if(options.parent){jelement=null;jparent=$(options.parent);}else{jparent=(jelement?jelement.parent():$("body"));}
if(jparent.find(".throbber").length==0){window.clearTimeout(jparent.data("throbber_timeout"));jparent.data("throbber_timeout",window.setTimeout(function(){var throbber=$('<img src="'+options.image+'" class="throbber" />');if(options.ajax){throbber.addClass("throbber_ajax");}
if(jelement){throbber.data("throbber_element",jelement);jelement.hide().after(throbber);}else{jparent.children().hide().end().append(throbber);}
if(options.wrap!=""){throbber.wrap(options.wrap);}},options.delay));}};_throbberHide=function(throbbers){throbbers.each(function(){var throbber=$(this);var jelement=throbber.data("throbber_element");if(jelement){jelement.show();}else{throbber.siblings().show();}
window.clearTimeout(throbber.parent().data("throbber_timeout"));throbber.remove();});}
$.fn.throbber=function(event,options){if(typeof event=="undefined"){event="click";options={};}else if(typeof event=="object"){options=event;event="click";}else if(typeof options=="undefined"){options={};}
options=$.extend({},defaultOptions,options);$(this).each(function(){var jtarget=$(this);jtarget.bind(event,function(){_throbberShow(options,jtarget);});});return $(this);};$.throbberShow=function(options){options=$.extend({},defaultOptions,options);_throbberShow(options,null);return $;};$.throbberHide=function(){_throbberHide($(".throbber"));return $;};})(jQuery);
