jQuery.fn.tabs=function(a){var t=$.extend({updateHash:!1,autoRotate:!1,alwaysScrollToTop:!1},a);return $(this).each(function(){function a(a,e){n.find("li.active").removeClass("active").find("a").attr("tabindex","-1"),a.attr("tabindex","0").parent().addClass("active"),r.find("> div.active").attr("aria-hidden",!0).removeClass("active"),$(a.attr("href")+d).addClass("active").attr("aria-hidden",!1),t.updateHash&&(location.hash=a.attr("href"))}function e(t){var e=t||window.location.hash,i=n.find('a[href="#'+e.replace("#","")+'"]');return i.length>0?a(i,!0):a(n.find("a:first"),!0),!!i.length}var i=$(this),n=i.find("ul:first"),r=$(n.find("a:eq(0)").attr("href")).parent(),d="-enhanced";if(n.addClass("tabs-nav").attr("role","tablist"),r.addClass("tabs-body"),r.find(">div").each(function(){$(this).addClass("tabs-panel").attr("role","tabpanel").attr("aria-hidden",!0).attr("aria-labelledby","tab-"+$(this).attr("id")).attr("id",$(this).attr("id")+d)}),n.find("li").each(function(){$(this).attr("role","tab").attr("id","tab-"+$(this).find("a").attr("href").split("#")[1])}),n.find("a").attr("tabindex","-1"),n.find("a").click(function(t){a($(this)),t.preventDefault()}).keydown(function(t){var e=$(this).parent(),i=!0;switch(t.keyCode){case 37:case 38:e.prev().length>0&&(a(e.prev().find("a")),e.prev().find("a").eq(0).focus(),i=!1);break;case 39:case 40:e.next().length>0&&(a(e.next().find("a")),e.next().find("a").eq(0).focus(),i=!1);break;case 36:a(n.find("li:first a")),n.find("li:first a").eq(0).focus(),i=!1;break;case 35:a(n.find("li:last a")),n.find("li:last a").eq(0).focus(),i=!1}return i}),i.bind("click keydown focus",function(){t.autoRotate&&clearInterval(s)}),e(null),t.updateHash&&$(window).bind("hashchange",function(){e(location.hash)}),t.autoRotate)var s=setInterval(function(){var t=n.find("li.active"),e=t.next();e.length?a(e.find("a"),!1):a(n.find("a:first"),!1)},t.autoRotate);t.alwaysScrollToTop&&$(window)[0].scrollTo(0,0)})},function(){"use strict";jQuery(document).on("contentloaded",function(a){jQuery(a.target).find(".policy-types").tabs()})}();