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);});function submitform()
{document.loginform.submit();}
jQuery(document).ready(function($){var tempo_que_fica_parado=5000;if($('#gallery_go').length>0){var imgs=$('#gallery_go').find('img').first();$('#gallery_go #slide').append($('#gallery_go').find('img').first().clone());var w=0;while(imgs.length>0){if(imgs.width()!=0)
w+=imgs.width();else
w+=650;imgs=imgs.next();}
$('#gallery_go').find('#slide').css("width",w+"px");setTimeout(function(){go_on($('#gallery_go').find('img').first(),w);},tempo_que_fica_parado);}
function go_on(e,w){var offset=$('#gallery_go').find('#slide').css('margin-left').substring(0,$('#gallery_go').find('#slide').css('margin-left').length-2);var move=offset-e.width();if(w+(offset-e.width())>0){$('#gallery_go').find('#slide').animate({marginLeft:move+"px"},1000,'linear',function(){setTimeout(function(){go_on($('#gallery_go').find('img').first(),w);},tempo_que_fica_parado);});}else{$('#gallery_go').find('#slide').css("margin-left","0px");go_on($('#gallery_go').find('img').first(),w);}}
var b_max=$('#center_go').find('.bloco').size();if($('#center_go').length>0){var b=$('#center_go').find('.bloco').first();var w2=0;if(b_max>=7)
{var count_b=7;var b2=$('#center_go').find('.bloco').first();while(count_b>0)
{$('#center_go .bloco:last').after(b2.clone());b2=b2.next();count_b--;}}
while(b.length>0){w2+=135;b=b.next('.bloco');}
$('#center_go').css("width",w2+"px");}
var family_moving=false;$('#right').click(function(){if(b_max>=7)
{var offset=$('#center_go').css('margin-left').substring(0,$('#center_go').css('margin-left').length-2);if(isNaN(offset))
offset=0;var move=offset-135;if(!family_moving)
{if($('#center_go').width()+(offset-945)>0){family_moving=true;$('#center_go').animate({marginLeft:move+"px"},300,function(){family_moving=false;});}else{$('#center_go').css("margin-left","0px");family_moving=true;$('#center_go').animate({marginLeft:"-135px"},300,function(){family_moving=false;});}}}});$('#left').click(function(){if(b_max>=7)
{var offset=$('#center_go').css('margin-left').substring(0,$('#center_go').css('margin-left').length-2);if(isNaN(offset))
offset=0;var move=Number(offset)+135;if(!family_moving)
{if(offset<0){family_moving=true;$('#center_go').animate({marginLeft:move+"px"},300,function(){family_moving=false;});}else{var aux=-($('#center_go').width())+945;$('#center_go').css("margin-left",aux.toString()+"px");aux+=135;family_moving=true;$('#center_go').animate({marginLeft:aux.toString()+"px"},300,function(){family_moving=false;});}}}});$('.servico .texto').each(function(){$(this).html($(this).html()+"<div style='display:none;' class='h'>"+$(this).height().toString()+"</div>");$(this).css("height","0px");});$('.servico .switch').click(function(){var h=0;if($(this).next('.texto').height()==0){var h=$(this).next('.texto').find('.h').html();}
$(this).next('.texto').stop();$(this).next('.texto').animate({height:h},1000,function(){});});});
