!function(){function l(e,t){return t?this.settings.readingEventLabelPrefix+e+" pixels":e<.001?this.settings.readingEventLabelPrefix+"0%":this.settings.readingEventLabelPrefix+100*e+"%"}function d(e,t,i,n){if(!this.DEBUG_MODE){var s=function(){var e=null;null!=this.settings.gtmDataLayerName?e=this.settings.gtmDataLayerName:"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(e=dataLayer);return e}();null==this.GA_TYPE&&(this.GA_TYPE=function(){var t=document.getElementsByTagName("script"),e="";for(var i in t)try{var n=t[i].getAttribute("src");if(n){if(-1!=n.indexOf("/gtm.js")){e="gtm";break}-1!=n.indexOf("/gtag")?e="gtag":-1!=n.indexOf("/analytics.js")?e="ga":-1!=n.indexOf("/ga.js")&&(e="gaq")}}catch(e){this.DEBUG_MODE&&(console.log(t[i]),console.log(e))}return e}()),"gtm"==this.GA_TYPE&&null!=s?(console.log("SOURCE: GTM"),s.push({event:this.settings.gtmEventName,eventCategory:e,eventAction:t,eventLabel:i,eventValue:n})):"gtag"==this.GA_TYPE?(console.log("SOURCE: GTAG"),gtag("event","mm_page_track",{event_category:e,event_action:t,event_label:i,event_value:n})):"ga"==this.GA_TYPE?(console.log("SOURCE: GA"),ga("send",{hitType:"event",eventCategory:e,eventAction:t,eventLabel:i,eventValue:n})):"gaq"==this.GA_TYPE&&(console.log("SOURCE: GAQ"),"undefined"!=typeof pageTracker?pageTracker._trackEvent(e,t,i,n):(_gaq.push(["_trackEvent",e,t,i,n]),_gaq.push(["pageTracker._trackEvent",e,t,i,n])))}}function t(){for(i=0;i=this.readerLocations[i]&&0=e+c)){var l=0==h.adjustX?h.bgXPosition:Math.round((f-e)*h.adjustX)+0+h.bgXOffset+"px",m=0==h.adjustY?h.bgYPosition:Math.round((f-e)*h.adjustY)+0+h.bgYOffset+"px";b.css("background-position",l+" "+m)}})})},a.fn.parallaxLockElement=function(b){var c=!1,d=a.extend({parentEl:"",offsetTop:0,additionalCSS:void 0,onLock:void 0,onRelease:void 0},b);return this.each(function(){var b=a(this),e=a(d.parentEl);a(window).scroll(function(){var f=parseInt(e.offset().top-a(window).scrollTop()-d.offsetTop),g=e.offset().top+e.outerHeight(),i=(parseInt(b.outerHeight()),e.offset().top+e.outerHeight()-(b.offset().top+b.outerHeight()));f<=0?g+i<=a(window).scrollTop()+a(window).innerHeight()?c&&(c=!1,b.css({position:"absolute",top:"inherit",bottom:i+"px"}),"function"==typeof d.onRelease&&d.onRelease(this)):(b.css({position:"fixed",top:d.offsetTop+"px",bottom:"auto"}),"function"==typeof d.onLock&&d.onLock(this),c=!0):(b.css({position:"relative",top:"auto"}),"function"==typeof d.onRelease&&d.onRelease(this),c=!1),void 0!=d.additionalCSS&&b.css(d.additionalCSS)})})},a.fn.parallaxAnimateElement=function(b){var c=new Array,d=0,e=0,f=!1,g=a.extend({frames:1,elementClass:"floatingElement",elementFrameClassRoot:"frame",startOffset:null,endOffset:null,showWhenCentered:!1,centerOffsetAnimationRange:null,lock:!1,parentEl:"",offsetTop:0,additionalCSS:void 0,onLock:void 0,onRelease:void 0},b);g.lock?a(this).parallaxLockElement({parentEl:g.parentEl,offsetTop:g.offsetTop,additionalCSS:g.additionalCSS,onLock:g.onLock,onRelease:g.onRelease}):f=!0;var h=parseInt(a(this).parent().height());if(g.showWhenCentered)null==g.centerOffsetAnimationRange?g.centerOffsetAnimationRange=1:g.centerOffsetAnimationRange.indexOf("%")!=-1?g.centerOffsetAnimationRange=parseInt(g.centerOffsetAnimationRange)/100:g.centerOffsetAnimationRange=1;else{if(null!=g.startOffset)if(g.startOffset.indexOf("%")!=-1){var i=parseInt(g.startOffset)/100;d=Math.floor(h*i)}else{var i=parseInt(g.startOffset);d=i}if(null!=g.endOffset)if(g.endOffset.indexOf("%")!=-1){var i=parseInt(g.endOffset)/100;e=Math.floor(h-h*i)}else{var i=parseInt(g.endOffset);e=i}0==d&&0==e||(h=h-e-d);for(var j=h/g.frames,k=1;k<=g.frames;k++)c.push(Math.floor(d+j*k));f&&void 0!=g.additionalCSS&&a(this).css(g.additionalCSS)}return this.each(function(){var b=a(this),d=c.length,e=g.showWhenCentered?a(this).height()*g.centerOffsetAnimationRange:a(this).height();a(window).scroll(function(){var f=b.offset().top,h=!(f+b.outerHeight()<=a(window).scrollTop()||f>=a(window).scrollTop()+a(window).height());if(h){if(g.showWhenCentered){var i=parseInt(b.offset().top-a(window).scrollTop()),j=parseInt(i+e/2),k=parseInt(a(window).innerHeight()/2),l=parseInt(j-e),m=parseInt(j+e);if(k=l&&k<=m){var n=Math.max(0,Math.min(1,1-(l+(j-k))/j));d=Math.ceil(g.frames*n)}else d=g.frames}else for(var o=parseInt(b.parent().offset().top-a(window).scrollTop()),p=o*-1+e/2,q=0;q";t.append(a)}},unFixBGImagesForIPads=function(e){e=void 0===e?".chapterImage":e,getIsLarge()&&getIsIPad()&&$(e).css("background-attachment","scroll")},getLazyLoadPluginObject=function(){return _lazyLoadObject},getCurrentChapter=function(){return _onChapter},getVisibleViewport=function(e){return e?window.innerHeight-_stickyTopBarHeight+"px":parseInt(window.innerHeight-_stickyTopBarHeight)},getViewportOffset=function(e,t){return t?jQuery(e).offset().top-jQuery(window).scrollTop()-_stickyTopBarHeight+"px":parseInt(jQuery(e).offset().top-jQuery(window).scrollTop()-_stickyTopBarHeight)},getItemInViewport=function(e){var t=jQuery(e).offset().top;return!(t+jQuery(e).outerHeight()<=jQuery(window).scrollTop()||t>=jQuery(window).scrollTop()+jQuery(window).height())},getItemInViewportCenter=function(e,t){var r=jQuery(e).offset().top,o=jQuery(window).height()/2;return t=t||0,!(r>=jQuery(window).scrollTop()+o+t||r<=jQuery(window).scrollTop()+o-t)},getStickyTopBarHeight=function(){return _stickyTopBarHeight},getIsSmall=function(){return _isSmall},getIsMedium=function(){return _isMedium},getIsLarge=function(){return _isLarge},getIsMobile=function(){return"undefined"!=typeof console&&console.log("%c NOTICE getIsMobile()) deprecated - use getIsSmall()","background:orange; color:black"),_isSmall},getIsTablet=function(){return"undefined"!=typeof console&&console.log("%c NOTICE getIsTablet()) deprecated - use getIsMedium()","background:orange; color:black"),_isMedium},getDoParallax=function(){return"undefined"!=typeof console&&console.log("%c NOTICE getDoParallax()) deprecated - use getIsLarge()","background:orange; color:black"),_isLarge},getIsDesktop=function(){return!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},getIsIPad=function(){return navigator.userAgent.match(/iPad;.*CPU.*OS/i)},getIsNewerIPad=function(){return!!getIsIPad()&&1!=window.devicePixelRatio},getIsResponsive=function(){return IS_RESPONSIVE},adjustLayoutAfterResize=function(){initChapterTops(!0)},adjustChapterLinksArtHeight=function(e,t){jQuery(e).css("height",jQuery(t).outerHeight())},adjustSizeToParentAndViewport=function(e,t){jQuery(e).css("height",getVisibleViewport(!0)),jQuery(e).css("width",jQuery(t).width())},adjustSizeHeightToParent=function(e,t){var r=jQuery(t).height();jQuery(e).css("height",r+"px")},equalizeElementHeightsToTallest=function(e){for(var t=0,r=0;r=_chapterTops[o]){t=o+1;break}return-1!=t&&adjustChapterLinks(t),t}},adjustChapterLinks=function(e){jQuery(_chapterLinkEl).each(function(){jQuery(this).attr("href")!="#"+e?"function"==typeof _setChapterLinkCallback&&_setChapterLinkCallback(this,!1):("function"==typeof _setChapterLinkCallback&&_setChapterLinkCallback(this,!0),_onChapter=e)})},adjustMultiSizedImages=function(){"undefined"!=typeof console&&console.log("%c NOTICE adjustMultiSizedImages()) deprecated - lazy load is automatically managed","background:orange; color:black")},toTop=function(){jQuery("html, body").animate({scrollTop:0},600)},runTopMenuControl=function(){getIsSmall()?toggleMobileMenu(_mobileMenuEl,_topAndMobileMenuControl):toTop()},toggleMobileMenu=function(e,t){getIsSmall()&&(jQuery(e).toggle("fast"),jQuery(t).toggle("fast"))},goToChapter=function(e){var t=jQuery(_chapterElPrefix+e).offset().top-_stickyTopBarHeight+1,r=e<_onChapter?_onChapter-e:e-_onChapter,o=Math.floor(1e3/(_chapterTops.length-(_chapterTops.length-r)));jQuery("html, body").animate({scrollTop:t},o,function(){adjustChapterLinks(e),"function"==typeof _chapterSetCompleteCallback&&_chapterSetCompleteCallback(e)}),_onChapter=e},animateOverflowContent=function(e,t,r,o,a){if(a==_onChapter){var n=jQuery(e).css("background-position").split(" "),i=isNaN(t)?t:t+parseInt(n[0])+"px",l=isNaN(r)?r:r+parseInt(n[1])+"px";jQuery(e).css({"background-position":i+" "+l})}window.setTimeout(function(){animateOverflowContent(e,t,r,o,a)},o)},cycleImages=function(e,t){var r=jQuery(e+" .active"),o=0 100) { $("#topBar").removeClass("hide"); } else if (lastScroll < 50) { $("#topBar").removeClass("hide"); } else { $("#topBar").addClass("hide"); } lastScroll = scroll; }); var lastScrollTop = 0; $(window).scroll(function(event) { var st = $(this).scrollTop(); if (st < lastScrollTop) { $("#topBar").removeClass("hide"); } lastScrollTop = st; }); // set the window width _winWidth = $(window).width(); // parallax effects if (getIsLarge()) { // parallax bgs // $("#ci0").parallaxBG({ adjustY: .12, bgXPosition: 'center' }); $("#c2person").parallaxBG({ adjustY: 0.06, bgXPosition: "5%" }); $("#c3person").parallaxBG({ adjustY: 0.06, bgXPosition: "right" }); $("#c4person").parallaxBG({ adjustY: 0.06, bgXPosition: "5%" }); $("#c5person").parallaxBG({ adjustY: 0.06, bgXPosition: "right" }); $("#c6person").parallaxBG({ adjustY: 0.06, bgXPosition: "5%" }); $("#c1bgA").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); $("#c1bgB").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c2bgA").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c2bgB").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); $("#c3bgA").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); $("#c3bgB").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c4bgA").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c4bgB").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); $("#c5bgA").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); $("#c5bgB").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c6bgA").parallaxBG({ adjustY: 0.12, bgXPosition: "center" }); $("#c6bgB").parallaxBG({ adjustY: -0.12, bgXPosition: "center" }); } // Recommended Reads links var relatedLinks = [ { title: "Cheese Sales", link: "https://www.greencounty.org/category/cheese-sales/" }, { title: "Farm Visits + Factory Tours", link: "https://www.greencounty.org/category/farm-visits-factory-tours/" }, { title: "Cheese + Beer + Wine", link: "https://www.greencounty.org/cheese-beer-wine/" } ]; // footer links buildRelatedLinks(relatedLinks); // End Recommended Reads links // ipad pro will use large size, but needs backgrounds set to scroll, not fixed unFixBGImagesForIPads(); customAdjustLayout(true); // add the complete class to the loader $("#loading").addClass("complete"); }; // // Called on document scroll // contentOnScroll = function() { $(".imageWrapper, .pullquote").each(function() { if (getItemInViewport($(this))) { $(this).addClass("show"); } else { $(this).removeClass("show"); } }); plUpdates.replaceBackgroundImage(); }; // // Called on a touch move on mobile // contentOnTouchMove = function() {}; // // Called on document resize // contentOnResize = function() { customAdjustLayout(); }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // CUSTOM FUNCTIONS ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // // The frameworks was given this function to handle setting chapter buttons // when the chapter is set // // chapterEl: The chapter link DOM element // on: Is it being turned on? (true|false) // customChapterLinkAdjust = function(chapterEl, on) { //$(chapterEl).attr("class", ((on) ? "navLink chapterLink noGA on" : "navLink chapterLink noGA")); }; // // Adjust this specific layout after a load or resize event // // isLoad: Is this being called by a load or resize event? // customAdjustLayout = function(isLoad) { var localNotJustTouchScroll = isLoad; // resize footer links to be equal height of the tallest one //equalizeElementHeightsToTallest($(".linkTitleWrapper")); // is it really a resize? if ($(window).width() != _winWidth) { // yes localNotJustTouchScroll = true; _winWidth = $(window).width(); } if (localNotJustTouchScroll) { } }; plUpdates = { "contentUpdate": function () { //replace content in first paragraph in #c2Text $("#c2Text p:nth-child(1)").html("What happens when tourism rolls around a bit and bumps into dairy farming? Magical stuff! Dan and Ashley Wegmueller happily welcomed us to their 4th generation farm near Monroe. At Wegmueller Farm, we met the horses and the Brown Swiss cows, bottle fed the calves, and shared some snacks with the pigs. Dan and Ashley are true stewards of the land, practicing sustainable agriculture and rotational grazing of their herd. We’ll be back with our families for a stay at their VRBO. The kids will love the horse trail rides around the farm, and we can bring our bikes to explore the back roads less traveled."); //replace string in first paragraph in #c6Text var newC6Text = "When you’re ready to hit the hay, there’s nothing like a night on a farm. Several in Green County open the doors with overnight accommodations. One example of a farm-stay vacation is at The Dairy at the Wegmuller Farm, mentioned above. With four bedrooms, it’s perfect for family groups. Another option, ideal for green thumbs, is a night at Bloomin’ Pickets Farm House Stay a recently modernized 2,100-square-foot, century-old farmhouse in Monroe, owned by a member of the Green County Master Gardeners who grew up on the farm. Bring all your questions about growing flowers as you may pick up some tips!"; $("#c6Text p:nth-child(1)").html(newC6Text); }, 'replaceBackgroundImage': function () { //replace background image .chapterImage.c2.show class $("#c3person.person.c3.show") .css("background", "transparent url(https://maddencdn.com/content/images/2021/green-county/herd-to-curd/bikes_tractor.jpg) no-repeat top center fixed") .css("background-size", "cover"); } }