PageSourceSearch

https://www.depaolapictures.com/lib/g/2.0/scripts/feature_panels.j…=3b9cafc&g=f1b7f5432bc6f164edf67e44137ac0a0

js depaolapictures.com collected 2026-09-28 13:49:41 UTC 9,427 bytes, 182 lines download raw bytes

1(function ($) {
2
3    window.feature_panels = {
4
5        init: function () {
6            window.feature_panels.layout.init();
7            window.feature_panels.twitter.init();
8        },
9
10        layout: {
11
12            init: function () {
13                if ($('.feature_panels').length) {
14                    $('.feature_panels').each(function () {
15                        if ($('.panel:eq(0)', this).hasClass('panel_hero')) {
16                            $(this).addClass('first_panel_full_bleed');
17                        }
18                    });
19                }
20
21                if ($('.panel_image_text_columns').length) {
22                    $('.panel_image_text_columns .read_less_link').hide();
23                    $('.panel_image_text_columns .read_more_link a').click(function () {
24                        $(this).closest('.panel_image_text_columns').addClass('read-more-text-open');
25                        $(this).closest('.link, .read_more_link').slideUp();
26                        $(this).closest('.content').find('.content_full').slideDown();
27                        $(this).closest('.content').find('.initial_content').slideUp();
28                        $(this).closest('.content').find('.read_less_link').slideDown();
29                        setTimeout(function () {
30                            // resize window after collapsing text panel 
31                            // to ensure parallax images get repositioned 
32                            $(window).trigger('resize');
33                        }, 300);
34                        return false;
35                    });
36                    $('.panel_image_text_columns .read_less_link a').click(function () {
37                        $(this).closest('.panel_image_text_columns').removeClass('read-more-text-open');
38                        $(this).closest('.link:not(.read_less_link), .read_more_link').slideDown();
39                        $(this).closest('.content').find('.content_full').slideUp();
40                        $(this).closest('.content').find('.initial_content').slideDown();
41                        $(this).closest('.content').find('.read_less_link').slideUp();
42                        $('html,body').animate(
43                            {scrollTop: $(this).closest('.content').find('.initial_content').offset().top - 100},
44                            400,
45                            'easeInOutQuad'
46                        );
47                        return false;
48                    });
49                }
50
51                if ($('.feature_panels ul li .panel_image_slideshow').length) {
52                    $('.feature_panels ul li .panel_image_slideshow').each(function () {
53
54                        if ($('.panel_slide[data-caption]', this).filter('[data-caption!=""]').length) {
55
56                            if ($(this).hasClass("text_image_full_width_slideshow")) {
57
58                                var related_caption_element = $(this).closest('li').find('.enquire_button_container').find('a.website_contact_form');
59                                $(related_caption_element).attr('data-contact-form-details', $('.panel_slide', this).eq(0).attr('data-caption'));
60                                $(related_caption_element).attr('data-contact-form-image', $('.panel_slide', this).eq(0).attr('data-image'));
61                                $(related_caption_element).parent().parent().parent().parent().find(".image-caption").html($('.panel_slide', this).eq(0).attr('data-caption'));
62
63                            } else {
64                                var related_caption_element = $(this).closest('li').find('.slider-content');
65                                $(related_caption_element).attr('data-default-caption', $(related_caption_element).html());
66                                $(related_caption_element).html('');
67                                var first_slide_caption = $('.panel_slide', this).eq(0).attr('data-caption');
68                                if (first_slide_caption) {
69                                    $(related_caption_element).html(first_slide_caption);
70                                } else {
71                                    $(related_caption_element).html($(related_caption_element).attr('data-default-caption'));
72                                }
73                            }
74
75
76                        } else {
77                            $(this).addClass('panel_image_slideshow_captions_disabled')
78                        }
79
80                        var mastersettings = {
81                            fx: 'fade',
82                            speed: 800,
83                            timeout: 2500,
84                            pause: 0,
85                            slides: '>',
86                            autoHeight: 'calc',
87                            swipe: true
88                        }
89
90                        if (typeof $.fn.cycle == 'undefined') {
91                            var that = this;
92                            $.getScript('/lib/jquery/1.12.4/plugins/jquery.cycle2.min.js', function () {
93                                $(that).cycle(mastersettings);
94                            })
95                        } else {
96                            $(this).cycle(mastersettings);
97                        }
98
99                        var slideshow_controls = $(this).next();
100
101                        if (slideshow_controls.length) {
102                            var previous = $(slideshow_controls).find('.slideshow_controls_previous');
103                            var next = $(slideshow_controls).find('.slideshow_controls_next');
104                            var progress = $(slideshow_controls).find('.slideshow_controls_progress');
105
106                            // Setup button functions
107                            previous.click(() => {
108                                $(this).cycle('prev')
109                            });
110                            next.click(() => {
111                                $(this).cycle('next')
112                            });
113
114                            // Add event handlers
115                            $(this).on('cycle-update-view', (_event, optionHash) => {
116                                progress.html(`${optionHash.currSlide + 1}/${optionHash.slideCount}`);
117                            });
118                        }
119
120                        var onfunction = $(this).on;
121                        if (onfunction) {
122                            // Method for jQuery Cycle 2 ONLY
123                            // 
124                            // Function fired directly before the slide changes
125                            $(this).on('cycle-before', function (event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) {
126                                var this_instance = $(this).closest('.panel_image_slideshow');
127                                if (!$(this_instance).hasClass('panel_image_slideshow_captions_disabled')) {
128                                    var current_caption = $(incomingSlideEl, this_instance).attr('data-caption');
129                                    //console.log("next slide number = "+ optionHash.nextSlide);
130                                    $(".fp-slider-share > ul > li").hide();
131                                    $(".fp-slider-share > ul > li:nth-child("+(optionHash.nextSlide + 1)+")").show();
132                                    //console.log(".fp-slider-share > ul > li:nth-child("+(optionHash.nextSlide + 1)+")");
133
134                                    if (current_caption) {
135                                        if ($(this).hasClass("text_image_full_width_slideshow")) {
136                                            $(related_caption_element).parent().parent().parent().parent().find(".image-caption").html(current_caption);
137                                            $(related_caption_element).attr('data-contact-form-details', current_caption.replace(/\n/g, ''));
138
139                                            $(related_caption_element).attr('data-contact-form-image', $(incomingSlideEl, this_instance).attr('data-image'));
140                                        }else{
141                                            $(related_caption_element).html(current_caption.replace(/\n/g, ''));
142                                        }
143                                    } else {
144                                        if ($(this).hasClass("text_image_full_width_slideshow")) {
145                                            $(related_caption_element).attr('data-contact-form-details', "");
146                                            $(related_caption_element).attr('data-contact-form-image', "");
147
148                                            $(related_caption_element).parent().parent().parent().parent().find(".image-caption").html("");
149                                        }else{
150
151                                            $(related_caption_element).html($(related_caption_element).attr('data-default-caption'));
152                                        }
153                                    }
154                                    window.galleries.contact_form_popup.init();
155                                }
156                            });
157                        }
158                    });
159                }
160            }
161
162        },
163
164        twitter: {
165
166            init: function () {
167            }
168
169        }
170
171    };
172
173
174    $(document).ready(function () {
175
176        window.feature_panels.init();
177
178    });
179
180})(jQuery);
181
182

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.