PageSourceSearch

https://foxberry-farm.com/assets/js/main.js

js foxberry-farm.com collected 2026-10-05 22:42:13 UTC 11,627 bytes, 348 lines download raw bytes

1(function ($) {
2    "use strict";
3
4    $(document).ready(function () {
5        // Mean Menu
6        $('.mean-menu').meanmenu({
7            meanScreenWidth: "991"
8        });
9
10        // Header Sticky
11        $(window).on('scroll', function () {
12            if ($(this).scrollTop() > 120) {
13                $('.navbar-area').addClass("is-sticky");
14            }
15            else {
16                $('.navbar-area').removeClass("is-sticky");
17            }
18        });
19
20        // Courses Slides
21        $('.courses-slides').owlCarousel({
22            loop: true,
23            nav: true,
24            dots: false,
25            autoplayHoverPause: true,
26            autoplay: true,
27            navText: [
28                "<i class='icofont-simple-left'></i>",
29                "<i class='icofont-simple-right'></i>"
30            ],
31            responsive: {
32                0: {
33                    items: 1,
34                },
35                768: {
36                    items: 2,
37                },
38                1200: {
39                    items: 3,
40                }
41            }
42        });
43
44        // Popup Video
45        $('.popup-youtube').magnificPopup({
46            disableOn: 320,
47            type: 'iframe',
48            mainClass: 'mfp-fade',
49            removalDelay: 160,
50            preloader: false,
51            fixedContentPos: false
52        });
53
54        // Stallions Slides
55        //$('.stallions-slides').owlCarousel({
56        //    loop: true,
57        //    nav: true,
58        //    dots: false,
59        //    autoplayHoverPause: true,
60        //    autoplay: true,
61        //    navText: [
62        //        "<i class='icofont-simple-left'></i>",
63        //        "<i class='icofont-simple-right'></i>"
64        //    ],
65        //    responsive: {
66        //        0: {
67        //            items: 1,
68        //        },
69        //        768: {
70        //            items: 2,
71        //        },
72        //        1200: {
73        //            items: 2,
74        //        }
75        //    }
76        //});
77
78        // Feedback Slides
79        //$('.feedback-slides').owlCarousel({
80        //    loop: true,
81        //    nav: true,
82        //    dots: false,
83        //    autoplayHoverPause: true,
84        //    autoplay: true,
85        //    center: true,
86        //    navText: [
87        //        "<i class='icofont-simple-left'></i>",
88        //        "<i class='icofont-simple-right'></i>"
89        //    ],
90        //    responsive: {
91        //        0: {
92        //            items: 1,
93        //        },
94        //        768: {
95        //            items: 2,
96        //        },
97        //        1200: {
98        //            items: 3,
99        //        }
100        //    }
101        //});
102
103        // Subscribe form
104        $(".newsletter-form").validator().on("submit", function (event) {
105            if (event.isDefaultPrevented()) {
106                // handle the invalid form...
107                formErrorSub();
108                submitMSGSub(false, "Please enter your email correctly.");
109            } else {
110                // everything looks good!
111                event.preventDefault();
112            }
113        });
114        function callbackFunction(resp) {
115            if (resp.result === "success") {
116                formSuccessSub();
117            }
118            else {
119                formErrorSub();
120            }
121        }
122        function formSuccessSub() {
123            $(".newsletter-form")[0].reset();
124            submitMSGSub(true, "Thank you for subscribing!");
125            setTimeout(function () {
126                $("#validator-newsletter").addClass('hide');
127            }, 4000)
128        }
129        function formErrorSub() {
130            $(".newsletter-form").addClass("animated shake");
131            setTimeout(function () {
132                $(".newsletter-form").removeClass("animated shake");
133            }, 1000)
134        }
135        function submitMSGSub(valid, msg) {
136            if (valid) {
137                var msgClasses = "validation-success";
138            } else {
139                var msgClasses = "validation-danger";
140            }
141            $("#validator-newsletter").removeClass().addClass(msgClasses).text(msg);
142        }
143        // AJAX MailChimp
144        //$(".newsletter-form").ajaxChimp({
145        //    url: "https://envytheme.us20.list-manage.com/subscribe/post?u=60e1ffe2e8a68ce1204cd39a5&amp;id=42d6d188d9", // Your url MailChimp
146        //    callback: callbackFunction
147        //});
148
149        // Instructor Slides
150        $('.instructor-slides').owlCarousel({
151            loop: true,
152            nav: true,
153            dots: false,
154            autoplayHoverPause: true,
155            autoplay: true,
156            navText: [
157                "<i class='icofont-simple-left'></i>",
158                "<i class='icofont-simple-right'></i>"
159            ],
160            responsive: {
161                0: {
162                    items: 1,
163                },
164                768: {
165                    items: 2,
166                },
167                1200: {
168                    items: 3,
169                }
170            }
171        });
172
173        // Popup Image
174        $('.popup-btn').magnificPopup({
175            type: 'image',
176            gallery: {
177                enabled: true
178            }
179        });
180
181        // Products Slides
182        $('.products-slides').owlCarousel({
183            loop: true,
184            nav: true,
185            dots: false,
186            autoplayHoverPause: true,
187            autoplay: true,
188            navText: [
189                "<i class='icofont-simple-left'></i>",
190                "<i class='icofont-simple-right'></i>"
191            ],
192            responsive: {
193                0: {
194                    items: 1,
195                },
196                768: {
197                    items: 2,
198                },
199                1200: {
200                    items: 3,
201                }
202            }
203        });
204
205        // Partner Slides
206        $('.partner-slides').owlCarousel({
207            loop: true,
208            nav: false,
209            dots: false,
210            autoplayHoverPause: true,
211            autoplay: true,
212            navText: [
213                "<i class='icofont-simple-left'></i>",
214                "<i class='icofont-simple-right'></i>"
215            ],
216            responsive: {
217                0: {
218                    items: 2,
219                },
220                768: {
221                    items: 4,
222                },
223                1200: {
224                    items: 6,
225                }
226            }
227        });
228
229        // Products Image Slides
230        $('.products-image-slides').owlCarousel({
231            loop: true,
232            nav: true,
233            dots: false,
234            autoplayHoverPause: true,
235            autoplay: true,
236            items: 1,
237            navText: [
238                "<i class='icofont-simple-left'></i>",
239                "<i class='icofont-simple-right'></i>"
240            ],
241        });
242
243        // FAQ Accordion
244        $(function () {
245            $('.accordion').find('.accordion-title').on('click', function () {
246                // Adds Active Class
247                $(this).toggleClass('active');
248                // Expand or Collapse This Panel
249                $(this).next().slideToggle('fast');
250                // Hide The Other Panels
251                $('.accordion-content').not($(this).next()).slideUp('fast');
252                // Removes Active Class From Other Titles
253                $('.accordion-title').not($(this)).removeClass('active');
254            });
255        });
256
257        // Tabs
258        (function ($) {
259            $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
260            $('.tab ul.tabs li a').on('click', function (g) {
261                var tab = $(this).closest('.tab'),
262                    index = $(this).closest('li').index();
263                tab.find('ul.tabs > li').removeClass('current');
264                $(this).closest('li').addClass('current');
265                tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').slide
265Up();
266                tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').slideDown();
267                g.preventDefault();
268            });
269        })(jQuery);
270
271        // Tabs
272        $("#tabs li").on("click", function () {
273            var tab = $(this).attr("id");
274            if ($(this).hasClass("inactive")) {
275                $(this).removeClass("inactive");
276                $(this).addClass("active");
277                $(this).siblings().removeClass("active").addClass("inactive");
278                $("#" + tab + "_content").addClass("show");
279                $("#" + tab + "_content").siblings("div").removeClass("show");
280            }
281        });
282
283        // Count Time 
284        function makeTimer() {
285            var endTime = new Date("September 30, 2019 17:00:00 PDT");
286            var endTime = (Date.parse(endTime)) / 1000;
287            var now = new Date();
288            var now = (Date.parse(now) / 1000);
289            var timeLeft = endTime - now;
290            var days = Math.floor(timeLeft / 86400);
291            var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
292            var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600)) / 60);
293            var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
294            if (hours < "10") { hours = "0" + hours; }
295            if (minutes < "10") { minutes = "0" + minutes; }
296            if (seconds < "10") { seconds = "0" + seconds; }
297            $("#days").html(days + "<span>Days</span>");
298            $("#hours").html(hours + "<span>Hours</span>");
299            $("#minutes").html(minutes + "<span>Minutes</span>");
300            $("#seconds").html(seconds + "<span>Seconds</span>");
301        }
302        setInterval(function () { makeTimer(); }, 1000);
303
304        // Go to Top
305        $(function () {
306            //Scroll event
307            $(window).on('scroll', function () {
308                var scrolled = $(window).scrollTop();
309                if (scrolled > 300) $('.go-top').fadeIn('slow');
310                if (scrolled < 300) $('.go-top').fadeOut('slow');
311            });
312            //Click event
313            $('.go-top').on('click', function () {
314                $("html, body").animate({ scrollTop: "0" }, 500);
315            });
316        });
317
318    });
319
320    // Odometer JS
321    $('.odometer').appear(function (e) {
322        var odo = $(".odometer");
323        odo.each(function () {
324            var countNumber = $(this).attr("data-count");
325            $(this).html(countNumber);
326        });
327    });
328
329    // WOW JS
330    $(window).on('load', function () {
331        if ($(".wow").length) {
332            var wow = new WOW({
333                boxClass: 'wow', // animated element css class (default is wow)
334                animateClass: 'animated', // animation css class (default is animated)
335                offset: 20, // distance to the element when triggering the animation (default is 0)
336                mobile: true, // trigger animations on mobile devices (default is true)
337                live: true, // act on asynchronously loaded content (default is true)
338            });
339            wow.init();
340        }
341    });
342
343    // Preloader Area
344    jQuery(window).on('load', function () {
345        $('.preloader').fadeOut();
346    });
347
348}(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.