1(function($) 2{"use strict";$.fn.avia_sc_tab_section=function() 3{var win=$(window),browserPrefix=$.avia_utilities.supports('transition'),cssActive=this.browserPrefix!==false?true:false,isMobile=$.avia_utilities.isMobile,isTouchDevice=$.avia_utilities.isTouchDevice,mobile_no_animation=$('body').hasClass('avia-mobile-no-animations'),transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1?true:false,transition={},animations=['avia_animate_when_visible','avia_animate_when_almost_visible','av-animated-generic','av-animated-when-visible','av-animated-when-almost-visible','av-animated-when-visible-95'];return this.each(function() 4{var container=$(this),tabs=container.find('.av-section-tab-title'),tab_outer=container.find('.av-tab-section-outer-container'),tab_wrap=container.find('.av-tab-section-tab-title-container'),tab_nav=container.find('.av_tab_navigation'),arrows_wrap=container.find('.av-tabsection-arrow'),arrows=arrows_wrap.find('.av-tab-section-slide'),slides_wrap=container.find('.av-slide-section-container-wrap'),slide_arrows_wrap=container.find('.av-tabsection-slides-arrow'),slide_arrows=slide_arrows_wrap.find('.av-tab-section-slide-content'),slide_dots_wrap=container.find('.av-tabsection-slides-dots'),slide_dots=slide_dots_wrap.find('.goto-slide'),content_wrap=container.find('.av-tab-section-inner-container'),single_tabs=container.find('.av-animation-delay-container'),layout_tab_wrap=container.find('.av-layout-tab'),inner_content=container.find('.av-layout-tab-inner'),flexible=container.is('.av-tab-content-auto'),minimumBrowserHeight=container.hasClass('av-minimum-height'),current_content=null,current_tab_id='1',current_iTab_id=1,min_width=0,transition_action='none',slideshowOptions={animation:'av-tab-slide-transition',autoplay:false,loop_autoplay:'once',interval:5,loop_manual:'manual-endless',autoplay_stopper:false,noNavigation:false},slideshowData=tab_outer.data('slideshow-data'),deepLinksToTabs={},timeoutIDAutoplay=null;if('undefined'!=typeof slideshowData) 5{slideshowOptions=$.extend({},slideshowOptions,slideshowData);} 6layout_tab_wrap.each(function() 7{var tab=$(this),link=tab.data('av-deeplink-tabs'),id=tab.data('av-tab-section-content');if(link) 8{deepLinksToTabs[link.toLowerCase()]=id;}});current_tab_id=container.find('.av-active-tab-title').data('av-tab-section-title');current_tab_id='undefined'!=typeof current_tab_id?current_tab_id:'1';current_iTab_id=parseInt(current_tab_id,10);current_content=container.find('[data-av-tab-section-content="'+current_tab_id+'"]');current_content.addClass('__av_init_open av-active-tab-content');if('av-tab-slide-transition'==slideshowOptions.animation) 9{transition_action='slide_sidewards';} 10else if('av-tab-slide-up-transition'==slideshowOptions.animation) 11{transition_action='slide_up';} 12else if('av-tab-fade-transition'==slideshowOptions.animation) 13{transition_action='fade';} 14if('slide_up'==transition_action) 15{$.each(animations,function(index,value) 16{inner_content.find('.'+value).addClass('avia_start_animation_when_active');});} 17var change_tab=function(e,prevent_hash) 18{e.preventDefault();if(container.hasClass('av-is-slideshow')&&e.originalEvent!==undefined) 19{return;} 20var current_tab=$(e.currentTarget),tab_nr=current_tab.data('av-tab-section-title'),iTab_nr=parseInt(tab_nr,10),prev_content=current_content;tabs.removeClass('av-active-tab-title');prev_content.removeClass('av-active-tab-content');current_tab.removeClass('no-scroll');current_content=container.find('[data-av-tab-section-content="'+tab_nr+'"]');current_tab_id=tab_nr;current_iTab_id=iTab_nr;current_tab.addClass('av-active-tab-title');current_content.addClass('av-active-tab-content');var new_pos=((iTab_nr-1)*-100);if($('body').hasClass('rtl')) 21{new_pos=((iTab_nr-1)*100);} 22set_slide_height();if(['none','slide_sidewards'].indexOf(transition_action)>=0) 23{if(cssActive) 24{new_pos=new_pos/tabs.length;transition['transform']=transform3d?"translate3d("+new_pos+"%, 0, 0)":"translate("+new_pos+"%,0)";transition['left']="0%";content_wrap.css(transition);} 25else 26{content_wrap.css('left',new_pos+"%");}} 27else if('slide_up'==transition_action) 28{layout_tab_wrap.css('opacity',1);if(cssActive) 29{var top=current_content.data('slide-top');if('undefined'==typeof top) 30{top=0;} 31transition['transform']=transform3d?"translate3d(0, -"+top+"px, 0)":"translate(0, -"+top+"px ,0)";transition['left']="0";content_wrap.css(transition);} 32else 33{content_wrap.css('top','-'+new_pos+'px');} 34layout_tab_wrap.filter(':not(.av-active-tab-content)').css('opacity',0);} 35set_tab_title_pos();set_slide_arrows_visibility(iTab_nr);set_slide_dots_visibility(iTab_nr);if(!(prevent_hash||slideshowOptions.autoplay)) 36{var newHash=current_tab.attr('href'),deepLink=current_content.data('av-deeplink-tabs');if('undefined'!=typeof(deepLink)&&''!=deepLink) 37{newHash=deepLink;} 38location.hash=newHash;} 39setTimeout(function() 40{current_content.trigger('avia_start_animation_if_current_slide_is_active');if(!isMobile||(isMobile&&!mobile_no_animation)) 41{single_tabs.not(current_content).trigger('avia_remove_animation');}},600);},set_min_width=function() 42{min_width=0;tabs.each(function() 43{min_width+=$(this).outerWidth();});tab_wrap.css('min-width',min_width);},set_slide_height=function() 44{var tab_wrap_height=container.hasClass('av-hide-tabs')?0:tab_wrap.height(),tab_wrap_add=tab_wrap_height?tab_wrap.outerHeight():0,min_el_height=0,cell_padding=0,same_slide_height=0,same_table_cell_height=0,calc_el_height=0;if(minimumBrowserHeight) 45{var css_height=container.hasClass('av-minimum-height-custom')?container.data('av_minimum_height_px'):container.css('min-height');css_height=parseInt(css_height,10);if(!isNaN(css_height)) 46{min_el_height=css_height;} 47if(!min_el_height) 48{minimumBrowserHeight=false;}} 49if(!flexible) 50{inner_content.css('height','');content_wrap.css('min-height','');var first=layout_tab_wrap.first();cell_padding=first.outerHeight()-first.height();layout_tab_wrap.each(function() 51{var content=$(this),inner=content.find('.av-layout-tab-inner');same_slide_height=Math.max(same_slide_height,inner.height());});same_table_cell_height=same_slide_height+cell_padding;calc_el_height=same_table_cell_height+tab_wrap_add;if(minimumBrowserHeight) 52{if(calc_el_height<min_el_height) 53{same_table_cell_height=min_el_height-tab_wrap_add;calc_el_height=min_el_height;}} 54content_wrap.css('min-height',same_table_cell_height);content_wrap.css('height',same_table_cell_height);} 55else if(flexible&&minimumBrowserHeight) 56{same_table_cell_height=min_el_height-tab_wrap_add;calc_el_height=min_el_height;content_wrap.css('min-height',same_table_cell_height);content_wrap.css('height',same_table_cell_height);} 57if(['none','slide_sidewards','fade'].indexOf(transition_action)>=0) 58{if(!current_content.length) 59{return;} 60if(flexible) 61{inner_content.height('auto');var content_height=current_content.find('.av-layout-tab-inner').height(),height=current_content.outerHeight(),outer_height=height+tab_wrap_height+100;tab_outer.css('max-height',outer_height);inner_content.height(content_height);inner_content.css('overflow','hidden');} 62setTimeout(function(){win.trigger('av-height-change');},600);return;} 63var top=0;layout_tab_wrap.each(function() 64{var content=$(this),inner=content.find('.av-layout-tab-inner'),layout_tab_nr=content.data('av-tab-section-content'),layout_iTab_nr=parseInt(layout_tab_nr,10),outerHeight=content.outerHeight();
64content.data('slide-top',top);top+=outerHeight;if(flexible&&layout_iTab_nr==current_iTab_id) 65{tab_outer.css('max-height',outerHeight+tab_wrap_add);inner.css('overflow','hidden');}});},set_tab_title_pos=function() 66{var current_tab=container.find('.av-active-tab-title'),viewport=container.width(),left_pos=(current_tab.position().left*-1)-(current_tab.outerWidth()/2)+(viewport/2);if(!$('body').hasClass('rtl')) 67{if(viewport>=min_width) 68{left_pos=0;} 69if(left_pos+min_width<viewport) 70{left_pos=(min_width-viewport)*-1;} 71if(left_pos>0) 72{left_pos=0;} 73tab_wrap.css('left',left_pos);var show_prev=left_pos!==0;var show_next=left_pos+min_width>viewport;set_arrows_visibility(show_prev,show_next);} 74else 75{var right_pos=0;if(viewport<min_width) 76{if(left_pos+min_width>viewport) 77{if(left_pos>0) 78{left_pos=0;} 79right_pos=(left_pos+min_width-viewport)*-1;}} 80tab_wrap.css('left','auto');tab_wrap.css('right',right_pos);var show_prev=right_pos+min_width>viewport;var show_next=right_pos!==0;set_arrows_visibility(show_prev,show_next);}},set_arrows_visibility=function(show_prev,show_next) 81{if(show_prev) 82{arrows_wrap.addClass('av-visible-prev');} 83else 84{arrows_wrap.removeClass('av-visible-prev');} 85if(show_next) 86{arrows_wrap.addClass('av-visible-next');} 87else 88{arrows_wrap.removeClass('av-visible-next');}},set_slide_arrows_visibility=function(current_tab) 89{if(current_tab>1) 90{slide_arrows_wrap.addClass('av-visible-prev');} 91else 92{slide_arrows_wrap.removeClass('av-visible-prev');} 93if(current_tab<tabs.length) 94{slide_arrows_wrap.addClass('av-visible-next');} 95else 96{slide_arrows_wrap.removeClass('av-visible-next');}},set_slide_dots_visibility=function(current_tab) 97{slide_dots_wrap.find('a').removeClass('active');slide_dots_wrap.find('a').eq(current_tab-1).addClass('active');},swipe_to_next_prev=function(e) 98{if(slideshowOptions.noNavigation) 99{return;} 100switch_to_next_prev(e);},switch_to_next_prev=function(e) 101{e.preventDefault();var clicked=$(e.currentTarget),current_tab=container.find('.av-active-tab-title');if(container.hasClass('av-slideshow-section')) 102{if(clicked.hasClass('av_prev_tab_section')) 103{slide_arrows_wrap.find('.av_prev_tab_section').trigger('click');} 104else 105{slide_arrows_wrap.find('.av_next_tab_section').trigger('click');} 106return;} 107if(clicked.is('.av_prev_tab_section')) 108{if(!$('body').hasClass('rtl')) 109{current_tab.prev('.av-section-tab-title').trigger('click');} 110else 111{current_tab.next('.av-section-tab-title').trigger('click');}} 112else 113{if(!$('body').hasClass('rtl')) 114{current_tab.next('.av-section-tab-title').trigger('click');} 115else 116{current_tab.prev('.av-section-tab-title').trigger('click');}}},slide_arrows_next_prev=function(e) 117{e.preventDefault();if(slideshowOptions.noNavigation&&e.originalEvent!==undefined) 118{return;} 119var clicked=$(e.currentTarget),current_tab=container.find('.av-active-tab-title'),tab_nr=current_tab.data('av-tab-section-title'),iTab_nr=parseInt(tab_nr,10),next=0;if(clicked.hasClass('av_prev_tab_section')) 120{next=!$('body').hasClass('rtl')?-1:1;} 121else 122{next=!$('body').hasClass('rtl')?1:-1;} 123var pos=iTab_nr+next;if(pos<=0||pos>tabs.length) 124{if('endless'!=slideshowOptions.loop_autoplay&&'manual-endless'!=slideshowOptions.loop_manual) 125{return;} 126pos=pos<=0?tabs.length:1;} 127clearTimeoutAutoplay();tabs.eq(pos-1).trigger('click');init_autoplay();},slide_dots_change_tab=function(e) 128{e.preventDefault();var clicked=$(e.currentTarget);if(clicked.hasClass('active')) 129{return;} 130var tab_nr=clicked.attr('href').replace('#',''),iTab_nr=parseInt(tab_nr,10);if(iTab_nr>tabs.length) 131{return;} 132clearTimeoutAutoplay();tabs.eq(iTab_nr-1).trigger('click');init_autoplay();},get_init_open=function() 133{var hash=window.location.hash?window.location.hash:'',deepHash=hash.toLowerCase().replace('#',''),open=null;if('undefined'!=typeof(deepLinksToTabs[deepHash])&&''!=deepLinksToTabs[deepHash]) 134{var hashID=deepLinksToTabs[deepHash];open=tabs.filter('[data-av-tab-section-title="'+hashID+'"]');} 135else 136{open=tabs.filter('[href="'+hash+'"]');} 137if(open.length) 138{if(!open.is('.active_tab')) 139{open.trigger('click');}} 140else 141{container.find('.av-active-tab-title').trigger('click',true);}},clearTimeoutAutoplay=function() 142{if(typeof timeoutIDAutoplay==='number') 143{clearTimeout(timeoutIDAutoplay);} 144timeoutIDAutoplay=null;},init_autoplay=function() 145{if(!container.hasClass('av-slideshow-section')) 146{return;} 147if(true!==slideshowOptions.autoplay) 148{tab_outer.removeClass('av-slideshow-autoplay').addClass('av-slideshow-manual');} 149if('undefined'==typeof slideshowOptions.loop_autoplay||'endless'!=slideshowOptions.loop_autoplay) 150{slideshowOptions.loop_autoplay='once';} 151if('undefined'==typeof slideshowOptions.interval) 152{slideshowOptions.interval=5;} 153if('undefined'==typeof slideshowOptions.autoplay||true!==slideshowOptions.autoplay) 154{slideshowOptions.autoplay=false;tab_outer.removeClass('av-slideshow-autoplay').addClass('av-slideshow-manual');return;} 155clearTimeoutAutoplay();timeoutIDAutoplay=setTimeout(function() 156{rotate_next_slide();},slideshowOptions.interval*1000);},rotate_next_slide=function() 157{var current_tab=container.find('.av-active-tab-title'),tab_nr=current_tab.data('av-tab-section-title'),iTab_nr=parseInt(tab_nr,10),stop=false,next=0;timeoutIDAutoplay=null;if('endless'==slideshowOptions.loop_autoplay) 158{if(!$('body').hasClass('rtl')) 159{next=iTab_nr<tabs.length?iTab_nr+1:1;} 160else 161{next=iTab_nr>1?iTab_nr-1:tabs.length;}} 162else 163{if(!$('body').hasClass('rtl')) 164{stop=iTab_nr==tabs.length;next=iTab_nr+1;} 165else 166{stop=iTab_nr==1;next=iTab_nr-1;} 167if(stop) 168{slideshowOptions.autoplay=false;slideshowOptions.loop_autoplay='manual';tab_outer.removeClass('av-slideshow-autoplay').addClass('av-slideshow-manual');tab_outer.removeClass('av-loop-endless').addClass('av-loop-once');return;}} 169tabs.eq(next-1).trigger('click');timeoutIDAutoplay=setTimeout(function() 170{rotate_next_slide();},slideshowOptions.interval*1000);};
170$.avia_utilities.preload({container:current_content,single_callback:function() 171{tabs.on('click',change_tab);arrows.on('click',switch_to_next_prev);slide_arrows.on('click',slide_arrows_next_prev);slide_dots.on('click',slide_dots_change_tab);if(isMobile||isTouchDevice) 172{tab_nav.on('click',swipe_to_next_prev);} 173win.on('debouncedresize',set_tab_title_pos);win.on('hashchange',get_init_open);win.on('debouncedresize av-content-el-height-changed',set_slide_height);set_min_width();set_slide_height();get_init_open();init_autoplay();}});if(isMobile||isTouchDevice) 174{if(!slideshowOptions.noNavigation) 175{content_wrap.avia_swipe_trigger({prev:'.av_prev_tab_section',next:'.av_next_tab_section'});}} 176set_slide_height();});};}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.