$(document).ready(function(){var e,n,s,i=$("html").attr("lang"),t="",a="",o={fr:"Hydro-Québec",en:"Hydro-Québec"},r={position:"top",content:['Me connecter'],height:1},l={position:"top",content:['Log-in'],height:1},h={position:"bottom",content:['
']},c={position:"bottom",content:['
Search
']},m=[r,h],u=[l,c],d=[];"fr"===i?(e='
  • Résidentiel
  • ',n='
  • Affaires
  • ',s='
  • À propos
  • ',d[0]='
  • International
  • ',d[1]='
  • Tous nos sites
  • ',d[2]='
  • Nouvelles
  • ',d[3]='
  • Nous joindre
  • ',d[4]='
  • Info-pannes
  • ',d[5]='
  • English
  • ',d[6]='
  • English
  • '):(e='
  • Residential
  • ',n='
  • Business
  • ',s='
  • About
  • ',d[0]='
  • International
  • ',d[1]='
  • All sites
  • ',d[2]='
  • News
  • ',d[3]='
  • Contact us
  • ',d[4]='
  • Power outages
  • ',d[5]='
  • Français
  • ',d[6]='
  • Français
  • ');var p,f='
    ";if($("#hq-header-nav-section").length>0)a="#hq-header-nav-section",o={fr:p=$(".hq-nav-grande-section").find("#hq-nav-grande-section-ul > li > a.active").text(),en:p};else if($("#hq-nav-grande-section").length>0)a="#hq-nav-grande-section",o={fr:"Hydro-Québec",en:"Hydro-Québec"};else if($("#hq-nav-site-specialise").length>0){a="#hq-nav-site-specialise",o={fr:t=$("#hq-nom-site-spec").text(),en:t};$("#hq-nav-site-specialise").find(".hq-menu-site-2014").length}else $("#hq-nav-site-international").length>0?(a="#hq-nav-site-international",o={fr:t=$("#hq-nom-site-spec").text(),en:t},m=[h],u=[c],f='
    "):$("#hq-nav-pannes").length>0?(a="#hq-nav-pannes",o={fr:t,en:t},f='
    "):(a="#hq-formulaire",t="",o="  ",m=[r],u=[l],r.content='',l.content='',f='
    ");($(a).mmenu({extensions:["pagedim-black","pageshadow","multiline"],backButton:{close:!0},keyboardNavigation:{enable:!0},navbar:{title:o[i]},screenReader:{aria:!0,text:!0},navbars:"fr"===i?m:u,setSelected:{current:!0,parent:!0},currentItem:{find:!0}},{clone:!0,screenReader:{text:{closeMenu:"fr"===i?"Fermer le menu":"Close menu",closeSubmenu:"fr"===i?"Fermer le sous-menu":"Close submenu",openSubmenu:"fr"===i?"Afficher le sous-menu":"Dislay menu",toggleSubmenu:"fr"===i?"Afficher le sous-menu":"Display submenu"}}}),$(".hq-mm-recherche").html($(".hq-mm-recherche").html()),$("#hq-header-nav-section").length>0)&&("affaires"===(p=$(".hq-nav-grande-section").find("#hq-nav-grande-section-ul > li > a.active").text()).toLowerCase()||"business"===p.toLowerCase()?$("#mm-hq-header-nav-section").find(".mm-listview").append(e):$("#mm-hq-header-nav-section").find(".mm-listview").append(n),$("#mm-hq-header-nav-section").find(".mm-listview").append(s));(f=$(".hq-nav-utils").find("ul > li").clone()).each(function(e,n){$(this).hasClass("hq-connexion")&&f.splice(e,1)}),$(".mm-panels").find(".mm-listview").parent().append(''),$(".hq-mm-utils").append(f),$(".changement-langue").length&&$(".mm-panels").changementLanguev2(),$("#hq-header-nav-section2").hqmenu(),$(window).bind("resizeEnd",function(){$(window).width()>767&&$("html.mm-opened").find("#mm-blocker").trigger("mousedown")}),$(window).resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){$(this).trigger("resizeEnd")},250)});var q=a.replace("#","#mm-"),g=$(q).data("mmenu"),b=!1;null!=g&&(g.bind("opened",function(){$(q+" a").first().focus(),$(".hq-menu-vl .visuallyhidden").text("fr"===i?"Fermer le":"Close"),b=!0}),g.bind("closed",function(){console.log("test"),b=!1,$(".hq-menu-vl .visuallyhidden").text("fr"===i?"Afficher":"Display")})),$("a[href='"+a+"']").on("click",function(){b&&g.close()})});