PageSourceSearch

https://www.glitterglossgarbage.com/wp-content/plugins/shopbop-widget/js/public_widget.js

js glitterglossgarbage.com collected 2026-09-26 05:58:06 UTC 5,802 bytes, 133 lines download raw bytes

1var SWJquery = jQuery;
2
3SWJquery(function($) {
4    // CAROUSEL
5    var widget_index = 1;
6    SWJquery('.shopbop-core-widget .shopbop-widget-carousel').each(function(){
7        var root = SWJquery(this);
8
9        var totalLinks   = root.find('ul>li').size();
10        var visibleLinks = root.find('ul').carouFredSel().triggerHandler("configuration", "items.visible");
11        var widgetWidth  = root.width();
12
13        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-next').hide();
14        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-prev').hide();
15
16        var dynamicLinks = Math.ceil((totalLinks/visibleLinks)) * visibleLinks;
17        var genLinks 	 = dynamicLinks - totalLinks;
18        var cloneLinks   = root.find('ul > li:lt('+ genLinks +')').clone();
19        root.find('ul').carouFredSel().append(cloneLinks);
20
21        root.attr('id', 'shopbop-widget-' + widget_index);
22        root.find('ul').carouFredSel({
23            prev : '#shopbop-widget-' + widget_index + ' .shopbop-widget-carousel-prev',
24            next : '#shopbop-widget-' + widget_index + ' .shopbop-widget-carousel-next',
25            pagination : '#shopbop-widget-' + widget_index + ' .shopbop-widget-carousel-pager',
26            circular : false,
27            infinite: true,
28            auto: false,
29            height : 128,
30            width: widgetWidth,
31            align: "center",
32            scroll:
33            {
34                easing: 'swing'
35            },
36
37            debug: false
38        });
39
40        //Force showing the pager to keep the heights the same
41        if(root.find('.shopbop-widget-carousel-pager').hasClass('hidden'))
42        {
43            root.find('.shopbop-widget-carousel-pager').removeClass('hidden').show();
44        }
45
46        widget_index++;
47    });
48
49    //Hides the
50    SWJquery('.shopbop-core-widget').mouseleave(function(){
51
52        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-next').hide();
53        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-prev').hide();
54    });
55
56    SWJquery('.shopbop-core-widget').mouseenter(function(){
57
58        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-next').fadeIn("slow").show();
59        SWJquery('.shopbop-core-widget .shopbop-widget-carousel-prev').fadeIn("slow").show();
60    });
61
62
63
64
65    // SHOW DESCRIPTION FOR ITEMS
66    SWJquery('.shopbop-core-widget .shopbop-widget-carousel li').mouseenter(function() {
67        var self = $(this);
68        self.closest('.shopbop-widget-carousel').find('li').removeClass('hovered').removeClass('not-hovered');
69        self.closest('li').addClass('hovered').siblings().addClass('not-hovered');
70        self.closest('.shopbop-widget-carousel').find('.shopbop-widget-carousel-info').html(
71        self.find('div.shopbop-widget-carousel-description').html()).stop(true, true).delay(500).slideDown();
72        if(shopbopProductVaribles.affOption == 'nothanks')
73        {
74            if(typeof skimlinksAjaxHandlerByClass == 'function')
75            {
76                skimlinksAjaxHandlerByClass('shopbop-product-link');
77                skimlinksAjaxHandlerByClass('shopbop-product-dynamic-link');
78            }
79        }
80        else if(shopbopProductVaribles.affOption == 'cjAffiliateSelected' && shopbopProductVaribles.cjPid != "null")
81        {
82            /** Commission Junction*/
83            commisionJunctionForPanes();
84        }
85
86    });
87    //Commission Junction
88    function commisionJunctionForPanes()
89    {
90        jQuery('.shopbop-product-link, .shopbop-product-dynamic-link a').unbind('click', cjhandler);
91        jQuery('.shopbop-product-link, .shopbop-product-dynamic-link a').bind('click', cjhandler);
92    }
93
94    function cjhandler(e)
95    {
96        e.preventDefault();
97        cjFormat1 = "http://www.jdoqocy.com/click-" + shopbopProductVaribles.cjPid + "-" + shopbopProductVaribles.cjAid + "?URL=" + encodeURIComponent(this.href);
98        window.open(cjFormat1, '_blank');
99        console.log(cjFormat1);
100    }
101
102
103    var box_keep_open = '.shopbop-core-widget .shopbop-widget-carousel li, .shopbop-core-widget .shopbop-widget-carousel-info';
104    SWJquery(box_keep_open).mouseleave(function(e) {
105        if(!SWJquery(e.relatedTarget).is(box_keep_open) && SWJquery(e.relatedTarget).closest(box_keep_open).length == 0) {
106            $(this).closest('.shopbop-widget-carousel').find('.hovered').removeClass('hovered');
107            $(this).closest('.shopbop-widget-carousel').find('.not-hovered').removeClass('not-hovered');
108            $(this).closest('.shopbop-widget-carousel').find('.shopbop-widget-carousel-info').slide
108Up();
109            $(this).closest('.shopbop-widget-carousel').find('.shopbop-widget-carousel-info').html(
110                    $(this).find('div.shopbop-widget-carousel-description').html()).stop(true, true).delay(500).queue(function() {
111                    $(this).hide();
112                });
113        }
114    });
115
116    SWJquery('.shopbop-widget-carousel-info').hide();
117
118    // ACCORDION MENU
119    SWJquery('.shopbop-core-widget').each(function(){
120        var self = SWJquery(this);
121        self.find('.shopbop-widget-panel').hide();
122        self.find('.shopbop-widget-heading.start-open').addClass('selected').next('.shopbop-widget-panel').slideDown();
123        self.find('.shopbop-widget-heading').click(function(e){
124            e.preventDefault();
125            if($(this).hasClass('selected')) return;
126            $(this).closest('.shopbop-core-widget').find('.shopbop-widget-heading').removeClass('selected');
127            $(this).closest('.shopbop-core-widget').find('.shopbop-widget-panel').slideUp();
128            $(this).addClass('selected').next('.shopbop-widget-panel').slideDown();
129        });
130
131    });
132
133});

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.