1 2var wpAjaxUrl='https://flagstaffranchrealestate.com/wp-admin/admin-ajax.php';var blvdBuilderUrl='https://flagstaffranchrealestate.com/wp-content/plugins/hji-blvd-framework/third-party/page-builder/';var BlvdBuilderLayoutConfig={anchorLinkAnimations:{duration:1000,easing:'swing',offset:100},paths:{pluginUrl:'https://flagstaffranchrealestate.com/wp-content/plugins/hji-blvd-framework/third-party/page-builder/',wpAjaxUrl:'https://flagstaffranchrealestate.com/wp-admin/admin-ajax.php'},breakpoints:{small:768,medium:992},waypoint:{offset:80}};(function($) 3{if(typeof BlvdBuilderLayout!='undefined') 4{return;} 5BlvdBuilderLayout={init:function() 6{BlvdBuilderLayout._destroy();BlvdBuilderLayout._initClasses();BlvdBuilderLayout._initBackgrounds();BlvdBuilderLayout._initModuleAnimations();BlvdBuilderLayout._reloadBxSlider();if(0===$('.blvd-builder-edit').length) 7{BlvdBuilderLayout._initAnchorLinks();BlvdBuilderLayout._initHash();BlvdBuilderLayout._initForms();}},refreshGalleries:function(element) 8{var $element='undefined'==typeof element?$('body'):$(element),mfContent=$element.find('.blvd-mosaicflow-content'),wmContent=$element.find('.blvd-gallery'),mfObject=null;if(mfContent) 9{mfObject=mfContent.data('mosaicflow');if(mfObject) 10{mfObject.columns=$([]);mfObject.columnsHeights=[];mfContent.data('mosaicflow',mfObject);mfContent.mosaicflow('refill');}} 11if(wmContent) 12{wmContent.trigger('refreshWookmark');}},refreshGridLayout:function(element) 13{var $element='undefined'==typeof element?$('body'):$(element),msnryContent=$element.find('.masonry');if(msnryContent.length) 14{msnryContent.masonry('layout');}},reloadSlider:function(element) 15{var $element='undefined'==typeof element?$('body'):$(element),bxContent=$element.find('.bx-viewport > div').eq(0),bxObject=null;if(bxContent.length) 16{bxObject=bxContent.data('bxSlider');if(bxObject) 17{bxObject.reloadSlider();}}},resizeAudio:function(element) 18{var $element='undefined'==typeof element?$('body'):$(element),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio'),player=null,mejsPlayer=null,rail=null,railWidth=400;if(audioPlayers.length&&typeof mejs!=='undefined') 19{audioPlayers.each(function() 20{player=$(this);mejsPlayer=mejs.players[player.attr('id')];rail=player.find('.mejs-controls .mejs-time-rail');var innerMejs=player.find('.mejs-inner'),total=player.find('.mejs-controls .mejs-time-total');if(typeof mejsPlayer!=='undefined') 21{railWidth=Math.ceil(player.width()*0.8);if(innerMejs.length) 22{rail.css('width',railWidth+'px!important');mejsPlayer.options.autosizeProgress=true;setTimeout(function() 23{mejsPlayer.setControlsSize();},50);player.find('.mejs-inner').css({visibility:'visible',height:'inherit'});}}});}},preloadAudio:function(element) 24{var $element='undefined'==typeof element?$('body'):$(element),contentWrap=$element.closest('.blvd-accordion-item'),audioPlayers=$element.find('.wp-audio-shortcode.mejs-audio');if(!contentWrap.hasClass('blvd-accordion-item-active')&&audioPlayers.find('.mejs-inner').length) 25{audioPlayers.find('.mejs-inner').css({visibility:'hidden',height:0});}},_reloadBxSlider(){var sliders=$('[data-init="slider"]');hji.require(['hji-common/bxslider'],function(bx){sliders.each(function(){var bxSlider=bx();bxSlider.start(this);});});},_destroy:function() 26{var win=$(window);win.off('scroll.blvd-bg-parallax');win.off('resize.blvd-bg-video');},_isTouch:function() 27{if(('ontouchstart'in window)||(window.DocumentTouch&&document instanceof DocumentTouch)) 28{return true;} 29return false;},_isMobile:function() 30{return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent);},_initClasses:function() 31{var body=$('body'),ua=navigator.userAgent;if(!body.hasClass('archive')&&$('.blvd-builder-content-primary').length>0) 32{body.addClass('hj-builder');} 33if(BlvdBuilderLayout._isTouch()) 34{body.addClass('blvd-builder-touch');} 35if(BlvdBuilderLayout._isMobile()) 36{body.addClass('blvd-builder-mobile');} 37if(ua.indexOf('Trident/7.0')>-1&&ua.indexOf('rv:11.0')>-1) 38{body.addClass('blvd-builder-ie-11');}}
38,_initBackgrounds:function() 39{var win=$(window);if($('.blvd-row-bg-parallax').length>0&&!BlvdBuilderLayout._isMobile()) 40{BlvdBuilderLayout._scrollParallaxBackgrounds();BlvdBuilderLayout._initParallaxBackgrounds();win.on('scroll.blvd-bg-parallax',BlvdBuilderLayout._scrollParallaxBackgrounds);} 41if($('.blvd-bg-video').length>0) 42{BlvdBuilderLayout._initBgVideos();BlvdBuilderLayout._resizeBgVideos();win.on('resize.blvd-bg-video',BlvdBuilderLayout._resizeBgVideos);}},_initParallaxBackgrounds:function() 43{$('.blvd-row-bg-parallax').each(BlvdBuilderLayout._initParallaxBackground);},_initParallaxBackground:function() 44{var row=$(this),content=row.find('> .blvd-row-content-wrap'),src=row.data('parallax-image'),loaded=row.data('parallax-loaded'),img=new Image();if(loaded) 45{return;} 46else if(typeof src!='undefined') 47{$(img).on('load',function() 48{content.css('background-image','url('+src+')');row.data('parallax-loaded',true);});img.src=src;}},_scrollParallaxBackgrounds:function() 49{$('.blvd-row-bg-parallax').each(BlvdBuilderLayout._scrollParallaxBackground);},_scrollParallaxBackground:function() 50{var win=$(window),row=$(this),content=row.find('> .blvd-row-content-wrap'),speed=row.data('parallax-speed'),offset=content.offset(),yPos=-((win.scrollTop()-offset.top)/speed);content.css('background-position','center '+yPos+'px');},_initBgVideoControls:function(autoplay){var vid=document.querySelector('.blvd-bg-video video');if(!vid){return;} 51var pauseButton=document.querySelector(".hji-bgvideo-controls button");var pauseButtonI=pauseButton.querySelector("i");if(window.matchMedia('(prefers-reduced-motion)').matches){vid.removeAttribute("autoplay");vid.pause();pauseButtonI.classList.replace('fa-pause','fa-play');} 52function vidFade(){vid.classList.add("stopfade");} 53vid.addEventListener('ended',function() 54{vid.pause();vidFade();});pauseButton.addEventListener("click",function(){vid.classList.toggle("stopfade");if(vid.paused){vid.play();pauseButtonI.classList.replace('fa-play','fa-pause');}else{vid.pause();pauseButtonI.classList.replace('fa-pause','fa-play');}});},_initBgVideos:function() 55{$('.blvd-bg-video').each(BlvdBuilderLayout._initBgVideo);},_initBgVideo:function() 56{var wrap=$(this),width=wrap.data('width'),height=wrap.data('height'),mp4=wrap.data('mp4'),youtube=wrap.data('youtube'),vimeo=wrap.data('vimeo'),mp4Type=wrap.data('mp4-type'),webm=wrap.data('webm'),webmType=wrap.data('webm-type'),fallback=wrap.data('fallback'),loaded=wrap.data('loaded'),autoplay=wrap.data('autoplay'),fallbackTag='',videoTag=null,mp4Tag=null,webmTag=null;if(loaded) 57{return;} 58if(autoplay==='yes'){videoTag=$('<video autoplay loop muted playsinline></video>');}else{videoTag=$('<video loop muted playsinline></video>');} 59if('undefined'!=typeof fallback&&''!=fallback) 60{videoTag.attr('poster','data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');videoTag.css('background','transparent url("'+fallback+'") no-repeat center center');videoTag.css('background-size','cover');videoTag.css('height','100%');} 61if('undefined'!=typeof mp4&&''!=mp4) 62{mp4Tag=$('<source />');mp4Tag.attr('src',mp4);mp4Tag.attr('type',mp4Type);videoTag.append(mp4Tag);} 63if('undefined'!=typeof webm&&''!=webm) 64{webmTag=$('<source />');webmTag.attr('src',webm);webmTag.attr('type',webmType);videoTag.append(webmTag);} 65if('undefined'!=typeof youtube&&!BlvdBuilderLayout._isMobile()) 66{BlvdBuilderLayout._initYoutubeBgVideo.apply(this);} 67else if('undefined'!=typeof vimeo&&!BlvdBuilderLayout._isMobile()) 68{BlvdBuilderLayout._initVimeoBgVideo.apply(this);} 69else if(!BlvdBuilderLayout._isMobile()||(BlvdBuilderLayout._isMobile()&&fallback==='')) 70{wrap.append(videoTag);BlvdBuilderLayout._initBgVideoControls(autoplay);}else{document.querySelector('.hji-bgvideo-controls').style.display='none';wrap.css('background','transparent url("'+fallback+'") no-repeat center center');wrap.css('background-size','cover');wrap.css('height','100%');} 71wrap.data('loaded',true);},_initYoutubeBgVideo:function() 72{var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoPlayer=playerWrap.find('.blvd-bg-video-player'),fallback=playerWrap.data('fallback'),videoURL=playerWrap.data('youtube'),enableAudio=playerWrap.data('enable-audio'),startTime='undefined'!==typeof playerWrap.data('t')?playerWrap.data('t'):0,loop='undefined'!==typeof playerWrap.data('loop')?playerWrap.data('loop'):1,autoplay=playerWrap.data('autoplay'),player;if(autoplay==='yes'){autoplay=1;}else{autoplay=0;} 73if('undefined'!=typeof fallback&&''!=fallback) 74{playerWrap.css('background','transparent url("'+fallback+'") no-repeat center center');playerWrap.css('background-size','cover');playerWrap.css('height','100%');} 75if(videoId&&videoURL) 76{var pauseButton=document.querySelector(".hji-bgvideo-controls button");var pauseButtonI=pauseButton.querySelector("i");if(window.matchMedia('(prefers-reduced-motion)').matches){autoplay=0;pauseButtonI.classList.replace('fa-pause','fa-play');} 77BlvdBuilderLayout._onYoutubeApiReady(function(YT) 78{setTimeout(function() 79{player=new YT.Player(videoPlayer[0],{videoId:videoId,events:{onReady:function(event) 80{if("no"===enableAudio) 81{event.target.mute();} 82else if("yes"===enableAudio&&event.target.isMuted) 83{event.target.unMute();} 84playerWrap.data('YTPlayer',player);BlvdBuilderLayout._resizeYoutubeBgVideo.apply(playerWrap);if(autoplay===1){event.target.playVideo();}},onStateChange:function(event) 85{if(event.data===YT.PlayerState.ENDED&&1===loop) 86{player.seekTo(startTime);}}},playerVars:{autoplay:autoplay,wmode:'opaque',controls:0,showinfo:0,rel:0,start:startTime,loop:loop,playlist:1===loop?videoId:'',}});console.clear();console.log('player',player);pauseButton.addEventListener("click",function(){if(player.getPlayerState()===-1||player.getPlayerState()===2||player.getPlayerState()===5){player.playVideo();pauseButtonI.classList.replace('fa-play','fa-pause');}else if(player.getPlayerState()===1){player.pauseVideo();pauseButtonI.classList.replace('fa-pause','fa-play');}});},1);});}},_onYoutubeApiReady:function(callback) 87{if(window.YT&&YT.loaded) 88{callback(YT);}else 89{setTimeout(function() 90{BlvdBuilderLayout._onYoutubeApiReady(callback);},350);}},_initVimeoBgVideo:function() 91{var playerWrap=$(this),videoId=playerWrap.data('video-id'),videoPlayer=playerWrap.find('.blvd-bg-video-player'),fallback=playerWrap.data('fallback'),enableAudio=playerWrap.data('enable-audio'),vimeoURL=playerWrap.data('vimeo'),player,autoplay=playerWrap.data('autoplay'),width=playerWrap.outerWidth();if('undefined'!=typeof fallback&&''!=fallback) 92{playerWrap.css('background','transparent url("'+fallback+'") no-repeat center center');playerWrap.css('background-size','cover');playerWrap.css('height','100%');} 93if(typeof Vimeo!=='undefined'&&videoId&&vimeoURL) 94{var pauseButton=document.querySelector(".hji-bgvideo-controls button");var pauseButtonI=pauseButton.querySelector("i");player=new Vimeo.Player(videoPlayer[0],{id:videoId,loop:true,title:false,portrait:false,autoplay:autoplay,});if(!player){return;} 95playerWrap.data('VMPlayer',player);if("no"===enableAudio) 96{player.setVolume(0);} 97else if("yes"===enableAudio) 98{player.setVolume(1);} 99if(autoplay==='yes'){player.play();}
100pauseButton.addEventListener("click",function(){if(player){player.getPaused().then(function(paused){if(paused){player.play();pauseButtonI.classList.replace('fa-play','fa-pause');}else{player.pause();pauseButtonI.classList.replace('fa-pause','fa-play');}}).catch(function(error){console.log(error);});}});}},_videoBgSourceError:function(e) 101{var source=$(e.target),wrap=source.closest('.blvd-bg-video'),vid=wrap.find('video'),fallback=wrap.data('fallback'),fallbackTag='';source.remove();if(vid.find('source').length) 102{return;}else if(''!==fallback) 103{fallbackTag=$('<div></div>');fallbackTag.addClass('blvd-bg-video-fallback');fallbackTag.css('background-image','url('+fallback+')');wrap.append(fallbackTag);vid.remove();}},_resizeBgVideos:function() 104{$('.blvd-bg-video').each(function() 105{BlvdBuilderLayout._resizeBgVideo.apply(this);if($(this).parent().find('img').length>0) 106{$(this).parent().imagesLoaded($.proxy(BlvdBuilderLayout._resizeBgVideo,this));}});},_resizeBgVideo:function() 107{if(0===$(this).find('video').length&&0===$(this).find('iframe').length) 108{return;} 109var wrap=$(this),wrapHeight=wrap.outerHeight(),wrapWidth=wrap.outerWidth(),vid=wrap.find('video'),vidHeight=wrap.data('height'),vidWidth=wrap.data('width'),newWidth=wrapWidth,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newLeft=0,newTop=0,iframe=wrap.find('iframe');if(vid.length) 110{if(vidHeight===''||typeof vidHeight==='undefined'||vidWidth===''||typeof vidWidth==='undefined') 111{vid.css({'left':'0px','top':'0px','width':newWidth+'px'});vid.on('loadedmetadata',BlvdBuilderLayout._resizeOnLoadedMeta);} 112else 113{if(newHeight<wrapHeight) 114{newHeight=wrapHeight;newWidth=Math.round(vidWidth*wrapHeight/vidHeight);newLeft=-((newWidth-wrapWidth)/2);} 115else 116{newTop=-((newHeight-wrapHeight)/2);} 117vid.css({'left':newLeft+'px','top':newTop+'px','height':newHeight+'px','width':newWidth+'px'});}} 118else if(iframe.length) 119{if(typeof wrap.data('youtube')!=='undefined') 120{BlvdBuilderLayout._resizeYoutubeBgVideo.apply(this);}}},_resizeOnLoadedMeta:function() 121{var video=$(this),wrapHeight=video.parent().outerHeight(),wrapWidth=video.parent().outerWidth(),vidWidth=video[0].videoWidth,vidHeight=video[0].videoHeight,newHeight=Math.round(vidHeight*wrapWidth/vidWidth),newWidth=wrapWidth,newLeft=0,newTop=0;if(newHeight<wrapHeight) 122{newHeight=wrapHeight;newWidth=Math.round(vidWidth*wrapHeight/vidHeight);newLeft=-((newWidth-wrapWidth)/2);} 123else 124{newTop=-((newHeight-wrapHeight)/2);} 125video.parent().data('width',vidWidth);video.parent().data('height',vidHeight);video.css({'left':newLeft+'px','top':newTop+'px','width':newWidth+'px','height':newHeight+'px'});},_resizeYoutubeBgVideo:function() 126{var wrap=$(this),wrapWidth=wrap.outerWidth(),wrapHeight=wrap.outerHeight(),player=wrap.data('YTPlayer'),video=player?player.getIframe():null,aspectRatioSetting='16:9',aspectRatioArray=aspectRatioSetting.split(':'),aspectRatio=aspectRatioArray[0]/aspectRatioArray[1],ratioWidth=wrapWidth/aspectRatio,ratioHeight=wrapHeight*aspectRatio,isWidthFixed=wrapWidth/wrapHeight>aspectRatio,width=isWidthFixed?wrapWidth:ratioHeight,height=isWidthFixed?ratioWidth:wrapHeight;if(video) 127{$(video).width(width).height(height);}},_initModuleAnimations:function() 128{if(typeof jQuery.fn.waypoint!=='undefined'&&!BlvdBuilderLayout._isMobile()&&0===$('.blvd-builder-edit').length) 129{$('.blvd-yield').each(function() 130{var node=$(this),nodeTop=node.offset().top,winHeight=$(window).height(),bodyHeight=$('body').height(),offset='80%';if(bodyHeight-nodeTop<winHeight*0.2) 131{offset='100%';} 132node.waypoint({triggerOnce:true,offset:offset,handler:BlvdBuilderLayout._doModuleAnimation,animationName:BlvdBuilderLayout._getAnimationName(node)});});} 133else 134{$('.blvd-yield').each(function() 135{$(this).css('visibility','visible');});}},_getAnimationName:function(module) 136{if(module.css('animation-name')&&module.css('animation-name')!=='none') 137{var cacheAnimationName=module.css('animation-name');module.css({'animation-name':'none'});return cacheAnimationName;} 138else 139{return'';}},_doModuleAnimation:function() 140{var module='undefined'==typeof this.element?$(this):$(this.element),delay=parseFloat(module.data('animation-delay'))*1000;module.addClass('animated');module.css({'visibility':'visible','animation-name':this.options.animationName,'animation-delay':delay});setTimeout(function() 141{module.removeClass('animated');},delay);},_initHash:function() 142{var hash=window.location.hash.replace('#','').split('/').shift(),element=null,tabs=null,responsiveLabel=null,tabIndex=null,label=null;if(''!==hash) 143{try 144{element=$('#'+hash);if(element.length>0) 145{if(element.hasClass('blvd-accordion-item')) 146{setTimeout(function() 147{element.find('.blvd-accordion-button').trigger('click');},100);} 148if(element.hasClass('blvd-tabs-panel')) 149{setTimeout(function() 150{tabs=element.closest('.blvd-tabs');responsiveLabel=element.find('.blvd-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.blvd-tabs-labels .blvd-tabs-label[data-index='+tabIndex+']');if(responsiveLabel.is(':visible')) 151{responsiveLabel.trigger('click');} 152else 153{label[0].trigger('click');BlvdBuilderLayout._scrollToElement(element);}},100);}}} 154catch(e) 155{}}
155},_initAnchorLinks:function() 156{$('a').each(BlvdBuilderLayout._initAnchorLink);},_initAnchorLink:function() 157{var link=$(this),href=link.attr('href'),loc=window.location,id=null,element=null;if('undefined'!=typeof href&&href.indexOf('#')>-1&&link.closest('svg').length<1) 158{if(loc.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&loc.hostname==this.hostname) 159{try 160{id=href.split('#').pop();if(!id) 161{return;} 162element=$('#'+id);if(element.length>0) 163{if(link.hasClass('blvd-scroll-link')||element.hasClass('blvd-row')||element.hasClass('blvd-col')||element.hasClass('blvd-module')) 164{$(link).on('click',BlvdBuilderLayout._scrollToElementOnLinkClick);} 165if(element.hasClass('blvd-accordion-item')) 166{$(link).on('click',BlvdBuilderLayout._scrollToAccordionOnLinkClick);} 167if(element.hasClass('blvd-tabs-panel')) 168{$(link).on('click',BlvdBuilderLayout._scrollToTabOnLinkClick);}}} 169catch(e) 170{}}}},_scrollToElementOnLinkClick:function(e,callback) 171{var element=$('#'+$(this).attr('href').split('#').pop());BlvdBuilderLayout._scrollToElement(element,callback);e.preventDefault();},_scrollToElement:function(element,callback) 172{var config=BlvdBuilderLayoutConfig.anchorLinkAnimations,dest=0,win=$(window),doc=$(document);if(element.length>0) 173{if(element.offset().top>doc.height()-win.height()) 174{dest=doc.height()-win.height();} 175else 176{dest=element.offset().top-config.offset;} 177$('html, body').animate({scrollTop:dest},config.duration,config.easing,function() 178{if('undefined'!=typeof callback) 179{callback();} 180if(undefined!=element.attr('id')) 181{if(history.pushState) 182{history.pushState(null,null,'#'+element.attr('id'));} 183else 184{window.location.hash=element.attr('id');}}});}}
184,_scrollToAccordionOnLinkClick:function(e) 185{var element=$('#'+$(this).attr('href').split('#').pop());if(element.length>0) 186{var callback=function() 187{if(element) 188{element.find('.blvd-accordion-button').trigger('click');element=false;}};BlvdBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);}},_scrollToTabOnLinkClick:function(e) 189{var element=$('#'+$(this).attr('href').split('#').pop()),tabs=null,label=null,responsiveLabel=null;if(element.length>0) 190{tabs=element.closest('.blvd-tabs');responsiveLabel=element.find('.blvd-tabs-panel-label');tabIndex=responsiveLabel.data('index');label=tabs.find('.blvd-tabs-labels .blvd-tabs-label[data-index='+tabIndex+']');if(responsiveLabel.is(':visible')) 191{var callback=function() 192{if(element) 193{responsiveLabel.trigger('click');element=false;}};BlvdBuilderLayout._scrollToElementOnLinkClick.call(this,e,callback);} 194else 195{label[0].trigger('click');BlvdBuilderLayout._scrollToElement(element);} 196e.preventDefault();}},_initForms:function() 197{if(!BlvdBuilderLayout._hasPlaceholderSupport) 198{$('.blvd-form-field input').each(BlvdBuilderLayout._initFormFieldPlaceholderFallback);} 199$('.blvd-form-field input').on('focus',BlvdBuilderLayout._clearFormFieldError);},_hasPlaceholderSupport:function() 200{var input=document.createElement('input');return'undefined'!=input.placeholder;},_initFormFieldPlaceholderFallback:function() 201{var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if('undefined'!=placeholder&&''===val) 202{field.val(placeholder);field.on('focus',BlvdBuilderLayout._hideFormFieldPlaceholderFallback);field.on('blur',BlvdBuilderLayout._showFormFieldPlaceholderFallback);}},_hideFormFieldPlaceholderFallback:function() 203{var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(val==placeholder) 204{field.val('');}},_showFormFieldPlaceholderFallback:function() 205{var field=$(this),val=field.val(),placeholder=field.attr('placeholder');if(''===val) 206{field.val(placeholder);}},_clearFormFieldError:function() 207{var field=$(this);field.removeClass('blvd-form-error');field.siblings('.blvd-form-error-message').hide();}};$(function() 208{BlvdBuilderLayout.init();});})(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.