function linksVentanaNueva(){var a="a.ventana-nueva, a.btn-ventana-nueva";$(a).attr("target","_blank"),"es"===$(document).find("html").attr("lang")?$(a).attr("title","Enlace externo, se abre en ventana nueva."):$(a).attr("title","External link, opens in new window.")}function enlaceAppStore(){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&($("a[href='https://play.google.com/store/apps/details?id=com.iberdrola.clientes']").not(".contenedorFooter a").not(".btn-google-play").each(function(){$(this).attr("href","https://itunes.apple.com/es/app/iberdrola-clientes/id883078092")}),$("a[href='https://play.google.com/store/apps/details?id=com.iberdrola.clientes&hl=es']").not(".contenedorFooter a").not(".btn-google-play").each(function(){$(this).attr("href","https://itunes.apple.com/es/app/iberdrola-clientes/id883078092")}))}function loaderIn(){0===$(".wcom-loader").length&&$("<div>").attr("class","wcom-loader").append($("<div>").attr("class","loader-circle")).appendTo("body"),$(".wcom-loader").fadeIn("fast")}function loaderOut(){$(".wcom-loader").fadeOut("fast")}function addLoadEvent(a){var e=window.onload;$("meta[name=author]").attr("author","Iberdrola S.A.U."),"function"!=typeof window.onload?window.onload=a:window.onload=function(){e(),a()}}function marcarErrores(){$(".help-block").each(function(){""!==$(this).html()?$(this).parent().addClass("has-error"):$(this).parent().removeClass("has-error")})}function scrollHastaAncla(a,e,t){var o,n;switch(null===e&&(e=200),a){case"TOP":o=0;break;case"BOTTOM":o=$("body").height();break;default:n=void 0===t?0:t,o=$("#"+a).offset().top-n}$("html, body").animate({scrollTop:o},e)}$(document).ready(function(){linksVentanaNueva(),enlaceAppStore()}),$(document).on("click","#navbar-search",function(){$(".botonera").removeClass("hidden"),$(".navbar-toggle").parents(".contenedorCabecera .navbar-default").css("bottom","auto")});