PageSourceSearch

https://sierragordaecotours.com/wp-content/cache/autoptimize/js/au…dd24c4d388c52ae68ea34290995c6.js?ver=5.6.10

js sierragordaecotours.com collected 2026-10-05 02:22:31 UTC 12,236 bytes, 147 lines download raw bytes

1(function($)
2{"use strict";$.AviaVideoAPI=function(options,video,option_container)
3{this.videoElement=video;this.$video=$(video);this.$option_container=option_container?$(option_container):this.$video;this.load_btn=this.$option_container.find('.av-click-to-play-overlay');this.video_wrapper=this.$video.parents('ul').eq(0);this.lazy_load=this.video_wrapper.hasClass('av-show-video-on-click')?true:false;this.isMobile=$.avia_utilities.isMobile;this.fallback=this.isMobile?this.$option_container.is('.av-mobile-fallback-image'):false;if(this.fallback)
4{return;}
5this._init(options);};$.AviaVideoAPI.defaults={loop:false,mute:false,controls:false,events:'play pause mute unmute loop toggle reset unload'};$.AviaVideoAPI.apiFiles={youtube:{loaded:false,src:'https://www.youtube.com/iframe_api'}};$.AviaVideoAPI.players={};$.AviaVideoAPI.prototype={_init:function(options)
6{this.options=this._setOptions(options);this.type=this._getPlayerType();this.player=false;this._bind_player();this.eventsBound=false;this.playing=false;this.$option_container.addClass('av-video-paused');this.pp=$.avia_utilities.playpause(this.$option_container);},_setOptions:function(options)
7{var newOptions=$.extend(true,{},$.AviaVideoAPI.defaults,options),htmlData=this.$option_container.data(),i="";for(i in htmlData)
8{if(htmlData.hasOwnProperty(i)&&(typeof htmlData[i]==="string"||typeof htmlData[i]==="number"||typeof htmlData[i]==="boolean"))
9{newOptions[i]=htmlData[i];}}
10return newOptions;},_getPlayerType:function()
11{var vid_src=this.$video.get(0).src||this.$video.data('src');if(this.$video.is('video'))
12{return'html5';}
13if(this.$video.is('.av_youtube_frame'))
14{return'youtube';}
15if(vid_src.indexOf('vimeo.com')!=-1)
16{return'vimeo';}
17if(vid_src.indexOf('youtube.com')!=-1)
18{return'youtube';}},_bind_player:function()
19{var _self=this;var cookie_check=$('html').hasClass('av-cookies-needs-opt-in')||$('html').hasClass('av-cookies-can-opt-out');var allow_continue=true;var silent_accept_cookie=$('html').hasClass('av-cookies-user-silent-accept');var self_hosted='html5'==this.type;if(cookie_check&&!silent_accept_cookie&&!self_hosted)
20{if(!document.cookie.match(/aviaCookieConsent/)||$('html').hasClass('av-cookies-session-refused'))
21{allow_continue=false;}
22else
23{if(!document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/))
24{allow_continue=false;}
25else if(!document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/))
26{allow_continue=false;}
27else if(document.cookie.match(/aviaPrivacyVideoEmbedsDisabled/))
28{allow_continue=false;}}}
29if(!allow_continue)
30{this._use_external_link();return;}
31if(this.lazy_load&&this.load_btn.length&&this.type!="html5")
32{this.$option_container.addClass('av-video-lazyload');this.load_btn.on('click',function()
33{_self.load_btn.remove();_self._setPlayer();});}
34else
35{this.lazy_load=false;this._setPlayer();}},_use_external_link:function()
36{this.$option_container.addClass('av-video-lazyload');this.load_btn.on('click',function(e)
37{if(e.originalEvent===undefined)return;var src_url=$(this).parents('.avia-slide-wrap').find('div[data-original_url]').data('original_url');if(src_url)window.open(src_url,'_blank');});},_setPlayer:function()
38{var _self=this;switch(this.type)
39{case"html5":this.player=this.$video.data('mediaelementplayer');if(!this.player)
40{this.$video.data('mediaelementplayer',$.AviaVideoAPI.players[this.$video.attr('id').replace(/_html5/,'')]);this.player=this.$video.data('mediaelementplayer');}
41this._playerReady();break;case"vimeo":var ifrm=document.createElement("iframe");var $ifrm=$(ifrm);ifrm.onload=function()
42{_self.player=Froogaloop(ifrm);_self._playerReady();_self.$option_container.trigger('av-video-loaded');};ifrm.setAttribute("src",this.$video.data('src'));$ifrm.insertAfter(this.$video);this.$video.remove();this.$video=ifrm;break;case"youtube":this._getAPI(this.type);$('body').on('av-youtube-iframe-api-loaded',function(){_self._playerReady();});break;}},_getAPI:function(api)
43{if($.AviaVideoAPI.apiFiles[api].loaded===false)
44{$.AviaVideoAPI.apiFiles[api].loaded=true;var tag=document.createElement('script'),first=document.getElementsByTagName('script')[0];tag.src=$.AviaVideoAPI.apiFiles[api].src;first.parentNode.insertBefore(tag,first);}},_playerReady:function()
45{var _self=this;this.$option_container.on('av-video-loaded',function(){_self._bindEvents();});switch(this.type)
46{case"html5":this.$video.on('av-mediajs-loaded',function(){_self.$option_container.trigger('av-video-loaded');});this.$video.on('av-mediajs-ended',function(){_self.$option_container.trigger('av-video-ended');});break;case"vimeo":_self.player.addEvent('ready',function()
47{_self.$option_container.trigger('av-video-loaded');_self.player.addEvent('finish',function(){_self.$option_container.trigger('av-video-ended');});});break;case"youtube":var params=_self.$video.data();if(_self._supports_video())
48{params.html5=1;}
49_self.player=new YT.Player(_self.$video.attr('id'),{videoId:params.videoid,height:_self.$video.attr('height'),width:_self.$video.attr('width'),playerVars:params,events:{'onReady':function(){_self.$option_container.trigger('av-video-loaded');},'onError':function(player){$.avia_utilities.log('YOUTUBE ERROR:','error',player);},'onStateChange':function(event){if(event.data===YT.PlayerState.ENDED)
50{var command=_self.options.loop!=false?'loop':'av-video-ended';_self.$option_container.trigger(command);}}}});break;}
51setTimeout(function()
52{if(_self.eventsBound==true||typeof _self.eventsBound=='undefined'||_self.type=='youtube')
53{return;}
54$.avia_utilities.log('Fallback Video Trigger "'+_self.type+'":','log',_self);_self.$option_container.trigger('av-video-loaded');},2000);},_bindEvents:function()
55{if(this.eventsBound==true||typeof this.eventsBound=='undefined')
56{return;}
57var _self=this,volume='unmute';this.eventsBound=true;this.$option_container.on(this.options.events,function(e)
58{_self.api(e.type);});if(!_self.isMobile)
59{if(this.options.mute!=false)
60{volume="mute";}
61if(this.options.loop!=false)
62{_self.api('loop');}
63_self.api(volume);}
64setTimeout(function()
65{_self.$option_container.trigger('av-video-events-bound').addClass('av-video-events-bound');},50);},_supports_video:function()
66{return!!document.createElement('video').canPlayType;},api:function(action)
67{if(this.isMobile&&!this.was_started())return;if(this.options.events.indexOf(action)===-1)return;this.$option_container.trigger('av-video-'+action+'-executed');if(typeof this['_'+this.type+'_'+action]=='function')
68{this['_'+this.type+'_'+action].call(this);}
69if(typeof this['_'+action]=='function')
70{this['_'+action].call(this);}},was_started:function()
71{if(!this.player)return false;switch(this.type)
72{case"html5":if(this.player.getCurrentTime()>0)
73{return true;}
74break;case"vimeo":if(this.player.api('getCurrentTime')>0)
75{return true;}
76break;case"youtube":if(this.player.getPlayerState()!==-1)
77{return true;}
78break;}
79return false;},_play:function()
80{this.playing=true;this.$option_container.addClass('av-video-playing').removeClass('av-video-paused');},_pause:function()
81{this.playing=false;this.$option_container.removeClass('av-video-playing').addClass('av-video-paused');},_loop:function()
82{this.options.loop=true;},_toggle:function()
83{var command=this.playing==true?'pause':'play';this.api(command);this.pp.set(command);},_vimeo_play:function()
84{this.player.api('play');},_vimeo_pause:function()
85{this.player.api('pause');},_vimeo_mute:function()
86{this.player.api('setVolume',0);},_vimeo_unmute:function()
87{this.player.api('setVolume',0.7);},_vimeo_loop:function()
88{},_vimeo_reset:function()
89{this.player.api('seekTo',0);},_vimeo_unload:function()
90{this.player.api('unload');},_youtube_play:function()
91{this.player.playVideo();},_youtube_pause:function()
92{this.player.pauseVideo();},_youtube_mute:function()
93{this.player.mute();},_youtube_unmute:function()
94{this.player.unMute();},_youtube_loop:function()
95{if(this.playing==true)this.player.seekTo(0);},_youtube_reset:function()
96{this.player.stopVideo();},_youtube_unload:function()
97{this.player.clearVideo();},_html5_play:function()
98{if(this.player)
99{this.player.options.pauseOtherPlayers=false;this.player.play();}},_html5_pause:function()
100{if(this.player)this.player.pause();},_html5_mute:function()
101{if(this.player)this.player.setMuted(true);},_html5_unmute:function()
102{if(this.player)this.player.setVolume(0.7);},_html5_loop:function()
103{if(this.player)this.player.options.loop=true;},_html5_reset:function()
104{if(this.player)this.player.setCurrentTime(0);},_html5_unload:function()
105{this._html5_pause();this._html5_reset();}};$.fn.aviaVideoApi=function(options,apply_to_parent)
106{return this.each(function()
107{var applyTo=this;if(apply_to_parent)
108{applyTo=$(this).parents(apply_to_parent).get(0);}
109var self=$.data(applyTo,'aviaVideoApi');if(!self)
110{self=$.data(applyTo,'aviaVideoApi',new $.AviaVideoAPI(options,this,applyTo));}});};})(jQuery);window.onYouTubeIframeAPIReady=function(){jQuery('body').trigger('av-youtube-iframe-api-loaded');};var Froogaloop=(function(){function Froogaloop(iframe){return new Froogaloop.fn.init(iframe);}
111var eventCallbacks={},hasWindowEvent=false,isReady=false,slice=Array.prototype.slice,playerOrigin='*';Froogaloop.fn=Froogaloop.prototype={element:null,init:function(iframe){if(typeof iframe==="string"){iframe=document.getElementById(iframe);}
112this.element=iframe;return this;},api:function(method,valueOrCallback){if(!this.element||!method){return false;}
113var self=this,element=self.element,target_id=element.id!==''?element.id:null,params=!isFunction(valueOrCallback)?valueOrCallback:null,callback=isFunction(valueOrCallback)?valueOrCallback:null;if(callback){storeCallback(method,callback,target_id);}
114postMessage(method,params,element);return self;},addEvent:function(eventName,callback){if(!this.element){return false;}
115var self=this,element=self.element,target_id=element.id!==''?element.id:null;storeCallback(eventName,callback,target_id);if(eventName!='ready'){postMessage('addEventListener',eventName,element);}
116else if(eventName=='ready'&&isReady){callback.call(null,target_id);}
117return self;},removeEvent:function(eventName){if(!this.element){return false;}
118var self=this,element=self.element,target_id=element.id!==''?element.id:null,removed=removeCallback(eventName,target_id);if(eventName!='ready'&&removed){postMessage('removeEventListener',eventName,element);}}};function postMessage(method,params,target){if(!target.contentWindow.postMessage){return false;}
119var data=JSON.stringify({method:method,value:params});target.contentWindow.postMessage(data,playerOrigin);}
120function onMessageReceived(event)
121{var data,method;try{data=JSON.parse(event.data);method=data.event||data.method;}
122catch(e){}
123if(method=='ready'&&!isReady){isReady=true;}
124if(!(/^https?:\/\/player.vimeo.com/).test(event.origin)){return false;}
125if(playerOrigin==='*'){playerOrigin=event.origin;}
126var value=data.value,eventData=data.data,target_id=target_id===''?null:data.player_id,callback=getCallback(method,target_id),params=[];if(!callback){return false;}
127if(value!==undefined){params.push(value);}
128if(eventData){params.push(eventData);}
129if(target_id){params.push(target_id);}
130return params.length>0?callback.apply(null,params):callback.call();}
131function storeCallback(eventName,callback,target_id){if(target_id){if(!eventCallbacks[target_id]){eventCallbacks[target_id]={};}
132eventCallbacks[target_id][eventName]=callback;}
133else{eventCallbacks[eventName]=callback;}}
134function getCallback(eventName,target_id){if(target_id&&eventCallbacks[target_id]&&eventCallbacks[target_id][eventName])
135{return eventCallbacks[target_id][eventName];}
136else
137{return eventCallbacks[eventName];}}
138function removeCallback(eventName,target_id){if(target_id&&eventCallbacks[target_id]){if(!eventCallbacks[target_id][eventName]){return false;}
139eventCallbacks[target_id][eventName]=null;}
140else{if(!eventCallbacks[eventName]){return false;}
141eventCallbacks[eventName]=null;}
142return true;}
143function isFunction(obj){return!!(obj&&obj.constructor&&obj.call&&obj.apply);}
144function isArray(obj){return toString.call(obj)==='[object Array]';}
145Froogaloop.fn.init.prototype=Froogaloop.fn;if(window.addEventListener){window.addEventListener('message',onMessageReceived,false);}
146else{window.attachEvent('onmessage',onMessageReceived);}
147return(window.Froogaloop=window.$f=Froogaloop);})();

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.