PageSourceSearch

https://www.magmilecapital.com/wp-content/themes/alma/js/blog.js?ver=1

js magmilecapital.com collected 2026-10-06 19:17:02 UTC 13,260 bytes, 204 lines download raw bytes

1"use strict";
2function initBlogs() {
3    jQuery(".pbd-alp-placeholder").html(""),
4    jQuery(".posts_category_filter").length && (jQuery(".posts_category_filter .showall .counter").text(" (" + jQuery("article").length + ")"),
5    jQuery(".posts_category_filter li:not(.showall)").each(function() {
6        var e = jQuery(this);
7        e.find(".counter").text(" (" + jQuery("article." + e.attr("class").replace(" disable", "")).length + ")"),
8        jQuery("article." + e.attr("class").replace(" disable", "")).length < 1 ? e.addClass("disable") : e.removeClass("disable")
9    }));
10    for (var e = 0; e < 17; e++)
11        jQuery("li.depth-" + e).each(function() {
12            jQuery(this).css({
13                width: jQuery(this).parent().width() - 10 * (e - 1) + "px"
14            })
15        });
16    jQuery(".post-listing .flexslider").length && jQuery(".post-listing .flexslider").each(function() {
17        jQuery(this).parents(".single").length ? jQuery(this).flexslider({
18            animation: "fade",
19            controlNav: !0,
20            directionNav: !0,
21            touch: !0
22        }) : jQuery(this).flexslider({
23            animation: "fade",
24            controlNav: !0,
25            directionNav: !0,
26            touch: !0,
27            start: function(e) {
28                jQuery(e).find(".flex-direction-nav li a").each(function() {
29                    jQuery(this).on("mouseenter", function() {
30                        jQuery(this).css("background-color", window.almaOptions.styleColor)
31                    }).on("mouseleave", function() {
32                        jQuery(this).css("background-color", "rgba(0, 0, 0, 0.5)")
33                    })
34                })
35            }
36        })
37    }),
38    jQuery(".the_movies").length && jQuery(".the_movies").each(function() {
39        var e = jQuery(this).attr("data-movie");
40        if (e ? jQuery(this).html("<iframe src='" + jQuery(".v_links[data-movie=" + e + "]").eq(0).html() + "' width='100%' height='370' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>") : jQuery(this).html("<iframe src='" + jQuery(".v_links").eq(0).html() + "' width='100%' height='370' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>"),
41        jQuery(".the_movies").siblings(".v_links").length > 1) {
42            jQuery(this).find(".movies-nav").remove(),
43            jQuery(this).append('<ul class="flex-direction-nav movies-nav"><li><a class="prev" href="javascript:;">Previous</a></li><li><a class="next" href="javascript:;">Next</a></li></ul>'),
44            jQuery(this).siblings(".current_movie").remove(),
45            jQuery(this).after('<div style="display:none;" class="current_movie">0</div>');
46            var t = jQuery(this);
47            jQuery(this).find(".movies-nav .prev").on("click", function(e) {
48                e.preventDefault();
49                var r = parseInt(t.siblings(".current_movie").html())
50                  , a = 0;
51                a = 0 == r ? t.siblings(".v_links").length - 1 : r - 1,
52                t.find("iframe").attr("src", t.siblings(".v_links").eq(a).html()),
53                t.siblings(".current_movie").html(a)
54            }),
55            jQuery(this).find(".movies-nav .next").on("click", function(e) {
56                e.preventDefault();
57                var r = parseInt(t.siblings(".current_movie").html())
58                  , a = 0;
59                a = r == t.siblings(".v_links").length - 1 ? 0 : r + 1,
60                t.find("iframe").attr("src", t.siblings(".v_links").eq(a).html()),
61                t.siblings(".current_movie").html(a)
62            })
63        }
64    }),
65    jQuery(".postcontent .flexslider.slider").length && jQuery(".postcontent .flexslider.slider .mask .more").each(function() {
66        jQuery(this).attr("onclick", "jQuery(this).parents('.mask').siblings('ul.slides').find('li').eq(0).find('a').trigger('click');")
67    }),
68    jQuery("a.comment-reply-link").each(function() {
69        -1 != jQuery(this).attr("href").indexOf("#") && jQuery(this).on("click", function() {
70            jQuery("html,body").animate({
71                scrollTop: jQuery(this).offset().top - 80
72            }, 222, "jswing")
73        })
74    }),
75    jQuery(".container .vendor").length && jQuery(".container .vendor").fitVids(),
76    jQuery(window).resize(),
77    /* new for blogs */
78    jQuery('.fullwidth_media_content').each(function() {
79        jQuery(this).add(jQuery(this).siblings().not('.divider-posts')).wrapAll('<div class="fullwidth_media_wrapper" />');
80    });
81    /* endof new for blogs */
82}
83function alma_monitorScrollTop() {
84    if (jQuery("#pbd-alp-load-posts").length) {
85        var e = getScrollTop();
86        window.loadingPoint = parseInt(jQuery("#pbd-alp-load-posts").offset().top - jQuery(window).height() + 50, 10),
87        e >= window.loadingPoint && (clearInterval(window.interval),
88        jQuery("#pbd-alp-load-posts a").trigger("click"))
89    } else
90        clearInterval(window.interval)
91}
92function getScrollTop() {
93    if ("undefined" != typeof pageYOffset)
94        return pageYOffset;
95    var e = document.body
96      , t = document.documentElement;
97    return (t = t.clientHeight ? t : e).scrollTop
98}
99jQuery(document).ready(function(e) {
100    "use strict";
101    initBlogs()
102}),
103jQuery(document).ready(function(e) {
104    "use strict";
105    window.alma_pageNum = 0 != parseInt(window.almaOptions.loader_startPage, 10) ? parseInt(window.almaOptions.loader_startPage, 10) : 1,
106    window.alma_totalForward = 1,
107    window.alma_totalBackward = -1;
108    var t = parseInt(window.almaOptions.loader_maxPages)
109      , r = "empty";
110    jQuery(".navigation .next-posts").parent().attr("href") && (r = jQuery(".navigation .next-posts").parent().attr("href"));
111    var a = "empty";
112    jQuery(".navigation .prev-posts").parent().attr("href") && (a = jQuery(".navigation .prev-posts").parent().attr("href")),
113    "empty" == r && "empty" == a || "scroll" !== window.almaOptions.reading_option && "scrollauto" !== window.almaOptions.reading_option || (parseInt(window.alma_pageNum, 10) + 1 <= t && jQuery(".post-listing").each(function() {
114        if (0 == jQuery(this).parents(".recentPosts_widget").length && 0 == jQuery(this).parents(".single").length) {
115            var e = '<p id="pbd-alp-load-posts"><a href="javascript:;">' + window.almaOptions.alma_load_more_posts_text + "</a></p>";
116            jQuery(this).parent().append('<div style="position:relative;float:left;display:inline-block;width:100%;" class="pbd-alp-placeholder pbd-alp-placeholder-' + (parseInt(window.alma_pageNum, 10) + 1) + '"></div>').append(e)
117        }
118        0 == jQuery(this).parents(".single").length && jQuery(".navigation").css("display", "none")
119    }),
120    parseInt(window.alma_pageNum, 10) > 1 && jQuery(".post-listing").each(function() {
121        if (0 == jQuery(this).parents(".recentPosts_widget").length && 0 == jQuery(this).parents(".single").length) {
122            var e = '<p id="pbd-alp-load-newer-posts" style="position: relative; height:50px;width:100%;text-align:center;"><a style=" position: relative; display:inline-block;" href="javascript:;">' + window.almaOptions.alma_load_more_posts_text + "</a></p>";
123            jQuery(this).parent().prepend('<div class="pbd-alp-placeholder-newer-' + (parseInt(window.alma_pageNum, 10) - 1) + '"></div>').prepend(e)
124        }
125        0 == jQuery(this).parents(".single").length && jQuery(".navigation").css("display", "none")
126    }),
127    jQuery("#pbd-alp-load-posts a").length && jQuery("#pbd-alp-load-posts a").on("click", function(e) {
128        return window.alma_pageNum + window.alma_totalForward <= t ? (jQuery(this).html(window.almaOptions.alma_loading_posts_text + '<img style="width:16px; height: 16px; left: 10px;top:3px; position: relative;" src="' + window.almaOptions.templatepath + '/images/ajx_loading.gif">'),
129        jQuery(".pbd-alp-placeholder-" + parseInt(window.alma_pageNum + window.alma_totalForward, 10)).load(r + " article", function() {
130            if (jQuery(".pbd-alp-placeholder-" + parseInt(window.alma_pageNum + window.alma_totalForward, 10) + " article").each(function() {
131                jQuery(".post-listing").hasClass("journal") ? (window.iso.isotope("insert", jQuery(this)),
132                jQuery(window).trigger("resize")) : jQuery(this).appendTo(jQuery(".post-listing")),
133                jQuery(this).hasClass("recent") && jQuery(this).remove()
134            }),
135            window.alma_totalForward = parseInt(window.alma_totalForward + 1),
136            r = r.indexOf("paged") < 0 ? r.replace(/\/page\/[0-9]?/, "/page/" + parseInt(window.alma_pageNum + window.alma_totalForward, 10)) : r.replace(/paged=[0-9]?/, "paged=" + parseInt(window.alma_pageNum + window.alma_totalForward, 10)),
137            jQuery("#pbd-alp-load-posts").before('<div style="position:relative;float:left;width:100%;display:inline-block;" class="pbd-alp-placeholder pbd-alp-placeholder-' + parseInt(window.alma_pageNum + window.alma_totalForward, 10) + '"></div>'),
138            window.alma_pageNum + window.alma_totalForward <= t)
139                jQuery("#pbd-alp-load-posts a").text(window.almaOptions.alma_load_more_posts_text),
140                "scrollauto" !== window.almaOptions.reading_option || jQuery("body").hasClass("single") || (window.clearInterval(window.alma_interval),
141                window.alma_interval = setInterval("alma_monitorScrollTop()", 1e3));
142            else {
143                jQuery("#pbd-alp-load-posts a").text(window.almaOptions.alma_no_more_posts_text);
144                setTimeout(function() {
145                    jQuery("#pbd-alp-load-posts").slideUp(500).fadeOut(500)
146                }, 5e3);
147                window.clearInterval(window.alma_interval)
148            }
149            jQuery(".post-listing").next(".pbd-alp-placeholder").remove(),
150            initBlogs();
151
152            /* related to the slideup posts feature */
153            if (jQuery('.not-in-view').length) {
154                setTimeout(function() {
155                    jQuery(window).resize();
156                    jQuery(".not-in-view").waypoint({
157                        handler: function(event, direction) {
158                            var element = this.element ? this.element : this;
159                            jQuery(element).removeClass("not-in-view");
160                        },
161                        offset: "40%"
162                    });
163                }, 1000);
164            }
165            /* grayscales */
166            if (window.almaOptions.alma_grayscale_effect == "on") {
167                jQuery('img').each(function() {
168                    if (!jQuery(this).closest('.gm-style').length && !jQuery(this).parent().hasClass('navbar-brand') && !jQuery(this).closest('rev_slider').length && !jQuery(this).closest('#big_footer').length) {
169                        jQuery(this).addClass('alma_grayscale');
170                    }
171                });
172            }
173
174        }).fadeIn(5e3)) : window.clearInterval(window.alma_interval),
175        !1
176    }),
177    jQuery("#pbd-alp-load-newer-posts a").length && jQuery("#pbd-alp-load-newer-posts a").on("click", function(e) {
178        return window.alma_pageNum + window.alma_totalBackward > 0 ? (jQuery(this).html(window.almaOptions.alma_loading_posts_text + '<img style="width:16px; height: 16px; left: 10px; top:3px;position: relative;" src="' + window.almaOptions.templatepath + '/images/ajx_loading.gif">'),
179        jQuery(".pbd-alp-placeholder-newer-" + (window.alma_pageNum + window.alma_totalBackward)).load(a + " article", function() {
180            if (jQuery(".pbd-alp-placeholder-newer-" + (window.alma_pageNum + window.alma_totalBackward) + " article").each(function() {
181                jQuery(this).hasClass("recent") && jQuery(this).remove(),
182                jQuery(".post-listing").hasClass("journal") ? (jQuery(this).prependTo(jQuery(".journal")),
183                window.iso.isotope("reloadItems").isotope({
184                    sortBy: "original-order"
185                }),
186                jQuery(window).trigger("resize")) : jQuery(this).prependTo(jQuery(".post-listing"))
187            }),
188            window.alma_totalBackward = window.alma_totalBackward - 1,
189            a = a.indexOf("paged") < 0 ? a.replace(/\/page\/[0-9]?/, "/page/" + (window.alma_pageNum + window.alma_totalBackward)) : a.replace(/paged=[0-9]?/, "paged=" + (window.alma_pageNum + window.alma_totalBackward)),
190            jQuery("#pbd-alp-load-newer-posts").after('<div class="pbd-alp-placeholder-newer-' + parseInt(window.alma_pageNum + window.alma_totalBackward) + '"></div>'),
191            window.alma_pageNum + window.alma_totalBackward + 1 > 1)
192                jQuery("#pbd-alp-load-newer-posts a").text(window.almaOptions.alma_load_more_posts_text);
193            else {
194                jQuery("#pbd-alp-load-newer-posts a").text(window.almaOptions.alma_no_more_posts_text);
195                setTimeout(function() {
196                    jQuery("#pbd-alp-load-newer-posts").slideUp(500).fadeOut(500)
197                }, 5e3)
198            }
199            jQuery(".post-listing").hasClass("journal") && jQuery(".pbd-alp-placeholder-newer-" + (window.alma_pageNum + window.alma_totalBackward)).remove(),
200            initBlogs()
201        }).fadeIn(5e3)) : window.clearInterval(window.alma_interval),
202        !1
203    }))
204});

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.