PageSourceSearch

https://mezopotamyaajansi44.com/js/main_v3.js

js mezopotamyaajansi44.com collected 2026-09-30 05:46:26 UTC 37,996 bytes, 1,015 lines download raw bytes

1var selectedItems = [];
2var ajax_url;
3
4(function ($) {
5    "use strict";
6    var windowOn = $(window);
7
8    /* Windows Load */
9    $(window).on('load', function () {
10        // Preloader Activation
11        $("#pre-load").delay(600).fadeOut(500);
12        $(".pre-loader").delay(600).fadeOut(500);
13
14        // Wow Animation Init
15        wowAnimation();
16    });
17
18
19    /* footer year */
20    var yearElement = document.getElementById("year");
21    if (yearElement) { yearElement.innerHTML = new Date().getFullYear(); }
22    /* footer year */
23
24    /* Wow Active */
25    function wowAnimation() {
26        var wow = new WOW({
27            boxClass: 'wow',
28            animateClass: 'animated',
29            offset: 0,
30            mobile: false,
31            live: true
32        });
33        wow.init();
34    }
35
36    /* Sidebar Toggle */
37    $(".offcanvas-close,.offcanvas-overlay").on("click", function () {
38        $(".offcanvas-area").removeClass("info-open");
39        $(".offcanvas-overlay").removeClass("overlay-open");
40    });
41    $(".sidebar-toggle").on("click", function () {
42        $(".offcanvas-area").addClass("info-open");
43        $(".offcanvas-overlay").addClass("overlay-open");
44    });
45
46    /* Body overlay Js */
47    $(".body-overlay").on("click", function () {
48        $(".offcanvas-area").removeClass("opened");
49        $(".body-overlay").removeClass("opened");
50    });
51
52    /* Data Css js */
53    $("[data-background").each(function () {
54        $(this).css(
55            "background-image",
56            "url( " + $(this).attr("data-background") + "  )"
57        );
58    });
59
60    $("[data-background-color").each(function () {
61        $(this).css(
62            "background-color",
63            $(this).attr("data-background-color")
64        );
65    });
66
67    $("[data-width]").each(function () {
68        $(this).css("width", $(this).attr("data-width"));
69    });
70
71    $("[data-bg-color]").each(function () {
72        $(this).css("background-color", $(this).attr("data-bg-color"));
73    });
74
75    /* MagnificPopup image view */
76    $(".popup-image").magnificPopup({
77        type: "image",
78        gallery: {
79            enabled: true,
80        },
81    });
82
83    /* jarallax js */
84    jarallax(document.querySelectorAll('.jarallax'), {
85        speed: 0.5,
86    });
87
88    /* MagnificPopup video view */
89    $(".popup-video").magnificPopup({
90        type: "iframe",
91    });
92
93    /* Nice Select Js */
94    $("select").niceSelect();
95
96    /* pricing switcher */
97    $('.pricing-switcher-wrapper span').on('click', function () {
98        $('.rs-pricing-switcher').toggleClass('switched');
99        $('.rs-pricing-switcher').addClass('switching');
100        setTimeout(() => {
101            $('.rs-pricing-switcher').removeClass('switching');
102        }, 50);
103    });
104
105    //===== Odometer js
106    $('.odometer').appear(function (e) {
107        var odo = $(".odometer");
108        odo.each(function () {
109            var countNumber = $(this).attr("data-count");
110            $(this).html(countNumber);
111        });
112    });
113
114    //search
115    $('.header-search-icon').on('click', function (event) {
116        $('.rs-stickys-form').slideToggle('show');
117        $(this).toggleClass('icon-close');
118    });
119
120    $(document).ready(function () {
121        if ($("#ajax-pager")) {
122            var c = $("#ajax-pager");
123            $("#ajax-pager a").each(function() {
124                var l = $(this);
125                l.click(function() {
126                    getNewsList(c.attr("url"), parseInt($(this).attr("page")))
127                })
128            })
129        }
130        if ($("#ajaxlist")) {
131            var b = $("#ajaxlist").attr("url");
132            $("#ajaxlist tr").each(function() {
133                if ($(this).attr("n")) {
134                    $(this).click(function() {
135                        openNews(b + $(this).attr("n"), "#ajaxlist");
136                        return false
137                    })
138                }
139            })
140        }
141        $(".video-link").click(function() {
142            open_video($(this))
143        });
144        // circle text slide
145        if ($('input.date-picker').length > 0) {
146            $.fn.datepicker.dates['en'] = {
147                days: dayNames,
148                daysShort: dayNamesShort,
149                daysMin: dayNamesMin,
150                months: monthNames,
151                monthsShort: monthNamesShort,
152                today: today,
153                clear: "Temizle",
154                format: "dd/mm/yyyy",
155                titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */
156                weekStart: 0
157            };
158            $("input.date-picker").each(function () {
159               $(this).datepicker({});
160            });
161        }
162        if ($(".post-head .rs-social-links a").length > 0){
163            social_init();
164        }
165        if ($('.rs-text-circle').length) {
166            $(".rs-text-circle").each(function () {
167                // Wrap all charecter inside a span
168                var sentence = $(this).text().replace(/\s+/g, ' ').trim();
169                var wrappedSentence = '';
170                for (var i = 0; i < sentence.length; i++) {
171                    wrappedSentence += '<span>' + sentence[i] + '</span>';
172                }
173                $(this).html(wrappedSentence);
174
175                // Give a rotate value for each span
176                var rotateDegree = $(this).data("rotate-degree") || 20;
177                $(this).find("span").each(function (index) {
178                    $(this).css("transform", "rotate(" + ((index + 1) * rotateDegree) + "deg)");
179                });
180            });
181        }
182
183        $('.video-gallery .swiper.original').each(function (index) {
184            var $swiper = $(this);
185            
186            var rsNavPrev = `rs-nav-prev-${index}`;
187            var rsNavNext = `rs-nav-next-${index}`;
188            $swiper.closest('.video-gallery').find('.swiper-button-prev').addClass(rsNavPrev);
189            $swiper.closest('.video-gallery').find('.swiper-button-next').addClass(rsNavNext);
190
191            var rsPagination = `rs-pagination-${index}`;
192            $swiper.closest('.video-gallery').find('.swiper-pagination').addClass(rsPagination);
193
194            var rsThumb = `rs-thumb-${index}`;
195            $swiper.closest('.video-gallery').find('.swiper.thumb').addClass(rsThumb);
196
197            var videoThumb = new Swiper('.'+rsThumb, {
198                spaceBetween: 20,
199                freeMode: true,
200                watchSlidesProgress: true,
201                mousewheel: {
202                    invert: false,
203                    forceToAxis: true,
204                },
205                breakpoints: {
206                    10: {
207                        slidesPerView: 2,
208                        direction: "horizontal",
209                    },
210                    992: {
211                        slidesPerView: 3,
212                        direction: "vertical",
213                    },
214                }
215            });
216
217            new Swiper(this, {
218                spaceBetween: 20,
219                centeredSlides: false,
220                navigation: {
221                    nextEl: "."+rsNavPrev,
222                    prevEl: "."+rsNavNext,
223                },
224                pagination: {
225                    el: "."+rsPagination,
226                    clickable: true,
227                },
228                thumbs: {
229                    swiper: videoThumb,
230                },
231                })
232        });
233
234        // Swiper Dynamic Slider Active
235        $('.rs-swiper .swiper').each(function (index) {
236            var $swiper = $(this);
237            var hoverAutoplay = $swiper.data('hover-pause') === undefined ? true : $swiper.data('hover-pause');
238            var loop = $(this).data('loop') === undefined ? true : $(this).data('loop');
239            var centeredSlides = $(this).data('center-mode') === undefined ? false : $(this).data('center-mode');
240            var autoplay = $(this).data('autoplay') === undefined ? true : $(this).data('autoplay');
241            var dynamicBullets = $(this).data('dots-dynamic') === undefined ? false : $(this).data('dots-dynamic');
242            var direction = $(this).data('direction') === 'vertical' ? 'vertical' : 'horizontal';
243            var fridgeMovement = $(this).data('play-slide') === undefined ? true : $(this).data('play-slide');
244            var effect = $(this).data('effect') || 'slide'; //'slide' | 'fade' | 'cube' | 'coverflow' | 'flip' | 'creative' | 'cards';
245            var grabCursor = $(this).data('grab-cursor') === undefined ? false : $(this).data('grab-cursor');
246            var oneWayMovement = $(this).data('one-way') === undefined ? false : $(this).data('one-way');
247            var startAt = $(this).data('start-at');
248            var slidesPerView = $(this).data('item');
249            var speed = $(this).data('speed');
250            var gap = (($(this).data('no-gap') === true) ? 0 : 30);
251            var margin = ($(this).data('margin') ? $(this).data('margin') : gap);
252
253            // Breakpoints
254            var slidesPerViewXl = $(this).data('item-xl');
255            var slidesPerViewLg = $(this).data('item-lg');
256            var slidesPerViewMd = $(this).data('item-md');
257            var slidesPerViewSm = $(this).data('item-sm');
258            var slidesPerViewXs = $(this).data('item-xs');
259            var slidesPerViewMobile = $(this).data('item-mobile');
260            var marginXl = ($(this).data('margin-xl') ? $(this).data('margin-xl') : margin);
261            var marginLg = ($(this).data('margin-lg') ? $(this).data('margin-lg') : marginXl);
262            var marginMd = ($(this).data('margin-md') ? $(this).data('margin-md') : marginLg);
263            var marginSm = ($(this).data('margin-sm') ? $(this).data('margin-sm') : marginMd);
264            var marginXs = ($(this).data('margin-xs') ? $(this).data('margin-xs') : marginSm);
265            var marginMobile = ($(this).data('margin-mobile') ? $(this).data('margin-mobile') : marginXs);
266
267            // Controls unique classes based on the index
268            var rsNavPrev = `rs-nav-prev-${index}`;
269            var rsNavNext = `rs-nav-next-${index}`;
270            $swiper.closest('.rs-swiper').find('.swiper-button-prev').addClass(rsNavPrev);
271            $swiper.closest('.rs-swiper').find('.swiper-button-next').addClass(rsNavNext);
272
273            var rsPagination = `rs-pagination-${index}`;
274            $swiper.closest('.rs-swiper').find('.swiper-pagination').addClass(rsPagination);
275
276            var swiper = new Swiper(this, {
277                loop: loop,
278                autoplay: autoplay,  // data-autoplay="true" => Delay | .swiper-slide | data-swiper-autoplay="2000">
279                direction: direction,
280                effect: effect,
281                enabled: fridgeMovement,
282                grabCursor: grabCursor,
283                oneWayMovement: oneWayMovement,
284                centeredSlides: centeredSlides,
285                initialSlide: (startAt ? startAt : 0),
286                slidesPerView: (slidesPerView ? slidesPerView : 1),
287                spaceBetween: margin,
288                speed: (speed ? speed : 500),
289                pagination: {
290                    el: `.${rsPagination}`,
291                    dynamicBullets: dynamicBullets,
292                    clickable: true,
293                },
294                navigation: {
295                    nextEl: `.${rsNavPrev}`,
296                    prevEl: `.${rsNavNext}`,
297                },
298                breakpoints: {
299                    10: {
300                        slidesPerView: (slidesPerViewMobile ? slidesPerViewMobile : 1),
301                        spaceBetween: marginMobile,
302                    },
303                    481: {
304                        slidesPerView: (slidesPerViewXs ? slidesPerViewXs : 1),
305                        spaceBetween: marginXs,
306                    },
307                    576: {
308                        slidesPerView: (slidesPerViewSm ? slidesPerViewSm : 1),
309                        spaceBetween: marginSm,
310                    },
311                    768: {
312                        slidesPerView: (slidesPerViewMd ? slidesPerViewMd : 1),
313                        spaceBetween: marginMd,
314                    },
315                    992: {
316                        slidesPerView: (slidesPerViewLg ? slidesPerViewLg : 1),
317                        spaceBetween: marginLg,
318                    },
319                    1025: {
320                        slidesPerView: (slidesPerViewXl ? slidesPerViewXl : 1),
321                        spaceBetween: marginXl,
322                    },
323                    1201: {
324                        slidesPerView: (slidesPerView ? slidesPerView : 1),
325                        spaceBetween: margin,
326                    }
327                }
328            });
329            if (hoverAutoplay) {
330                $swiper.on('mouseenter', function () {
331                    swiper.autoplay.stop();
332                }).on('mouseleave', function () {
333                    swiper.autoplay.start();
334                });
335            }
336        });
337
338        /*  category slider active 01 */
339        var commonSlide = new Swiper(".header-menu-slide", {
340            slidesPerView: 'auto',
341            spaceBetween: 20,
342            loop: true,
343            centeredSlides: false,
344            speed: 1000,
345            autoplay: {
346                delay: 5000,
347            },
348            navigation: {
349                nextEl: ".slider-button-next",
350                prevEl: ".slider-button-prev",
351            },
352        });
353
354        // Team Social Icon trigger Button
355        $('.social-trigger-btn').on('click', function () {
356            $(this).parents('.team-info-inner').toggleClass('is-open')
357        });
358
359        // news active
360        (function () {
361            var items = document.querySelectorAll('.header-top-description');
362            var current = 0;
363            var total = items.length;
364
365            function rotateText() {
366                items[current].classList.remove('is-active');
367                current = (current + 1) % total;
368                items[current].classList.remove('d-none');
369                items[current].classList.add('is-active');
370            }
371
372            // rotate every 3s
373            setInterval(rotateText, 3000);
374        })();
375
376
377        /* Button scroll up js */
378        $(window).on("scroll", function () {
379            var scrollTop = $(window).scrollTop();
380            var documentHeight = $(document).height();
381            var windowHeight = $(window).height();
382            $(".progress-circle").css("stroke-dashoffset", 113.1 - 113.1 * (scrollTop / (documentHeight - windowHeight)));
383            if (scrollTop > 150) {
384                $(".backtotop-wrap").addClass("active-progress").fadeIn();
385            } else {
386                $(".backtotop-wrap").removeClass("active-progress").fadeOut();
387            }
388
389            // Sticky Header
390            var stickyHeader = $("#rs-sticky-header");
391            $(window).on("scroll", function () {
392                if ($(this).scrollTop() > 200) {
393                    stickyHeader.addClass("active");
394                } else {
395                    stickyHeader.removeClass("active");
396                }
397            });
398        });
399
400        $(".backtotop-wrap").on("click", function () {
401            $("html,body").animate({ scrollTop: 0 }, 500);
402        });
403
404        // work process active
405        $('.work-process-wrapper .work-process-item').on('mouseenter', function () {
406            $('.work-process-wrapper .work-process-item').removeClass('active');
407            $(this).addClass('active');
408        });
409
410        // Menu Active
411        const currentPath = window.location.pathname.split('/').pop();
412        const menuLinks = document.querySelectorAll('.multipage-menu a');
413        menuLinks.forEach(link => {
414            const linkPath = link.getAttribute('href');
415            if (linkPath === currentPath || (currentPath === '' && linkPath === 'index.html')) {
416                link.classList.add('active');
417                let parentLi = link.parentElement;
418                while (parentLi) {
419                    if (parentLi.tagName === 'LI') {
420                        parentLi.classList.add('active');
421                    }
422                    parentLi = parentLi.parentElement;
423                }
424            }
425        });
426
427        /* Mobile Menu Js */
428        /*
429        $("#mobile-menu").meanmenu({
430            meanMenuContainer: ".mobile-menu",
431            meanScreenWidth: "1199",
432            meanExpand: ['<i class="fa-regular fa-plus"></i>'],
433        });
434        */
435
436        // .portfolio thumb bg
437        if ($('.rs-portfolio-accordion').length) {
438            $('.portfolio-active .accordion-item').on('click', function () {
439                var index = $(this).data('index');
440                $('.portfolio-bg-thumb').removeClass('active');
441
442                $('.portfolio-bg-thumb').eq(index).addClass('active');
443            });
444        }
445
446        /*======================================
447          One Page overlay close
448        ========================================*/
449        function scrollNav() {
450            $(".onepage-menu li a").on('click', function () {
451                $(".onepage-menu li a.active").removeClass("active");
452                $(this).addClass("active");
453                $(".offcanvas-area").removeClass("info-open");
454                $(".offcanvas-overlay").removeClass("overlay-open");
455            });
456        }
457        scrollNav();
458
459        /* countdown activation start */
460        function makeTimer(endTime, countdownElementId) {
461            var now = new Date();
462            now = (Date.parse(now) / 1000);
463            var timeLeft = endTime - now;
464            if (timeLeft <= 0) {
465                clearInterval(timerInterval); // Stop the timer
466                $("#" + countdownElementId + " [data-unit='days']").html("00<span>Days</span>");
467                $("#" + countdownElementId + " [data-unit='hours']").html("00<span>Hours</span>");
468                $("#" + countdownElementId + " [data-unit='minutes']").html("00<span>Minutes</span>");
469                $("#" + countdownElementId + " [data-unit='seconds']").html("00<span>Seconds</span>");
470                return;
471            }
472            var days = Math.floor(timeLeft / 86400);
473            var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
474            var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600)) / 60);
475            var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
476            if (hours < "10") { hours = "0" + hours; }
477            if (minutes < "10") { minutes = "0" + minutes; }
478            if (seconds < "10") { seconds = "0" + seconds; }
479            $("#" + countdownElementId + " [data-unit='days']").html(days + "<span>Days</span>");
480            $("#" + countdownElementId + " [data-unit='hours']").html(hours + "<span>Hours</span>");
481            $("#" + countdownElementId + " [data-unit='minutes']").html(minutes + "<span>Minutes</span>");
482            $("#" + countdownElementId + " [data-unit='seconds']").html(seconds + "<span>Seconds</span>");
483        }
484        var endTime = new Date("5 August 2025 14:00:00 GMT+06:00");
485        endTime = (Date.parse(endTime) / 1000);
486        var timerInterval = setInterval(function () {
487            makeTimer(endTime, "countdown1");
488            makeTimer(endTime, "countdown2");
489            makeTimer(endTime, "countdown3");
490            makeTimer(endTime, "countdown4");
491            makeTimer(endTime, "countdown5");
492        }, 1000);
493
494    });
495
496    /* pralax image */
497    if ($('.prallax-parent').length) {
498        $(".prallax-parent").each(function () {
499            var prallaxParent = $(this).get(0);
500            var parallaxInstance = new Parallax(prallaxParent);
501        });
502    }
503
504    // Smooth Scroling
505    if ($('.rs-smoother-yes').length) {
506        const lenis = new Lenis({
507            smoothWheel: true,
508            wheelMultiplier: 1.2,
509            duration: 1.5,
510            lerp: 0.1,
511        });
512        function raf(time) {
513            lenis.raf(time);
514            requestAnimationFrame(raf);
515        }
516        requestAnimationFrame(raf);
517
518        // Handle scroll animation for anchor links
519        document.querySelectorAll('a[href^="#"]').forEach((el) => {
520            el.addEventListener('click', (e) => {
521                e.preventDefault()
522                const id = el.getAttribute('href')?.slice(1)
523                if (!id) return
524                const target = document.getElementById(id)
525                if (target) {
526                    target.scrollIntoView({ behavior: 'smooth' })
527                }
528            })
529        });
530    }
531
532    // button style
533    $('.rs-button-wrapper .rs-btn').mouseenter(function () {
534        $(this).find('.rs-icon').css('animation', 'btnHoverEffect 0.5s');
535    });
536    $('.rs-button-wrapper .rs-btn').mouseleave(function () {
537        $(this).find('.rs-icon').css('animation', 'btnHoverEffectReverse 0.5s');
538    });
539
540
541    //  text slide
542    var roll_slider = new Swiper(".text-slide-one", {
543        loop: true,
544        freemode: true,
545        slidesPerView: 4,
546        spaceBetween: 0,
547        allowTouchMove: false,
548        speed: 10000,
549        autoplay: {
550            delay: 1,
551            disableOnInteraction: true,
552        },
553    });
554
555    // Contact Form Activation
556    var form = $('#contact-form');
557    var formMessages = $('#form-messages');
558    $(form).submit(function (e) {
559        e.preventDefault();
560        var formData = $(form).serialize();
561        $.ajax({
562            type: 'POST',
563            url: $(form).attr('action'),
564            data: formData
565        })
566            .done(function (response) {
567                $(formMessages).removeClass('error');
568                $(formMessages).addClass('success');
569                $(formMessages).text(response);
570                $('#name, #email, #message').val('');
571                if ($('#phone').length) $('#phone').val('');
572                if ($('#website').length) $('#website').val('');
573                if ($('#subject').length) $('#subject').val('');
574                if ($('#date').length) $('#date').val('');
575                if ($('#time').length) $('#time').val('');
576            })
577            .fail(function (data) {
578                $(formMessages).removeClass('success');
579                $(formMessages).addClass('error');
580                if (data.responseText !== '') {
581                    $(formMessages).text(data.responseText);
582                } else {
583                    $(formMessages).text('Oops! An error occurred and your message could not be sent.');
584                }
585            });
586    });
587
588})(jQuery);
589
590function refreshSecure() {
591    $("#secureimage").attr("src", "/staticfiles/secure/" + Math.random())
592}
593function getNewsList(a, d) {
594    d = parseInt(d);
595    if (d < 1) {
596        return false
597    }
598    var b = ($("#ajax-pager").attr("key")) ? "&key=" + $("#ajax-pager").attr("key") : "";
599    var c = $("#ajaxlist");
600    c.css("height", c.height() + "px").html("").addClass("loading");
601    $.ajax({
602        url: a,
603        type: "GET",
604        data: "type=ajax&page=" + d + b,
605        success: function(e) {
606            c.html(e).css("height", "").removeClass("loading");
607            if ($("#ajaxlist").hasClass("search-list") == false) {
608                $("#ajaxlist tr").each(function() {
609                    $(this).click(function() {
610                        openNews(c.attr("url") + $(this).attr("n"), "#ajaxlist");
611                        return false
612                    })
613                })
614            }
615            c.contents().filter(function() {
616                if (this.nodeType == 8) {
617                    $(".filter").html(this.data)
618                }
619            });
620            updatePager(d)
621        },
622        error: function() {}
623    })
624}
625function updatePager(h) {
626    var d = $("#ajax-pager");
627    var a = d.attr("url");
628    var g = parseInt($("#ajax-pager").attr("pages"));
629    var f = 5;
630    var b = 1;
631    var e = 5;
632    var i = Math.ceil(f / 2);
633    if (g > f) {
634        if (h <= 2) {
635            b = 1;
636            e = 5
637        } else {
638            if ((g - h) <= 2) {
639                e = g;
640                b = g - 4
641            } else {
642                b = h - 2;
643                e = h + 2
644            }
645        }
646    }
647    d.empty();
648    var c = $('<button class="rs-btn is-small has-icon has-bg-white" page=' + (h - 1) + '><</button>');
649    if (h != 1) {
650        c.find("button").click(function() {
651            getNewsList(a, h - 1)
652        })
653    }
654    d.append(c);
655    for (; b <= e; b++) {
656        var k = $('<button page="'+(b)+'" class="rs-btn is-small has-icon has-bg-white'+ ((b == h) ? ' is-active' : '') + '">' + (b) + '</button>');
657        k.find("button").click(function() {
658            getNewsList(a, $(this).attr("page"))
659        });
660        k.find("button").attr("bla", b);
661        d.append(k)
662    }
663    var j = $('<button class="rs-btn is-small has-icon has-bg-white" page="'+(h+1)+'">></button>');
664    if (h != g) {
665        j.find("button").click(function() {
666            getNewsList(a, h + 1)
667        })
668    }
669    d.append(j);
670    $("#curPage").html(h)
671}
672
673function openNews(a, c) {
674    var b = a.replace(/[^0-9]/g, "");
675    $(".rs-postbox-details-wrapper").append('<div class="content-loading"><i/></i></div>');
676    var scrollTop = $(window).scrollTop();
677    console.log(scrollTop)
678    if (scrollTop > 200) {
679        $("html,body").animate({ scrollTop: 0 }, 200);
680    }
681
682    $.ajax({
683        url: a,
684        type: "GET",
685        data: "type=ajax&",
686        success: function(e) {
687            
688            $(".container.post-head").html("").html($(e).find('.container.post-head').html());
689            $(".rs-postbox-details-wrapper").html("").html($(e).find('.rs-postbox-details-wrapper').html());
690
691            $(c + " tr").each(function() {
692                var f = $(this);
693                (f.attr("n") == b) ? f.attr("class", "active") : f.attr("class", "")
694            });
695
696            var d = "";
697            if ($(".rs-postbox-details-wrapper .post_image").length) {
698                d = $(".rs-postbox-details-wrapper .post_image").attr("src")
699            }
700            $("title").html($(".container.post-head .rs-blog-post-title").html());
701            $("meta[property='og\\:image']").attr("content", d);
702            $(".video-link").click(function() {
703                open_video($(this))
704            });
705
706            window.history.replaceState({}, document.title, a);
707            ajax_url = a;
708
709            social_init()
710			//preloader();
711			
712            $(".rs-postbox-details-wrapper").find("[data-rel='gallery']").hover(function(){
713				$(this).find(".fullscreen").removeClass("slideRightBack").addClass("slideRight");
714			},
715			function(){
716				$(this).find(".fullscreen").removeClass("slideRight").addClass("slideRightBack");
717			});
718        },
719        error: function() {}
720    })
721}
722function userMenu(a) {
723    if ($("#user_menu")) {
724        $.ajax({
725            url: a,
726            type: "GET",
727            data: "type=ajax&action=usermenu",
728            success: function(b) {
729                $(".tbr-login").html("").append(b)
730            },
731            error: function() {}
732        })
733    }
734}
735
736function social_init(){
737    return;
738	$('.post-head .rs-social-links a').click(function(event) {
739		var width  = 575,
740			height = 400,
741			left   = (jQuery(window).width()  - width)  / 2,
742			top    = (jQuery(window).height() - height) / 2,
743			url    = this.href,
744			opts   = 'status=1' +
745					 ',width='  + width  +
746					 ',height=' + height +
747					 ',top='    + top    +
748					 ',left='   + left;
749
750		window.open(url, 'twitter', opts);
751
752		return false;
753	});
754
755	var API_URL = "http://cdn.api.twitter.com/1/urls/count.json",
756		TWEET_URL = "https://twitter.com/intent/tweet";
757	
758	$(".from-news .social_icon.twitterr").each(function() {
759		var elem = $(this),
760		// Use current page URL as default link
761		url = encodeURIComponent(elem.attr("data-url") || document.location.href),
762		// Use page title as default tweet message
763		text = elem.attr("data-text") || document.title,
764		via = elem.attr("data-via") || "",
765		hashtags = encodeURIComponent(elem.attr("data-hashtags")) || "";
766		
767		// Set href to tweet page
768		elem.attr({
769			href: TWEET_URL + "?hashtags=" + hashtags + "&original_referer=" +
770					encodeURIComponent(document.location.href) + 
771					"&source=tweetbutton&text=" + text + "&url=" + url + "&via=" + via,
772			target: "_blank"
773		});
774	});
775}
776
777function preloader(){
778    $(".blog:not('.small, .horizontal_carousel') .post>a>img, .grid_view .post>a>img, .post.single .post_image img, .slider .slide img, .pr_preload").each(function(){
779        $(this).before("<span class='pr_preloader'></span>");
780        //$(this).attr('src',$(this).attr('src') + '?i='+getRandom(1,100000));
781        $(this).one("load", function(){
782            $(this).prev(".pr_preloader").remove();
783            $(this).fadeTo("slow", 1, function(){
784                $(this).css("opacity", "");
785            });
786            $(this).css("display", "block");
787            $(this).parent().children(".icon").css("display", "block");
788            if($(this).parent().parent().parent().hasClass("blog rating"))
789                $(".blog.rating .value_bar_container").each(function(){
790                    $(this).height($(this).parent().outerHeight()-$(this).parent().find("img").height());
791                });
792        }).each(function(){
793            if(this.complete || $(this).height()>0) 
794                $(this).load();
795        });
796    });
797		
798};
799
800function init_popup_gallery(content){
801    $.magnificPopup.close();
802    selectedIndex = [];
803    $.magnificPopup.open({
804        showCloseBtn:false,
805        closeOnBgClick:false,
806        items: {
807            src: $('<div class="rs-popup rs-black" />').html(content),
808            type: 'inline'
809        },
810        callbacks: {
811            open: function() {
812                $('.mfp-content').addClass('gallery');
813                $('.rs-popup a.close').on('click', function(){
814                    $.magnificPopup.close();
815                })
816                var swiper = new Swiper(".rs-popup .rs-gallery .swiper.thumb", {
817                    direction: "vertical",
818                    slidesPerView: Math.floor(490/95),
819                    spaceBetween: 20,
820                    freeMode: true,
821                    watchSlidesProgress: true,
822                    mousewheel: {
823                        invert: false,
824                        forceToAxis: true,
825                    },
826                });
827
828                new Swiper(".rs-popup .rs-gallery .swiper.original", {
829                    spaceBetween: 20,
830                    centeredSlides: false,
831                    navigation: {
832                        nextEl: ".slider-button-next",
833                        prevEl: ".slider-button-prev",
834                    },
835                    thumbs: {
836                        swiper: swiper,
837                    },
838                    })
839                    .on('activeIndexChange', function(swiper){
840                        var info = $('.rs-popup .actions .slider-info');
841                        var fileId = $(swiper.slides[swiper.activeIndex]).attr('i') ;
842                        
843                        info.attr('cur', swiper.activeIndex+1);
844                        info.html(info.attr('cur')+' / '+info.attr('total'));
845
846                        $('.rs-popup .actions .select i')
847                            .attr('class', '')
848                            .addClass('ri-checkbox-'+(selectedItems.includes(fileId)?'line':'blank-line'));
849                    });
850
851                $('.rs-popup .actions .select').on('click', function(){
852                    var index = parseInt($('.rs-popup .actions .slider-info').attr('cur'))-1;
853                    var fileId = $(swiper.slides[index]).attr('i') ;
854                    var check = $(this).find('i');
855                    var selectedIndex = selectedItems.indexOf(fileId);
856                    var saveSelected = $('.rs-popup .actions .save-selected');
857                    
858                    check.attr('class', '');
859                    if(selectedIndex === -1){
860                        check.addClass('ri-checkbox-line');
861                        selectedItems.push(fileId);
862                    }else{
863                        check.addClass('ri-checkbox-blank-line');
864                        selectedItems.splice(selectedIndex, 1);
865                    }
866
867                    saveSelected.removeClass('disabled');
868                    if(selectedItems.length  === 0)
869                        saveSelected.addClass('disabled');
870
871                })
872
873            },
874        }
875
876    })
877    return;
878}
879
880function saveImage(selected){
881	var url;
882	var item;
883	if(selected){
884		if(selectedItems.length == 0)
885			return;
886		url = (ajax_url == null)?window.location.href:ajax_url;
887		url = url.replace('content/view', 'content/saveZip')+'?list='+selectedItems.join(",");
888	}else{
889        item = $('.rs-popup .rs-gallery .swiper.original .swiper-slide-active img').attr('src');
890		if(item)
891			url = item.replace(/(\/[a-z]*\/[a-z]*)/i, "$1/save");
892	}
893	console.log({item,url});
894	window.location.href = url;
895}
896
897function init_popup(panelId){
898    
899    return;
900	if($("body .gallery_overlay").length < 1){
901		$("body").append("<div class='gallery_overlay'></div>");
902		$(".gallery_overlay").css({"width":$(window).width()+"px", "height":$(document).height()+"px", "opacity":"1"});
903	}
904	var top = $(window).scrollTop();
905	if(top<0)
906		top = 0;
907	top = 0;
908	$(panelId).css("top", top + "px");
909	$(panelId).appendTo("body").css("display", "block");
910
911	$(panelId).css("opacity", "0");
912	
913	$(panelId).animate({opacity: 1}, 500, function(){
914		
915	});
916	$(panelId).css("height", $(window).height()+"px");
917
918	var scrollPosition = $(window).scrollTop();
919	$("body").addClass("lock-position");
920
921	$(".close_popup").one("click", function(event){
922		event.preventDefault();
923		$(".close_popup").unbind("click");
924		//$("html,body").css("overflow", "auto").removeClass("dont_scroll");
925		$("body").removeClass("lock-position");
926		$(window).scrollTop(scrollPosition);
927		$(panelId).css({"top": scrollPosition, "overflow": "hidden"});
928		$(panelId).addClass("disabled").animate({opacity:0}
928,500,function(){$(this).css("display", "none").removeClass("disabled");$(panelId).css({"top": 0, "overflow-y": "scroll"});});
929		$(".gallery_overlay").animate({opacity:0},500,function(){$(this).remove()});
930	});
931}
932
933function open_video(a) {
934	var popup = $('#video-popup');
935	if(popup){
936		init_popup('#video-popup');
937		popup.find('.player_contanier').html('<video preload="none" width="100%" height="100%" controls="true"  poster="' + a.attr("poster") + '">'+
938						'<source src="' + a.attr("video") + '" type="video/mp4" /></video>');
939		popup.find('.video-title').html(a.attr("data-title"));
940		popup.find('.video-title').append('<p>'+a.attr("data-desc")+'</p>');
941		popup.find("video").bind("stop pause play", function(c) {
942                    changePlayerState(popup, c.type)
943		});
944		playPause(popup, true);
945	}
946}
947
948function open_gallery(a) {
949    
950    $.ajax({
951        url: a,
952        type: "POST",
953        data: "type=ajax&action=view",
954        dataType: "html",
955        beforeSend: function() {
956            //$("#post-thumb").show().addClass("loading")
957        },
958        success: function(b) {
959            var d = $("<data />").html(b);
960            console.log(d.find("#login-form").length)
961            if (d.find("#login-form").length > 0) {
962                $.magnificPopup.open({
963                    showCloseBtn:false,
964                    items: {
965                        src: $('<div class="rs-popup rs-black" />').html(b),
966                        type: 'inline'
967                    },
968                    callbacks: {
969                        open: function() {
970                            console.log('Popup is opened');
971                            $('.mfp-content').addClass('login');
972                            $('.rs-popup a.close').on('click', function(){
973                                console.log('deneme')
974                                $.magnificPopup.close();
975                            })
976                        },
977                    }
978    
979                })
980                return;
981            }
982
983            init_popup_gallery(b);
984        },
985        error: function(d, b, c) {
986            alert(d.status + "-" + c)
987        }
988    });
989    return false
990}
991
992function login(a) {
993    var b = $("#login-form").serialize();
994    $.ajax({
995        url: $("#login-form").attr("action"),
996        type: "POST",
997        data: "type=ajax&target=" + a + "&" + b,
998        beforeSend: function() {
999            $("#form-messages .alert").addClass('show');
1000        },
1001        success: function(c) {
1002            var d = $("<data />").html(c);
1003            if (d.find("#status") && d.find("#status").attr("result") == "fail") {
1004                $("#form-messages .message").html(d.find("#status").html());
1005				$("#form-messages .alert").addClass('show');
1006				$("#login-form").find("#secure").val("");
1007				refreshSecure();
1008            } else {
1009                init_popup_gallery(c);
1010            }
1011        },
1012        error: function(d, c) {}
1013    });
1014    return false
1015}

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.