$(function(){$("a.rec_acceso").colorbox({opacity:0.5,overlayClose:false,iframe:true,width:"750px",height:"320px"});$("a#oficinaclientes").click(new_ac);$("button.loginnext").click(new_ac);$("a.reg_user").click(new_ac);$("#loginForm").bind("submit",function(){setTimeout(function(){$("#login").val("");$("#password").val("")},100)});if($.fn.checkbox!==undefined){var b=function(){$(this).checkbox()};$("#taxcontent input.pretty, #arcocontent input.pretty, #opinion input.pretty, #attentioncontent input.pretty, #sign_up input.pretty").livequery(b);var e=document.createElement("style");e.setAttribute("type","text/css");var a="\ninput.pretty {visibility: hidden !important;}\n";if(e.styleSheet){e.styleSheet.cssText=a}else{var d=document.createTextNode(a);e.appendChild(d)}var f=document.getElementsByTagName("head")[0];f.appendChild(e)}if($.validator!==undefined){$.validator.addMethod("regex",function(k,h,j){var g=false;var i=new RegExp(j);return this.optional(h)||i.test(k)},"Please check your input.");$.validator.addMethod("maxDaysFromNow",function(h,g,i){return false},"&nbsp;");$.validator.addMethod("minYearsFromNow",function(i,h,g){$date=$(h).val().split("/");$checkDate=new Date;$checkDate.setFullYear(parseInt($date[2]),parseInt($date[1])-1,parseInt($date[0]));$yearsfromnow=(new Date-$checkDate)/31536000000;return($checkDate.getMonth()==$date[1]-1&&$yearsfromnow>g)},"&nbsp;");$.validator.addMethod("valid_date",function(h,g){$date=$(element).val().split("/");$checkDate=new Date;$checkDate.setFullYear(parseInt($date[2]),parseInt($date[1])-1,parseInt($date[0]));return($checkDate.getMonth()==$date[1]-1)},"&nbsp;");$.validator.addMethod("dateExists",function(i,g){date=i.split("/");date[1]--;var h=new Date(date[2],date[1],date[0]);if(date[2]!=h.getFullYear()||date[1]!=h.getMonth()||date[0]!=h.getDate()){return false}return true},"&nbsp;");$.validator.addMethod("checkNoFuture",function(j,i){date=j.split("/");date[1]--;var g=new Date(date[2],date[1],date[0]);var h=new Date();if(g>h){return false}return true},"&nbsp;")}$.prototype.minYears=function(g){$date=$(this).val().split("/");$checkDate=new Date;$checkDate.setFullYear(parseInt($date[2]),parseInt($date[1])-1,parseInt($date[0]));$yearsfromnow=(new Date-$checkDate)/31536000000;return($checkDate.getDate()==parseInt($date[0])&&$checkDate.getMonth()==$date[1]-1&&$yearsfromnow>g)};$.prototype.maxYears=function(g){$date=$(this).val().split("/");$checkDate=new Date;$checkDate.setFullYear(parseInt($date[2]),parseInt($date[1])-1,parseInt($date[0]));$yearsfromnow=($checkDate-new Date)/31536000000;return($checkDate.getDate()==parseInt($date[0])&&$checkDate.getMonth()==$date[1]-1&&$yearsfromnow<g)};$.prototype.valid_date=function(){$date=$(this).val().split("/");$checkDate=new Date;$checkDate.setFullYear(parseInt($date[2]),parseInt($date[1])-1,parseInt($date[0]));return($checkDate.getDate()==parseInt($date[0])&&$checkDate.getMonth()==$date[1]-1)};if($.fn.qtip!==undefined){$("a[class^='tooltip']").live("click",function(g){g.preventDefault();$(".qtip").qtip("hide")});$(".tooltip_close").live("click",function(g){g.preventDefault();$(".qtip").qtip("hide")});$.fn.qtip.styles.genesis={width:250,background:"#ffffff",color:"#333333",textAlign:"left",padding:"10px 10px",border:{width:1,radius:0,color:"#333333"}};tooltip_click_config={style:"genesis",show:{when:{event:"click"}},hide:{when:{event:"click"}},position:{corner:{target:"bottomLeft",tooltip:"topLeft"},adjust:{y:10,x:-10}}}}if($.fn.colorbox!==undefined){$(".closelightbox").live("click",function(g){g.preventDefault();parent.$.fn.colorbox.close();return false});$(".recover_box a").colorbox({opacity:0.5,iframe:true,width:"770px",height:"335px",close:"Cerrar"});$(".call_you").live("click",function(g){g.preventDefault();$(this).colorbox({opacity:0.5,overlayClose:false,open:true,iframe:true,width:"668px",height:"499px"})});$(".oi").colorbox({iframe:true,width:"790px",height:"380px"})}$.fn.file_replacement=function(h){var i={placeholder:"Adjuntar un nuevo archivo"};var g=$.extend(i,h||{});return this.each(function(){var k=this;var l=$("<div>").css({width:"100%",overflow:"hidden"});var j=$('<span class="file">'+g.placeholder+"</span>").addClass($(k).attr("class")).css({position:"absolute","z-index":"0"});$(k).before(j);$(k).wrap(l);$(k).css({opacity:"0.0",height:$(j).height()+5+"px",width:$(j).width()+5+"px","font-size":"60px",cursor:"pointer",position:"relative","z-index":"1"});$(k).bind("change",function(){$(j).html($(k).val());$(k).css({height:$(j).height()+5+"px",width:$(j).width()+5+"px"})})})};if($.fn.example!==undefined){$(".login_form #login").example("Usuario");$(".login_form #password").example("Contraseña");$(".brand_type #car_index").example("Escribe aqui la marca")}var c={init:function(){var i=$("#footer .home_legal"),g=$("body"),h=$(window);h.bind("footer_position",function(){if(h.height()>g.height()){i.css("bottom",-(h.height()-g.height())+"px")}else{i.css("bottom","0px")}}).trigger("footer_position").bind("resize",function(){h.trigger("footer_position")})}};c.init()});$.ProcessBox=function(a,c){var b='<div class="proccess_box" id="proccess_box"><h2>'+a+"</h2><p>"+c+"</p></div>";$.blockUI({message:b})};$.ProcessBox.close=function(){$.unblockUI()};function new_ac(){var a="";var b=window.open("about:blank","areaclientes",a);b.focus();b.moveTo(0,0);b.resizeTo(screen.width,screen.height)};
