PageSourceSearch

https://queertheory.com/moose-html/template/moose/style/js/scripts.js

js queertheory.com collected 2026-10-02 08:27:53 UTC 17,607 bytes, 506 lines download raw bytes

1/*-----------------------------------------------------------------------------------*/
2/*	FANCYBOX
3/*-----------------------------------------------------------------------------------*/
4$(document).ready(function () {
5    $(".fancybox-media").fancybox({
6        arrows: true,
7        padding: 0,
8        closeBtn: true,
9        openEffect: 'fade',
10        closeEffect: 'fade',
11        prevEffect: 'fade',
12        nextEffect: 'fade',
13        helpers: {
14            media: {},
15            overlay: {
16                locked: false
17            },
18            buttons: false,
19            thumbs: {
20                width: 50,
21                height: 50
22            },
23            title: {
24                type: 'inside'
25            }
26        },
27        beforeLoad: function () {
28            var el, id = $(this.element).data('title-id');
29            if (id) {
30                el = $('#' + id);
31                if (el.length) {
32                    this.title = el.html();
33                }
34            }
35        }
36    });
37});
38/*-----------------------------------------------------------------------------------*/
39/*	TABS
40/*-----------------------------------------------------------------------------------*/
41$(document).ready(function () {
42    $('.tabs.services').easytabs({
43        animationSpeed: 300,
44        updateHash: false,
45        cycle: 5000
46    });
47});
48$(document).ready(function () {
49    $('.tabs.tabs-top, .tabs.tabs-side').easytabs({
50        animationSpeed: 300,
51        updateHash: false
52    });
53});
54/*-----------------------------------------------------------------------------------*/
55/*	TESTIMONIALS
56/*-----------------------------------------------------------------------------------*/
57$(document).ready(function () {
58    $('#testimonials').easytabs({
59        animationSpeed: 500,
60        updateHash: false,
61        cycle: 5000
62    });
63
64});
65/*-----------------------------------------------------------------------------------*/
66/*	RETINA.JS
67/*-----------------------------------------------------------------------------------*/
68(function () {
69    function t(e) {
70        this.path = e;
71        var t = this.path.split("."),
72            n = t.slice(0, t.length - 1).join("."),
73            r = t[t.length - 1];
74        this.at_2x_path = n + "@2x." + r
75    }
76
77    function n(e) {
78        this.el = e, this.path = new t(this.el.getAttribute("src"));
79        var n = this;
80        this.path.check_2x_variant(function (e) {
81            e && n.swap()
82        })
83    }
84    var e = typeof exports == "undefined" ? window : exports;
85    e.RetinaImagePath = t, t.confirmed_paths = [], t.prototype.is_external = function () {
86        return !!this.path.match(/^https?\:/i) && !this.path.match("//" + document.domain)
87    }, t.prototype.check_2x_variant = function (e) {
88        var n, r = this;
89        if (this.is_external()) return e(!1);
90        if (this.at_2x_path in t.confirmed_paths) return e(!0);
91        n = new XMLHttpRequest, n.open("HEAD", this.at_2x_path), n.onreadystatechange = function () {
92            return n.readyState != 4 ? e(!1) : n.status >= 200 && n.status <= 399 ? (t.confirmed_paths.push(r.at_2x_path), e(!0)) : e(!1)
93        }, n.send()
94    }, e.RetinaImage = n, n.prototype.swap = function (e) {
95        function n() {
96            t.el.complete ? (t.el.setAttribute("width", t.el.offsetWidth), t.el.setAttribute("height", t.el.offsetHeight), t.el.setAttribute("src", e)) : setTimeout(n, 5)
97        }
98        typeof e == "undefined" && (e = this.path.at_2x_path);
99        var t = this;
100        n()
101    }, e.devicePixelRatio > 1 && (window.onload = function () {
102        var e = document.getElementsByTagName("img"),
103            t = [],
104            r, i;
105        for (r = 0; r < e.length; r++) i = e[r], t.push(new n(i))
106    })
107})();
108/*-----------------------------------------------------------------------------------*/
109/*	GO TO TOP
110/*-----------------------------------------------------------------------------------*/
111! function (a, b, c) {
112    a.fn.scrollUp = function (b) {
113        a.data(c.body, "scrollUp") || (a.data(c.body, "scrollUp", !0), a.fn.scrollUp.init(b))
114    }, a.fn.scrollUp.init = function (d) {
115        var e = a.fn.scrollUp.settings = a.extend({}, a.fn.scrollUp.defaults, d),
116            f = e.scrollTitle ? e.scrollTitle : e.scrollText,
117            g = a("<a/>", {
118                id: e.scrollName,
119                href: "#top",
120                title: f
121            }).appendTo("body");
122        e.scrollImg || g.html(e.scrollText), g.css({
123            display: "none",
124            position: "fixed",
125            zIndex: e.zIndex
126        }), e.activeOverlay && a("<div/>", {
127            id: e.scrollName + "-active"
128        }).css({
129            position: "absolute",
130            top: e.scrollDistance + "px",
131            width: "100%",
132            borderTop: "1px dotted" + e.activeOverlay,
133            zIndex: e.zIndex
134        }).appendTo("body"), scrollEvent = a(b).scroll(function () {
135            switch (scrollDis = "top" === e.scrollFrom ? e.scrollDistance : a(c).height() - a(b).height() - e.scrollDistance, e.animation) {
136            case "fade":
137                a(a(b).scrollTop() > scrollDis ? g.fadeIn(e.animationInSpeed) : g.fadeOut(e.animationOutSpeed));
138                break;
139            case "slide":
140                a(a(b).scrollTop() > scrollDis ? g.slideDown(e.animationInSpeed) : g.slideUp(e.animationOutSpeed));
141                break;
142            default:
143                a(a(b).scrollTop() > scrollDis ? g.show(0) : g.hide(0))
144            }
145        }), g.click(function (b) {
146            b.preventDefault(), a("html, body").animate({
147                scrollTop: 0
148            }, e.topSpeed, e.easingType)
149        })
150    }, a.fn.scrollUp.defaults = {
151        scrollName: "scrollUp",
152        scrollDistance: 300,
153        scrollFrom: "top",
154        scrollSpeed: 300,
155        easingType: "linear",
156        animation: "fade",
157        animationInSpeed: 200,
158        animationOutSpeed: 200,
159        scrollText: "Scroll to top",
160        scrollTitle: !1,
161        scrollImg: !1,
162        activeOverlay: !1,
163        zIndex: 2147483647
164    }, a.fn.scrollUp.destroy = function (d) {
165        a.removeData(c.body, "scrollUp"), a("#" + a.fn.scrollUp.settings.scrollName).remove(), a("#" + a.fn.scrollUp.settings.scrollName + "-active").remove(), a.fn.jquery.split(".")[1] >= 7 ? a(b).off("scroll", d) : a(b).unbind("scroll", d)
166    }, a.scrollUp = a.fn.scrollUp
167}(jQuery, window, document);
168
169$(document).ready(function () {
170    $.scrollUp({
171        scrollName: 'scrollUp', // Element ID
172        scrollDistance: 300, // Distance from top/bottom before showing element (px)
173        scrollFrom: 'top', // 'top' or 'bottom'
174        scrollSpeed: 300, // Speed back to top (ms)
175        easingType: 'linear', // Scroll to top easing (see http://easings.net/)
176        animation: 'fade', // Fade, slide, none
177        animationInSpeed: 200, // Animation in speed (ms)
178        animationOutSpeed: 200, // Animation out speed (ms)
179        scrollText: '<i class="icon-up-open"></i>', // Text for element, can contain HTML
180        scrollTitle: false, // Set a custom <a> title if required. Defaults to scrollText
181        scrollImg: false, // Set true to use image
182        activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
183        zIndex: 1001 // Z-Index for the overlay
184    });
185});
186/*-----------------------------------------------------------------------------------*/
187/*	MENU
188/*-----------------------------------------------------------------------------------*/
189$(document).ready(function () {
190    $('.js-activated').dropdownHover({
191        instantlyCloseOthers: false,
192        delay: 0
193    }).dropdown();
194
195
196    $('.dropdown-menu a, .social .dropdown-menu, .social .dropdown-menu input').click(function (e) {
197        e.stopPropagation();
198    });
199
200});
201/*-----------------------------------------------------------------------------------*/
202/*	STICKY NAVIGATION
203/*-----------------------------------------------------------------------------------*/
204$(document).ready(function () {
205    $(".navbar:not(.basic) .navbar-collapse").sticky({
206        topSpacing: 0
207    });
208});
209/*-----------------------------------------------------------------------------------*/
210/*	STICKY NAVIGATION - BASIC
211/*-----------------------------------------------------------------------------------*/
212$(document).ready(function () {
213
214    var menu = $('.navbar');
215    var pos = menu.offset();
216    $(window).scroll(function() {
217        if (menu.length>0) {
218	        if ($(this).scrollTop() > pos.top + menu.height() && menu.hasClass('default') && $(this).scrollTop() > 300) {
219	            menu.fadeOut('fast', function() {
220	                $(this).removeClass('default').addClass('fixed').fadeIn('fast');
221	            });
222	        } else if ($(this).scrollTop() <= pos.top + 300 && menu.hasClass('fixed')) {
223	            menu.fadeOut(0, function() {
224	                $(this).removeClass('fixed').addClass('default').fadeIn(0);
225	            });
226	        }
227        }
228    });
229
230});
231/*-----------------------------------------------------------------------------------*/
232/*	ISOTOPE PORTFOLIO
233/*-----------------------------------------------------------------------------------*/
234$(document).ready(function () {
235    var $container = $('.items');
236    $container.imagesLoaded(function () {
237        $container.isotope({
238            itemSelector: '.item',
239            layoutMode: 'fitRows'
240        });
241    });
242
243    $('.portfolio .filter li a').click(function () {
244
245        $('.portfolio .filter li a').removeClass('active');
246        $(this).addClass('active');
247
248        var selector = $(this).attr('data-filter');
249        $container.isotope({
250            filter: selector
251        });
252
253        return false;
254    });
255});
256/*-----------------------------------------------------------------------------------*/
257/*	ISOTOPE FULLSCREEN PORTFOLIO
258/*-----------------------------------------------------------------------------------*/
259
260var isotopeBreakpoints = [{
261        min_width: 1680,
262        columns: 6
263    }, // Desktop
264    {
265        min_width: 1140,
266        max_width: 1680,
267        columns: 5
268    }, // iPad Landscape
269    {
270        min_width: 1024,
271        max_width: 1440,
272        columns: 4
273    }, // iPad Portrait
274    {
275        min_width: 768,
276        max_width: 1024,
277        columns: 3
278    }, // iPhone Landscape
279    {
280        max_width: 768,
281        columns: 1
282    } // iPhone Portrait
283
284];
285
286$(document).ready(function () {
287    var $container = $('.items.fullscreen');
288
289    $container.imagesLoaded(function () {
290        $container.isotope({
291            itemSelector: '.item',
292            layoutMode: 'fitRows'
293        });
294    });
295
296    // hook to window resize to resize the portfolio items for fluidity / responsiveness
297    $(window).smartresize(function () {
298        var windowWidth = $(window).width();
299        var windowHeight = $(window).height();
300
301        for (var i = 0; i < isotopeBreakpoints.length; i++) {
302            if (windowWidth >= isotopeBreakpoints[i].min_width || !isotopeBreakpoints[i].min_width) {
303                if (windowWidth < isotopeBreakpoints[i].max_width || !isotopeBreakpoints[i].max_width) {
304                    $container.find('.item').each(function () {
305                        $(this).width(Math.floor($container.width() / isotopeBreakpoints[i].columns));
306                    });
307
308                    break;
309                }
310            }
311        }
312    });
313
314    $(window).trigger('smartresize');
315
316});
317/*-----------------------------------------------------------------------------------*/
318/*	ISOTOPE BLOG
319/*-----------------------------------------------------------------------------------*/
320$(document).ready(function () {
321    var $container = $('.grid-blog');
322    $container.imagesLoaded(function () {
323        $container.isotope({
324            itemSelector: '.post'
325        });
326    });
327
328    $(window).on('resize', function () {
329        $('.grid-blog').isotope('reLayout')
330    });
331});
332/*-----------------------------------------------------------------------------------*/
333/*	IMAGE HOVER
334/*-----------------------------------------------------------------------------------*/
335$(document).ready(function () {
336    $('.icon-overlay a').prepend('<span class="icn-more"></span>');
337});
338/*-----------------------------------------------------------------------------------*/
339/*	HOME SLIDER
340/*-----------------------------------------------------------------------------------*/
341$(document).ready(function () {
342    var revapi;
343    jQuery(document).ready(function () {
344
345        revapi = jQuery('.fullwidthbanner').revolution({
346            delay: 9000,
347            startwidth: 1170,
348            startheight: 600,
349            hideThumbs: 200,
350            fullWidth: "on"
351        });
352
353    });
354});
355/*-----------------------------------------------------------------------------------*/
356/*	PRETTIFY
357/*-----------------------------------------------------------------------------------*/
358jQuery(document).ready(function () {
359    window.prettyPrint && prettyPrint()
360});
361/*-----------------------------------------------------------------------------------*/
362/*	DATA REL
363/*-----------------------------------------------------------------------------------*/
364$('a[data-rel]').each(function () {
365    $(this).attr('rel', $(this).data('rel'));
366});
367/*-----------------------------------------------------------------------------------*/
368/*	VIDEO
369/*-----------------------------------------------------------------------------------*/
370jQuery(document).ready(function () {
371    jQuery('.player').fitVids();
372});
373/*-----------------------------------------------------------------------------------*/
374/*	OWL CAROUSEL
375/*-----------------------------------------------------------------------------------*/
376$(document).ready(function () {
377    $("#owl-projects").owlCarousel({
378
379        navigation: false,
380        autoHeight: true,
381        slideSpeed: 300,
382        paginationSpeed: 400,
383        rewindNav: false,
384        singleItem: true,
385        navigationText: ["<i class='icon-left-open-mini'></i>", "<i class='icon-right-open-mini'></i>"]
386
387    });
388
389    $("#owl-blog").owlCarousel({
390        navigation: true,
391        pagination: false,
392        rewindNav: false,
393        items: 4,
394        itemsDesktop: [1200, 4],
395        itemsDesktopSmall: [1024, 3],
396        itemsTablet: [970, 2],
397        itemsMobile: [767, 1],
398        navigationText: ["<i class='icon-left-open-mini'></i>", "<i class='icon-right-open-mini'></i>"]
399    });
400
401    $("#owl-portfolio").owlCarousel({
402        navigation: true,
403        pagination: false,
404        rewindNav: false,
405        items: 3,
406        itemsDesktop: [1200, 3],
407        itemsDesktopSmall: [1024, 3],
408        itemsTablet: [970, 2],
409        itemsMobile: [767, 1],
410        navigationText: ["<i class='icon-left-open-mini'></i>", "<i class='icon-right-open-mini'></i>"]
411    });
412
413    $("#owl-clients").owlCarousel({
414
415        autoPlay: 9000,
416        rewindNav: false,
417        items: 6,
418        itemsDesktop: [1200, 6],
419        itemsDesktopSmall: [1024, 4],
420        itemsTablet: [768, 3],
421        itemsMobile: [480, 2],
422        navigation: false,
423        pagination: false
424
425    });
426
427    $("#owl-gallery").owlCarousel({
428
429        autoPlay: 3000, //Set AutoPlay to 3 seconds
430        pagination: false,
431        rewindNav: false,
432        lazyLoad: true,
433        items: 3,
434        itemsDesktop: [1200, 3],
435        itemsDesktopSmall: [1024, 2],
436        itemsTablet: [970, 2],
437        itemsMobile: [767, 1]
438
439    });
440    
441    var owl = $(".owl-portfolio-slider");
442
443    owl.owlCarousel({
444        navigation: false,
445        autoHeight: true,
446        slideSpeed: 300,
447        paginationSpeed: 400,
448        singleItem: true
449    });
450
451    // Custom Navigation Events
452    $(".slider-next").click(function () {
453        owl.trigger('owl.next');
454    })
455    $(".slider-prev").click(function () {
456        owl.trigger('owl.prev');
457    })
458
459});
460
461
462/*-----------------------------------------------------------------------------------*/
463/*	FORM
464/*-----------------------------------------------------------------------------------*/
465jQuery(document).ready(function ($) {
466    $('.forms').dcSlickForms();
467});
468$(document).ready(function () {
469    $('.comment-form input[title], .comment-form textarea').each(function () {
470        if ($(this).val() === '') {
471            $(this).val($(this).attr('title'));
472        }
473
474        $(this).focus(function () {
475            if ($(this).val() == $(this).attr('title')) {
476                $(this).val('').addClass('focused');
477            }
478        });
479        $(this).blur(function () {
480            if ($(this).val() === '') {
481                $(this).val($(this).attr('title')).removeClass('focused');
482            }
483        });
484    });
485});
486/*-----------------------------------------------------------------------------------*/
487/*	PARALLAX MOBILE
488/*-----------------------------------------------------------------------------------*/
489$(document).ready(function () {
490    if (navigator.userAgent.match(/Android/i) ||
491        navigator.userAgent.match(/webOS/i) ||
492        navigator.userAgent.match(/iPhone/i) ||
493        navigator.userAgent.match(/iPad/i) ||
494        navigator.userAgent.match(/iPod/i) ||
495        navigator.userAgent.match(/BlackBerry/i)) {
496        $('.parallax').addClass('mobile');
497    }
498});
499/*-----------------------------------------------------------------------------------*/
500/*	TOOLTIP
501/*-----------------------------------------------------------------------------------*/
502$(document).ready(function () {
503    if ($("[rel=tooltip]").length) {
504        $("[rel=tooltip]").tooltip();
505    }
506});

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.