!function(t){"use strict";t.fn.avia_sc_tabs=function(e){var i=t(window);e=t.extend({heading:".tab",content:".tab_content",active:"active_tab",sidebar:!1},e);return this.each(function(){var n,a=t(this),o=t('
').prependTo(a),c=t(e.heading,a),r=t(e.content,a),d=!1;function s(){e.sidebar&&r.css({"min-height":o.outerHeight()+1})}function l(n,o,c){if(!n.is("."+e.active)){t("."+e.active,a).removeClass(e.active),t("."+e.active+"_content",a).attr("aria-hidden",!0).removeClass(e.active+"_content"),n.addClass(e.active);var d=n.data("fake-id");"string"==typeof d&&window.location.replace(d),c&&c.addClass(e.active);var s=r.eq(o).addClass(e.active+"_content").attr("aria-hidden",!1);"undefined"!=typeof click_container&&click_container.length&&sidebar_shadow.height(s.outerHeight());var l=s.offset().top,h=l-50-parseInt(t("html").css("margin-top"),10);i.scrollTop()>l&&t("html:not(:animated),body:not(:animated)").scrollTop(h)}i.trigger("av-content-el-height-changed",n)}function h(t){if(!t&&window.location.hash&&(t=window.location.hash),t){var e=c.filter('[data-fake-id="'+t+'"]');e.length&&(e.is(".active_tab")||e.trigger("click"),window.scrollTo(0,a.offset().top-70))}}n=c.clone(),d=c.addClass("fullsize-tab").attr("aria-hidden",!0),(c=n).prependTo(o).each(function(e){var i=t(this),a=!1;n&&(a=d.eq(e)),i.addClass("tab_counter_"+e).on("click",function(){return l(i,e,a),!1}),i.on("keydown",function(t){13===t.keyCode&&i.trigger("click")}),n&&(a.on("click",function(){return l(a,e,i),!1}),a.on("keydown",function(t){13===t.keyCode&&a.trigger("click")}))}),s(),h(!1),i.on("debouncedresize",s),t("a").on("click",function(){var e=t(this).attr("href");void 0!==e&&e&&h("#"+(e=e.replace(/^.*?#/,"")))})})}}(jQuery);