PageSourceSearch

https://ntpark.rs/wp-content/themes/ntp/ntp_assets/js/main.js?ver=6ab567c86a7cc

js ntpark.rs collected 2026-09-24 18:11:52 UTC 9,404 bytes, 278 lines download raw bytes

1$(document).ready(function() {
2
3    if (window.location.href.indexOf("script=cir") > -1) {
4        $('a[href]:not(.switch-to-lat)').each(function() {
5            var link = $(this).attr('href');
6            if (link.indexOf("script=cir") < 1) {
7                $(this).attr('href', link + '?script=cir');
8            }
9        });
10    }
11
12    AOS.init({
13        duration: 2000,
14    });
15
16    $(".card-top").on("click", function() {
17        if ($(this).hasClass("open-icon")) {
18            $(".minus-icon").attr("src", ntpObject.urlPlus);
19            $(".card-top").removeClass("open-icon");
20
21            return true;
22        } else {
23            $(".minus-icon").attr("src", ntpObject.urlPlus);
24            $(this).find("img").attr("src", ntpObject.urlMinus);
25            $(".card-top").removeClass("open-icon");
26        }
27
28        $(this).addClass("open-icon");
29    });
30
31    // Small fix for coutner animtation
32
33    let circle_animation_heihght = $(".cricle_animation_div_checker").first().height();
34    $(".cricle_animation_div_checker").css("height", circle_animation_heihght + "px");
35
36    //Header
37
38    $(".menu-item").hover(function() {
39        let sub_navigation_id = $(this).data("target");
40
41        $(".sub_nav").removeClass("d_block");
42        $(".sub_nav").addClass("d_none");
43
44        $(".main_nav").find(".active").removeClass("active");
45
46        $(this).addClass("active");
47
48        $("#" + sub_navigation_id).addClass("d_block");
49    });
50
51    $(".subTitle, .mainTitle").on("mouseenter", function() {
52        $("#cursor").addClass("cursor_hover");
53    });
54
55    $(".subTitle, .mainTitle").on("mouseleave", function() {
56        $("#cursor").removeClass("cursor_hover");
57    });
58
59    $("#ntp_carousel_homepage").on("slide.bs.carousel", function(item) {
60        let current_slide = item.to;
61
62        $(".homepage_nav_indicators").removeClass("active");
63
64        $.each($(".homepage_nav_indicators"), function() {
65            if (current_slide == $(this).data("slide-to")) {
66                $(this).addClass("active");
67            }
68        });
69    });
70
71    // Check to see where we are with the animation, so there is no necesasry dom writing.
72
73    let checker = 0;
74
75    $(document).on("scroll", function() {
76        let counter_id = $(".run_animation").first().parent().parent();
77
78        if ($(counter_id).length !== 0) {
79            //Check if counter is there
80
81            let scroll_top = counter_id.offset().top;
82            let counter_height = counter_id.height();
83            let window_top = $(window).scrollTop();
84            let window_height = $(window).height();
85
86            if (window_top + window_height > scroll_top && window_top - counter_height < scroll_top) {
87                if ($(".run_animation").hasClass("ko-progress-circle")) {
88                    if (checker == 0) {
89                        $(".run_animation").removeClass("ko-progress-circle");
90                        let reload = $(document).width();
91                        $(".run_animation").addClass("ko-progress-circle");
92                        // custom formatting example
93                        $(".count-number").data("countToOptions", {
94                            formatter: function(value, options) {
95                                return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ",") + "+";
96                            },
97                        });
98
99                        // start all the timers
100                        $(".timer").each(count);
101                        checker = 1;
102                    }
103                }
104            }
105        }
106    });
107
108    // Check to see where we are with the animation, so there is no necesasry dom writing.
109    let circle_animation_checker = 0;
110
111    $(document).on("scroll", function() {
112        let $checker = $(".cricle_animation_div_checker").first();
113    
114        // Proveri da li postoji bar jedan element
115        if ($checker.length === 0) return;
116    
117        let counter_id = $checker.parent().parent();
118        let offset = counter_id.offset();
119        if (!offset) return; // dodatna zaštita ako parent nije u DOM-u
120    
121        let scroll_top = offset.top;
122        let counter_height = counter_id.height();
123        let window_top = $(window).scrollTop();
124        let window_height = $(window).height();
125    
126        if (window_top + window_height > scroll_top && window_top - counter_height < scroll_top) {
127            if (circle_animation_checker != 0) {
128                circle_animation_checker = 0;
129    
130                $(".cricle_animation_div_checker").removeClass("circle_animation_div");
131                $(".cricle_animation_div_checker").addClass("circle_animation_div");
132            }
133        } else {
134            if (circle_animation_checker != 1) {
135                $(".cricle_animation_div_checker").removeClass("circle_animation_div");
136            }
137            circle_animation_checker = 1;
138        }
139    });
140
141    // Count Function for Counter
142    function count(options) {
143        var $this = $(this);
144        options = $.extend({}, options || {}
144, $this.data("countToOptions") || {});
145        $this.countTo(options);
146    }
147
148    var $window = $(window);
149    var windowWidth = $window.width();
150    var windowHeight = $window.height();
151    var mousePos = { x: windowWidth / 2, y: windowHeight / 2 };
152
153    clip(mousePos);
154
155    $(".new_animated_section").mousemove(function(e) {
156        mousePos = { x: e.pageX, y: e.pageY };
157        if (windowWidth > 768) {
158            clip(mousePos);
159        }
160    });
161
162    function clip(mousePos) {
163        var pourcPos = { x: ((mousePos.x * 100) / windowWidth) * 2, y: (mousePos.y * 100) / windowHeight };
164        var gapX = (pourcPos.x * 30) / 200 - 15;
165        var gapY = (15 * ((pourcPos.y * 30) / 100 - 15)) / 100;
166        var pointTop;
167        var pointBottom;
168        if (pourcPos.y < 50) {
169            pointTop = 150 - pourcPos.x + gapY * gapX;
170            pointBottom = 150 - pourcPos.x;
171        } else {
172            pointTop = 150 - pourcPos.x;
173            pointBottom = 150 - pourcPos.x - gapY * gapX;
174        }
175        if (pourcPos.x < 100) {
176            $(".back").addClass("on");
177            $(".front").removeClass("on");
178        } else if (pourcPos.x > 100) {
179            $(".back").removeClass("on");
180            $(".front").addClass("on");
181        } else {
182            $(".back").add(".front").removeClass("on");
183        }
184        $(".front").css({ "clip-path": "polygon(" + pointTop + "% 0%, 100% 0%, 100% 100%, " + pointBottom + "% 100%)" });
185    }
186
187    $(".card-top_blue").on("click", function() {
188        if ($(this).hasClass("open-icon")) {
189            $(".minus-icon").attr("src", ntpObject.urlPlus_blue);
190            $(".card-top_blue").removeClass("open-icon");
191            return true;
192        } else {
193            $(".minus-icon").attr("src", ntpObject.urlPlus_blue);
194            $(this).find("img").attr("src", ntpObject.urlMinus_blue);
195            $(".card-top_blue").removeClass("open-icon");
196        }
197        $(this).addClass("open-icon");
198    });
199
200    function check_if_animation_on_load() {
201        //Check if counter is there
202
203        if (!$(".run_animation").hasClass("ko-progress-circle")) {
204            $(".run_animation").addClass("ko-progress-circle");
205
206            // custom formatting example
207            $(".count-number").data("countToOptions", {
208                formatter: function(value, options) {
209                    return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ",") + "+";
210                },
211            });
212
213            // start all the timers
214            $(".timer").each(count);
215        }
216    }
217    check_if_animation_on_load();
218
219    $(".company_name").on("click", function() {
220        let current_company = $(this).data("company");
221
222        $(".hide_companys").hide();
223
224        $("#" + current_company).fadeIn();
225    });
226
227    // Startup i rastuce
228
229    $(".company_type").on("click", function() {
230        $(".company_type").removeClass("st_active");
231        $(this).addClass("st_active");
232
233        let current_company_type = $(this).data("type");
234
235        $(".company_name").hide();
236        $("." + current_company_type).css("display", "flex");
237    });
238
239    $(".homepage_slick_slider").not(".slick-initialized").slick({
240        infinite: true,
241        prevArrow: "<span class='slick_left slick_nav_item'><i class='fa fa-caret-left fa-2x'></i></span>",
242        nextArrow: "<span class='slick_right slick_nav_item'><i class='fa fa-caret-right fa-2x'></i></span>",
243        autoplay: true,
244        // ispravka
245    });
246
247    $(".your-class").slick({
248        slidesToShow: 5,
249        arrows: true,
250        responsive: [{
251                breakpoint: 1024,
252                settings: {
253                    slidesToShow: 3,
254                    slidesToScroll: 3,
255                    infinite: true,
256                    dots: true,
257                },
258            },
259            {
260                breakpoint: 600,
261                settings: {
262                    slidesToShow: 2,
263                    slidesToScroll: 2,
264                },
265            },
266            {
267                breakpoint: 480,
268                settings: {
269                    slidesToShow: 1,
270                    slidesToScroll: 1,
271                },
272            },
273            // You can unslick at a given breakpoint now by adding:
274            // settings: "unslick"
275            // instead of a settings object
276        ],
277    });
278});

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.