PageSourceSearch

https://jobshint.com/wp-content/themes/WorkScout/workscout/js/custom.min.js?ver=1790223333

js jobshint.com collected 2026-09-25 05:30:38 UTC 46,859 bytes, 1,386 lines download raw bytes

1/* ----------------- Start Document ----------------- */
2(function($){
3    "use strict";
4
5    $(document).ready(function(){
6
7    $(":checkbox").attr("autocomplete", "off");
8
9
10    $('#login-tabs a').click(function (e) {
11        e.preventDefault();
12       
13        // add class to tab
14        $('#login-tabs li').removeClass('active');
15        $(this).parent().addClass('active');
16        // show the right tab
17        $('.tab-content').hide();
18        $( $(this).attr('href')).show();
19        return false;
20    });
21
22
23    $(".cart-in-header").hoverIntent({
24        sensitivity: 3,
25        interval: 60,
26        over: function () {
27            $('.cart-list', this).fadeIn(200);
28            $('.cart-btn a.button', this).addClass('hovered');
29        },
30        timeout: 220,
31        out: function () {
32            $('.cart-list', this).fadeOut(100);
33            $('.cart-btn a.button', this).removeClass('hovered');
34        }
35    });
36
37
38    $('.search_keywords #search_keywords').change(function() {
39      
40        $('.sidebar #search_keywords').val($(this).val());
41    });
42    /*----------------------------------------------------*/
43    /*  Navigation
44    /*----------------------------------------------------*/
45    if($('header#main-header').hasClass('full-width')) {
46        $('header#main-header').attr('data-full', 'yes');
47    }  
48    if($('header#main-header').hasClass('alternative')) {
49        $('header#main-header').attr('data-alt', 'yes');
50    }
51    function menumobile(){
52        var winWidth = $(window).width();
53
54        if( winWidth < 973 ) {
55            $('#navigation').removeClass('menu');
56            $('#navigation li').removeClass('dropdown');
57            $('header#main-header').removeClass('full-width');
58            $('#navigation').superfish('destroy');
59        } else {
60            $('#navigation').addClass('menu');
61            if($('header#main-header').data('full') === "yes" ) {
62                 $('header#main-header').addClass('full-width');
63            }
64            $('#navigation').superfish({
65                delay:       300,                               // one second delay on mouseout
66                animation:   {opacity:'show'},   // fade-in and slide-down animation
67                speed:       200,                               // animation speed
68                speedOut:    50                                 // out animation speed
69            });
70        }
71        if( winWidth < ws.header_breakpoint ) {
72            $('header#main-header').addClass('alternative').removeClass('full-width');
73        } else {
74            if($('header#main-header').data('alt') === "yes" ) {} else {
75                $('header#main-header').removeClass('alternative');
76            }
77        }
78    }
79
80    // $(window).resize(function (){
81    //     menumobile();
82    // });
83    // menumobile();
84
85
86    $(window).load(function(){
87        var $mascontainer = $('.recent-blog-posts.masonry, .woo_pricing_tables');
88        $mascontainer.isotope({ itemSelector: '.recent-blog, .plan',layoutMode: 'fitRows' });
89    });
90
91  $('.modal-register-link').on('click', function(e){
92    e.preventDefault();
93    var magnificPopup = $.magnificPopup.instance; 
94    if(magnificPopup) {
95        magnificPopup.close();  
96        
97    }
98    window.setTimeout(function() {
99    $('.register-btn').trigger('click');
100          }, 500);
101   
102  })
103
104  $('.workscout_form').on('click','.modal-login-link', function(e) {
105    e.preventDefault();
106    var magnificPopup = $.magnificPopup.instance; 
107    if(magnificPopup) {
108        magnificPopup.close();  
109        
110    }
111    window.setTimeout(function() {
112    $('.login-btn').trigger('click');
113          }, 500);
114   
115  })
116    /*----------------------------------------------------*/
117    /*  Mobile Navigation
118    /*----------------------------------------------------*/
119    
120     $(function() {
121    function mmenuInit() {
122      var wi = $(window).width();
123      if(wi <= '1099') {
124
125        $(".mmenu-init" ).remove();
126        $("#navigation").clone().addClass("mmenu-init").insertBefore("#navigation").removeAttr('id').removeClass('style-1 style-2')
127                .find('ul, div').removeClass('style-1 style-2 mega-menu mega-menu-content mega-menu-section').removeAttr('id');
128        $(".mmenu-init").find("ul").addClass("mm-listview");
129        $(".mmenu-init").find(".mobile-styles .mm-listview").unwrap();
130
131
132        $(".mmenu-init").mmenu({
133          "counters": true
134        }, {
135         // configuration
136         offCanvas: {
137            pageNodetype: "#wrapper"
138         }
139        });
140
141        var mmenuAPI = $(".mmenu-init").data( "mmenu" );
142        var $icon = $(".mmenu-trigger .hamburger");
143
144        $(".mmenu-trigger").on('click', function() {
145          mmenuAPI.open();
146        });
147
148      }
149      $(".mm-next").addClass("mm-fullsubopen");
150    }
151    mmenuInit();
152    $(window).resize(function() { mmenuInit(); });
153  });
154
155  
156  /*----------------------------------------------------*/
157  /* Panel Dropdown
158  /*----------------------------------------------------*/
159    function close_panel_dropdown() {
160    $('.panel-dropdown').removeClass("active");
161    $('.fs-inner-container.content').removeClass("faded-out");
162    }
163
164    $('.panel-dropdown a').on('click', function(e) {
165
166    if ( $(this).parent().is(".active") ) {
167            close_panel_dropdown();
168        } else {
169            close_panel_dropdown();
170            $(this).parent().addClass('active');
171      $('.fs-inner-container.content').addClass("faded-out");
172        }
173
174        e.preventDefault();
175    });
176
177    // Apply / Close buttons
178    $('.panel-buttons button,.panel-buttons span.panel-cancel').on('click', function(e) {
179      $('.panel-dropdown').removeClass('active');
180    $('.fs-inner-container.content').removeClass("faded-out");
181    }); 
182
183     // Closes dropdown on click outside the conatainer
184  var mouse_is_inside = false;
185
186  $('.panel-dropdown').hover(function(){
187      mouse_is_inside=true;
188  }, function(){
189      mouse_is_inside=false;
190  });
191
192  $("body").mouseup(function(){
193      if(! mouse_is_inside) close_panel_dropdown();
194  });
195  //   /*  User Menu */
196  //   $('.user-menu').on('click', function(){
197  //   $(this).toggleClass('active');
198  // });
199
200      //   var jPanelMenu = $.jPanelMenu({
201      //     menu: '#responsive',
202      //     animated: false,
203      //     duration: 200,
204      //     keyboardShortcuts: false,
205      //     closeOnContentClick: true
206      //   });
207
208
209      // // desktop devices
210      //   $('.menu-trigger').on('click',function(){
211      //     var jpm = $(this);
212
213      //     if( jpm.hasClass('active') )
214      //     {
215      //       jPanelMenu.off();
216      //       jpm.removeClass('active');
217      //     }
218      //     else
219      //     {
220      //       jPanelMenu.on();
221      //       jPanelMenu.open();
222      //       jpm.addClass('active');
223      //     }
224      //     return false;
225      //   });
226
227
228      //   // Removes SuperFish Styles
229      //   $('#jPanelMenu-menu').removeClass('sf-menu');
230      //   $('#jPanelMenu-menu li ul').removeAttr('style');
231
232
233      //   $(window).resize(function (){
234      //     var winWidth = $(window).width();
235      //     var jpmactive = $('.menu-trigger');
236      //     if(winWidth>990) {
237      //       jPanelMenu.off();
238      //       jpmactive.removeClass('active');
239      //     }
240      //   });
241
242    var pixelRatio = !!window.devicePixelRatio ? window.devicePixelRatio : 1;
243      $(window).on("load", function() {
244        if (pixelRatio > 1) {
245          if(ws.retinalogo) {
246            $('header:not(.transparent) #logo img').attr('src',ws.retinalogo);
247          }
248         if(ws.transparentretinalogo) {
249            $('header.transparent:not(.cloned) #logo img').attr('src',ws.transparentretinalogo);
250            $('#wrapper:not(.wrapper-with-transparent-header) #header:not(.cloned) #logo img').attr('src',ws.retinalogo);
251
252          }
253
254        } else {
255              $('header:not(.transparent) #logo img').attr('src',ws.logo);
256              $('header.transparent:not(.cloned) #logo img').attr('src',ws.transparentlogo);
257              $('#wrapper.wrapper-with-transparent-header #header:not(.cloned) #logo img').attr('src',ws.transparentlogo);
258              $('#wrapper:not(.wrapper-with-transparent-header) #header:not(.cloned) #logo img').attr('src',ws.logo);
259        }
260      });
261
262    $(window).bind("load resize",function(){
263        var winWidth = $(window).width();
264        if(winWidth<1290) {
265            $(".sticky-header.cloned").remove();
266        }
267    });
268
269    /*----------------------------------------------------*/
270    /*  Stacktable / Responsive Tables Plug-in
271    /*----------------------------------------------------*/
272    $('.shop_table,.responsive-table').stacktable();
273    
274    $(".small-only input.input-text.qty.text").on( "change", function() {
275        var value = $(this).val();
276        var name = $(this).attr('name');
277        $(".large-only").find(".quantity.buttons_added .qty[name*='"+name+"']").val(value);
278    });
279
280    /*----------------------------------------------------*/
281    /*  Back to Top
282    /*----------------------------------------------------*/
283        var pxShow = 400; // height on which the button will show
284        var fadeInTime = 400; // how slow / fast you want the button to show
285        var fadeOutTime = 400; // how slow / fast you want the button to hide
286        var scrollSpeed = 400; // how slow / fast you want the button to scroll to top.
287
288        $(window).scroll(function(){
289          if($(window).scrollTop() >= pxShow){
290            $("#backtotop").fadeIn(fadeInTime);
291          } else {
292            $("#backtotop").fadeOut(fadeOutTime);
293          }
294        });
295
296        $('#backtotop a').on('click',function(){
297          $('html, body').animate({scrollTop:0}, scrollSpeed);
298          return false;
299        });
300    
301
302
303    /*----------------------------------------------------*/
304    /*  Showbiz Carousel
305    // /*----------------------------------------------------*/
306
307    $('.job-spotlight-car').slick({
308        infinite: true,
309        speed: 500,
310        centerPadding: '20px',
311        slidesToShow: 1,
312        adaptiveHeight: true
313    });   
314
315    $('.related-job-spotlight-car').slick({
316        centerPadding: '20px',
317        slidesToShow: 2,
318        responsive: [
319            {
320              breakpoint: 1367,
321              settings: {
322                centerPadding: '15%'
323              }
324            },
325            {
326              breakpoint: 1025,
327              settings: {
328                centerPadding: '0'
329              }
330            },
331            {
332              breakpoint: 767,
333              settings: {
334                centerPadding: '0',
335                slidesToShow: 1
336              }
337            }
338      ]
339    });
340
341    $('#our-clients').slick({
342        slidesToShow: 6,
343        slidesToScroll: 4,
344    });
345    
346
347
348
349
350    /*----------------------------------------------------*/
351    /*  Flexslider
352    /*----------------------------------------------------*/
353        $('.testimonials-slider').flexslider({
354            animation: "fade",
355            controlsContainer: $(".custom-controls-container"),
356            customDirectionNav: $(".custom-navigation a")
357        });
358
359
360
361    /*----------------------------------------------------*/
362    /*  Counters
363    /*----------------------------------------------------*/
364
365        $('.counter').counterUp({
366            delay: 10,
367            time: 800
368        });
369
370
371
372
373
374
375    /*----------------------------------------------------*/
376    /*  Magnific Popup
377    /*----------------------------------------------------*/   
378        
379            $('body').magnificPopup({
380                type: 'image',
381                delegate: 'a.mfp-gallery',
382
383                fixedContentPos: true,
384                fixedBgPos: true,
385
386                overflowY: 'auto',
387
388                closeBtnInside: true,
389                preloader: true,
390
391                removalDelay: 0,
392                mainClass: 'mfp-fade',
393
394                gallery:{enabled:true},
395
396                callbacks: {
397                    buildControls: function() {
398                         this.contentContainer.append(this.arrowLeft.add(this.arrowRight));
399                    }
400                }
401            });
402
403            
404        $(document).on( 'submit', '.small-dialog-content.woo-reg-box form.login, .small-dialog-content.woo-reg-box form.register', function(e) {
405            var form = $(this);
406            var error = false;
407
408            var base = $(this).serialize();
409            var button = $(this).find( 'input[type=submit]' );
410
411            $(button).css('backgroundColor','#ddd');
412            var data = base + '&' + button.attr("name") + "=" + button.val();
413
414            var $response = $( '#ajax-response' );
415
416            var request = $.ajax({
417                url: ws.woo_account_page,
418                data: data,
419                type: 'POST',
420                cache: false,
421                async: false,
422                success: function(response) {
423                    form.find( $( '.woocommerce-error' ) ).remove();
424
425                    var $response = $( '#ajax_response' );
426                    var html = $.parseHTML(response);
427
428                    $response.append(html);
429                    error = $response.find( $( '.woocommerce-error' ) );
430
431                    $(button).css('backgroundColor',ws.theme_color);
432                    if ( error.length > 0 ) {
433                        form.prepend( error.clone() );
434                        $response.html('');
435                        e.preventDefault();
436                    } else {
437                        if(form.hasClass('register')) {
438                            window.location.href = ws.woo_account_page;
439                            e.preventDefault();
440                            return false;
441                        } else {
442                            document.location.href = ws.woo_account_page;
443                        }
444                    }
445                }
446            });
447
448        });
449
450            $('.popup-with-zoom-anim').magnificPopup({
451                type: 'inline',
452
453                fixedContentPos: false,
454                fixedBgPos: true,
455
456                overflowY: 'auto',
457
458                closeBtnInside: true,
459                preloader: false,
460
461                midClick: true,
462                removalDelay: 300,
463                mainClass: 'my-mfp-zoom-in',
464
465                prependTo: '#wrapper'
466            });
467
468
469            $('.mfp-image').magnificPopup({
470                type: 'image',
471                closeOnContentClick: true,
472                mainClass: 'mfp-fade',
473                image: {
474                    verticalFit: true
475                }
476            });
477
478
479            $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
480                disableOn: 700,
481                type: 'iframe',
482                mainClass: 'mfp-fade',
483                removalDelay: 160,
484                preloader: false,
485
486                fixedContentPos: false
487            });
488
489
490     /*---------------------------------------------------*/
491    /*  Contact Form
492    /*---------------------------------------------------*/
493    
494
495    //reset previously set border colors and hide all comment on .keyup()
496    $("#contactform input, #contactform textarea").keyup(function() {
497      $("#contactform input, #contactform textarea").removeClass('error');
498      $("#result").slideUp();
499    });
500
501
502
503
504    /*----------------------------------------------------*/
505    /*  Accordions
506    /*----------------------------------------------------*/
507
508        var $accor = $('.accordion');
509
510         $accor.each(function() {
511            $(this).find("div").hide().first().show();
512            $(this).find("h3").first().addClass('active-acc');
513        });
514
515        var $trigger = $accor.find('h3');
516
517        $trigger.on('click', function(e) {
518            var location = $(this).parent();
519
520            if( $(this).next().is(':hidden') ) {
521                var $triggerloc = $('h3',location);
522                $triggerloc.removeClass('active-acc').next().slideUp(300);
523                $(this).addClass('active-acc').next().slideDown(300);
524            }
525             e.preventDefault();
526        });
527
528    
529
530    /*----------------------------------------------------*/
531    /*  Application Tabs
532    /*----------------------------------------------------*/   
533        // Get all the links.
534        var link = $(".app-link");
535        $('.close-tab').hide();
536
537        $('.app-tabs div.app-tab-content').hide();
538        // On clicking of the links do something.
539        link.on('click', function(e) {
540
541            e.preventDefault();
542            $(this).parents('div.application').find('.close-tab').fadeOut();
543            if($(this).hasClass('opened')) {
544                $(this).parents('div.application').find(".app-tabs div.app-tab-content").slideUp('fast');
545                $(this).parents('div.application').find('.close-tab').fadeOut(10);
546                $(this).removeClass('opened');
547            } else {
548                $(this).parents('div.application').find(".app-link").removeClass('opened');
549                $(this).addClass('opened');
550                var a = $(this).attr("href");
551                $(this).parents('div.application').find(a).slideDown('fast').removeClass('closed').addClass('opened');
552                $(this).parents('div.application').find('.close-tab').fadeIn(10);
553            }
554
555            $(this).parents('div.application').find(".app-tabs div.app-tab-content").not(a).slideUp('fast').addClass('closed').removeClass('opened');
556            
557        });
558
559        $('.close-tab').on('click',function(e){
560            $(this).fadeOut();
561            e.preventDefault();
562            $(this).parents('div.application').find(".app-link").removeClass('opened');
563            $(this).parents('div.application').find(".app-tabs div.app-tab-content").slideUp('fast').addClass('closed').removeClass('opened');
564        });
565
566
567    /*----------------------------------------------------*/
568    /*  Add Resume 
569    /*----------------------------------------------------*/   
570        $('.box-to-clone').hide();
571        $('.add-box').on('click', function(e) {
572            e.preventDefault();
573            var newElem = $(this).parent().find('.box-to-clone:first').clone();
574            newElem.find('input').val('');
575            newElem.prependTo($(this).parent()).show();
576            var height = $(this).prev('.box-to-clone').outerHeight(true);
577            
578            $("html, body").stop().animate({ scrollTop: $(this).offset().top-height}, 600);
579        });
580
581        $('body').on('click','.remove-box', function(e) {
582            e.preventDefault();
583            $(this).parent().remove();
584        });
585
586
587
588        $('.stars a').on( "click", function() {
589            $('.stars a').removeClass('prevactive');
590            $(this).prevAll().addClass('prevactive');
591        }).hover(
592          function() {
593            $('.stars a').removeClass('prevactive');
594            $(this).addClass('prevactive').prevAll().addClass('prevactive');
595          }, function() {
596            $('.stars a').removeClass('prevactive');
597            $('.stars a.active').prevAll().addClass('prevactive');
598          }
599        );
600
601        
602    /*----------------------------------------------------*/
603    /*  Tabs
604    /*----------------------------------------------------*/ 
605        var $tabsNav    = $('.tabs-nav,.vc_tta-tabs-list'),
606        $tabsNavLis = $tabsNav.children('li');
607        // $tabContent = $('.tab-content');
608
609        $tabsNav.each(function() {
610            var $this = $(this);
611            
612                $this.next().children('.tab-content').stop(true,true).hide().first().show();
613
614                $this.children('li').first().addClass('active').stop(true,true).show();
615            
616        });
617
618        $tabsNavLis.on('click', function(e) {
619            var $this = $(this);
620
621            $this.siblings().removeClass('active').end()
622            .addClass('active');
623
624            $this.parent().next().children('.tab-content').stop(true,true).hide()
625            .siblings( $this.find('a').attr('href') ).fadeIn();
626
627            e.preventDefault();
628        });
629    
630    var hash = window.location.hash;
631    console.log(hash);
632    var anchor = $('.tabs-nav a[href="' + hash + '"]');
633    if (anchor.length === 0) {
634      
635    } else {
636        $(".tab-content").hide();
637        anchor.trigger( "click" );
638        $(hash+".tab-content").show();
639    }
640
641
642    $('#login-tabs a').click(function (e) {
643        
644        e.preventDefault();
645        // add class to tab
646        $('#login-tabs li').removeClass('active');
647       $(this).parent().addClass('active');
648        // show the right tab
649        $(' .tab-content').hide();
650        $( $(this).attr('href')).show();
651        return false;
652    });
653
654    /*remove empty tags*/
655    $('p').each(function() {
656        var $this = $(this);
657        if($this.html().replace(/\s|&nbsp;/g, '').length === 0)
658        $this.addClass('pfix').html(''); 
659    }); 
660
661
662    
663    $('.ws-file-upload').change(function(){
664        
665            var filename = [];
666            $.each($(this).prop("files"), function(k,v){
667                filename.push('<span class="job-manager-uploaded-file-name">'+v['name']+'</span> ');
668            });
669        
670            $(this).prev('.job-manager-uploaded-files').html(filename);
671      
672    });
673
674    
675    /*----------------------------------------------------*/
676    /*  Sliding In-Out Content
677    /*----------------------------------------------------*/
678
679    $(window).bind("load resize scroll",function(e){
680        var headerElem = $('.parallax .search-container');
681
682        // flying out and fading for header content
683        $(headerElem).css({  'transform': 'translateY(' + (  $(window).scrollTop() / -9 ) + 'px)', });
684        // $(headerElem).css({ 'opacity': 1 - $(window).scrollTop() / 600 });  
685    });
686
687
688
689    /*----------------------------------------------------*/
690    /*  Parallax
691    /*----------------------------------------------------*/
692    /* detect touch */
693    if("ontouchstart" in window){
694        document.documentElement.className = document.documentElement.className + " touch";
695    }
696    if(!$("html").hasClass("touch")){
697        /* background fix */
698        $(".parallax").css("background-attachment", "fixed");
699    }
700
701    /* fix vertical when not overflow
702    call fullscreenFix() if .fullscreen content changes */
703    function fullscreenFix(){
704        var h = $('body').height();
705        // set .fullscreen height
706        $(".parallax-content").each(function(i){
707            if($(this).innerHeight() > h){ $(this).closest(".fullscreen").addClass("overflow");
708            }
709        });
710    }
711    $(window).resize(fullscreenFix);
712    fullscreenFix();
713
714
715
716    /* resize background images */
717    function backgroundResize(){
718        var windowH = $(window).height();
719        var winWidth = $(window).width();
720        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
721        var ios = false;
722        
723        if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) ) {
724            ios = true;
725        }
726       if( ios == true) {
727             $(".background").each(function(i){
728               $(this).addClass('mobilebg');
729            });
730            console.log('are we here IOS?');
731        } else 
732            if( winWidth>1023 ) {
733            $(".background").each(function(i){
734                var path = $(this);
735                $(this).removeClass('mobilebg');
736                // variables
737                var contW = path.width();
738                var contH = path.height();
739                var imgW = path.attr("data-img-width");
740                var imgH = path.attr("data-img-height");
741                var ratio = imgW / imgH;
742                // overflowing difference
743                var diff = parseFloat(path.attr("data-diff"));
744                diff = diff ? diff : 0;
745                // remaining height to have fullscreen image only on parallax
746                var remainingH = 0;
747                if(path.hasClass("parallax") && !$("html").hasClass("touch")){
748                    var maxH = contH > windowH ? contH : windowH;
749                    remainingH = windowH - contH;
750                }
751                // set img values depending on cont
752                imgH = contH + remainingH + diff;
753                imgW = imgH * ratio;
754                // fix when too large
755                if(contW > imgW){
756                    imgW = contW;
757                    imgH = imgW / ratio;
758                }
759                //
760                path.data("resized-imgW", imgW);
761                path.data("resized-imgH", imgH);
762                path.css("background-size", imgW + "px " + imgH + "px");
763            });
764        } 
765    }
766    $(window).resize(backgroundResize);
767    $(window).focus(backgroundResize);
768    backgroundResize();
769
770
771
772    /* set parallax background-position */
773    function parallaxPosition(e){
774         var winWidth = $(window).width();
775        var userAgent = navigator.userAgent || navigator.vendor || window.opera;
776        var ios = false;
777        if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) ) {
778            ios = true;
779        }
780        if(winWidth>1023 || ios == false) {
781            var heightWindow = $(window).height();
782            var topWindow = $(window).scrollTop();
783            var bottomWindow = topWindow + heightWindow;
784            var currentWindow = (topWindow + bottomWindow) / 2;
785                $(".parallax").each(function(i){
786                    var path = $(this);
787                    var height = path.height();
788                    var top = path.offset().top;
789                    var bottom = top + height;
790                    // only when in range
791                    if(bottomWindow > top && topWindow < bottom){
792                        var imgW = path.data("resized-imgW");
793                        var imgH = path.data("resized-imgH");
794                        // min when image touch top of window
795                        var min = 0;
796                        // max when image touch bottom of window
797                        var max = - imgH + heightWindow;
798                        // overflow changes parallax
799                        var overflowH = height < heightWindow ? imgH - height : imgH - heightWindow; // fix height on overflow
800                        top = top - overflowH;
801                        bottom = bottom + overflowH;
802                        // value with linear interpolation
803                        var value = -100 + min + (max - min) * (currentWindow - top) / (bottom - top);
804                        // set background-position
805                        var orizontalPosition = path.attr("data-oriz-pos");
806                        orizontalPosition = orizontalPosition ? orizontalPosition : "50%";
807                        $(this).css("background-position", orizontalPosition + " " + value + "px");
808
809                    }
810                });
811            }
812        }
813    if(!$("html").hasClass("touch")){
814        $(window).resize(parallaxPosition);
815        //$(window).focus(parallaxPosition);
816        $(window).scroll(parallaxPosition);
817        parallaxPosition();
818    }
819
820
821    /*----------------------------------------------------*/
822    /*  Sticky Header 
823    /*----------------------------------------------------*/
824    if ($('header#main-header').hasClass('sticky-header')) { 
825    
826        $(".sticky-header" ).clone(true).addClass('cloned').insertAfter( ".sticky-header" );
827       
828        $(".sticky-header.cloned.transparent #logo a img").attr('src',ws.logo);
829        $(".sticky_new.cloned #logo a img").attr('src',ws.logo);
830        $(".sticky-header.cloned.alternative").removeClass('alternative');
831        $('.sticky-header.cloned .popup-with-zoom-anim').magnificPopup({
832                type: 'inline',
833
834                fixedContentPos: false,
835                fixedBgPos: true,
836
837                overflowY: 'auto',
838
839                closeBtnInside: true,
840                preloader: false,
841
842                midClick: true,
843                removalDelay: 300,
844                mainClass: 'my-mfp-zoom-in'
845            });
846
847        var stickyHeader = document.querySelector(".sticky-header.cloned");
848
849        var headroom = new Headroom(stickyHeader, {
850          "offset": $(".sticky-header").height(),
851          "tolerance": 0
852        });
853         $(".sticky-header.cloned").find('#signup-dialog').remove();
854        $(".sticky-header.cloned").find('#login-dialog').remove();
855
856        // disabling on mobile
857        $(window).bind("load resize",function(e){
858            $( ".sticky-header.cloned" ).removeClass('transparent alternative');
859
860            var winWidth = $(window).width();
861
862            if(winWidth>ws.header_breakpoint) {
863                headroom.init();
864                }
865
866                else if(winWidth<ws.header_breakpoint) {
867                    headroom.destroy();
868                }
869        });
870
871    }
872
873        $(".small-only #coupon_code").on( "change", function() {
874                var value = $(this).val();
875                var name = $(this).attr('name');
876                $(".large-only").find("input[name*='"+name+"']").val(value);
877            }); 
878
879        $(".large-only #coupon_code").on( "change", function() {
880                var value = $(this).val();
881                var name = $(this).attr('name');
882                $(".small-only").find("input[name*='"+name+"']").val(value);
883            });
884
885    /* move related jobs after job details*/
886    var winWidth = $(window).width();
887    if(winWidth < 768){
888        $("#related-job-container").detach().appendTo('#job-details')
889    } 
890    
891// v1.5
892
893    /*----------------------------------------------------*/
894    /*  Slick Carousel
895    /*----------------------------------------------------*/
896    $('.testimonial-carousel').slick({
897      centerMode: true,
898      centerPadding: '34%',
899      slidesToShow: 1,
900     
901      dots: false,
902      arrows: false,
903      responsive: [
904        {
905          breakpoint: 1025,
906          settings: {
907            centerPadding: '10px',
908            slidesToShow: 2,
909          }
910        },
911        {
912          breakpoint: 767,
913          settings: {
914            centerPadding: '10px',
915            slidesToShow: 1
916          }
917        }
918      ]
919    });
920
921
922    /*----------------------------------------------------*/
923    /*  Flip Banner
924    /*----------------------------------------------------*/
925    function flipBanner() {
926
927        $('.flip-banner').prepend('<div class="flip-banner-overlay"></div>');
928
929        $(".flip-banner").each(function() {
930            var attrImage = $(this).attr('data-background');
931            var attrColor = $(this).attr('data-color');
932            var attrOpacity = $(this).attr('data-color-opacity');
933
934            if(attrImage !== undefined) {
935                $(this).css('background-image', 'url('+attrImage+')');
936            }
937
938            if(attrColor !== undefined) {
939                $(this).find(".flip-banner-overlay").css('background-color', ''+attrColor+'');
940            }
941
942            if(attrOpacity !== undefined) {
943                $(this).find(".flip-banner-overlay").css('opacity', ''+attrOpacity+'');
944            }
945
946        });
947    }
948    flipBanner();
949
950
951    /*----------------------------------------------------*/
952    /*  Image Box
953    /*----------------------------------------------------*/
954    $('.img-box').each(function(){
955        $(this).append('<div class="img-box-background"></div>');
956        $(this).children('.img-box-background').css({'background-image': 'url('+ $(this).attr('data-background-image') +')'});
957    });
958
959
960
961    
962    /*----------------------------------------------------*/
963    /*  Auto Header Padding
964    /*----------------------------------------------------*/
965    $(window).on('load resize', function() {
966
967        var headerHeight = $(".dashboard-header").height();
968        $('#dashboard').css('padding-top', headerHeight);
969
970    });
971
972    /*----------------------------------------------------*/
973    /*  Counters
974    /*----------------------------------------------------*/
975    // $(window).on('load', function() {
976    //     $('.dashboard-stat-content h4').counterUp({
977    //         delay: 100,
978    //         time: 800
979    //     });
980    // });
981
982    /*----------------------------------------------------*/
983    /* Dashboard Scripts
984    /*----------------------------------------------------*/
985
986    // Dashboard Nav Submenus
987    $('.dashboard-nav ul li a').on('click', function(e){
988        if($(this).closest("li").children("ul").length) {
989            if ( $(this).closest("li").is(".active-submenu") ) {
990               $('.dashboard-nav ul li').removeClass('active-submenu');
991            } else {
992                $('.dashboard-nav ul li').removeClass('active-submenu');
993                $(this).parent('li').addClass('active-submenu');
994            }
995            e.preventDefault();
996        }
997    });
998
999    // Dashbaord Nav Scrolling
1000    $(window).on('load resize', function() {
1001        var wrapperHeight = window.innerHeight;
1002        var headerHeight = $("#header-container").height();
1003        var winWidth = $(window).width();
1004
1005        if(winWidth>992) {
1006            $(".dashboard-nav-inner").css('max-height', wrapperHeight-headerHeight);
1007        } else {
1008            $(".dashboard-nav-inner").css('max-height', '');
1009        }
1010    });
1011
1012
1013    // Responsive Nav Trigger
1014    $('.dashboard-responsive-nav-trigger').on('click', function(e){
1015        e.preventDefault();
1016        $(this).toggleClass('active');
1017
1018        var dashboardNavContainer = $('body').find(".dashboard-nav");
1019
1020        if( $(this).hasClass('active') ){
1021            $(dashboardNavContainer).addClass('active');
1022        } else {
1023            $(dashboardNavContainer).removeClass('active');
1024        }
1025
1026    });
1027
1028
1029    /*----------------------------------------------------*/
1030    /* V2 Update
1031    /*----------------------------------------------------*/
1032
1033    /*--------------------------------------------------*/
1034    /*  Sticky Header
1035    /*--------------------------------------------------*/
1036    function stickyHeaderOther() {
1037        if($("#header-container").hasClass('sticky_new')) {
1038            $(window).on('scroll load', function() {
1039
1040                if($(window).width() < '1099') { 
1041                    $("#header-container").removeClass("cloned");
1042                }
1043                
1044                if($(window).width() > '1099') {
1045
1046                    // CSS adjustment
1047                    $("#header-container").css({
1048                        position: 'fixed',
1049                    });
1050            
1051                    var headerOffset = $("#header-container").height();
1052
1053                    if($(window).scrollTop() >= headerOffset){
1054                        $("#header-container").addClass('cloned');
1055                        $(".wrapper-with-transparent-header #header-container").addClass('cloned').removeClass("transparent-header unsticky");
1056                    } else {
1057                        $("#header-container").removeClass("cloned");
1058                        $(".wrapper-with-transparent-header #header-container").addClass('transparent-header unsticky').removeClass("cloned");
1059                    }
1060
1061               
1062                    if( $('.wrapper-with-transparent-header #header-container').hasClass('cloned')) {
1063                        $("#header-container.cloned #logo_nh img").attr("src", ws.logo);
1064                    } 
1065
1066                    if( $('.wrapper-with-transparent-header #header-container').hasClass('transparent-header')) {
1067                        $("#header-container #logo_nh img").attr("src", ws.transparentlogo);
1068                    } 
1069
1070                    $(window).on('load resize', function() {
1071                        var headerOffset = $("#header-container").height();
1072                        $("#wrapper").css({'padding-top': headerOffset});
1073                    });
1074                }
1075            });
1076        }
1077    }
1078
1079    // Sticky Header Init
1080    stickyHeaderOther();
1081
1082
1083    /*--------------------------------------------------*/
1084    /*  Transparent Header Spacer Adjustment
1085    /*--------------------------------------------------*/
1086    $(window).on('load resize', function() {
1087        var transparentHeaderHeight = $('.transparent-header').outerHeight();
1088        $('.transparent-header-spacer').css({
1089            height: transparentHeaderHeight,
1090        });
1091    });
1092
1093
1094    /*--------------------------------------------------*/
1095    /*  Ripple Effect
1096    /*--------------------------------------------------*/
1097    $('.ripple-effect, .ripple-effect-dark').on('click', function(e) {
1098        var rippleDiv = $('<span class="ripple-overlay">'),
1099            rippleOffset = $(this).offset(),
1100            rippleY = e.pageY - rippleOffset.top,
1101            rippleX = e.pageX - rippleOffset.left;
1102
1103        rippleDiv.css({
1104            top: rippleY - (rippleDiv.height() / 2),
1105            left: rippleX - (rippleDiv.width() / 2),
1106            // background: $(this).data("ripple-color");
1107        }).appendTo($(this));
1108
1109        window.setTimeout(function() {
1110            rippleDiv.remove();
1111        }, 800);
1112    });
1113
1114    /*--------------------------------------------------*/
1115    /*  Header User Dropdown
1116    /*--------------------------------------------------*/
1117     window.header_menu = function(){
1118      
1119        $(".header-notifications").each(function() {
1120          
1121          var userMenu = $(this);
1122          var userMenuTrigger = $(this).find('.header-notifications-trigger a');
1123
1124          $(userMenuTrigger).on('click', function(event) {
1125
1126            event.preventDefault();
1127
1128            if ( $(this).closest(".header-notifications").is(".active") ) {
1129                    close_user_dropdown();
1130                } else {
1131                    close_user_dropdown();
1132                    userMenu.addClass('active');
1133                }
1134          });
1135        });
1136     }
1137     header_menu();
1138    
1139
1140    // Closing function
1141    function close_user_dropdown() {
1142        $('.header-notifications').removeClass("active");
1143    }
1144
1145    // Closes notification dropdown on click outside the conatainer
1146    var mouse_is_inside = false;
1147
1148    $( ".header-notifications" ).on( "mouseenter", function() {
1149      mouse_is_inside=true;
1150    });
1151    $( ".header-notifications" ).on( "mouseleave", function() {
1152      mouse_is_inside=false;
1153    });
1154
1155    $("body").mouseup(function(){
1156        if(! mouse_is_inside) close_user_dropdown();
1157    });
1158
1159    // Close with ESC
1160    $(document).keyup(function(e) { 
1161        if (e.keyCode == 27) {
1162            close_user_dropdown();
1163        }
1164    });
1165
1166    /*----------------------------------------------------*/
1167    /*  Inline CSS replacement for backgrounds
1168    /*----------------------------------------------------*/
1169    function inlineBG() {
1170
1171        // Common Inline CSS
1172        $(".single-page-header, .intro-banner").each(function() {
1173            var attrImageBG = $(this).attr('data-background-image');
1174
1175            if(attrImageBG !== undefined) {
1176                $(this).append('<div class="background-image-container"></div>');
1177                $('.background-image-container').css('background-image', 'url('+attrImageBG+')');
1178            }
1179        });
1180
1181    } inlineBG();
1182
1183
1184    // Fix for intro banner with label
1185    $(".intro-search-field").each(function() {
1186        var bannerLabel = $(this).children("label").length;
1187        if ( bannerLabel > 0 ){
1188            $(this).addClass("with-label");
1189        }
1190    });
1191
1192    /*--------------------------------------------------*/
1193    /*  Full Screen Page Scripts
1194    /*--------------------------------------------------*/
1195
1196    // Wrapper Height (window height - header height)
1197    function wrapperHeight() {
1198        var headerHeight = $("#header-container").outerHeight();
1199        var windowHeight = $(window).outerHeight() - headerHeight;
1200        $('.full-page-content-container, .dashboard-content-container, .dashboard-sidebar-inner, .dashboard-container, .full-page-container').css({ height: windowHeight });
1201        $('.dashboard-content-inner').css({ 'min-height': windowHeight });
1202    }
1203
1204    // Init
1205    $(window).on('load resize', function() {
1206        wrapperHeight();
1207    });
1208    wrapperHeight();
1209
1210
1211
1212     $( "#radius-range" ).slider({
1213        value: workscout_core.radius_default,
1214        min: 1,
1215        max: 800,
1216        step: 1,
1217      slide: function( event, ui ) {
1218        $( "input#radius_amount" ).val(  ui.value );
1219        $( ".radius_amount span" ).text(  ui.value );
1220        // if(job_manager_ajax_filters.currency_postion === 'before') {
1221        //   $( ".salary_amount .from" ).text(job_manager_ajax_filters.currency+ui.values[ 0 ]);
1222        //   $( ".salary_amount .to" ).text(job_manager_ajax_filters.currency+ui.values[ 1 ]); 
1223        // } else {
1224        //   $( ".salary_amount .from" ).text(ui.values[ 0 ]+job_manager_ajax_filters.currency);
1225        //   $( ".salary_amount .to" ).text(ui.values[ 1 ]+job_manager_ajax_filters.currency); 
1226        // }
1227      
1228      },
1229      stop: function( event, ui ) {
1230          var target   = $('div.job_listings,div.resumes' );
1231          target.triggerHandler( 'update_results', [ 1, false ] );
1232      }
1233    });
1234
1235    
1236    // Single Select
1237    $('.select2-single').select2({
1238        minimumResultsForSearch: 20,
1239        width: "100%",
1240        allowClear: true,
1241    });
1242
1243    // Multiple Select
1244    $(".select2-multiple").each(function() {
1245        $(this).select2({
1246            width: "100%",
1247            placeholder: $(this).attr('placeholder')
1248        });
1249    });
1250
1251    // Select on Home Search Bar
1252    $('.select-on-home').select2({
1253      dropdownParent: $('.intro-banner'),
1254      minimumResultsForSearch: 20,
1255      width: "100%"
1256    });
1257    
1258    // Dashboard Wrapper Height 
1259    $(window).on('load resize', function() {
1260        $("#dashboard").css('min-height', $(window).height()-$(".new-header #header-container").height());
1261    });
1262
1263
1264
1265
1266
1267// ------------------ End Document ------------------ //
1268});
1269
1270})(this.jQuery);
1271
1272  
1273  /**
1274 * hoverIntent is similar to jQuery's built-in "hover" method except that
1275 * instead of firing the handlerIn function immediately, hoverIntent checks
1276 * to see if the user's mouse has slowed down (beneath the sensitivity
1277 * threshold) before firing the event. The handlerOut function is only
1278 * called after a matching handlerIn.
1279 *
1280 * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
1281 * http://cherne.net/brian/resources/jquery.hoverIntent.html
1282 *
1283 * You may use hoverIntent under the terms of the MIT license. Basically that
1284 * means you are free to use hoverIntent as long as this header is left intact.
1285 * Copyright 2007, 2013 Brian Cherne
1286 *
1287 * // basic usage ... just like .hover()
1288 * .hoverIntent( handlerIn, handlerOut )
1289 * .hoverIntent( handlerInOut )
1290 *
1291 * // basic usage ... with event delegation!
1292 * .hoverIntent( handlerIn, handlerOut, selector )
1293 * .hoverIntent( handlerInOut, selector )
1294 *
1295 * // using a basic configuration object
1296 * .hoverIntent( config )
1297 *
1298 * @param  handlerIn   function OR configuration object
1299 * @param  handlerOut  function OR selector for delegation OR undefined
1300 * @param  selector    selector OR undefined
1301 * @author Brian Cherne <brian(at)cherne(dot)net>
1302 **/
1303(function($) {
1304    $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
1305
1306        // default configuration values
1307        var cfg = {
1308            interval: 50,
1309            sensitivity: 7,
1310            timeout: 0
1311        };
1312
1313        if ( typeof handlerIn === "object" ) {
1314            cfg = $.extend(cfg, handlerIn );
1315        } else if ($.isFunction(handlerOut)) {
1316            cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
1317        } else {
1318            cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
1319        }
1320
1321        // instantiate variables
1322        // cX, cY = current X and Y position of mouse, updated by mousemove event
1323        // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
1324        var cX, cY, pX, pY;
1325
1326        // A private function for getting mouse position
1327        var track = function(ev) {
1328            cX = ev.pageX;
1329            cY = ev.pageY;
1330        };
1331
1332        // A private function for comparing current and previous mouse position
1333        var compare = function(ev,ob) {
1334            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
1335            // compare mouse positions to see if they've crossed the threshold
1336            if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
1337                $(ob).off("mousemove.hoverIntent",track);
1338                // set hoverIntent state to true (so mouseOut can be called)
1339                ob.hoverIntent_s = 1;
1340                return cfg.over.apply(ob,[ev]);
1341            } else {
vendor: 2,174 bytes, lines 1342-1386
1342                // set previous coordinates for next time
1343                pX = cX; pY = cY;
1344                // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
1345                ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
1346            }
1347        };
1348
1349        // A private function for delaying the mouseOut function
1350        var delay = function(ev,ob) {
1351            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
1352            ob.hoverIntent_s = 0;
1353            return cfg.out.apply(ob,[ev]);
1354        };
1355
1356        // A private function for handling mouse 'hovering'
1357        var handleHover = function(e) {
1358            // copy objects to be passed into t (required for event object to be passed in IE)
1359            var ev = jQuery.extend({},e);
1360            var ob = this;
1361
1362            // cancel hoverIntent timer if it exists
1363            if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
1364
1365            // if e.type == "mouseenter"
1366            if (e.type == "mouseenter") {
1367                // set "previous" X and Y position based on initial entry point
1368                pX = ev.pageX; pY = ev.pageY;
1369                // update "current" X and Y position based on mousemove
1370                $(ob).on("mousemove.hoverIntent",track);
1371                // start polling interval (self-calling timeout) to compare mouse coordinates over time
1372                if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
1373
1374                // else e.type == "mouseleave"
1375            } else {
1376                // unbind expensive mousemove event
1377                $(ob).off("mousemove.hoverIntent",track);
1378                // if hoverIntent state is true, then call the mouseOut function after the specified delay
1379                if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
1380            }
1381        };
1382
1383        // listen for mouseenter and mouseleave
1384        return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
1385    };
1386})(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.