CAIC


CAIC – Continental American Insurance Company – Home Skip to main content ul”; var nav_timer = null; function toggleNavElement(link_element) { var $a = $(link_element); var $li = $a.parent(); if($li.hasClass(“open”)) { $li.removeClass(“open”); $a.attr(“aria-expanded”,false); }else{ clearTimeout(nav_timer); $(“li.has-submenu”).removeClass(“open”); $(“a.opens-menu”).attr(“aria-expanded”,false); $li.addClass(“open”); $a.attr(“aria-expanded”,true); } } $(document).ready(function() { $(“a.opens-menu”).bind(“keydown”, function(event){ //enter if(event.keyCode == 13) { event.preventDefault(); }else{ return; } $a = $(event.target); toggleNavElement($a); }); $(document).bind(“click”, function(event){ $(“li.has-submenu”).removeClass(“open”); $(“lli.has-submenu a.opens-menu”).attr(“aria-expanded”,false); }); $(“a.opens-menu”).bind(“click”, function(event){ event.preventDefault(); event.stopPropagation(); $a = $(event.target); toggleNavElement($a); }); $(“li.has-submenu”).each(function(index, item){ var $item = $(item); $item.bind(“keydown”, function(event){ if(event.keyCode == 27) { $item.removeClass(“open”); $item.find(“a.opens-menu”).attr(“aria-expanded”,false); $item.find(“a.opens-menu”).focus(); setTimeout(function(){ },100); } }); $item.bind(“mouseover”,function(event){ $(“li.has-submenu”).removeClass(“open”); $(“a.opens-menu”).attr(“aria-expanded”,false); $item.addClass(“open”); $item.find(“a.opens-menu”).attr(“aria-expanded”,true); clearTimeout(nav_timer); }); $item.bind(“mouseleave”, function(event){ timer = setTimeout(function(){ $item.removeClass(“open”); $item.find(“a.opens-menu”).attr(“aria-expanded”,false); }, 500); }); }); $(“#skip_link”).click(function(event){ var h1 = $(“h1:visible”)[0]; if(h1 != null) { h1.tabIndex = “-1”; h1.focus(); } }); }); ]]>

Source

0 Replies to “CAIC”