var currentMenu=1;(function(p){var d=0;var g=49;var e=98;var f=147;var b=196;var n;var l;var o;var j;var a;var i=null;var q=null;var c=null;var k=null;var m=null;var h=false;jQuery.fn.SearchBox=function(r){var s=this;function t(){ConfigurationPosition();BindButtons()}t()};this.ConfigurationPosition=function(){p(".bt1 .curve-bottom").hide();p(".bt2 .curve-bottom").hide();p(".bt3 .curve-bottom").hide();p(".bt4 .curve-bottom").hide();p(".bt5 .curve-bottom").show();p(".content-1").css({display:"block"});p(".content-2").css({display:"none"});p(".content-3").css({display:"none"});p(".content-4").css({display:"none"});p(".content-5").css({display:"none"});n=p("#dv_bt_search .bt1");i=n.position();n.addClass("no-bg");l=p("#dv_bt_search .bt2");q=l.position();o=p("#dv_bt_search .bt3");c=o.position();j=p("#dv_bt_search .bt4");k=j.position();a=p("#dv_bt_search .bt5");m=a.position()};this.BindButtons=function(){n.click(function(){if(h==false){p(".content-1").fadeIn("slow");p(".content-2").css({display:"none"});p(".content-3").css({display:"none"});p(".content-4").css({display:"none"});p(".content-5").css({display:"none"});MoveMenu(n)}});n.hover(function(){if(currentMenu!=1){this.style.background="#43e2dd url(/img/traco.png) repeat-y 47px 0"}},function(){this.style.background="#44d1cd url(/img/traco.png) repeat-y 47px 0"});l.click(function(){if(h==false){p(".content-1").css({display:"none"});p(".content-2").fadeIn("slow");p(".content-3").css({display:"none"});p(".content-4").css({display:"none"});p(".content-5").css({display:"none"});MoveMenu(l)}});l.hover(function(){if(currentMenu!=2){this.style.background="#42cac6 url(/img/traco.png) repeat-y 47px 0"}},function(){this.style.background="#3ab8b4 url(/img/traco.png) repeat-y 47px 0"});o.click(function(){if(h==false){p(".content-1").css({display:"none"});p(".content-2").css({display:"none"});p(".content-3").fadeIn("slow");p(".content-4").css({display:"none"});p(".content-5").css({display:"none"});MoveMenu(o)}});o.hover(function(){if(currentMenu!=3){this.style.background="#3daaaa url(/img/traco.png) repeat-y 47px 0"}},function(){this.style.background="#339494 url(/img/traco.png) repeat-y 47px 0"});j.click(function(){if(h==false){p(".content-1").css({display:"none"});p(".content-2").css({display:"none"});p(".content-3").css({display:"none"});p(".content-4").fadeIn("slow");p(".content-5").css({display:"none"});MoveMenu(j)}});j.hover(function(){if(currentMenu!=4){this.style.background="#1f898a url(/img/traco.png) repeat-y 47px 0"}},function(){this.style.background="#247475 url(/img/traco.png) repeat-y 47px 0"});a.click(function(){if(h==false){p(".content-1").css({display:"none"});p(".content-2").css({display:"none"});p(".content-3").css({display:"none"});p(".content-4").css({display:"none"});p(".content-5").fadeIn("slow");MoveMenu(a)}});a.hover(function(){if(currentMenu!=5){this.style.background="#247475 url(/img/traco.png) repeat-y 47px 0"}},function(){this.style.background="#1C5D5E url(/img/traco.png) repeat-y 47px 0"})};this.MoveMenu=function(s){h=true;p(".bt1 .curve-bottom").hide();p(".bt2 .curve-bottom").hide();p(".bt3 .curve-bottom").hide();p(".bt4 .curve-bottom").hide();p(".bt5 .curve-bottom").hide();p("#calendarContent").hide();if(p("#ckbCalendario")!=null){if(p("#ckbCalendario")[0]!=null){p("#ckbCalendario")[0].checked=false}}for(x=1;x<6;x++){div_sel=p("#dv_bt_search .bt"+x);div_sel.removeClass("no-bg")}var r=s.position().left;var t=null;if(r==d){t=4}else{if(r==g){t=3}else{if(r==e){t=2}else{if(r==f){t=1}else{if(r==b){t=0;h=false}}}}}s.hide();if(t==4){for(x=1;x<6;x++){div_sel=p("#dv_bt_search .bt"+x);div_sel_left=div_sel.position().left;var u=0;if(div_sel_left==49||div_sel_left==98||div_sel_left==147||div_sel_left==196){div_sel.animate({left:div_sel_left-49},function(){if(p("#dv_bt_search .bt1").position().left==0){p(".bt1 .curve-bottom").show()}if(p("#dv_bt_search .bt2").position().left==0){p(".bt2 .curve-bottom").show()}if(p("#dv_bt_search .bt3").position().left==0){p(".bt3 .curve-bottom").show()}if(p("#dv_bt_search .bt4").position().left==0){p(".bt4 .curve-bottom").show()}if(p("#dv_bt_search .bt5").position().left==0){p(".bt5 .curve-bottom").show()}u++;if(u==4){h=false}})}}}if(t==3){for(x=1;x<6;x++){div_sel=p("#dv_bt_search .bt"+x);div_sel_left=div_sel.position().left;var u=0;if(div_sel_left==98||div_sel_left==147||div_sel_left==196){div_sel.animate({left:div_sel_left-49},function(){if(p("#dv_bt_search .bt1").position().left==0){p(".bt1 .curve-bottom").show()}if(p("#dv_bt_search .bt2").position().left==0){p(".bt2 .curve-bottom").show()}if(p("#dv_bt_search .bt3").position().left==0){p(".bt3 .curve-bottom").show()}if(p("#dv_bt_search .bt4").position().left==0){p(".bt4 .curve-bottom").show()}if(p("#dv_bt_search .bt5").position().left==0){p(".bt5 .curve-bottom").show()}u++;if(u==3){h=false}})}}}if(t==2){for(x=1;x<6;x++){div_sel=p("#dv_bt_search .bt"+x);div_sel_left=div_sel.position().left;var u=0;if(div_sel_left==147||div_sel_left==196){div_sel.animate({left:div_sel_left-49},function(){if(p("#dv_bt_search .bt1").position().left==0){p(".bt1 .curve-bottom").show()}if(p("#dv_bt_search .bt2").position().left==0){p(".bt2 .curve-bottom").show()}if(p("#dv_bt_search .bt3").position().left==0){p(".bt3 .curve-bottom").show()}if(p("#dv_bt_search .bt4").position().left==0){p(".bt4 .curve-bottom").show()}if(p("#dv_bt_search .bt5").position().left==0){p(".bt5 .curve-bottom").show()}u++;if(u==2){h=false}})}}}if(t==1){for(x=1;x<6;x++){div_sel=p("#dv_bt_search .bt"+x);div_sel_left=div_sel.position().left;var u=0;if(div_sel_left==196){div_sel.animate({left:div_sel_left-49},function(){if(p("#dv_bt_search .bt1").position().left==0){p(".bt1 .curve-bottom").show()}if(p("#dv_bt_search .bt2").position().left==0){p(".bt2 .curve-bottom").show()}if(p("#dv_bt_search .bt3").position().left==0){p(".bt3 .curve-bottom").show()}if(p("#dv_bt_search .bt4").position().left==0){p(".bt4 .curve-bottom").show()}if(p("#dv_bt_search .bt5").position().left==0){p(".bt5 .curve-bottom").show()}u++;if(u==1){h=false}})}}}s.animate({left:"196"},300);s.show();s.addClass("no-bg");switch(s.selector){case"#dv_bt_search .bt1":currentMenu=1;break;case"#dv_bt_search .bt2":currentMenu=2;break;case"#dv_bt_search .bt3":currentMenu=3;break;case"#dv_bt_search .bt4":currentMenu=4;break;case"#dv_bt_search .bt5":currentMenu=5;break}}})(jQuery);

