PageSourceSearch

https://www.hagag-group.co.il/Scripts/Script.js?ver=65

js hagag-group.co.il collected 2026-10-01 10:17:02 UTC 43,941 bytes, 1,329 lines download raw bytes

1$(function () {
2
3    Validation.init();
4    topContactclick.init();
5    async.init();
6    OwlCarousel.initOwlNewsCarousel();
7
8    setTimeout(function () {
9        $('.SlideshowDIV').removeClass("slider");
10        $('.SlideshowDIV').addClass("SlideshowDIVOpacity");
11    }, 10);
12
13
14    $('.nameProject').on('change', function () {
15        var bmbiCode = $('option:selected', this).attr('data-bambiId');
16        var n2uCode = $('option:selected', this).attr('data-n2uId');
17        $(".ProjectBambiCode").val(bmbiCode);
18        $(".Projectn2uCode").val(n2uCode);
19    });
20
21    $(".emailHidden").each(function () {
22        $(this).val('1');
23    });
24
25
26
27    $('html').on('click', function (event) {
28        var wiht = window.innerWidth;
29        if (wiht > 991) {
30            event.stopPropagation();
31        }
32    });
33
34    $('.topProjects_0').magnificPopup({
35        type: 'image',
36        gallery: {
37            enabled: true,
38            navigateByImgClick: true,
39            preload: [0, 1]
40        },
41        image: {
42            titleSrc: 'title',
43            // this tells the script which attribute has your caption
44        },
45        mainClass: 'mfp-with-zoom', // this class is for CSS animation below
46
47        zoom: {
48            enabled: true, // By default it's false, so don't forget to enable it
49
50            duration: 300, // duration of the effect, in milliseconds
51            easing: 'ease-in-out', // CSS transition easing function
52
53            // The "opener" function should return the element from which popup will be zoomed in
54            // and to which popup will be scaled down
55            // By defailt it looks for an image tag:
56            opener: function (openerElement) {
57                // openerElement is the element on which popup was initialized, in this case its <a> tag
58                // you don't need to add "opener" option if this code matches your needs, it's defailt one.
59                return openerElement.is('img') ? openerElement : openerElement.find('img');
60            }
61        }
62
63    });
64    $('.topProjects_1').magnificPopup({
65        type: 'image',
66        gallery: {
67            enabled: true,
68            navigateByImgClick: true,
69            preload: [0, 1]
70        },
71        image: {
72            titleSrc: 'title',
73            // this tells the script which attribute has your caption
74        },
75        mainClass: 'mfp-with-zoom', // this class is for CSS animation below
76
77        zoom: {
78            enabled: true, // By default it's false, so don't forget to enable it
79
80            duration: 300, // duration of the effect, in milliseconds
81            easing: 'ease-in-out', // CSS transition easing function
82
83            // The "opener" function should return the element from which popup will be zoomed in
84            // and to which popup will be scaled down
85            // By defailt it looks for an image tag:
86            opener: function (openerElement) {
87                // openerElement is the element on which popup was initialized, in this case its <a> tag
88                // you don't need to add "opener" option if this code matches your needs, it's defailt one.
89                return openerElement.is('img') ? openerElement : openerElement.find('img');
90            }
91        }
92
93    });
94    $('.topProjects_2').magnificPopup({
95        type: 'image',
96        gallery: {
97            enabled: true,
98            navigateByImgClick: true,
99            preload: [0, 1]
100        },
101        image: {
102            titleSrc: 'title',
103            // this tells the script which attribute has your caption
104        },
105        mainClass: 'mfp-with-zoom', // this class is for CSS animation below
106
107        zoom: {
108            enabled: true, // By default it's false, so don't forget to enable it
109
110            duration: 300, // duration of the effect, in milliseconds
111            easing: 'ease-in-out', // CSS transition easing function
112
113            // The "opener" function should return the element from which popup will be zoomed in
114            // and to which popup will be scaled down
115            // By defailt it looks for an image tag:
116            opener: function (openerElement) {
117                // openerElement is the element on which popup was initialized, in this case its <a> tag
118                // you don't need to add "opener" option if this code matches your needs, it's defailt one.
119                return openerElement.is('img') ? openerElement : openerElement.find('img');
120            }
121        }
122
123    });
124
125
126    $('.close-form-side').on('click', function (event) {
127
128        event.preventDefault();
129
130        $(".Content-toggle").slideToggle("slow", "", 300);
131        setTimeout(function () {
132            if ($(".close-form-side> span").text() == "סגור") {
133                $(".close-form-side> span").text("פתח");
134            }
135            else {
136                $(".close-form-side> span").text("סגור");
137            }
138        }, 700)
139
140
141
142
143
144    });
145
146
147
148    $("#HousePlans a").each(function (e) {
149
150        $(this).addClass("image-popup-no-margins");
151
152    });
153
154
155
156
157    $('.popup-youtube').magnificPopup({
158        disableOn: 300,
159        type: 'iframe',
160        mainClass: 'mfp-fade',
161        removalDelay: 160,
162        preloader: false,
163        fixedContentPos: false,
164
165    });
166
167    $('.popup-youtube').attr('role', 'button');
168
169
170    $('.popup-with-zoom-anim').magnificPopup({
171        type: 'inline',
172
173        fixedContentPos: false,
174        fixedBgPos: true,
175
176        overflowY: 'auto',
177
178        closeBtnInside: true,
179        preloader: false,
180        enableEscapeKey: true,
181        midClick: true,
182        removalDelay: 300,
183        mainClass: 'my-mfp-zoom-in',
184
185        callbacks: {
186            open: function () {
187                // Set focus on the first input field or any other element
188                //setTimeout(function () {
189
190                //    $(".popSpan_" + id).focus();
191                //    // Disable focus on elements outside the modal
192                //    $('body').attr('tabindex', '-1');
193
194                //    $('body').on('focus', function () {
195
196                //        //$(".popSpan_" + id).focus();
197                //    });
198                //}, 500);
199            }
200        }
201
202
203    });
204    $('.popup-with-zoom-anim').click(function () {
205        var id = $(this).attr('data-id');
206        var href = $(this).attr('href');
207        window.location.hash = '#small-dialog_' + id;
208        $(".mfp-close").attr("aria-label", "סגור חלונית");
209
210        setTimeout(function () {
211
212            var div = $("#small-dialog_" + id);
213            $(".mfp-content").children('.small-dialog').attr("tabindex", -1).focus();
214
215        }, 100);
216
217        //$("#small-dialog_" + id).trigger("click");
218        //$("#small-dialog_" + id).trigger("focus");
219
220        //$('#small-dialog_' + id).focus();
221
222
223
224    });
225    $(document).ready(function () {
226
227        $('.floatingDivClose').on('click', function () {
228            $(this).closest('.floatingDiv').fadeOut(200);
229        });
230
231        var $message = $('.works-grid-wrapper');
232        
233
234        setTimeout(function () {
235            $message.addClass('fadeIn fast');
236        }, 2000);
237        //setTimeout(
238        //    function () {
239        //        $(".mfp-close").attr("aria-label", "סגור חלונית");
240        //    }, 1000);
241
242        $(".pauseButton").attr("aria-label", "עצור ניגון");
243        $(".pauseButton").attr("role", "button");
244        $(".pauseButton").attr("tabindex", "0");
245
246        $(".pauseButton").on('click', function () {
247            $(this).attr("aria-label", "המשך ניגון");
248        });
249
250        $(".playButton").on('click', function () {
251            $(this).attr("aria-label", "עצור ניגון");
252        });
253
254
255        $('.sliderBtn').on('click', function () {
256            var id = $(this).attr("data-id");
257            if ($(this).siblings('.topProjectsLeftSlider').children('.cycle-slideshow').hasClass('cycle-paused')) {
258                $('.slider_' + id).cycle('resume');
259                $(this).text("עצור");
260                $(this).attr("aria-label", "עצור ניגון");
261            }
262            else {
263                $('.slider_' + id).cycle('pause');
264                $(this).text("המשך");
265                $(this).attr("aria-label", "המשך ניגון");
266            }
267
268        });
269
270        $('#stopButton').on('click', function () {
271            $('.cycle-slideshow').cycle('pause');
272        });
273
274
275        $(".work-item").on("focus", function () {
276            $(this).children('work-caption').css("bottom", "0");
277        });
278
279
280
281        $(".filterProjectsA").on("click", function () {
282            var cur = $(this);
283            $(".filterProjectsA").each(function () {
284                $(this).attr("aria-pressed", "false");
285            });
286            cur.attr("aria-pressed", "true");
287
288        });
289
290
291    });
292
293
294    $('.image-popup-no-margins').magnificPopup({
295        type: 'image',
296        closeOnContentClick: true,
297        closeBtnInside: false,
298        fixedContentPos: true,
299        mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
300        image: {
301            verticalFit: true
302        },
303        zoom: {
304            enabled: true,
305            duration: 300 // don't foget to change the duration also in CSS
306        }
307    });
308
309
310    $(document).on('mouseleave', '#jrate', function () {
311        $('#demo-onchange-value').hide();
312
313    });
314    var fleg = false;
315
316    $(".navbar-toggle").on("click", function () {
317        if (!$(".navbar-collapse").hasClass("in")) {
318            $(".sidebar").css("position", "relative");
319            //$(".wrapper").css("margin-top", "0");
320        }
321        else {
322            $(".sidebar").css("position", "fixed");
323            //$(".wrapper").css("margin-top", "70px");
324        }
325
326    });
327
328
329
330
331    $('.my-links').colorTip({ color: "black" });
332    setInterval(function () {
333        $('#LoadingMask').fadeOut(900)
334    }, 1500);
335
336    $('.my-links-sharing').colorTip({ color: "black" });
337    setInterval(function () {
338        $('#LoadingMask').fadeOut(900)
339    }, 1500);
340
341
342    $(".print").click(linkToPrint);
343
344    $(".navbar-toggle").on('click', function () {
345        window.scrollTo(0, 0);
346    });
347
348
349    $('.portfolio-post.post img[title]').each(function () {
350        title = $(this).attr('title');
351        if (title != "")
352            $(this).after('<div class="clear"></div><span class="title-description-tip">' + title.toString() + '</span>');
353    });
354
355
356
357    $("#isEmailNotify").on('click', function () {
358        if ($(this).is(':checked')) {
359            $("#row-email").show();
360            $("#email").addClass("signin-email");
361        }
362        else {
363            $("#row-email").hide();
364            $("#email").removeClass("signin-email");
365            $("#email").removeClass("not-valid");
366        }
367    });
368
369    setTimeout(function () { $('.to-bottom-baner').fadeIn(600) }, 1200);
370
371
372    $('.to-bottom-baner a').click(function (e) {
373        e.preventDefault();
374        var mobile;
375        if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
376            mobile = true;
377        } else {
378            mobile = false;
379        }
380        if (mobile == true) {
381            var h = 90;
382            $("html, body").animate({ scrollTop: $(".h1-top-border h1").offset().top - h }, "slow");
383        }
384        else {
385            var h = 20;
386            $("html, body").animate({ scrollTop: $(".h1-top-border h1").offset().top - h }, "slow");
387
388        }
389    });
390
391
392
393    $(".my-pdf").on("click", function (e) {
394
395        window.open($(this).attr('data-pdf'), "_blank");
396
397    });
398
399
400
401
402
403
404
405
406});
407
408
409
410var topContactclick = {
411    init: function () {
412        $('.Contact-icon').on('click', function (e) {
413            e.preventDefault();
414            var h = -69;
415
416            $("html, body").animate({ scrollTop: $("#ContactFooter").offset().top + h }, 1000, "swing");
417
418        });
419
420    }
421};
422
423
424var topMemuFixed = {
425    init: function () {
426
427        var wiht = window.innerWidth;
428        jQuery(window).scroll(function () {
429            var top = $(window).scrollTop();
430            var topHeader = ($(".height-img").offset().top);
431            if (wiht > 991) {
432                if (top > ((topHeader) - 77)) {
433                    $('.top-tat-header').addClass("fixed");
434
435                }
436                else {
437                    $('.top-tat-header').removeClass("fixed");
438                }
439            }
440            if (wiht < 991) {
441                if (top > ((topHeader) - 145)) {
442                    $('.top-tat-header').addClass("fixed-mobile");
443
444                }
445                else {
446                    $('.top-tat-header').removeClass("fixed-mobile");
447                }
448            }
449        });
450    }
451};
452var topMemuProjectsFixed = {
453    init: function () {
454
455        var wiht = window.innerWidth;
456        jQuery(window).scroll(function () {
457            var top = $(window).scrollTop();
458            var topHeader = ($(".height-img").offset().top);
459            if (wiht > 991) {
460                if (top > ((topHeader) + 10)) {
461                    $('.FilterInProjects').addClass("fixed");
462
463                }
464                else {
465                    $('.FilterInProjects').removeClass("fixed");
466                }
467            }
468            if (wiht < 991) {
469                if (top > ((topHeader) - 65)) {
470                    $('.FilterInProjects').addClass("fixed-mobile");
471
472                }
473                else {
474                    $('.FilterInProjects').removeClass("fixed-mobile");
475                }
476            }
477        });
478    }
479};
480
481var topMemuCurrent = {
482    init: function () {
483        var wiht = window.innerWidth;
484        jQuery(window).scroll(function () {
485
486            var AboutProject = $("#AboutProject").offset().top;
487
488            var glryProject;
489            if ($("#glryProject").length) {
490                glryProject = $("#glryProject").offset().top;
491            }
492
493            var HousePlans;
494            if ($("#HousePlans").length) {
495                HousePlans = $("#HousePlans").offset().top;
496            }
497
498            var updateUsers = $("#updateUsers").offset().top;
499            var mapProject = $("#mapProject").offset().top;
500            var top;
501            if (wiht > 991) {
502                top = ($(window).scrollTop()) + 60;
503            }
504            if (wiht < 991) {
505                top = ($(window).scrollTop()) + 135;
506            }
507            if (top > AboutProject) {
508                $('.project-nav a').each(function () {
509                    $(this).removeClass('current');
510                });
511
512                $("a[href=#AboutProject]").addClass('current');
513            }
514
515            if (top > glryProject) {
516                $('.project-nav a').each(function () {
517                    $(this).removeClass('current');
518                });
519
520                $("a[href=#glryProject]").addClass('current');
521                $("#glryProject").focus();
522            }
523            if (top > HousePlans) {
524                $('.project-nav a').each(function () {
525                    $(this).removeClass('current');
526                });
527
528                $("a[href=#HousePlans]").addClass('current');
529            }
530
531            if (top > updateUsers) {
532                $('.project-nav a').each(function () {
533                    $(this).removeClass('current');
534                });
535
536                $("a[href=#updateUsers]").addClass('current');
537            }
538            if (top > mapProject) {
539                $('.project-nav a').each(function () {
540                    $(this).removeClass('current');
541                });
542
543                $("a[href=#mapProject]").addClass('current');
544            }
545
546
547        });
548    }
549};
550
551
552
553var topMemuclick = {
554    init: function () {
555        $('.project-nav a').on('click', function (e) {
556            e.preventDefault();
557            var h;
558            var wiht = window.innerWidth;
559            if (wiht > 991) {
560                h = -50;
561            }
562            if (wiht < 991) {
563                h = -130;
564            }
565
566            id = $(this).attr('href');
567            setTimeout(function () {
568                window.location.hash = id;
569            }, 1000);
570
571
572            $("html, body").animate({ scrollTop: $(id).offset().top + h }, 1000, "swing");
573
574        });
575
576    }
577};
578
579
580var OwlCarousel = function () {
581
582    return {
583        //Owl Carousel
584        initOwlNewsCarousel: function () {
585            var owl = jQuery(".news-slider").owlCarousel({
586                loop: true,
587                rtl: true,
588                responsive: {
589                    0: {
590                        items: 1
591                    },
592                    500:
593                    {
594                        items: 2
595                    },
596                    768:
597                    {
598                        items: 3
599                    },
600                }
601            });
602            jQuery(".next-v3").click(function () {
603                owl.trigger('next.owl.carousel');
604            })
605            jQuery(".prev-v3").click(function () {
606                owl.trigger('prev.owl.carousel');
607            })
608        },
609    };
610
611}();
612
613var MyMap = {
614    init: function (url) {
615        if (url == "contact") {
616            var contentString1 = "" +
617                "<div >" +
618                "</div>" +
619                "<h1 class='title-map-h1'>דא קוצ'ינה מטבחים</h1>" +
620                "<h2>חיים שפירא 1, אזה''ת החדש ראשל''צ</h2>" +
621                "</div>" +
622                "</div>";
623
624
625            var locations1 = [
626
627                [contentString1, 31.993625, 34.7502967],
628            ];
629
630            var map1 = new google.maps.Map(document.getElementById("map1"), {
631                zoom: 16,
632                scrollwheel: false,
633                center: new google.maps.LatLng(31.993625, 34.7502967),
634                mapTypeId: google.maps.MapTypeId.ROADMAP,
635                styles: [{ "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#e9e9e9" }, { "lightness": 17 }] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5" }, { "lightness": 20 }] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{ "color": "#ffffff" }, { "lightness": 17 }] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{ "color": "#ffffff" }, { "lightness": 29 }, { "weight": 0.2 }] }, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [{ "color": "#ffffff" }, { "lightness": 18 }] }, { "featureType": "road.local", "elementType": "geometry", "stylers": [{ "color": "#ffffff" }, { "lightness": 16 }] }, { "featureType": "poi", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5" }, { "lightness": 21 }] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#dedede" }, { "lightness": 21 }] }, { "elementType": "labels.text.stroke", "stylers": [{ "visibility": "on" }, { "color": "#ffffff" }, { "lightness": 16 }] }, { "elementType": "labels.text.fill", "stylers": [{ "saturation": 36 }, { "color": "#333333" }, { "lightness": 40 }] }, { "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "featureType": "transit", "elementType": "geometry", "stylers": [{ "color": "#f2f2f2" }, { "lightness": 19 }] }, { "featureType": "administrative", "elementType": "geometry.fill", "stylers": [{ "color": "#fefefe" }, { "lightness": 20 }] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [{ "color": "#fefefe" }, { "lightness": 17 }, { "weight": 1.2 }] }]
636
637            });
638
639            var infowindow = new google.maps.InfoWindow();
640
641            var marker1;
642
643
644            marker1 = new google.maps.Marker({
645                position: new google.maps.LatLng(locations1[0][1], locations1[0][2]),
646                map: map1,
647                options: {
648                    icon: '/Content/assets/images/map-icon.png'
649                }
650            });
651
652            google.maps.event.addListener(marker1, 'click', (function (marker1) {
653                return function () {
654                    infowindow.setContent(locations1[0][0]);
655                    infowindow.open(map1, marker1);
656                }
657            })(marker1));
658
659
660
661
662
663
664
665
666            var contentString2 = "" +
667                "<div >" +
668                "</div>" +
669                "<h1 class='title-map-h1'>דא קוצ'ינה מטבחים</h1>" +
670                "<h2>לח''י 2, דן דיזיין סנטר בני ברק</h2>" +
671                "</div>" +
672                "</div>";
673
674
675            var locations2 = [
676
677                [contentString2, 32.1036103, 34.8296561],
678            ];
679
680            var myMap2 = new google.maps.Map($('#map2')[0], {
681                zoom: 16,
682                scrollwheel: false,
683                center: new google.maps.LatLng(32.1036103, 34.8296561),
684                mapTypeId: google.maps.MapTypeId.ROADMAP,
685                styles: [{ "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#e9e9e9" }, { "lightness": 17 }] }, { "featureType": "landscape", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5" }, { "lightness": 20 }] }, { "featureType": "road.highway", "elementType": "geometry.fill", "stylers": [{ "color": "#ffffff" }, { "lightness": 17 }] }, { "featureType": "road.highway", "elementType": "geometry.stroke", "stylers": [{ "color": "#ffffff" }, { "lightness": 29 }, { "weight": 0.2 }] }, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [{ "color": "#ffffff" }, { "lightness": 18 }] }, { "featureType": "road.local", "elementType": "geometry", "stylers": [{ "color": "#ffffff" }, { "lightness": 16 }] }, { "featureType": "poi", "elementType": "geometry", "stylers": [{ "color": "#f5f5f5" }, { "lightness": 21 }] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#dedede" }, { "lightness": 21 }] }, { "elementType": "labels.text.stroke", "stylers": [{ "visibility": "on" }, { "color": "#ffffff" }, { "lightness": 16 }] }, { "elementType": "labels.text.fill", "stylers": [{ "saturation": 36 }, { "color": "#333333" }, { "lightness": 40 }] }, { "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "featureType": "transit", "elementType": "geometry", "stylers": [{ "color": "#f2f2f2" }, { "lightness": 19 }] }, { "featureType": "administrative", "elementType": "geometry.fill", "stylers": [{ "color": "#fefefe" }, { "lightness": 20 }] }, { "featureType": "administrative", "elementType": "geometry.stroke", "stylers": [{ "color": "#fefefe" }, { "lightness": 17 }, { "weight": 1.2 }] }]
686
687            });
688
689            var infowindow = new google.maps.InfoWindow();
690
691            var marker2;
692
693
694            marker2 = new google.maps.Marker({
695                position: new google.maps.LatLng(locations2[0][1], locations2[0][2]),
696                map: myMap2,
697                options: {
698                    icon: '/Content/assets/images/map-icon.png'
699                }
700            });
701
702            google.maps.event.addListener(marker2, 'click', (function (marker2) {
703                return function () {
704                    infowindow.setContent(locations2[0][0]);
705                    infowindow.open(myMap2, marker2);
706                }
707            })(marker2));
708
709
710
711
712
713        }
714    }
715};
716
717
718this.sitemapstyler = function () {
719    var sitemap = document.getElementById("sitemap")
720    if (sitemap) {
721        this.listItem = function (li) {
722            if (li.getElementsByTagName("ul").length > 0) {
723                var ul = li.getElementsByTagName("ul")[0];
724                ul.style.display = "block";
725                var span = document.createElement("span");
726                span.className = "collapsed";
727                span.onclick = function () {
728                    ul.style.display = (ul.style.display == "none") ? "block" : "none";
729                    this.className = (ul.style.display == "none") ? "collapsed" : "expanded";
730                };
731                li.appendChild(span);
732            };
733        };
734        var items = sitemap.getElementsByTagName("li");
735        for (var i = 0; i < items.length; i++) {
736            listItem(items[i]);
737        };
738    };
739};
740window.onload = sitemapstyler;
741
742
743
744function linkToPrint(e) {
745    e.preventDefault();
746
747    if ($(this).attr('href') == "#") {
748        window.print();
749    }
750    else {
751        //document.location.href = "http://www.co.il" + $(this).attr('href');
752    }
753}
754
755//Form Validation
756var Validation = {
757    init: function () {
758
759        $("form").on("submit", ".not-valid", Validation.validator);
760
761
762
763        $('#PopupFormBTN').on('click', function () {
764
765            //$("input[name=name]").focusout(Validation.validator);
766
767            //$("input[name=phone]").focusout(Validation.validator);
768
769            elName = $(".namePop");
770            elPhone = $(".phonePop");
771            elMail = $(".emailPop");
772
773
774
775            if (elMail.val().length < 2 || elMail.val() == elMail.attr('data-hint') || elMail.val() == elMail.attr('placeholder')) {
776                elMail.removeClass('not-valid').addClass('not-valid');
777                $(".emailErr").show();
778                elMail.focus();
779            }
780            else {
781                elMail.removeClass('not-valid');
782                $(".emailErr").hide();
783            }
784
785            if (elPhone.val().length < 2 || elPhone.val() == elPhone.attr('data-hint') || elPhone.val() == elPhone.attr('placeholder')) {
786                elPhone.removeClass('not-valid').addClass('not-valid');
787                $(".phoneErr").show();
788                elPhone.focus();
789            }
790            else {
791                elPhone.removeClass('not-valid');
792                $(".phoneErr").hide();
793            }
794            if (elName.val().length < 2 || elName.val() == elName.attr('data-hint') || elName.val() == elName.attr('placeholder')) {
795                elName.removeClass('not-valid').addClass('not-valid');
796                $(".nameErr").show();
797                elName.focus();
798            }
799            else {
800                elName.removeClass('not-valid');
801                $(".nameErr").hide();
802            }
803
804
805
806        })
807
808
809        $('.big-btn-side').on('click', function () {
810
811            //$("input[name=name]").focusout(Validation.validator);
812
813            //$("input[name=phone]").focusout(Validation.validator);
814
815            elName = $(".nameSide");
816            elPhone = $(".phoneSide");
817
818            elMail = $(".emailSide");
819
820
821
822            if (elMail.val().length < 2 || elMail.val() == elMail.attr('data-hint') || elMail.val() == elMail.attr('placeholder')) {
823                elMail.removeClass('not-valid').addClass('not-valid');
824                $(".emailErr").show();
825                elMail.focus();
826            }
827            else {
828                elMail.removeClass('not-valid');
829                $(".emailErr").hide();
830            }
831
832
833            if (elPhone.val().length < 2 || elPhone.val() == elPhone.attr('data-hint') || elPhone.val() == elPhone.attr('placeholder')) {
834                elPhone.removeClass('not-valid').addClass('not-valid');
835                $(".phoneErr").show();
836                elPhone.focus();
837            }
838            else {
839                elPhone.removeClass('not-valid');
840                $(".phoneErr").hide();
841            }
842            if (elName.val().length < 2 || elName.val() == elName.attr('data-hint') || elName.val() == elName.attr('placeholder')) {
843                elName.removeClass('not-valid').addClass('not-valid');
844                $(".nameErr").show();
845                elName.focus();
846            }
847            else {
848                elName.removeClass('not-valid');
849                $(".nameErr").hide();
850            }
851
852
853        })
854
855
856        $('.big-btn').on('click', function () {
857
858            //$("input[name=name]").focusout(Validation.validator);
859
860            //$("input[name=phone]").focusout(Validation.validator);
861
862            elName = $(".nameLayout");
863            elPhone = $(".phoneLayout");
864            elMail = $(".emailLayout");
865
866
867
868            if (elMail.val().length < 2 || elMail.val() == elMail.attr('data-hint') || elMail.val() == elMail.attr('placeholder')) {
869                elMail.removeClass('not-valid').addClass('not-valid');
870                $(".emailErr").show();
871                elMail.focus();
872            }
873            else {
874                elMail.removeClass('not-valid');
875                $(".emailErr").hide();
876            }
877
878            if (elPhone.val().length < 2 || elPhone.val() == elPhone.attr('data-hint') || elPhone.val() == elPhone.attr('placeholder')) {
879                elPhone.removeClass('not-valid').addClass('not-valid');
880                $(".phoneErr").show();
881                elPhone.focus();
882            }
883            else {
884                elPhone.removeClass('not-valid');
885                $(".phoneErr").hide();
886            }
887            if (elName.val().length < 2 || elName.val() == elName.attr('data-hint') || elName.val() == elName.attr('placeholder')) {
888                elName.removeClass('not-valid').addClass('not-valid');
889                $(".nameErr").show();
890                elName.focus();
891            }
892            else {
893                elName.removeClass('not-valid');
894                $(".nameErr").hide();
895            }
896
897
898
899        })
900
901
902        $('.big-btn-users').on('click', function () {
903
904            $("input[name=Password]").focusout(Validation.validator);
905
906
907        })
908
909        $('.login-customers-password').on('click', function () {
910
911            //$("input[name=Password]").focusout(Validation.validator);
912            //$("select[name=pgeid]").focusout(Validation.validator);
913
914            elSelect = $(".login-customers-select");
915            elPass = $("#Password");
916
917            if (elPass.val().length < 2 || elPass.val() == elPass.attr('data-hint') || elPass.val() == elPass.attr('placeholder')) {
918                elPass.removeClass('not-valid').addClass('not-valid');
919                $(".passErr").show();
920                elPass.focus();
921            }
922            else {
923                elPass.removeClass('not-valid');
924                $(".passErr").hide();
925            }
926
927            if (elSelect.val() == 0) {
928                elSelect.removeClass('not-valid').addClass('not-valid');
929                $(".selectErr").show();
930                elSelect.focus();
931            }
932            else {
933                elSelect.removeClass('not-valid');
934                $(".selectErr").hide();
935            }
936
937
938        })
939
940
941
942
943
944
945        $("input[name=searchTxt]").focusout(Validation.validator);
946
947
948
949
950
951        $('form').on("submit", (Validation.checkAll));
952    },
953    validator: function () {
954
955
956        el = $(this).attr('name');
957
958        //name
959
960        if (el == "name") {
961            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
962                $(this).removeClass('not-valid').addClass('not-valid');
963                $(".nameErr").show();
964                //$(this).trigger('focus');
965                $(this).focus();
966            }
967            else {
968                $(this).removeClass('not-valid');
969                $(".nameErr").hide();
970            }
971        }
972        if (el == "LastName") {
973            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
974                $(this).removeClass('not-valid').addClass('not-valid');
975            }
976            else {
977                $(this).removeClass('not-valid');
978            }
979        }
980
981
982        if (el == "UserName") {
983            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
984                $(this).removeClass('not-valid').addClass('not-valid');
985            }
986            else {
987                $(this).removeClass('not-valid');
988            }
989        }
990        if (el == "Password") {
991            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
992                $(this).removeClass('not-valid').addClass('not-valid');
993                $(".passErr").show();
994                $(".passBuyErr").show();
995            }
996            else {
997                $(this).removeClass('not-valid');
998                $(".passErr").hide();
999                $(".passBuyErr").hide();
1000            }
1001        }
1002
1003
1004        if (el == "Email") {
1005            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
1006                $(this).removeClass('not-valid').addClass('not-valid');
1007                $(".emailErr").show();
1008                $(this).focus();
1009            }
1010            else {
1011                $(this).removeClass('not-valid');
1012                $(".emailErr").hide();
1013            }
1014        }
1015        if (el == "phone") {
1016            if ($(this).val().length < 2 || $(this).val() == $(this).attr('data-hint') || $(this).val() == $(this).attr('placeholder')) {
1017                $(this).removeClass('not-valid').addClass('not-valid');
1018                $(".phoneErr").show();
1019                $(this).focus();
1020            }
1021            else {
1022                $(this).removeClass('not-valid');
1023                $(".phoneErr").hide();
1024            }
1025        }
1026
1027
1028
1029
1030
1031
1032
1033        if (el == "searchTxt") {
1034            if ($(this).val().length < 3 || $(this).val() == $(this).attr('data-hint')) {
1035                $(this).removeClass('not-valid').addClass('not-valid');
1036            }
1037            else {
1038                $(this).removeClass('not-valid');
1039            }
1040        }
1041
1042        if (el == "tel_number" || el == "tel_number1" || el == "tel_number2" || el == "phone") {
1043            if ($(this).val().length < 5 || $(this).val() == $(this).attr('data-hint')) {
1044                $(this).removeClass('not-valid').addClass('not-valid');
1045                $(".phoneErr").show();
1046            }
1047            else {
1048                $(this).removeClass('not-valid');
1049                $(".phoneErr").hide();
1050            }
1051        }
1052
1053        if (el == "password") {
1054            if ($(this).val().length < 1 || $(this).val() == $(this).attr('data-hint')) {
1055                $(this).removeClass('not-valid').addClass('not-valid');
1056                $(".passErr").show();
1057
1058            }
1059            else {
1060                $(this).removeClass('not-valid');
1061                $(".passErr").hide();
1062
1063            }
1064        }
1065
1066
1067        if (el == "pgeid") {
1068            if ($(this).val() == 0) {
1069                $(this).removeClass('not-valid').addClass('not-valid');
1070                $(".selectErr").show();
1071            }
1072            else {
1073                $(this).removeClass('not-valid');
1074                $(".selectErr").hide();
1075            }
1076        }
1077
1078    },
1079    checkAll: function () {
1080
1081        // console.log('checkAll')
1082        var inputs = $(this).find('input');
1083
1084        inputs.each(function () {
1085            $(this).trigger('focusout');
1086        })
1087        $('#subject').change();
1088        $("#Preferred").trigger('focusout');
1089        $("#working").trigger('focusout');
1090        $("#FulAddress").trigger('focusout');
1091
1092        $("select[name=selectProduct]").trigger('focusout');
1093        $("select[name=selectSample]").trigger('focusout');
1094        $("select[name=selectNo]").trigger('focusout');
1095
1096        $("select[name=pgeid]").trigger('focusout');
1097
1098        flag = true;
1099        if ($(this).find('.not-valid').size() > 0) {
1100            flag = false;
1101            //$('.ladda-button').removeAttr('disabled');
1102            //$('.ladda-button').removeAttr('data-loading');        
1103        }
1104
1105
1106        //ui
1107        if (flag) {
1108            $(this).find('input[type=submit]').hide();
1109            $(this).find('button').hide();
1110            //$(this).find('button').css({ 'height': '0px', 'padding': '0', 'width': '0px' })
1111
1112        }
1113
1114        return flag;
1115    }
1116};
1117
1118
1119
1120
1121var mainMenu = {
1122    init: function (lng, currentUrl) {
1123
1124        $('.navbar-nav a').each(function () {
1125            if (lng == "he") {
1126                if (($(this).attr('href') == "/" + currentUrl) || ($(this).attr('href') == "/" && currentUrl == "Home") || $(this).attr('href') == "/projects/" + currentUrl) {
1127                    $(this).parent('li').addClass('active');
1128                }
1129            }
1130            else {
1131                if ($(this).attr('href') == "/" + lng + "/" + currentUrl || $(this).attr('href') == "/" + lng + "/projects" + "/" + currentUrl) {
1132                    $(this).parent('li').addClass('active');
1133                }
1134            }
1135
1136        });
1137
1138
1139        if ($(".active").size() > 0) {
1140            $(".active").each(function () {
1141                var parent = $(this).parent('ul').parent('li');
1142                if (!$(parent).hasClass('active')) {
1143                    $(parent).addClass('active');
1144                }
1145                var parent2 = $(parent).parent('ul').parent('li');
1146                if (!$(parent2).hasClass('active')) {
1147                    $(parent2).addClass('active');
1148                }
1149            });
1150
1151        }
1152
1153        $(' #custom-collapse > ul > li.dropdown.active').each(function () {
1154            $(this).addClass('open');
1155            $(this).parent("a").addClass('disabled');
1156        });
1157        $(' #custom-collapse > ul > li.active').each(function () {
1158            $(this).addClass('open');
1159            $(this).parent("a").addClass('disabled');
1160        });
1161    }
1162};
1163
1164/////rating///////
1165var async = {
1166
1167    readonly: false,
1168    rating: 1,
1169    yourrating: 0,
1170    count: 0,
1171    init: function () {
1172        $(function () {
1173
1174            async.rating = parseFloat($('#rating_value').attr('data-rating'));
1175            var ischak = $('#rating_value').attr('data-check');
1176            if (ischak == "True") {
1177                async.readonly = true;
1178            }
1179
1180
1181            if (async.rating == 0) {
1182                async.rating = 1;
1183            }
1184            var pageType = $('#jrate').attr("data-type");
1185            var pageID = $('#jrate').attr("data-id");
1186
1187
1188            $("#jrate").jRate({
1189                precision: 1,
1190                Opacity: '4.5px',
1191                shapeGap: '4.5',
1192                rating: async.rating,
1193                readOnly: async.readonly,
1194                onSet: function (rating) {
1195                    async.rating = rating;
1196
1197                }
1198            });
1199
1200            $("svg").click(function () {
1201                setTimeout(function () {
1202                    $("#star_" + async.yourrating).attr("aria-pressed", "true");
1203                }, 3000);
1204
1205                if (async.readonly == false) {
1206
1207                    async.insert(async.rating, async.readonly);
1208                    async.yourrating = async.rating;
1209                    $('#rating_box').hide();
1210
1211
1212                    setTimeout(
1213                        function () {
1214
1215
1216                            $('#rating_box').slideDown(500);
1217                            $('#Your-score').css("display", "normal");
1218                            $('#Your-score').text("הדירוג שלך: " + async.yourrating).slideDown(500);
1219                            $('#demo-onchange-value').hide();
1220
1221
1222                            var clientIp = $('#jrate').attr("data-clientIp");
1223                            var pageID = $('#jrate').attr("data-id");
1224
1225                            $.ajax({
1226                                type: "get",
1227                                contentType: "multipart/form-data; charset=UTF-8",
1228                                url: "/IsCheck",//?action2do=set
1229                                data: { clientIp: clientIp.toString(), pageID: pageID },
1230                                cache: false,
1231                                success:
1232                                    function (returnedIsCheck) {
1233                                        async.readonly = returnedIsCheck;
1234
1235                                        $("#jrate").html('');
1236
1237                                        $("#jrate").jRate({
1238                                            precision: 1,
1239                                            shapeGap: '4.5',
1240                                            rating: async.rating,
1241                                            readOnly: async.readonly,
1242                                            onSet: function (rating) {
1243                                                async.rating = rating;
1244                                            }
1245                                        });
1246                                    },
1247
1248
1249                            });
1250
1251
1252
1253
1254                            if (async.count > 0) {
1255                                $('#rating_value').text(async.rating);
1256                                $('#count_value').text(async.count);
1257
1258                            }
1259                        }, 2000);
1260
1261                }
1262            })
1263
1264        })
1265    },
1266    insert: function (rating, readonly) {
1267
1268        var pageType = $('#jrate').attr("data-type");
1269        var pageID = $('#jrate').attr("data-id");
1270
1271
1272        $("#jrate").html('');
1273        $(function () {
1274            $("#jrate").jRate({
1275                precision: 1,
1276
1277                shapeGap: '4.5',
1278                rating: rating,
1279                readOnly: readonly,
1280                onSet: function (rating) {
1281                    async.rating = rating
1282
1283
1284
1285                }
1286            });
1287        });
1288
1289
1290        var clientIp = $('#jrate').attr("data-clientIp");
1291        var pageID = $('#jrate').attr("data-id");
1292
1293        console.log($('#jrate').attr('data-type') + pageType + " " + pageID);
1294
1295        $.ajax({
1296            type: "get",
1297            contentType: "multipart/form-data; charset=UTF-8",
1298            url: "/setRating",//?action2do=set
1299            data: { clientIp: clientIp.toString(), pageID: pageID, grade: async.rating.toString() },//pageType: pageType, pageID: pageID,typepage: lang, pageID: typeId, pageUrl: questId,
1300            cache: false,
1301            success:
1302                function (returnedData) {
1303                    var data = returnedData.split(',');
1304                    async.rating = data[0];
1305                    async.count = data[1];
1306                    $('#rating_value').attr('data-rating', data[0])
1307                    //if (data[2] == "false") {
1308                    //    $("#jrate").html('');
1309                    //    $(function () {
1310                    //        $("#jrate").jRate({
1311                    //            precision: 1,
1312                    //            shapeGap: '4.5',
1313                    //            rating: data[0],
1314                    //            readOnly: readonly,
1315
1316                    //        });
1317
1318
1319                    //    });
1320                    //}
1321
1322
1323                },
1324
1325
1326        });
1327
1328    }
1329}

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.