!function(t){"use strict";t.fn.avia_sc_tabs=function(e){var a=t(window);e=t.extend({heading:".tab",content:".tab_content",active:"active_tab",sidebar:!1},e);return this.each((function(){var i,n=t(this),o=t('<div class="tab_titles" role="tablist"></div>').prependTo(n),c=t(e.heading,n),r=t(e.content,n),d=!1;function s(){e.sidebar&&r.css({"min-height":o.outerHeight()+1})}function l(i,o,c){if(!i.is("."+e.active)){t("."+e.active,n).removeClass(e.active).attr({"aria-selected":!1,tabindex:0}),t("."+e.active+"_content",n).removeClass(e.active+"_content").attr("aria-hidden",!0),i.addClass(e.active).attr({"aria-selected":!0,tabindex:0});var d=i.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);a.scrollTop()>l&&t("html:not(:animated),body:not(:animated)").scrollTop(h)}a.trigger("av-content-el-height-changed",i)}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,n.offset().top-70))}}i=c.clone(),d=c.addClass("fullsize-tab").attr({"aria-hidden":!0,"aria-selected":!1,id:"",role:"","aria-controls":"",tabindex:0}),(c=i).prependTo(o).each((function(e){var a=t(this),n=!1;i&&(n=d.eq(e)),a.addClass("tab_counter_"+e).attr({tab_counter:e}).on("click",(function(){return l(a,e,n),!1})),a.on("keydown",(function(t){13===t.keyCode&&a.trigger("click")})),i&&(n.on("click",(function(){return l(n,e,a),!1})),n.on("keydown",(function(t){13===t.keyCode&&n.trigger("click")})))})),s(),h(!1),a.on("debouncedresize",s),t("a").on("click",(function(){var e=t(this).attr("href");void 0!==e&&e&&h("#"+(e=e.replace(/^.*?#/,"")))}))}))}}(jQuery);