(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}
if(p==this){return false;}
var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}
if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);function limpar(){var perg=confirm("Deseja limpar todos os campos?");if(perg==true){document.getElementById('f6').value='Nome:';document.getElementById('f7').value='E-mail:';document.getElementById('f90').value='Telefone:';document.getElementById('f8').value='Mensagem:';return true}
return false}
jQuery(document).ready(function($){(function($){$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=='string'){var start=$.curCSS(fx.elem,'backgroundPosition');start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];}
var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}}});})(jQuery);$('.sf-menu a').css({backgroundPosition:"0px -90px"});$('.sf-menu li').addClass("mainsec");$('.sf-menu li ul li').removeClass("mainsec");$('.sf-menu a').mouseenter(function(){if(!$(this).hasClass('on')||!$(this).hasClass('opensec')){$(this).stop();$(this).animate({backgroundPosition:"(0px 0px)"},{duration:500});}
if(!$(this).children("ul")){$(this).mouseleave(function(){$(this).animate({backgroundPosition:"(0px -90px)"},200,function(){$(this).css({backgroundPosition:"0px -90px"});});});}});$('.mainsec').mouseleave(function(){$(this).children('a').stop();$(this).children('a').animate({backgroundPosition:"(0px -90px)"},200,function(){$(this).children('a').css({backgroundPosition:"0px -90px"});});});$('.sfHover').find('a').each(function(){$(this).css({backgroundPosition:"(0px 0px)"});});$('.sf-menu ul a').mouseenter(function(){$(".sf-menu ul a").stop();$(this).animate({opacity:.5},{duration:100});$(this).animate({width:"100px"},{duration:100});$(this).animate({width:"90px"},{duration:100});$(this).animate({opacity:1},{duration:100});$(".sf-menu ul a").stop();});$('.sf-menu ul a').mouseleave(function(){$(this).css({width:"90px"});$(this).css({opacity:1});});});
