https://silviagenz.de/wp-content/themes/enfold/config-templatebuil…/gallery_horizontal_ver-5.2.21.js
1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10// ------------------------------------------------------------------------------------------- 11// Horizontal Gallery 12// ------------------------------------------------------------------------------------------- 13 14(function($) 15{ 16 "use strict"; 17 18 $.fn.avia_hor_gallery= function(options) 19 { 20 var defaults = 21 { 22 slide_container : '.av-horizontal-gallery-inner', //element with max width 23 slide_element : '.av-horizontal-gallery-slider', //element that gets moved 24 slide_content : '.av-horizontal-gallery-wrap', 25 active : 'av-active-gal-item', // must be a class string without the . in front 26 prev : '.av-horizontal-gallery-prev', 27 next : '.av-horizontal-gallery-next' 28 }; 29 30 var options = $.extend(defaults, options); 31 32 var win = $(window), 33 browserPrefix = $.avia_utilities.supports('transition'), 34 cssActive = this.browserPrefix !== false ? true : false, 35 isMobile = $.avia_utilities.isMobile, 36 transform3d = document.documentElement.className.indexOf('avia_transform3d') !== -1 ? true : false, 37 transition = {}; 38 39 return this.each(function() 40 { 41 var container = $(this), 42 slide_container = container.find(options.slide_container), 43 slide_element = container.find(options.slide_element), 44 slide_content = container.find(options.slide_content), 45 prev = container.find(options.prev), 46 next = container.find(options.next), 47 imgs = container.find('img'), 48 49 all_elements_width = 0, 50 currentIndex = false, 51 initial = container.data('av-initial'), 52 53 set_up = function( init ) 54 { 55 var sl_height = (slide_container.width() / 100 ) * slide_container.data('av-height'); 56 57 slide_container.css({'padding':0}).height(sl_height); 58 59 //fixes img distortion when resizing browser: 60 imgs.css('display','inline-block'); 61 setTimeout(function(){ imgs.css('display','block'); }, 10); 62 63 //calculate the slidelement width based on the elements inside 64 all_elements_width = 0; 65 66 slide_content.each(function() 67 { 68 all_elements_width += $(this).outerWidth( true ); 69 }); 70 71 slide_element.css( 'min-width' , all_elements_width ); 72 73 if(currentIndex !== false ) 74 { 75 change_active(currentIndex); 76 } 77 }, 78 change_active = function(index) 79 { 80 //scroll the tabs if there is not enough room to display them all 81 var current = slide_element.find(options.slide_content).eq(index), 82 viewport = slide_container.width(), 83 modifier = container.data('av-enlarge') > 1 && currentIndex == index ? container.data('av-enlarge') : 1, 84 outerWidth = current.outerWidth( true ) * modifier, 85 margin_right= parseInt( current.css('margin-right') , 10 ) / 2, 86 left_pos = viewport < all_elements_width ? (current.position().left * - 1) - (outerWidth / 2) + (viewport / 2): 0; 87 88 //center properly 89 left_pos = left_pos + margin_right; 90 91 //out of bounce right side 92 if(left_pos + all_elements_width < viewport) left_pos = (all_elements_width - viewport - parseInt(current.css('margin-right'),10) ) * -1; 93 94 //out of bounce left side 95 if(left_pos > 0) left_pos = 0; 96 97 //set pos 98 slide_element.css('left',left_pos ); 99 100 slide_container.find("." +options.active).removeClass(options.active); 101 current.addClass(options.active); 102 currentIndex = index; 103 104 }; 105 106 107 $.avia_utilities.preload({container: container , global_callback: function() 108 { 109 // activate behavior 110 set_up( 'init' ); 111 win.on('debouncedresize', set_up); 112 if(initial) change_active(initial - 1); 113 114 setTimeout(function(){ 115 container.addClass('av-horizontal-gallery-animated'); 116 },10); 117 118 }}); 119 120 121 122 123 124 125 126 //swipe on mobile 127 slide_element.avia_swipe_trigger({prev:options.prev, next:options.next}); 128 129 //element click 130 slide_content.on('click', function(e) 131 { 132 var current = $(this); 133 var index = slide_content.index(current); 134 135 if(currentIndex === index) 136 { 137 if(container.data('av-enlarge') > 1 && !$(e.target).is('a') ) 138 { 139 //slide_container.find("." +options.active).removeClass(options.active); 140 //currentIndex = false; 141 } 142 return; 143 } 144 145 change_active(index); 146 }); 147 148 prev.on('click', function(e) 149 { 150 if(currentIndex === false) currentIndex = 1; 151 var index = currentIndex - 1; 152 if(index < 0) index = 0; 153 154 change_active(index); 155 }); 156 157 next.on('click', function(e) 158 { 159 if(currentIndex === false) currentIndex = -1; 160 var index = currentIndex + 1; 161 if(index > slide_content.length - 1) index = slide_content.length - 1; 162 163 change_active(index); 164 }); 165 166 //if its a desktop browser add arrow navigation, otherwise add touch nav 167 if(!isMobile) 168 { 169 container.avia_keyboard_controls({ 37: options.prev, 39: options.next }); 170 } 171 else 172 {
173 container.avia_swipe_trigger({next: options.next, prev: options.prev}); 174 } 175 176 177 178 }); 179 }; 180 181 182 183}(jQuery)); 184 185 186 187}
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.