PageSourceSearch

https://prishtinainsight.com/wp-content/themes/pi/js/main.js?ver=1.1

js prishtinainsight.com collected 2026-10-02 03:25:46 UTC 12,368 bytes, 344 lines download raw bytes

1(function($, window, document) {
2
3    $('.mainCon').click(function (e) { 
4        if ($('.socialButtonMainContainer').attr('aria-current') == "true") {
5            $('.socialButtonMainContainer').attr('aria-current', "false" );
6        }else{
7            $('.socialButtonMainContainer').attr('aria-current', "true" );
8        }
9        checkSocialValue($('.socialButtonMainContainer').attr('aria-current') == "true");
10        // e.preventDefault();
11    });
12
13    function checkSocialValue(index) {
14        console.log(index);
15        if (index) {
16            changeSocial('.socialButtonMainContainer', 'showSocialButtons', 'hideSocialButtons')
17        }else{
18            changeSocial('.socialButtonMainContainer', 'hideSocialButtons', 'showSocialButtons');
19        }
20    }
21
22    function changeSocial(index, addValue, removeValue) {
23        $(index).removeClass(removeValue);
24        $(index).addClass(addValue);
25    }
26
27    (function($) {
28        $.fn.clickToggle = function(func1, func2) {
29            var funcs = [func1, func2];
30            this.data('toggleclicked', 0);
31            this.click(function() {
32                var data = $(this).data();
33                var tc = data.toggleclicked;
34                $.proxy(funcs[tc], this)();
35                data.toggleclicked = (tc + 1) % 2;
36            });
37            return this;
38        };
39    }(jQuery));
40    
41    $(function() {
42        /*GLOBALS*/
43        var nav_trigger = $('#nav_trigger');
44        var body = $('body');
45        var header_fixed = $('.header_fixed');
46        var fixed_nav = $('.fixed_nav_container');
47        var map_trigger = $('#map_modal_trigger');
48        var social_shares = $('.socialShares');
49        var $window = $(window);
50        var map_modal = $('.map_modal_wrapper');
51        var close_map = $('.map_modal_wrapper').find('#closeMap');
52        var accordion_trigger = $('.accordion_trigger');
53        var accordion_body = $('.accordion_body');
54        var scroll_top = $('#scroll-top-trigger');
55        var noaccess = $('.no-access');
56        var revistaMeta = $('.revistaMeta a');
57        var sub_blocker = $('.sub_blocker');
58        var plan1 = $('.first_plan');
59        var plan2 = $('.second_plan');
60        var plan3 = $('.third_plan');
61        var radio_plan1 = $('#rcp_subscription_level_2');
62        var radio_plan2 = $('#rcp_subscription_level_3');
63        var radio_plan3 = $('#rcp_subscription_level_4');
64        var sub_plan_links = $('.sub_plans a');
65        var chosen_info = $('.sub_info_aside').find('span');
66        /*
67                var headline_single_height = $('.titleHolder h1').height() + 1;
68                var middle_content_opinion = $('.middle_content_opinion');*/
69
70        /*EVENTS*/
71        /* var waypoints = $('.tags').waypoint({
72  handler: function(direction) {
73sticky.destroy();
74  }
75})*/
76        nav_trigger.click(function(e) {
77            e.preventDefault();
78            e.stopPropagation();
79            $(this).toggleClass('active_nav');
80            body.toggleClass('fixed_nav_triggered');
81            if (fixed_nav.is(':visible')) {
82                fixed_nav.velocity('stop').velocity("fadeOut", {
83                    duration: 300,
84                    easing: 'easeInOutQuad'
85                });
86            } else {
87                fixed_nav.velocity('stop').velocity("fadeIn", {
88                    duration: 300,
89                    easing: 'easeInOutQuad'
90                });
91            }
92        })
93        map_trigger.click(function(e) {
94            e.preventDefault();
95            e.stopPropagation();
96            map_modal.fadeToggle('300');
97            initialize();
98        })
99        close_map.click(function(e) {
100            e.preventDefault();
101            e.stopPropagation();
102            map_modal.fadeOut('300');
103        })
104        jQuery(document).mouseup(function(e) {
105            var container = jQuery(".map_modal");
106            if (!container.is(e.target) && container.has(e.target).length === 0) {
107                jQuery('.map_modal_wrapper').fadeOut('300');
108            }
109        });
110        $window.scroll(function() {
111            if ($(this).scrollTop() > 100) { // this refers to window
112                header_fixed.show();
113            } else {
114                header_fixed.hide();
115            }
116        });
117
118        noaccess.click(function(event) {
119            event.preventDefault();
120            sub_blocker.velocity("fadeIn", {
121                duration: 400,
122                easing: "easeInOut"
123            });
124
125
126        });
127
128        /*        jQuery(document).mouseup(function(e) {
129                    var container = revistaThumb;
130                    if (!container.is(e.target) && container.has(e.target).length === 0) {
131                        sub_blocker.velocity("fadeOut", {
132                            duration: 400,
133                            easing: "easeInOut"
134                        });
135                        revistaMeta.attr({
136                            href: mag_link
137                        });
138
139                    }
140                });*/
141        
142        accordion_trigger.click(function(e) {
143            e.preventDefault();
144            e.stopPropagation();
145            var this_accordion_body = jQuery(this).siblings(accordion_body);
146            if (this_accordion_body.is(':visible')) {
147                this_accordion_body.velocity('stop').velocity("slideUp", {
148                    duration: 400,
149                    easing: 'easeInOutQuad'
150                });
151                this_accordion_body.siblings(accordion_trigger).removeClass('accordion_triggered');
152            } else {
153                this_accordion_body.velocity('stop').velocity("slideDown", {
154                    duration: 400,
155                    easing: 'easeInOutQuad'
156                });
157                this_accordion_body.siblings(accordion_trigger).addClass('accordion_triggered');
158            }
159            accordion_body.not(this_accordion_body).velocity('stop').velocity("slideUp", {
160                duration: 400,
161                easing: 'easeInQuad'
162            });
163            accordion_trigger.not($(this)).removeClass('accordion_triggered');
164        });
165        accordion_body.each(function() {
166            if ($(this).is(':visible')) {
167                $(this).siblings(accordion_trigger).addClass('accordion_triggered');
168            } else {
169                $(this).siblings(accordion_trigger).removeClass('accordion_triggered');
170            }
171        });
172        jQuery(window).scroll(function() {
173            if (jQuery(this).scrollTop() > 200) {
174                scroll_top.fadeIn('fast');
175            } else {
176                scroll_top.fadeOut('fast');
177            }
178        });
179        scroll_top.on("click", function() {
180            $("body").velocity("scroll", {
181                duration: 1000,
182                easing: "easeInBack"
183            });
184        });
185        plan1.click(function(event) {
186            event.preventDefault();
187            $(this).addClass('chosenPlan');
188            sub_plan_links.not(this).removeClass('chosenPlan');
189            radio_plan1.prop("checked", true);
190            chosen_info.html('Monthly Plan 9.99');
191        });
192        plan2.click(function(event) {
193            event.preventDefault();
194            $(this).addClass('chosenPlan');
195            sub_plan_links.not(this).removeClass('chosenPlan');
196            radio_plan2.prop("checked", true);
197            chosen_info.html('Annual Plan 99.90');
198        });
199        plan3.click(function(event) {
200            event.preventDefault();
201            $(this).addClass('chosenPlan');
202            sub_plan_links.not(this).removeClass('chosenPlan');
203            radio_plan3.prop("checked", true);
204            chosen_info.html("Corporate Annual Plan. The plan's price depends on how many users your institution plans to subscribe. Please click sign up, to get in touch with one of our sales agent who will provide detailed information.");
205        });
206        sub_plan_links.on("click", function() {
207            $(".rcp_reg_intro").velocity("scroll", {
208                duration: 1000,
209                offset: -40,
210                easing: "easeInBack"
211            });
212        });
213        if (navigator.userAgent.match(/Macintosh/) && navigator.userAgent.match(/Chrome/)) {
214            $("body").addClass("macOsBrowser");
215        } else {
216            $("body").addClass("pc");
217        }
218        /*INIT*/
219        /*  function setModal(){
220            $('.popup_rek').velocity("fadeIn",{
221                  duration: 400,
222                  easing: 'easeInQuad'
223              })
224          }
225          setTimeout(function(){setModal();}, 5000);*/
226
227        $('.pop_container button').click(function(event) {
228            $('.popup_rek').velocity("fadeOut", {
229                duration: 400,
230                easing: 'easeInQuad'
231            })
232        });
233
234
235
236
237
238
239        jQuery('.number_input').hide();
240        jQuery('.first_plan,.second_plan').click(function(e) {
241            e.preventDefault();
242            jQuery('.number_input').hide();
243        });
244        plan3.click(function(e) {
245            e.preventDefault();
246            jQuery('.number_input').show();
247        });
248        $(".loged-in").click(function(e) {
249            e.preventDefault();
250            $(".popup-login").show();
251            sub_blocker.velocity("fadeOut", {
252                duration: 400,
253                easing: "easeInOut"
254            });
255            /*            ev.preventDefault();
256                        ev.stopPropagation();*/
257
258        });
259        $('.login-container button').click(function(event) {
260            $(".popup-login").hide();
261        });
262    });
263
264    $scrollContainer = jQuery('.infScrollHolder');
265
266    $scrollContainer.infinitescroll({
267            navSelector: '.nav-links', // selector for the paged navigation 
268            nextSelector: '.nav-links a', // selector for the NEXT link (to page 2)
269            itemSelector: '.grid-item', // selector for all items you'll retrieve
270            loading: {
271                msgText: 'Loading ...',
272                finishedMsg: 'No more posts to load.',
273                img: null,
274            }
275        },
276        // trigger Masonry as a callback
277        function(newElements, opts) {
278            // hide new items while they are loading
279            var jQuerynewElems = jQuery(newElements).css({
280                opacity: 0
281            });
282            // ensure that images load before adding to masonry layout
283            jQuerynewElems.imagesLoaded(function() {
284                // show elems now they're ready
285                jQuerynewElems.animate({
286                    opacity: 1
287                });
288            });
289
290        }
291
292    );
293
294    if (jQuery('#menu-item-399').hasClass('current-post-parent') && jQuery('#menu-item-297').hasClass('current-post-parent')) {
295        jQuery('#menu-item-399').removeClass('current-post-parent')
296    }
297    if (jQuery('#menu-item-10').hasClass('current-post-parent') && jQuery('#menu-item-297').hasClass('current-post-parent')) {
298        jQuery('#menu-item-10').removeClass('current-post-parent')
299    }
300}(window.jQuery, window, document));
301jQuery(document).ready(function($) {
302
303    jQuery('.pdfview').on('click', function() {
304        var href = jQuery(this).attr('href');
305        var iframe = '<div class="pdf-viewer"><iframe width="100%" height="100%" frameBorder="0" id="previewFrame" src="' + href + '"></iframe></div>';
306        $('body').prepend(iframe);
307        $('body').css('overflow', 'hidden');
308        return false;
309    });
310});
311
312function closeIFrame() {
313    jQuery('.pdf-viewer').remove();
314    jQuery('body').css('overflow', 'visible');
315}
316jQuery(document).keydown(function(e) {
317    var code = e.keyCode ? e.keyCode : e.which;
318    if (code == 27) {
319        closeIFrame();
320    }
321});
322jQuery(window).load(function() {
323    var color = '';
324    jQuery('.Content p').find('span').each(function() {
325        var x = jQuery(this).css('color');
326        hexc(x);
327         if (jQuery(this).css('text-decoration') == 'underline') {
328        jQuery(this).css('border-bottom', '1px solid' + color);
329    }
330   
331    })
332
333
334    function hexc(colorval) {
335
336        var parts = colorval.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
337        delete(parts[0]);
338        for (var i = 1; i <= 3; ++i) {
339            parts[i] = parseInt(parts[i]).toString(16);
340            if (parts[i].length == 1) parts[i] = '0' + parts[i];
341        }
342        color = '#' + parts.join('');
343    }
344})

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.