PageSourceSearch

https://www.uniquelyunion.com/site/style6511/js/theme.js

js uniquelyunion.com collected 2026-09-30 17:04:30 UTC 22,222 bytes, 698 lines download raw bytes

1
2
3(function ($) {
4    "use strict";
5
6
7
8    $(window).load(function () {
9        // ----------------------------------------------------------------------------------------------------------------------->
10        // SITE LOADER                     ||----------- 
11        // ----------------------------------------------------------------------------------------------------------------------->
12        $('#loader').fadeOut();
13        $('#preloader').delay(350).fadeOut('slow');
14        $('body').delay(350).css({ 'overflow': 'visible' });
15
16
17    })
18
19
20    // ---------------------------------------------------------------------------------------------------------------------------->
21    // GENERAL SCRIPTS FOR ALL PAGES    ||----------- 
22    // ---------------------------------------------------------------------------------------------------------------------------->
23
24    $(document).ready(function () {
25        openSite();
26
27    });
28
29    function openSite() {
30        fullScreenSlider();
31        header();
32        scroll();
33        winResize();
34        pushmenu();
35        pluginElement();
36        sliderHero();
37        sliderAll();
38        containerGridMasonry();
39        scrollCallbackEle();
40        shortcodeElements();
41
42    };
43
44    // ---------------------------------------------------------------------------------------------------------------------------->
45    // RESIZE FUNCTIONS   ||-----------
46    // ---------------------------------------------------------------------------------------------------------------------------->
47    function winResize() {
48        $(window).resize(function () {
49
50        })
51    };
52
53
54})(jQuery);
55
56
57// ---------------------------------------------------------------------------------------------------------------------------->
58// SCROLL FUNCTIONS   ||-----------
59// ---------------------------------------------------------------------------------------------------------------------------->
60
61function scroll() {
62
63    // //Click Event to Scroll to Top
64    $(window).scroll(function () {
65        if ($(this).scrollTop() > 300) {
66            $('.scroll-top').fadeIn();
67        } else {
68            $('.scroll-top').fadeOut();
69        }
70
71
72    });
73    $('.scroll-top').click(function () {
74        $('html, body').animate({ scrollTop: 0 }, 800);
75        return false;
76    });
77
78    // Scroll Down Elements
79    $('.scroll-down[href^="#"], .scroll-to-target[href^="#"]').on('click', function (e) {
80        e.preventDefault();
81
82        var target = this.hash;
83        var $target = $(target);
84
85        $('html, body').stop().animate({
86            'scrollTop': $target.offset().top
87        }, 900, 'swing', function () {
88            window.location.hash = target;
89        });
90    });
91
92
93
94};
95
96
97// ---------------------------------------------------------------------------------------------------------------------------->
98// HEADER FUNCTIONS   ||-----------
99// ---------------------------------------------------------------------------------------------------------------------------->
100
101function header() {
102
103    // Sticky Header Elements
104    $(window).scroll(function () {
105        if ($(this).scrollTop() > 1) {
106            $('.header').addClass("sticky");
107            $('.inner-inro').css('z-index', '-1');
108        }
109        else {
110            $('.header').removeClass("sticky");
111            $('.inner-inro').css('z-index', 'auto');
112        }
113    });
114    heightElement();
115    function heightElement() {
116
117        // windowWidth = $(window).width();
118        var windowHeight = $(window).height();
119        if ($(window).width() > 767) {
120            // $('.inner-inro').css('height', windowHeight - 200);
121        }
122        else {
123            // $('.inner-inro').css({ 'height': '400px', 'padding-top': '64px' });
124        }
125    }
126
127    $(window).resize(function () {
128        heightElement();
129    });
130};
131
132
133// ---------------------------------------------------------------------------------------------------------------------------->
134// PUSHMENU FUNCTIONS (Top, Bottom, Right, Left)  ||-----------
135// ---------------------------------------------------------------------------------------------------------------------------->
136
137function pushmenu() {
138    $('.toggle-menu').jPushMenu();
139};
140
141
142// ---------------------------------------------------------------------------------------------------------------------------->
143// FULLSCREEN SLIDER FUNCTIONS  ||-----------
144// ---------------------------------------------------------------------------------------------------------------------------->
145
146function fullScreenSlider() {
147    if ($('.fullscreen-carousel').length > 0) {
148
149        $('.fullscreen-carousel').flexslider({
150            animation: "slide",
151            //  startAt: 0,
152            animationSpeed: 700,
153            animationLoop: true,
154            slideshow: true,
155            easing: "swing",
156            controlNav: false,
157            before: function (slider) {
158                //   $('.fullscreen-carousel .overlay-hero .caption-hero').fadeOut();
159                $('.fullscreen-carousel .overlay-hero .caption-hero').fadeOut().animate({ top: '80px' }, { queue: false, easing: 'easeOutQuad', duration: 700 });
160                slider.slides.eq(slider.currentSlide).delay(400);
161                slider.slides.eq(slider.animatingTo).delay(400);
162
163            },
164            after: function (slider) {
165                //$('.fullscreen-carousel .flex-active-slide').find('.caption-hero').delay().fadeIn(1500);
166                $('.fullscreen-carousel .flex-active-slide').find('.caption-hero').fadeIn(2000).animate({ top: '0' }, { queue: false, easing: 'easeOutQuad', duration: 1200 });
167                BackgroundCheck.refresh();
168
169
170            },
171            start: function (slider) {
172                $('body').removeClass('loading');
173                BackgroundCheck.init({
174                    targets: '.full-intro',
175                    images: '.flexslider li img',
176
177                });
178            },
179            useCSS: true,
180        });
181    };
182    fullScreenCarousel();
183    function fullScreenCarousel() {
184        var windowWidth = $(window).width();
185        var windowHeight = $(window).height();
186
187        if ($(window).width() > 767) {
188            $('.hero-slider-1 .slides li').css("height", windowHeight);
189        }
190        else {
191            $('.hero-slider-1 .slides li').css("height", '400px');
192        }
193
194    };
195    $(window).resize(function () {
196        fullScreenCarousel();
197    });
198
199
200};
201
202
203
204// ---------------------------------------------------------------------------------------------------------------------------->
205// SLIDER FUNCTIONS   ||-----------
206// ---------------------------------------------------------------------------------------------------------------------------->
207
208
209function sliderAll() {
210
211    // fullwidth Slider
212    $('.fullwidth-slider').owlCarousel({
213        slideSpeed: 400,
214        singleItem: true,
215        autoHeight: true,
216        navigation: true,  // Show next and prev buttons
217        pagination: true,  // Show pagination buttons
218        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
219        
220    });
221
222    // Image Slider
223    $('.image-slider').owlCarousel({
224        navigation: true,  // Show next and prev buttons
225        pagination: true,  // Show pagination buttons
226        slideSpeed: 350,
227        paginationSpeed: 400,
228        singleItem: true,
229        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
230        autoPlay: false,
231        autoHeight: true,
232        responsive: true
233    });
234
235    // Testimonial Slider
236    $('.testimonial-carousel').owlCarousel({
237        autoPlay: true,
238        autoHeight: true,
239        stopOnHover: true,
240        singleItem: true,
241        slideSpeed: 350,
242        pagination: true,  // Show pagination buttons
243        navigation: false,  // Hide next and prev buttons
244        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
245        //  responsive: true
246    });
247
248    // Team Carousel
249    $('.team-carousel').owlCarousel({
250        autoPlay: false,
251        stopOnHover: true,
252        items: 3,
253        itemsDesktop: [1170, 3],
254        itemsDesktopSmall: [1024, 2],
255        itemsTabletSmall: [768, 1],
256        itemsMobile: [480, 1],
257        pagination: false,  // Hide pagination buttons
258        navigation: false,  // Hide next and prev buttons
259        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
260    });
261
262    // Client Carousel
263    $('.client-carousel').owlCarousel({
264        autoPlay: 2500,
265        stopOnHover: true,
266        items: 5,
267        itemsDesktop: [1170, 4],
268        itemsDesktopSmall: [1024, 3],
269        itemsTabletSmall: [768, 2],
270        itemsMobile: [480, 1],
271        pagination: false,  // hide pagination buttons
272        navigation: false,  // hide next and prev buttons
273        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
274    });
275
276    // Content Slider
277    $('.content-carousel').owlCarousel({
278        autoPlay: true,
279        autoHeight: true,
280        stopOnHover: true,
281        singleItem: true,
282        slideSpeed: 500,
283        pagination: false,  // Hide pagination buttons
284        navigation: true,   // Show next and prev buttons
285        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
286        responsive: true
287    });
288
289    // Item-5 Carousel
290    $('.item5-carousel').owlCarousel({
291        autoPlay: 2500,
292        stopOnHover: true,
293        items: 5,
294        itemsDesktop: [1170, 3],
295        itemsDesktopSmall: [1024, 2],
296        itemsTabletSmall: [768, 1],
297        itemsMobile: [480, 1],
298        pagination: true,  // Show pagination buttons
299        navigation: true,  // Show next and prev buttons
300        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
301    });
302
303    // Item-4 Carousel
304    $('.item4-carousel').owlCarousel({
305        autoPlay: 2500,
306        stopOnHover: true,
307        items: 4,
308        itemsDesktop: [1170, 3],
309        itemsDesktopSmall: [1024, 2],
310        itemsTabletSmall: [768, 1],
311        itemsMobile: [480, 1],
312        pagination: false,  // Hide pagination buttons
313        navigation: true,  // Show next and prev buttons
314        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
315    });
316
317    // Item-3 Carousel
318    $('.item3-carousel').owlCarousel({
319        autoPlay: false,
320        stopOnHover: true,
321        items: 3,
322        itemsDesktop: [1170, 3],
323        itemsDesktopSmall: [1024, 2],
324        itemsTabletSmall: [768, 1],
325        itemsMobile: [480, 1],
326        pagination: true,  // show pagination buttons
327        navigation: true,  // Show next and prev buttons
328        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"]
329    });
330
331    // Item-1 Carousel
332    $('.item1-carousel').owlCarousel({
333        autoPlay: false,
334        autoHeight: true,
335        stopOnHover: true,
336        singleItem: true,
337        slideSpeed: 350,
338        pagination: true,  // Show pagination buttons
339        navigation: true,  // Show next and prev buttons
340        navigationText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
341        responsive: true
342    });
343
344
345};
346
347
348
349// ---------------------------------------------------------------------------------------------------------------------------->
350// SLIDER-HERO FUNCTIONS   ||-----------
351// ---------------------------------------------------------------------------------------------------------------------------->
352
353function sliderHero() {
354
355    $('.slider-hero').owlCarousel({
356        navigation: true, // Show next and prev buttons
357        slideSpeed: 700,
358        paginationSpeed: 400,
359        pagination: true,
360        addClassActive: true,
361
362        touchDrag: true,
363        singleItem: true,
364        navigationText: false,
365        autoPlay: false,
366        autoHeight: false,
367
368        //responsive: true,
369        //itemsDesktop: [3000, 1],
370        //itemsDesktopSmall: [1440, 1],
371        //itemsTablet: [1024, 1],
372        //itemsTabletSmall: [600, 1],
373        //itemsMobile: [360, 1],
374
375        beforeMove: beforeMove,
376        afterMove: afterMove,
377        afterInit: afterInit
378
379    });
380    function beforeMove() {
381        $('.slider-hero .overlay-hero .caption-hero').fadeOut(1);
382
383    }
384    function afterMove() {
385        $('.slider-hero .owl-item.active ').find('.caption-hero').delay(500).fadeIn(1500);
386        BackgroundCheck.refresh();
387
388    }
389    function afterInit() {
390        $('.slider-hero .owl-item.active ').find('.caption-hero').delay(500).fadeIn(1500);
391        BackgroundCheck.init({
392            targets: '.full-intro',
393            images: '.owl-carousel .item img',
394
395        });
396
397    }
398
399    $(window).height(function () {
400        heroResize();
401        function heroResize() {
402            var windowHeight = $(window).innerHeight();
403            $('.slider-hero, .full-screen-intro').css('height', windowHeight);
404        };
405        $(window).resize(function () {
406            heroResize();
407        });
408    });
409
410};
411
412
413
414
415
416// ---------------------------------------------------------------------------------------------------------------------------->
417// PLUGIN MEDIA FUNCTIONS  ||-----------
418// ---------------------------------------------------------------------------------------------------------------------------->
419
420function pluginElement() {
421
422    // Media Player Elements
423    videoElement();
424    function videoElement() {
425        $('.video').mediaelementplayer({
426            loop: true,
427            enableKeyboard: false,
428            iPadUseNativeControls: false,
429            pauseOtherPlayers: false,
430            iPhoneUseNativeControls: false,
431            AndroidUseNativeControls: false,
432            enableAutosize: true
433        });
434        $('.bg-video').mediaelementplayer({
435            loop: true,
436            enableKeyboard: false,
437            iPadUseNativeControls: false,
438            pauseOtherPlayers: false,
439            iPhoneUseNativeControls: false,
440            AndroidUseNativeControls: false,
441            enableAutosize: true,
442            alwaysShowControls: false,
443        });
444
445        $('.audio').mediaelementplayer({
446            audioWidth: '100%',
447            pauseOtherPlayers: false,
448        });
449    };
450
451    // Responsive Media Elements
452    $(".video, .audio, .post-media, .post-media iframe").fitVids();
453
454
455
456};
457
458
459// ---------------------------------------------------------------------------------------------------------------------------->
460// CONTAINER GRID & MESONRY FUNCTIONS (Portfolio, blog, etc)   ||-----------
461// ---------------------------------------------------------------------------------------------------------------------------->
462
463function containerGridMasonry() {
464
465    // Gria Element
466    if ($(this).length > 0) {
467        // ISOTOPE MASONRY ELEMENT  ||--------------
468        var $container = $('.container-masonry');
469        $container.imagesLoaded(function () {
470            $container.isotope({
471                itemSelector: '.nf-item',
472                layoutMode: 'masonry',
473                masonry: {
474                    columnWidth: 0,
475                    gutter: 0
476                },
477            });
478        });
479        
480        // bind filter button click
481        $('.container-filter').on('click', '.categories', function () {
482            var filterValue = $(this).attr('data-filter');
483            $container.isotope({ filter: filterValue });
484        });
485
486        // ISOTOPE GRID ELEMENT  ||--------------
487        var $container2 = $('.container-grid');
488        $container2.imagesLoaded(function () {
489            $container2.isotope({
490                itemSelector: '.nf-item',
491                layoutMode: 'fitRows'
492            });
493        });
494
495        // bind filter categories click
496        $('.container-filter').on('click', '.categories', function () {
497            var filterValue = $(this).attr('data-filter');
498            $container2.isotope({ filter: filterValue });
499        });
500
501        // change active class on categories
502        $('.categories-filter').each(function (i, buttonGroup) {
503            var $buttonGroup = $(buttonGroup);
504            $buttonGroup.on('click', '.categories', function () {
505                $buttonGroup.find('.active').removeClass('active');
506                $(this).addClass('active');
507            });
508
509        });
510    };
511
512    // Masonry Element
513    if ($(this).length > 0) {
514        var container = $('.masonry');
515        container.masonry({
516            // columnWidth: 0,
517            itemSelector: '.nf-item'
518        });
519    };
520
521
522};
523
524// ---------------------------------------------------------------------------------------------------------------------------->
525// SCROLL CALLBACK FUNCTION  ||-----------
526// ---------------------------------------------------------------------------------------------------------------------------->
527function scrollCallbackEle() {
528    //scroll Callback Element
529    $('.load-ele-fade').viewportChecker({
530        classToAdd: 'visible animated fadeIn',
531        offset: 100,
532        callbackFunction: function (elem, action) {
533        }
534    });
535    //scroll Animate Element
536    wow = new WOW({
537        boxClass: 'wow',
538        animateClass: 'animated',
539        offset: 0,
540        mobile: false,
541        live: true
542    })
543    wow.init();
544};
545
546// ---------------------------------------------------------------------------------------------------------------------------->
547// SHORTCODE ELEMENTS  ||-----------
548// ---------------------------------------------------------------------------------------------------------------------------->
549
550shortcodeElements();
551function shortcodeElements() {
552
553
554    //Parallax Function element
555    $('.parallax').each(function () {
556        var $el = $(this);
557        $(window).scroll(function () {
558            parallax($el);
559        });
560        parallax($el);
561    });
562
563
564    function parallax($el) {
565        var diff_s = $(window).scrollTop();
566        var parallax_height = $('.parallax').height();
567        var yPos_p = (diff_s * 0.5);
568        var yPos_m = -(diff_s * 0.5);
569        var diff_h = diff_s / parallax_height;
570
571        if ($('.parallax').hasClass('parallax-section1')) {
572            $el.css('top', yPos_p);
573        }
574        if ($('.parallax').hasClass('parallax-section2')) {
575            $el.css('top', yPos_m);
576        }
577        if ($('.parallax').hasClass('parallax-static')) {
578            $el.css('top', (diff_s * 1));
579        }
580        if ($('.parallax').hasClass('parallax-opacity')) {
581            $el.css('opacity', (1 - diff_h * 1));
582        }
583
584        if ($('.parallax').hasClass('parallax-background1')) {
585            $el.css("background-position", 'left' + " " + yPos_p + "px");
586        }
587        if ($('.parallax').hasClass('parallax-background2')) {
588            $el.css("background-position", 'left' + " " + -yPos_p + "px");
589
590        }
591    };
592
593    //Parallax plugin Js Function element
594    $.stellar({
595        horizontalScrolling: false,
596        verticalOffset: 500
597    });
598
599
600    // Portfolio Lightbox Popup Elements
601    lightbox();
602    function lightbox() {
603        $(".cbox-gallary1").colorbox({
604            rel: 'gallary',
605            maxWidth: "95%",
606            maxHeight: "95%"
607
608        });
609        $(".cbox-iframe").colorbox({
610            iframe: true,
611            maxWidth: "95%",
612            maxHeight: "95%",
613            innerWidth: 640,
614            innerHeight: 390
615        });
616    };
617
618    // Skills Progressbar Elements
619    skillsProgressBar();
620    function skillsProgressBar() {
621        $('.skillbar').each(function () {
622            $(this).find('.skillbar-bar').animate({
623                width: $(this).attr('data-percent')
624            }, 2000);
625        });
626    };
627
628    // Tooltip
629    $(".tipped").tipper();
630
631    //Counter
632    $('.counter').each(function () {
633        var $this = $(this),
634            countTo = $this.attr('data-count');
635        $({ countNum: $this.text() }).animate({
636            countNum: countTo
637        },
638        {
639            duration: 8000,
640            easing: 'linear',
641            step: function () {
642                $this.text(Math.floor(this.countNum));
643            },
644            complete: function () {
645                $this.text(this.countNum);
646                //alert('finished');
647            }
648        });
649    });
650
651};
652
653
654// Accordion Function Elements
655accordion();
656function accordion() {
657
658    $('.accordion-title').click(function (e) {
659
660        $(this).next().slideToggle('easeOut');
661        $(this).toggleClass('active');
662        $("accordion-title").toggleClass('active');
663        $(".accordion-content").not($(this).next()).slideUp('easeIn');
664        $(".accordion-title").not($(this)).removeClass('active');
665
666    });
667    $(".accordion-content").addClass("defualt-hidden");
668
669};
670/*
671// Jquery UI Elements
672jqueryUi();
673function jqueryUi() {
674
675    // Tab Function
676    $(function () {
677        $(".tabs").tabs();
678    });
679
680    // Price Filter Slider
681    $(function () {
682        $("#range-slider").slider({
683            range: true,
684            min: 0,
685            max: 500,
686            values: [0, 300],
687            slide: function (event, ui) {
688                $(".price-amount-from").text("$" + ui.values[0]);
689                $(".price-amount-to").text("$" + ui.values[1]);
690
691            }
692        });
693        $(".price-amount-from").text("$" + $("#range-slider").slider("values", 0));
694        $(".price-amount-to").text("$" + $("#range-slider").slider("values", 1));
695    });
696};
697*/
698

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.