PageSourceSearch

https://www.essonnetourisme.com/wp-content/themes/cdt91/js/shortcodes.js?ver=1.0

js essonnetourisme.com collected 2026-10-02 11:18:38 UTC 40,642 bytes, 1,364 lines download raw bytes

1(function($)
2{	
3    "use strict";
4
5    $(document).ready(function()
6    {	
7    	//global variables that are used on several ocassions
8    	$.avia_utilities = $.avia_utilities || {};
9    	
10    	if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement)
11    	{
12    		$.avia_utilities.isMobile =  true;
13    	}
14    	else
15    	{
16    		$.avia_utilities.isMobile =  false;
17    	}
18    
19    	//activate fixed bg fallback for mobile
20    	if($.fn.avia_mobile_fixed)
21		$('.avia-bg-style-fixed').avia_mobile_fixed();
22    	
23    	//activate parallax scrolling for backgrounds.
24    	if($.fn.avia_parallax)
25		$('.av-parallax').avia_parallax();
26    	
27    	//calculate the browser height and append a css rule to the head
28		if($.fn.avia_browser_height)
29		$('.av-minimum-height, .avia-fullscreen-slider, .av-cell-min-height').avia_browser_height();
30		
31		//calculate the height of each video section
32		if($.fn.avia_video_section)
33		 $('.av-section-with-video-bg').avia_video_section();
34		
35		//creates team social icon tooltip
36        new $.AviaTooltip({'class': "avia-tooltip", data: "avia-tooltip", delay:0, scope: "body"});
37		
38		//creates icon element tooltip
39		new $.AviaTooltip({'class': "avia-tooltip avia-icon-tooltip", data: "avia-icon-tooltip", delay:0, scope: "body"});
40		
41        $.avia_utilities.activate_shortcode_scripts();
42        
43        //layer slider height helper
44        if($.fn.layer_slider_height_helper)
45        $('.avia-layerslider').layer_slider_height_helper();
46        
47        //"ajax" portfolio
48        if($.fn.avia_portfolio_preview)
49		{
50        	$('.grid-links-ajax').avia_portfolio_preview();
51        }
52        
53        // actiavte the masonry script: sorting/loading/etc
54		if($.fn.avia_masonry)
55		$('.av-masonry').avia_masonry();
56		
57		//activate the accordion
58		if($.fn.aviaccordion)
59		$('.aviaccordion').aviaccordion();
60		
61		
62		//activate the accordion
63		if($.fn.avia_textrotator)
64		$('.av-rotator-container').avia_textrotator();
65		
66		//activates the tab section shortcode
67		if($.fn.avia_sc_tab_section)
68		{
69			$('.av-tab-section-container').avia_sc_tab_section();
70		}
71		
72		//activates the hor gallery  shortcode
73		if($.fn.avia_hor_gallery)
74		{
75			$('.av-horizontal-gallery').avia_hor_gallery();
76		}
77		
78		//	activate columns and cells with a link
79		if($.fn.avia_link_column)
80		{
81			$('.avia-link-column').avia_link_column();
82		}
83		
84		if($.fn.avia_delayed_animation_in_container)
85		{
86			$('.av-animation-delay-container').avia_delayed_animation_in_container();
87		}
88		
89		
90    });
91
92
93
94
95
96// -------------------------------------------------------------------------------------------
97// ACTIVATE ALL SHORTCODES
98// -------------------------------------------------------------------------------------------
99
100	$.avia_utilities = $.avia_utilities || {};
101	$.avia_utilities.activate_shortcode_scripts = function(container)
102	{
103		if(typeof container == 'undefined'){ container = 'body';}
104		
105		//activates the form shortcode
106		if($.fn.avia_ajax_form)
107		{
108			$('.avia_ajax_form:not( .avia-disable-default-ajax )', container).avia_ajax_form();
109		}
110		
111		activate_waypoints(container);
112		
113		//activate the video api
114		if($.fn.aviaVideoApi)
115		{
116			$('.avia-slideshow iframe[src*="youtube.com"], .av_youtube_frame, .av_vimeo_frame, .avia-slideshow video').aviaVideoApi({}, 'li');
117		}
118		
119	    //activates the toggle shortcode
120		if($.fn.avia_sc_toggle)
121		{
122			$('.togglecontainer', container).avia_sc_toggle();
123		}
124		
125		//activates the tabs shortcode
126		if($.fn.avia_sc_tabs)
127		{
128			$('.top_tab', container).avia_sc_tabs();
129			$('.sidebar_tab', container).avia_sc_tabs({sidebar:true});
130		}
131		
132		//activates behavior and animation for gallery
133		if($.fn.avia_sc_gallery)
134		{
135			$('.avia-gallery', container).avia_sc_gallery();
136		}
137		
138		//activates animated number shortcode
139		if($.fn.avia_sc_animated_number)
140		{
141			$('.avia-animated-number', container).avia_sc_animated_number();
142		}
143		
144		//animation for elements that are not connected like icon shortcode
145		if($.fn.avia_sc_animation_delayed)
146		{
147			$('.av_font_icon', container).avia_sc_animation_delayed({delay:100});
148			$('.avia-image-container', container).avia_sc_animation_delayed({delay:100});
149			$('.av-hotspot-image-container', container).avia_sc_animation_delayed({delay:100});
150			$('.av-animated-generic', container).avia_sc_animation_delayed({delay:100});
151		}
152
153		//activates animation for iconlist
154		if($.fn.avia_sc_iconlist)
155		{
156			$('.avia-icon-list.av-iconlist-big.avia-iconlist-animate', container).avia_sc_iconlist();
157		}
158
159		//activates animation for progress bar
160		if($.fn.avia_sc_progressbar)
161		{
162			$('.avia-progress-bar-container', container).avia_sc_progressbar();
163		}
164
165		//activates animation for testimonial
166		if($.fn.avia_sc_testimonial)
167		{
168			$('.avia-testimonial-wrapper', container).avia_sc_testimonial();
169		}
170		
171		//activate the fullscreen slider
172		if($.fn.aviaFullscreenSlider)
173		{
174			$('.avia-slideshow.av_fullscreen', container).aviaFullscreenSlider();
175		}
176		
177		//activate the aviaslider
178		if($.fn.aviaSlider)
179		{
180			$('.avia-slideshow:not(.av_fullscreen)', container).aviaSlider();
181		
182			//content slider
183        	$('.avia-content-slider-active', container).aviaSlider({wrapElement: '.avia-content-slider-inner', slideElement:'.slide-entry-wrap', fullfade:true});
184
185			//testimonial slider
186			$('.avia-slider-testimonials', container).aviaSlider({wrapElement: '.avia-testimonial-row', slideElement:'.avia-testimonial', fullfade:true});
187        }
188    	
189    	 //load magazine sorting
190        if($.fn.aviaMagazine)
191        {
192        	$('.av-magazine-tabs-active', container).aviaMagazine();
193    	}
194    	
195    	 //load image hotspot
196        if($.fn.aviaHotspots)
197        {
198        	$('.av-hotspot-image-container', container).aviaHotspots();
199    	}
200    	
201    	 //load countdown
202        if($.fn.aviaCountdown)
203        {
204        	$('.av-countdown-timer', container).aviaCountdown();
205    	}
206    	
207		 //load audio player
208		if($.fn.aviaPlayer)
209        {
210        	$('.av-player', container).aviaPlayer();
211    	}
212    	
213    	
214    }
215
216
217	function activate_waypoints(container)
218	{
219		//activates simple css animations of the content once the user scrolls to an elements
220		if($.fn.avia_waypoints)
221		{
222			if(typeof container == 'undefined'){ container = 'body';};
223
224			$('.avia_animate_when_visible', container).avia_waypoints();
225			$('.avia_animate_when_almost_visible', container).avia_waypoints({ offset: '80%'});
226			
227			if(container == 'body') container = '.avia_desktop body';
228			$('.av-animated-generic', container).avia_waypoints({ offset: '95%'});
229		}
230	}
231
232	
233// -------------------------------------------------------------------------------------------
234
235	$.AviaParallaxElement  =  function(options, element)
236	{
237	    this.$el  	  	= $( element ).addClass('active-parallax');
238	    this.$win	  	= $( window );
239	    this.$body	  	= $( 'body' );
240	    this.$parent  	= this.$el.parent();
241	    this.property	= {};
242	    this.isMobile 	= $.avia_utilities.isMobile;
243	    this.ratio		= this.$el.data('avia-parallax-ratio') || 0.5;
244	    this.transform  = document.documentElement.className.indexOf('avia_transform') !== -1 ? true : false;
245	    this.transform3d= document.documentElement.className.indexOf('avia_transform3d') !== -1 ? true : false;
246	    this.ticking	= false;
247	    
248	    if($.avia_utilities.supported.transition === undefined)
249		{
250			$.avia_utilities.supported.transition = $.avia_utilities.supports('transition');
251		}
252	    
253	    this._init( options );
254	}
255	
256	$.AviaParallaxElement.prototype = {
257	
258		_init: function( options )
259    	{
260    		var _self = this;
261			if(_self.isMobile)
262			{
263				return; //disable parallax scrolling on mobile
264			}
265			
266			//fetch window constants
267			setTimeout(function()
268			{
269    			_self._fetch_properties();
270    		},30);
271			
272			this.$win.on("debouncedresize av-height-change",  $.proxy( _self._fetch_properties, _self));
273			this.$body.on("av_resize_finished",  $.proxy( _self._fetch_properties, _self));
274			
275			
276			
277			//activate the scrolling
278			setTimeout(function()
279			{
280				_self.$win.on( 'scroll', $.proxy( _self._on_scroll, _self) );
281    			
282    		},100);
283		},
284		
285		_fetch_properties: function()
286		{
287			this.property.offset 	= this.$parent.offset().top;
288			this.property.wh 		= this.$win.height();
289			this.property.height 	= this.$parent.outerHeight();
290			
291			//set the height of the element based on the windows height, offset ratio and parent height
292			this.$el.height(Math.ceil((this.property.wh * this.ratio) + this.property.height));
293			
294			//re-position the element
295			this._parallax_scroll();
296		},
297		
298		_on_scroll: function(e)
299    	{
300	    	var _self = this;
301	    	
302	    	if(!_self.ticking) {
303		     _self.ticking = true;
304		      window.requestAnimationFrame( $.proxy( _self._parallax_scroll, _self) );
305		    }
306    	},
307		
308		_parallax_scroll: function(e)
309    	{
310    		var winTop		=  this.$win.scrollTop(),
311    			winBottom	=  winTop + this.property.wh,
312    			scrollPos 	= "0", 
313    			prop = {};
314    		
315    		//shift element when it moves into viewport
316    		if(this.property.offset < winBottom && winTop <= this.property.offset + this.property.height)
317    		{	
318    			scrollPos = Math.ceil( (winBottom - this.property.offset) * this.ratio );
319    			
320    			//parallax movement via backround position change, although
321    			if(this.transform3d)
322    			{
323    				prop[$.avia_utilities.supported.transition+"transform"] = "translate3d(0px,"+ scrollPos +"px, 0px)";
324    			}
325    			else if(this.transform)
326    			{
327    				prop[$.avia_utilities.supported.transition+"transform"] = "translate(0px,"+ scrollPos +"px)";
328    			}
329    			else
330    			{
331    				prop["background-position"] = "0px "+ scrollPos +"px";
332    			}
333	    		
334	    		this.$el.css(prop);
335    		}
336    		
337    		this.ticking = false;
338    	}
339	};
340
341
342$.fn.avia_parallax = function(options)
343{
344	return this.each(function()
345    	{
346    		var self = $.data( this, 'aviaParallax' );
347
348    		if(!self)
349    		{
350    			self = $.data( this, 'aviaParallax', new $.AviaParallaxElement( options, this ) );
351    		}
352    	});
353}
354
355
356// -------------------------------------------------------------------------------------------
357// Helper to allow fixed bgs on mobile
358// -------------------------------------------------------------------------------------------
359
360$.fn.avia_mobile_fixed = function(options)
361{
362	var isMobile = $.avia_utilities.isMobile;
363	if(!isMobile) return;
364	
365	return this.each(function()
366	{
367		var current				= $(this).addClass('av-parallax-section'),
368			$background 		= current.attr('style'),
369			$attachment_class 	= current.data('section-bg-repeat'),
370			template			= "";
371			
372			if($attachment_class == 'stretch' || $attachment_class == 'no-repeat' )
373			{
374				$attachment_class = " avia-full-stretch"; 
375			}
376			else
377			{
378				$attachment_class = ""; 
379			}
380			
381			template = "<div class='av-parallax " + $attachment_class + "' data-avia-parallax-ratio='0.0' style = '" + $background + "' ></div>";
382			
383			current.prepend(template);
384			current.attr('style','');
385	});
386}
387
388
389
390// -------------------------------------------------------------------------------------------
391//  shortcode javascript for delayed animation even when non connected elements are used
392// -------------------------------------------------------------------------------------------
393
394$.fn.avia_sc_animation_delayed = function(options)
395{
396	var global_timer = 0,
397		delay = options.delay || 50,
398		max_timer = 10,
399		new_max = setTimeout(function(){ max_timer = 20; }, 500);
400	
401	return this.each(function()
402	{
403		var elements = $(this);
404
405		//trigger displaying of thumbnails
406		elements.on('avia_start_animation', function()
407		{
408			var element = $(this);
409			 
410			if(global_timer < max_timer) global_timer ++;
411			
412			setTimeout(function()
413			{ 
414				element.addClass('avia_start_delayed_animation'); 
415				if(global_timer > 0) global_timer --; 
416			
417			}, (global_timer * delay));
418			
419		});
420	});
421}
422
423/*delayd animations when used within tab sections or similar elements. this way they get animated each new time a tab is shown*/
424$.fn.avia_delayed_animation_in_container = function(options)
425{
426	return this.each(function()
427	{
428		var elements = $(this);
429		
430		elements.on('avia_start_animation_if_current_slide_is_active', function()
431		{
432			var current = $(this),
433				animate = current.find('.avia_start_animation_when_active');
434				
435				animate.addClass('avia_start_animation').trigger('avia_start_animation');
436		});
437		
438		elements.on('avia_remove_animation', function()
439		{
440			var current = $(this),
441				animate = current.find('.avia_start_animation_when_active, .avia_start_animation');
442				animate.removeClass('avia_start_animation avia_start_delayed_animation');
443		});
444	});
445}
446
447
448
449
450
451// -------------------------------------------------------------------------------------------
452// Section Height Helper
453// -------------------------------------------------------------------------------------------
454
455$.fn.avia_browser_height = function()
456{
457	if(!this.length) return;
458	
459	var win			= $(window),
460		html_el		= $('html'),
461		subtract	= $('#wpadminbar, #header.av_header_top:not(.html_header_transparency #header), #main>.title_container'),
462		css_block	= $("<style type='text/css' id='av-browser-height'></style>").appendTo('head:first'), 
463		sidebar_menu= $('.html_header_sidebar #top #header_main'),
464		full_slider	= $('.html_header_sidebar .avia-fullscreen-slider.avia-builder-el-0.avia-builder-el-no-sibling').addClass('av-solo-full'),
465		calc_height = function()
466		{
467			var css			= "",
468				wh100 		= win.height(),
469				ww100 		= win.width(),
470				wh100_mod 	= wh100,
471				whCover		= (wh100 / 9) * 16,
472				wwCover		= (ww100 / 16) * 9,
473				wh75		= Math.round( wh100 * 0.75 ),
474				wh50		= Math.round( wh100 * 0.5  ),
475				wh25		= Math.round( wh100 * 0.25 ),
476				solo		= 0;
477			
478			if(sidebar_menu.length) solo = sidebar_menu.height();
479			
480			subtract.each(function(){ wh100_mod -= this.offsetHeight - 1; });	
481			
482			var whCoverMod	= (wh100_mod / 9) * 16;
483			
484			//fade in of section content with minimum height once the height has been calculated
485			css += ".avia-section.av-minimum-height .container{opacity: 1; }\n";
486			
487			//various section heights (100-25% as well as 100% - header/adminbar in case its the first builder element)
488			css += ".av-minimum-height-100 .container, .avia-fullscreen-slider .avia-slideshow, #top.avia-blank .av-minimum-height-100 .container, .av-cell-min-height-100 > .flex_cell{height:"+wh100+"px;}\n";
489			css += ".av-minimum-height-75 .container, .av-cell-min-height-75 > .flex_cell	{height:"+wh75+"px;}\n";
490			css += ".av-minimum-height-50 .container, .av-cell-min-height-50 > .flex_cell	{height:"+wh50+"px;}\n";
491			css += ".av-minimum-height-25 .container, .av-cell-min-height-25 > .flex_cell	{height:"+wh25+"px;}\n";
492			css += ".avia-builder-el-0.av-minimum-height-100 .container, .avia-builder-el-0.avia-fullscreen-slider .avia-slideshow, .avia-builder-el-0.av-cell-min-height-100 > .flex_cell{height:"+wh100_mod+"px;}\n";
493			
494			css += "#top .av-solo-full .avia-slideshow {min-height:"+solo+"px;}\n";
495			
496			//fullscreen video calculations
497			if(ww100/wh100 < 16/9)
498			{
499				css += "#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{width:"+whCover+"px; left: -"+(whCover - ww100)/2+"px;}\n";
500			}
501			else
502			{
503				css += "#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover - wh100)/2+"px;}\n";
504			}
505			
506			if(ww100/wh100_mod < 16/9)
507			{
508				css += "#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{width:"+whCoverMod+"px; left: -"+(whCoverMod - ww100)/2+"px;}\n";
509			}
510			else
511			{
512				css += "#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover - wh100_mod)/2+"px;}\n";
513			}
514			
515			//ie8 needs different insert method
516			try{
517				css_block.text(css); 
518			}
519			catch(err){
520				css_block.remove();
521				css_block = $("<style type='text/css' id='av-browser-height'>"+css+"</style>").appendTo('head:first');
522			}
523			
524			
525			setTimeout(function(){ win.trigger('av-height-change'); /*broadcast the height change*/ },100);
526		};
527	
528	win.on( 'debouncedresize', calc_height);
529	calc_height();
530}
531
532// -------------------------------------------------------------------------------------------
533// Video Section helper
534// -------------------------------------------------------------------------------------------
535
536$.fn.avia_video_section = function()
537{
538	if(!this.length) return;
539	
540	var elements	= this.length, content = "",
541		win			= $(window),
542		css_block	= $("<style type='text/css' id='av-section-height'></style>").appendTo('head:first'), 
543		calc_height = function(section, counter)
544		{
545			if(counter === 0) { content = "";}
546		
547			var css			= "",
548				the_id		= '#' +section.attr('id'),
549				wh100 		= section.height(),
550				ww100 		= section.width(),
551				aspect		= section.data('sectionVideoRatio').split(':'),
552				video_w		= aspect[0],
553				video_h		= aspect[1],
554				whCover		= (wh100 / video_h ) * video_w,
555				wwCover		= (ww100 / video_w ) * video_h;
556			
557			//fullscreen video calculations
558			if(ww100/wh100 < video_w/video_h)
559			{
560				css += "#top "+the_id+" .av-section-video-bg iframe, #top "+the_id+" .av-section-video-bg embed, #top "+the_id+" .av-section-video-bg object, #top "+the_id+" .av-section-video-bg video{width:"+whCover+"px; left: -"+(whCover - ww100)/2+"px;}\n";
561			}
562			else
563			{
564				css += "#top "+the_id+" .av-section-video-bg iframe, #top "+the_id+" .av-section-video-bg embed, #top "+the_id+" .av-section-video-bg object, #top "+the_id+" .av-section-video-bg video{height:"+wwCover+"px; top: -"+(wwCover - wh100)/2+"px;}\n";
565			}
566			
567			content = content + css;
568			
569			if(elements == counter + 1)
570			{
571				//ie8 needs different insert method
572				try{
573					css_block.text(content);
574				}
575				catch(err){
576					css_block.remove();
577					css_block = $("<style type='text/css' id='av-section-height'>"+content+"</style>").appendTo('head:first');
578				}
579			}
580		};
581		
582		
583	return this.each(function(i)
584	{
585		var self = $(this);
586		
587		win.on( 'debouncedresize', function(){ calc_height(self, i); });
588		calc_height(self, i);
589	});
590	
591}
592
593
594/**
595 * Column or cell with a link
596 * 
597 * @returns {jQuery}
598 */
599$.fn.avia_link_column = function()
600{
601	return this.each( function()
602	{
603		$(this).on( 'click', function(e){
604			
605				//	if event is bubbled from an <a> link, do not activate link of column/cell
606				if( 'undefined' !== typeof e.target && 'undefined' !== typeof e.target.href )
607				{
608					return;
609				}
610				
611				var	column = $(this),
612					url = column.data('link-column-url'),
613					target = column.data('link-column-target'),
614					link = window.location.hostname+window.location.pathname;
615					
616				if( 'undefined' === typeof url || 'string' !== typeof url )
617				{
618					return;
619				}
620				
621				if( 'undefined' !== typeof target || '_blank' == target )
622				{
623					window.open( url, '_blank' );
624				}
625				else
626				{
627					//	allow smoothscroll feature when on same page and hash exists - trigger only works for current page 
628					if( column.hasClass('av-cell-link') || column.hasClass('av-column-link') )
629					{
630						var reader = column.hasClass('av-cell-link') ? column.prev('a.av-screen-reader-only').first() : column.find('a.av-screen-reader-only').first();
631						url = url.trim();
632						if( (0 == url.indexOf("#")) || ((url.indexOf(link) >= 0) && (url.indexOf("#") > 0) ) )
633						{
634							reader.trigger('click');
635							return;
636						}
637					}
638					
639					window.location.href = url;
640				}
641				
642				e.preventDefault();
643				return;
644			});
645			
646	});
647};
648
649
650// -------------------------------------------------------------------------------------------
651// HELPER FUNCTIONS
652// -------------------------------------------------------------------------------------------
653
654
655//waipoint script when something comes into viewport
656 $.fn.avia_waypoints = function(options_passed)
657	{
658		if(! $('html').is('.avia_transform')) return;
659
660		var defaults = { offset: 'bottom-in-view' , triggerOnce: true},
661			options  = $.extend({}, defaults, options_passed),
662			isMobile = $.avia_utilities.isMobile;
663
664		return this.each(function()
665		{
666			var element = $(this);
667			
668			setTimeout(function()
669			{
670				if(isMobile)
671				{
672					element.addClass('avia_start_animation').trigger('avia_start_animation');
673				}
674				else
675				{
676					element.waypoint(function(direction)
677					{
678					 	var current 	= $(this.element),
679					 		parent  	= current.parents('.av-animation-delay-container:eq(0)');
680					 	
681					 	if(parent.length)
682					 	{
683						 	current.addClass('avia_start_animation_when_active').trigger('avia_start_animation_when_active');
684					 	}
685					 	
686					 	if(!parent.length || (parent.length && parent.is('.__av_init_open')))
687					 	{
688						 	current.addClass('avia_start_animation').trigger('avia_start_animation');
689					 	}
690					 	
691					 	
692					 	
693					}, options );
694				}
695			},100)
696			
697		});
698	};
699
700
701
702
703
704
705
706// window resize script
707var $event = $.event, $special, resizeTimeout;
708
709$special = $event.special.debouncedresize = {
710	setup: function() {
711		$( this ).on( "resize", $special.handler );
712	},
713	teardown: function() {
714		$( this ).off( "resize", $special.handler );
715	},
716	handler: function( event, execAsap ) {
717		// Save the context
718		var context = this,
719			args = arguments,
720			dispatch = function() {
721				// set correct event type
722				event.type = "debouncedresize";
723				$event.dispatch.apply( context, args );
724			};
725
726		if ( resizeTimeout ) {
727			clearTimeout( resizeTimeout );
728		}
729
730		execAsap ?
731			dispatch() :
732			resizeTimeout = setTimeout( dispatch, $special.threshold );
733	},
734	threshold: 150
735};
736
737
738
739
740
741$.easing['jswing'] = $.easing['swing'];
742
743$.extend( $.easing,
744{
745	def: 'easeOutQuad',
746	swing: function (x, t, b, c, d) { return $.easing[$.easing.def](x, t, b, c, d); },
747	easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; },
748	easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; },
749	easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; },
vendor: 4,549 bytes, lines 750-855
750	easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; },
751	easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; },
752	easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b;	},
753	easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b;	},
754	easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; },
755	easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b;	},
756	easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b;	},
757	easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b;	},
758	easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b;	},
759	easeInSine: function (x, t, b, c, d) {	return -c * Math.cos(t/d * (Math.PI/2)) + c + b;	},
760	easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b;	},
761	easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;	},
762	easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;	},
763	easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;	},
764	easeInOutExpo: function (x, t, b, c, d) {
765		if (t==0) return b;
766		if (t==d) return b+c;
767		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
768		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
769	},
770	easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;	},
771	easeOutCirc: function (x, t, b, c, d) {return c * Math.sqrt(1 - (t=t/d-1)*t) + b;	},
772	easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;	return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;	},
773	easeInElastic: function (x, t, b, c, d) {
774		var s=1.70158;var p=0;var a=c;
775		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
776		if (a < Math.abs(c)) { a=c; var s=p/4; }
777		else var s = p/(2*Math.PI) * Math.asin (c/a);
778		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
779	},
780	easeOutElastic: function (x, t, b, c, d) {
781		var s=1.70158;var p=0;var a=c;
782		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
783		if (a < Math.abs(c)) { a=c; var s=p/4; }
784		else var s = p/(2*Math.PI) * Math.asin (c/a);
785		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
786	},
787	easeInOutElastic: function (x, t, b, c, d) {
788		var s=1.70158;var p=0;var a=c;
789		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
790		if (a < Math.abs(c)) { a=c; var s=p/4; }
791		else var s = p/(2*Math.PI) * Math.asin (c/a);
792		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
793		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
794	},
795	easeInBack: function (x, t, b, c, d, s) {
796		if (s == undefined) s = 1.70158;
797		return c*(t/=d)*t*((s+1)*t - s) + b;
798	},
799	easeOutBack: function (x, t, b, c, d, s) {
800		if (s == undefined) s = 1.70158;
801		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
802	},
803	easeInOutBack: function (x, t, b, c, d, s) {
804		if (s == undefined) s = 1.70158;
805		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
806		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
807	},
808	easeInBounce: function (x, t, b, c, d) {
809		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
810	},
811	easeOutBounce: function (x, t, b, c, d) {
812		if ((t/=d) < (1/2.75)) {
813			return c*(7.5625*t*t) + b;
814		} else if (t < (2/2.75)) {
815			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
816		} else if (t < (2.5/2.75)) {
817			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
818		} else {
819			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
820		}
821	},
822	easeInOutBounce: function (x, t, b, c, d) {
823		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
824		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
825	}
826});
827
828})( jQuery );
829
830
831
832/*utility functions*/
833
834
835(function($)
836{
837	"use strict";
838
839	$.avia_utilities = $.avia_utilities || {};
840
841	/************************************************************************
842	gloabl loading function
843	*************************************************************************/
844	$.avia_utilities.loading = function(attach_to, delay){
845
846		var loader = {
847
848			active: false,
849
850			show: function()
851			{
852				if(loader.active === false)
853				{
854					loader.active = true;
855					loader.loading_item.css({display:'block', opacity:0}
855);
856				}
857
858				loader.loading_item.stop().animate({opacity:1});
859			},
860
861			hide: function()
862			{	
863				if(typeof delay === 'undefined'){ delay = 600; }
864
865				loader.loading_item.stop().delay( delay ).animate({opacity:0}, function()
866				{
867					loader.loading_item.css({display:'none'});
868					loader.active = false;
869				});
870			},
871
872			attach: function()
873			{
874				if(typeof attach_to === 'undefined'){ attach_to = 'body';}
875
876				loader.loading_item = $('<div class="avia_loading_icon"><div class="av-siteloader"></div></div>').css({display:"none"}).appendTo(attach_to);
877			}
878		}
879
880		loader.attach();
881		return loader;
882	};
883	
884	/************************************************************************
885	gloabl play/pause visualizer function
886	*************************************************************************/
887	$.avia_utilities.playpause = function(attach_to, delay){
888
889		var pp = {
890
891			active: false,
892			to1: "", 
893			to2: "", 
894			set: function(status)
895			{	
896				pp.loading_item.removeClass('av-play av-pause');
897				pp.to1 = setTimeout(function(){ pp.loading_item.addClass('av-' + status); },10);
898				pp.to2 = setTimeout(function(){ pp.loading_item.removeClass('av-' + status); },1500);
899			},
900
901			attach: function()
902			{
903				if(typeof attach_to === 'undefined'){ attach_to = 'body';}
904
905				pp.loading_item = $('<div class="avia_playpause_icon"></div>').css({display:"none"}).appendTo(attach_to);
906			}
907		}
908
909		pp.attach();
910		return pp;
911	};
912	
913	
914
915	/************************************************************************
916	preload images, as soon as all are loaded trigger a special load ready event
917	*************************************************************************/
918	$.avia_utilities.preload = function(options_passed)
919	{
920		new $.AviaPreloader(options_passed);
921	}
922	
923	$.AviaPreloader  =  function(options)
924	{
925	    this.win 		= $(window);
926	    this.defaults	=
927		{
928			container:			'body',
929			maxLoops:			10,
930			trigger_single:		true,
931			single_callback:	function(){},
932			global_callback:	function(){}
933
934		};
935		this.options 	= $.extend({}, this.defaults, options);
936		this.preload_images = 0;
937		
938		this.load_images();
939	}
940	
941	$.AviaPreloader.prototype  = 
942	{
943		load_images: function()
944		{	
945			var _self = this;
946			
947			if(typeof _self.options.container === 'string'){ _self.options.container = $(_self.options.container); }
948
949			_self.options.container.each(function()
950			{
951				var container		= $(this);
952	
953				container.images	= container.find('img');
954				container.allImages	= container.images;
955	
956				_self.preload_images += container.images.length;
957				setTimeout(function(){ _self.checkImage(container); }, 10);
958			});	
959		},
960		
961		checkImage: function(container)
962		{	
963			var _self = this;
964			
965			container.images.each(function()
966			{
967				if(this.complete === true)
968				{
969					container.images = container.images.not(this);
970					_self.preload_images -= 1;
971				}
972			});
973
974			if(container.images.length && _self.options.maxLoops >= 0)
975			{
976				_self.options.maxLoops-=1;
977				setTimeout(function(){ _self.checkImage(container); }, 500);
978			}
979			else
980			{
981				_self.preload_images = _self.preload_images - container.images.length;
982				_self.trigger_loaded(container);
983			}
984		},
985
986		trigger_loaded: function(container)
987		{
988			var _self = this;
989			
990			if(_self.options.trigger_single !== false)
991			{
992				_self.win.trigger('avia_images_loaded_single', [container]);
993				_self.options.single_callback.call(container);
994			}
995
996			if(_self.preload_images === 0)
997			{
998				_self.win.trigger('avia_images_loaded');
999				_self.options.global_callback.call();
1000			}
1001
1002		}
1003	}
1004
1005	/************************************************************************
1006	CSS Easing transformation table
1007	*************************************************************************/
1008	/*
1009	Easing transform table from jquery.animate-enhanced plugin
1010	http://github.com/benbarnett/jQuery-Animate-Enhanced
1011	*/
1012	$.avia_utilities.css_easings = {
1013			linear:			'linear',
1014			swing:			'ease-in-out',
1015			bounce:			'cubic-bezier(0.0, 0.35, .5, 1.3)',
1016			easeInQuad:     'cubic-bezier(0.550, 0.085, 0.680, 0.530)' ,
1017			easeInCubic:    'cubic-bezier(0.550, 0.055, 0.675, 0.190)' ,
1018			easeInQuart:    'cubic-bezier(0.895, 0.030, 0.685, 0.220)' ,
1019			easeInQuint:    'cubic-bezier(0.755, 0.050, 0.855, 0.060)' ,
1020			easeInSine:     'cubic-bezier(0.470, 0.000, 0.745, 0.715)' ,
1021			easeInExpo:     'cubic-bezier(0.950, 0.050, 0.795, 0.035)' ,
1022			easeInCirc:     'cubic-bezier(0.600, 0.040, 0.980, 0.335)' ,
1023			easeInBack:     'cubic-bezier(0.600, -0.280, 0.735, 0.04)' ,
1024			easeOutQuad:    'cubic-bezier(0.250, 0.460, 0.450, 0.940)' ,
1025			easeOutCubic:   'cubic-bezier(0.215, 0.610, 0.355, 1.000)' ,
1026			easeOutQuart:   'cubic-bezier(0.165, 0.840, 0.440, 1.000)' ,
1027			easeOutQuint:   'cubic-bezier(0.230, 1.000, 0.320, 1.000)' ,
1028			easeOutSine:    'cubic-bezier(0.390, 0.575, 0.565, 1.000)' ,
1029			easeOutExpo:    'cubic-bezier(0.190, 1.000, 0.220, 1.000)' ,
1030			easeOutCirc:    'cubic-bezier(0.075, 0.820, 0.165, 1.000)' ,
1031			easeOutBack:    'cubic-bezier(0.175, 0.885, 0.320, 1.275)' ,
1032			easeInOutQuad:  'cubic-bezier(0.455, 0.030, 0.515, 0.955)' ,
1033			easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)' ,
1034			easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)' ,
1035			easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)' ,
1036			easeInOutSine:  'cubic-bezier(0.445, 0.050, 0.550, 0.950)' ,
1037			easeInOutExpo:  'cubic-bezier(1.000, 0.000, 0.000, 1.000)' ,
1038			easeInOutCirc:  'cubic-bezier(0.785, 0.135, 0.150, 0.860)' ,
1039			easeInOutBack:  'cubic-bezier(0.680, -0.550, 0.265, 1.55)' ,
1040			easeInOutBounce:'cubic-bezier(0.580, -0.365, 0.490, 1.365)',
1041			easeOutBounce:	'cubic-bezier(0.760, 0.085, 0.490, 1.365)' 
1042		};
1043
1044	/************************************************************************
1045	check if a css feature is supported and save it to the supported array
1046	*************************************************************************/
1047	$.avia_utilities.supported	= {};
1048	$.avia_utilities.supports	= (function()
1049	{
1050		var div		= document.createElement('div'),
1051			vendors	= ['Khtml', 'Ms','Moz','Webkit'];  // vendors	= ['Khtml', 'Ms','Moz','Webkit','O']; 
1052
1053		return function(prop, vendor_overwrite)
1054		{
1055			if ( div.style[prop] !== undefined  ) { return ""; }
1056			if (vendor_overwrite !== undefined) { vendors = vendor_overwrite; }
1057
1058			prop = prop.replace(/^[a-z]/, function(val)
1059			{
1060				return val.toUpperCase();
1061			});
1062
1063			var len	= vendors.length;
1064			while(len--)
1065			{
1066				if ( div.style[vendors[len] + prop] !== undefined )
1067				{
1068					return "-" + vendors[len].toLowerCase() + "-";
1069				}
1070			}
1071
1072			return false;
1073		};
1074
1075	}());
1076
1077	/************************************************************************
1078	animation function
1079	*************************************************************************/
1080	$.fn.avia_animate = function(prop, speed, easing, callback)
1081	{
1082		if(typeof speed === 'function') {callback = speed; speed = false; }
1083		if(typeof easing === 'function'){callback = easing; easing = false;}
1084		if(typeof speed === 'string'){easing = speed; speed = false;}
1085
1086		if(callback === undefined || callback === false){ callback = function(){}; }
1087		if(easing === undefined || easing === false)	{ easing = 'easeInQuad'; }
1088		if(speed === undefined || speed === false)		{ speed = 400; }
1089
1090		if($.avia_utilities.supported.transition === undefined)
1091		{
1092			$.avia_utilities.supported.transition = $.avia_utilities.supports('transition');
1093		}
1094		
1095		
1096
1097		if($.avia_utilities.supported.transition !== false )
1098		{
1099			var prefix		= $.avia_utilities.supported.transition + 'transition',
1100				cssRule		= {},
1101				cssProp		= {},
1102				thisStyle	= document.body.style,
1103				end			= (thisStyle.WebkitTransition !== undefined) ? 'webkitTransitionEnd' : (thisStyle.OTransition !== undefined) ? 'oTransitionEnd' : 'transitionend';
1104
1105			//translate easing into css easing
1106			easing = $.avia_utilities.css_easings[easing];
1107
1108			//create css transformation rule
1109			cssRule[prefix]	=  'all '+(speed/1000)+'s '+easing;
1110			//add namespace to the transition end trigger
1111			end = end + ".avia_animate";
1112			
1113			//since jquery 1.10 the items passed need to be {} and not [] so make sure they are converted properly
1114			for (var rule in prop)
1115			{
1116				if (prop.hasOwnProperty(rule)) { cssProp[rule] = prop[rule]; }
1117			}
1118			prop = cssProp;
1119			
1120			
1121			
1122			this.each(function()
1123			{
1124				var element	= $(this), css_difference = false, rule, current_css;
1125
1126				for (rule in prop)
1127				{
1128					if (prop.hasOwnProperty(rule))
1129					{
1130						current_css = element.css(rule);
1131
1132						if(prop[rule] != current_css && prop[rule] != current_css.replace(/px|%/g,""))
1133						{
1134							css_difference = true;
1135							break;
1136						}
1137					}
1138				}
1139				
1140				if(css_difference)
1141				{
1142					//if no transform property is set set a 3d translate to enable hardware acceleration
1143					if(!($.avia_utilities.supported.transition+"transform" in prop))
1144					{
1145						prop[$.avia_utilities.supported.transition+"transform"] = "translateZ(0)";
1146					}
1147					
1148					var endTriggered = false;
1149					
1150					element.on(end,  function(event)
1151					{
1152						if(event.target != event.currentTarget) return false;
1153						
1154						if(endTriggered == true) return false;
1155						endTriggered = true;
1156
1157						cssRule[prefix] = "none";
1158
1159						element.off(end);
1160						element.css(cssRule);
1161						setTimeout(function(){ callback.call(element); });
1162					});
1163					
1164					
1165					//desktop safari fallback if we are in another tab to trigger the end event
1166					setTimeout(function(){ 
1167						if(!endTriggered && !avia_is_mobile && $('html').is('.avia-safari') ) { 
1168							element.trigger(end); 
1169							$.avia_utilities.log('Safari Fallback '+end+' trigger'); 
1170						}
1171					}, speed + 100);
1172					
1173					setTimeout(function(){ element.css(cssRule);},10);
1174					setTimeout(function(){ element.css(prop);	},20);
1175				}
1176				else
1177				{
1178					setTimeout(function(){ callback.call(element); });
1179				}
1180
1181			});
1182		}
1183		else // if css animation is not available use default JS animation
1184		{
1185			this.animate(prop, speed, easing, callback);
1186		}
1187
1188		return this;
1189	};
1190
1191})( jQuery );
1192
1193
1194
1195// -------------------------------------------------------------------------------------------
1196// keyboard controls
1197// -------------------------------------------------------------------------------------------
1198
1199(function($)
1200{
1201	"use strict";
1202
1203	/************************************************************************
1204	keyboard arrow nav
1205	*************************************************************************/
1206	$.fn.avia_keyboard_controls = function(options_passed)
1207	{
1208		var defaults	=
1209		{
1210			37: '.prev-slide',	// prev
1211			39: '.next-slide'	// next
1212		},
1213
1214		methods		= {
1215
1216			mousebind: function(slider)
1217			{
1218				slider.hover(
1219					function(){  slider.mouseover	= true;  },
1220					function(){  slider.mouseover	= false; }
1221				);
1222			},
1223
1224			keybind: function(slider)
1225			{
1226				$(document).keydown(function(e)
1227				{
1228					if(slider.mouseover && typeof slider.options[e.keyCode] !== 'undefined')
1229					{
1230						var item;
1231
1232						if(typeof slider.options[e.keyCode] === 'string')
1233						{
1234							item = slider.find(slider.options[e.keyCode]);
1235						}
1236						else
1237						{
1238							item = slider.options[e.keyCode];
1239						}
1240
1241						if(item.length)
1242						{
1243							item.trigger('click', ['keypress']);
1244							return false;
1245						}
1246					}
1247				});
1248			}
1249		};
1250
1251
1252		return this.each(function()
1253		{
1254			var slider			= $(this);
1255			slider.options		= $.extend({}, defaults, options_passed);
1256			slider.mouseover	= false;
1257
1258			methods.mousebind(slider);
1259			methods.keybind(slider);
1260
1261		});
1262	};
1263
1264
1265	/************************************************************************
1266	swipe nav
1267	*************************************************************************/
1268	$.fn.avia_swipe_trigger = function(passed_options)
1269	{
1270		var win		= $(window),
1271		isMobile	= $.avia_utilities.isMobile,
1272		defaults	=
1273		{
1274			prev: '.prev-slide',
1275			next: '.next-slide',
1276			event: {
1277				prev: 'click',
1278				next: 'click'
1279			}
1280		},
1281
1282		methods = {
1283
1284			activate_touch_control: function(slider)
1285			{
1286				var i, differenceX, differenceY;
1287
1288				slider.touchPos = {};
1289				slider.hasMoved = false;
1290
1291				slider.on('touchstart', function(event)
1292				{
1293					slider.touchPos.X = event.originalEvent.touches[0].clientX;
1294					slider.touchPos.Y = event.originalEvent.touches[0].clientY;
1295				});
1296
1297				slider.on('touchend', function(event)
1298				{
1299					slider.touchPos = {};
1300	                if(slider.hasMoved) { event.preventDefault(); }
1301	                slider.hasMoved = false;
1302				});
1303
1304				slider.on('touchmove', function(event)
1305				{
1306					if(!slider.touchPos.X)
1307					{
1308						slider.touchPos.X = event.originalEvent.touches[0].clientX;
1309						slider.touchPos.Y = event.originalEvent.touches[0].clientY;
1310					}
1311					else
1312					{
1313						differenceX = event.originalEvent.touches[0].clientX - slider.touchPos.X;
1314						differenceY = event.originalEvent.touches[0].clientY - slider.touchPos.Y;
1315
1316						//check if user is scrolling the window or moving the slider
1317						if(Math.abs(differenceX) > Math.abs(differenceY))
1318						{
1319							event.preventDefault();
1320
1321							if(slider.touchPos !== event.originalEvent.touches[0].clientX)
1322							{
1323								if(Math.abs(differenceX) > 50)
1324								{
1325									i = differenceX > 0 ? 'prev' : 'next';
1326
1327									if(typeof slider.options[i] === 'string')
1328									{
1329										slider.find(slider.options[i]).trigger(slider.options.event[i], ['swipe']);
1330									}
1331									else
1332									{
1333										slider.options[i].trigger(slider.options.event[i], ['swipe']);
1334									}
1335
1336									slider.hasMoved = true;
1337									slider.touchPos = {};
1338									return false;
1339								}
1340							}
1341						}
1342	                }
1343				});
1344			}
1345		};
1346
1347		return this.each(function()
1348		{
1349			if(isMobile)
1350			{
1351				var slider	= $(this);
1352
1353				slider.options	= $.extend({}, defaults, passed_options);
1354
1355				methods.activate_touch_control(slider);
1356			}
1357		});
1358	};
1359
1360}(jQuery));
1361
1362
1363
1364

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.