PageSourceSearch

https://paniajurweda.pl/wp-content/plugins/designthemes-portfolio-addon/js/frontend.js?ver=7.0.7

js paniajurweda.pl collected 2026-10-08 21:32:51 UTC 32,986 bytes, 952 lines download raw bytes

1jQuery.noConflict();
2jQuery(document).ready(function($){
3    "use strict";
4
5	var scriptLoaded = false;
6
7	var dtPortfolioPostsWidgetHandler = function($scope, $){
8
9		if(scriptLoaded && dtportfoliofrontendobject.elementor_preview_mode != 'true') {
10			return;
11		}
12
13		scriptLoaded = true;
14
15
16		var isMobile = (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i) || navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) ) ? true : false;
17		
18		var currentWidth = window.innerWidth || document.documentElement.clientWidth;
19
20
21		// On Window Resize
22			$(window).bind("resize", function() {
23
24				// Portfolio template fullwidth
25				calculatePortfolioTemplateWidth();
26				calculatePortfolioMultirowHeight();
27				if(currentWidth > 767) {
28					calculatePortfolioSingleItemHeight();
29				}
30
31
32				// Portfolio Isotope
33			    jQuery('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').each(function() {
34
35			    	if(jQuery(this).hasClass('dtportfolio-infinite-portfolio-container')) {
36			    		var $postperpage = 2;
37			    	} else {
38			    		var $postperpage = parseInt(jQuery(this).attr('data-postperpage'), 10);
39			    	}
40			  		if( jQuery(this).length && $postperpage != 1) {
41				        jQuery('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').isotope({
42							itemSelector: '.dtportfolio-item',
43							percentPosition: true,
44							masonry: {
45								columnWidth: '.dtportfolio-grid-sizer'
46							}        	
47				        });
48				    }
49
50			    });
51
52			});
53
54		// On Load Functions
55
56		$(window).on('load', function(){
57
58			// Portfolio Isotope
59		    jQuery('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').each(function() {
60
61		    	if(jQuery(this).hasClass('dtportfolio-infinite-portfolio-container')) {
62		    		var $postperpage = 2;
63		    	} else {
64		    		var $postperpage = parseInt(jQuery(this).attr('data-postperpage'), 10);
65		    	}
66		  		if( jQuery(this).length && $postperpage != 1) {
67			        jQuery('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').isotope({
68						itemSelector: '.dtportfolio-item',
69						percentPosition: true,
70						masonry: {
71							columnWidth: '.dtportfolio-grid-sizer'
72						}        	
73					});
74					$(window).trigger('resize');
75			    }
76
77		    });
78
79			// Portfolio Isotope Sorting
80			$('div.dtportfolio-sorting').each(function() {
81
82				var pf_sorter = $(this);
83				pf_sorter.find('a').on('click', function() {
84
85					var pf_sorter_item = $(this);
86
87					pf_sorter_item.parents('.dtportfolio-sorting').find('a').removeClass('active-sort');
88					var selector = pf_sorter_item.attr('data-filter');
89					pf_sorter_item.addClass('active-sort');
90
91					pf_sorter_item.parents('.dtportfolio-container-wrapper').find('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list) .dtportfolio-column').removeClass('animate flash shake bounce tada swing wobble pulse flip flipIn flipOutX flipInY flipOutY fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight fadeInUpBig fadeInDownBig fadeInLeftBig fadeInRightBig fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight fadeOutUpBig fadeOutDownBig fadeOutLeftBig fadeOutRightBig bounceIn bounceInUp bounceInDown bounceInLeft bounceInRight bounceOut bounceOutUp bounceOutDown bounceOutLeft bounceOutRight rotateIn rotateInUpLeft rotateInDownLeft rotateInUpRight rotateInDownRight rotateOut rotateOutUpLeft rotateOutDownLeft rotateOutUpRight rotateOutDownRight hinge rollIn rollOut lightSpeedIn lightSpeedOut slideDown slideUp slideLeft slideRight slideExpandUp expandUp expandOpen bigEntrance hatch floating tossing pullUp pullDown stretchLeft stretchRight zoomIn');
92					pf_sorter_item.parents('.dtportfolio-container-wrapper').find('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').isotope({ filter: selector, masonry: {  }, animationEngine : 'jquery' });
93
94					$(window).trigger('resize');
95
96					return false;
97
98				});
99
100			});
101
102			animatePortfolioItems();
103
104			// Repeat animation on periodic interval
105			portfolioRepeatAnimation();
106			function portfolioRepeatAnimation() {
107				var divs = $('.dtportfolio-container.repeat-animation .dtportfolio-item.animate');
108				if(divs.length) {
109				    setTimeout(function() {
110				    	var index = Math.floor(Math.random() * divs.length);
111				    	divs.eq(index).removeClass('animate');
112				    	setTimeout(function() {
113				        	divs.eq(index).addClass('animate');
114				        	portfolioRepeatAnimation();
115				         }, 200);
116				    }, ~~(Math.random()*(300-60+1)+2000));
117			    } 			
118			}	
119			
120			// Portfolio template fullwidth
121			calculatePortfolioTemplateWidth();
122			calculatePortfolioMultirowHeight();
123
124
125			// Image Gallery Swiper - Starts
126			var swiperGallery = [];
127			var swiperGalleryOptions = [];
128			var swiperIterator = 1;
129
130			jQuery('.dtportfolio-image-gallery-container, .dtportfolio-swiper-container').each(function() {
131
132				var $swiperItem = jQuery(this);
133				var swiperUniqueId = 'swiperuniqueid-'+swiperIterator;
134
135				swiperGalleryOptions[swiperUniqueId] = [];
136				$swiperItem.attr('id', swiperUniqueId);
137
138				// Get swiper options
139				var effect = $swiperItem.find('.swiper-wrapper').attr('data-carouseleffect');
140				var carouselnumberofrows = 1;
141				if(effect == 'multirows') {
142					var carouselnumberofrows = ($swiperItem.find('.swiper-wrapper').attr('data-carouselnumberofrows') != '') ? $swiperItem.find('.swiper-wrapper').attr('data-carouselnumberofrows') : 1;
143				}
144
145				var autoheight = false;
146
147				var playpausebutton = ($swiperItem.find('.swiper-wrapper').attr('data-carouselplaypausebutton') == 'true') ? true : false;
148
149				var autoplay = parseInt($swiperItem.find('.swiper-wrapper').attr('data-carouselautoplay'), 10);
150				if(autoplay > 0) {
151					swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] = true;
152					autoplay_enable = true;
153					if(playpausebutton) {
154						swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] = true;	
155					}				
156				} else {
157					swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] = false;
158					autoplay_enable = false;
159					if(playpausebutton) {
160						autoplay = 2000;
161						swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] = false;	
162					}			
163				}
164
165				var slidesperview = parseInt($swiperItem.find('.swiper-wrapper').attr('data-carouselslidesperview'), 10);
166
167				var loopmode = ($swiperItem.find('.swiper-wrapper').attr('data-carouselloopmode') == 'true') ? true : false;
168				var mousewheelcontrol = ($swiperItem.find('.swiper-wrapper').attr('data-carouselmousewheelcontrol') == 'true') ? true : false;
169				var centermode = ($swiperItem.find('.swiper-wrapper').attr('data-carouselcentermode') == 'true') ? true : false;
170				var verticaldirection = ($swiperItem.find('.swiper-wrapper').attr('data-carouselverticaldirection') == 'true') ? true : false;
171				var direction = 'horizontal';
172				if(verticaldirection) {
173					direction = 'vertical';
174				}
175
176				var pagination_class = '';
177				var pagination_type = '';
178
179				var paginationtype = ($swiperItem.find('.swiper-wrapper').attr('data-carouselpaginationtype') != '') ? $swiperItem.find('.swiper-wrapper').attr('data-carouselpaginationtype') : '';
180
181				if(paginationtype == 'bullets') {
182					var pagination_class = $swiperItem.find('.dtportfolio-swiper-bullet-pagination');
183					var pagination_type = 'bullets';
184				}
185
186				if(paginationtype == 'fraction') {
187					var pagination_class =  $swiperItem.find('.dtportfolio-swiper-fraction-pagination');
188					var pagination_type = 'fraction';
189				}
190
191				if(paginationtype == 'progressbar') {
192					var pagination_class =  $swiperItem.find('.dtportfolio-swiper-progress-pagination');
193					var pagination_type = 'progressbar';
194				}
195
196
197				var thumbnailpagination = ($swiperItem.find('.swiper-wrapper').attr('data-carouselthumbnailpagination') == 'true') ? true : false;
198				if(thumbnailpagination) {
199					swiperGalleryOptions[swiperUniqueId]['thumbnailpagination'] = true;
200					loopmode = false;
201				} else {
202					swiperGalleryOptions[swiperUniqueId]['thumbnailpagination'] = false;
203				}
204
205				var scrollbar_class = '';
206				var	scrollbar_hide = true;
207				var carouselscrollbar = ($swiperItem.find('.swiper-wrapper').attr('data-carouselscrollbar') == 'true') ? true : false;
208				if(carouselscrollbar) {
209					scrollbar_class = $swiperItem.find('.dtportfolio-swiper-scrollbar');
210					scrollbar_hide = false;
211				}
212
213				var carouselarrowformousepointer = ($swiperItem.find('.swiper-wrapper').attr('data-carouselarrowformousepointer') == 'true') ? true : false;
214
215				var spacebetween = parseInt($swiperItem.find('.swiper-wrapper').attr('data-carouselspacebetween'), 10);
216				if(spacebetween) {
217					spacebetween = spacebetween;
218				} else {
219					spacebetween = 0;
220				}
221
222				if(direction == 'vertical') {
223
224					effect = '';
225
226					if(slidesperview == 1) {
227						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 1;
228					} else if(slidesperview == 2) {
229						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 2;;
230					} else if(slidesperview == 3) {
231						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 3;
232					} else if(slidesperview >= 4) {
233						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 4;
234					}
235
236				} else {
237
238					if(slidesperview == 1) {
239						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 1;
240					} else if(slidesperview == 2) {
241						var breakpoint_slides_1 = 2; var breakpoint_slides_2 = 2; var breakpoint_slides_3 = 1; var breakpoint_slides_4 = 1;
242					} else if(slidesperview == 3) {
243						var breakpoint_slides_1 = 3; var breakpoint_slides_2 = 2; var breakpoint_slides_3 = 1; var breakpoint_slides_4 = 1;
244					} else if(slidesperview >= 4) {
245						var breakpoint_slides_1 = 4; var breakpoint_slides_2 = 2; var breakpoint_slides_3 = 1; var breakpoint_slides_4 = 1;
246					}	
247
248					if(effect == 'cube' || effect == 'fade' || effect == 'flip') {
249						var breakpoint_slides_1 = breakpoint_slides_2 = breakpoint_slides_3 = breakpoint_slides_4 = 1;
250					}
251
252				}		
253
254				// Generate swiper
255			    swiperGallery[swiperUniqueId] = new Swiper($swiperItem, {
256	     			
257	     			initialSlide: 0,
258	                simulateTouch: true,
259	                roundLengths: true,
260	                spaceBetween: spacebetween,
261	                keyboardControl: true,
262	                paginationClickable: true,
263	                autoHeight: autoheight,
264
265	                centeredSlides: centermode,
266	                grabCursor: false,
267	                autoplay: {
268	                			enabled: autoplay_enable,
269							    delay: autoplay,
270							},
271	                slidesPerView: parseInt(slidesperview+'.2'),
272	                slidesPerColumn: carouselnumberofrows,
273	                loop:loopmode,
274	                mousewheel: mousewheelcontrol,
275	                direction: direction,
276
277					pagination: {
278						el: pagination_class,
279						type: pagination_type,
280						clickable: true,
281						renderFraction: function (currentClass, totalClass) {
282							return '<span class="' + currentClass + '"></span>' +
283									'<span class="dtportfolio-separator"></span>' +
284									'<span class="' + totalClass + '"></span>';
285						}					
286					},
287
288					scrollbar: {
289						el: scrollbar_class,
290						hide: scrollbar_hide,
291						draggable: true,
292					},                  
293
294	                effect: effect,
295					coverflowEffect: {
296						slideShadows: false,
297						rotate: 0,
298						stretch: 0,
299						depth: 200,
300						modifier: 1,
301					},
302			        cubeEffect: {
303			        	slideShadows: true,
304			            shadow: true,
305			            shadowOffset: 20,
306			            shadowScale: 0.94
307			        },
308			      
309			        breakpoints: {
310			            1199: {
311			                slidesPerView: breakpoint_slides_1,
312			            },	            
313			            992: {
314			                slidesPerView: breakpoint_slides_2,
315			            },
316			            767: {
317			                slidesPerView: breakpoint_slides_3,
318			            }
319			        },  
320
321					on: {
322						init: function () {
323							if(carouselarrowformousepointer) {
324			                    $swiperItem.find('.dtportfolio-swiper-arrow-click').each(function() {
325			                        var arrow = jQuery(this);
326			                        jQuery(document).on('mousemove', function(event) {
327			                            var arrow_parent = arrow.parent(),
328			                                parent_offset = arrow_parent.offset(),
329			                                pos_left = Math.min(event.pageX - parent_offset.left, arrow_parent.width()),
330			                                pos_top = event.pageY - parent_offset.top;
331			                            arrow.css({
332			                                'left': pos_left,
333			                                'top': pos_top
334			                            });
335			                        });
336			                    });
337		                    } 
338
339							$swiperItem.find('a[data-gal^="prettyPhoto[dtgallery]"], a[data-gal^="prettyPhoto[gallery-listing]"]').iLightBox({
340								attr: 'href',
341								fullViewPort: 'stretch',
342							    controls: {
343							      mousewheel: true,
344							      swipe: true,
345							      thumbnail: true
346							    },		
347								path: 'vertical',
348								infinite: true,
349					    	});	
350
351		                }
352					},
353
354			    });
355
356
357			    // Arrow pagination
358		    	var arrowpagination = ($swiperItem.find('.swiper-wrapper').attr('data-carouselarrowpagination') == 'true') ? true : false;
359
360		    	if(arrowpagination) {
361
362				    $swiperItem.find('.dtportfolio-swiper-arrow-pagination .dtportfolio-swiper-arrow-prev').on('click', function(e) {			    	
363				    	var swiperUniqueId = $swiperItem.attr('id');
364				        swiperGallery[swiperUniqueId].slidePrev();
365				        if(swiperGalleryOptions[swiperUniqueId]['autoplay_enable']) {
366				        	swiperGallery[swiperUniqueId].autoplay.start();
367				        }
368				        e.preventDefault();		
369				    });
370
371				    $swiperItem.find('.dtportfolio-swiper-arrow-pagination .dtportfolio-swiper-arrow-next').on('click', function(e) {
372				    	var swiperUniqueId = $swiperItem.attr('id');
373				        swiperGallery[swiperUniqueId].slideNext();
374				        if(swiperGalleryOptions[swiperUniqueId]['autoplay_enable']) {
375				        	swiperGallery[swiperUniqueId].autoplay.start();
376				        }
377				        e.preventDefault();	
378				    });	
379
380				}
381
382				// Play pause button
383		    	var playpausebutton = ($swiperItem.find('.swiper-wrapper').attr('data-carouselplaypausebutton') == 'true') ? true : false;
384
385		    	if(playpausebutton) {			
386
387				    $swiperItem.find('.dtportfolio-swiper-playpause').on('click', function(e) {
388				    	e.preventDefault();
389				    	var swiperUniqueId = $swiperItem.attr('id');
390				    	if(jQuery(this).hasClass('play')) {
391				    		swiperGallery[swiperUniqueId].autoplay.start();
392				    	} else {
393				    		swiperGallery[swiperUniqueId].autoplay.stop();
394				    	}
395				    	jQuery(this).toggleClass('pause play');
396				    	jQuery(this).find('span').toggleClass('fa-pause fa-play');  	
397				    });			
398
399				}
400
401				if(carouselarrowformousepointer) {
402
403				    $swiperItem.find('.dtportfolio-swiper-arrow-click.left').on('click', function(e) {
404				        var swiperUniqueId = $swiperItem.attr('id');
405				        swiperGallery[swiperUniqueId].slidePrev();
406				        if(swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] > 0 || $swiperItem.find('.dtportfolio-swiper-pagination-holder').find('.dtportfolio-swiper-playpause').hasClass('pause')) {
407				        	swiperGallery[swiperUniqueId].startAutoplay();
408				        }
409				    	e.preventDefault();			        
410				    });
411
412				    $swiperItem.find('.dtportfolio-swiper-arrow-click.right').on('click', function(e) {
413				    	console.log('asdsad');
414				    	var swiperUniqueId = $swiperItem.attr('id');
415				        swiperGallery[swiperUniqueId].slideNext();
416				        if(swiperGalleryOptions[swiperUniqueId]['autoplay_enable'] > 0 || $swiperItem.find('.dtportfolio-swiper-pagination-holder').find('.dtportfolio-swiper-playpause').hasClass('pause')) {
417				        	 swiperGallery[swiperUniqueId].startAutoplay();
418				        } 
419				    	e.preventDefault();			        
420				    });	
421
422				}
423
424			    swiperIterator++;
425
426			});	
427
428			// Generate gallery thumb pagination
429			for(i = 1; i < swiperIterator; i++) {
430				if(swiperGalleryOptions['swiperuniqueid-'+i]['thumbnailpagination']) {
431
432					var swiperUniqueId = 'swiperuniqueid-'+i;
433
434					var $swiper_gallerythumb_item = jQuery('#'+swiperUniqueId).parents('.dtportfolio-image-gallery-holder').find('.dtportfolio-image-gallery-thumb-container');
435
436					if($swiper_gallerythumb_item.length == 0) {
437						var $swiper_gallerythumb_item = jQuery('#'+swiperUniqueId).parents('.dtportfolio-container-wrapper').find('.dtportfolio-swiper-thumbnail-container');
438					} 
439
440					if($swiper_gallerythumb_item.length > 0) {
441
442					    var swiperGalleryThumbs = new Swiper($swiper_gallerythumb_item, {
443					    	initialSlide: 0,
444					        spaceBetween: 10,
445					        centeredSlides: true,
446					        slidesPerView: 'auto',
447					        touchRatio: 0.2,
448					        slideToClickedSlide: true
449					    });
450						
451					    swiperGallery[swiperUniqueId].controller.control = swiperGalleryThumbs;
452					    swiperGalleryThumbs.controller.control = swiperGallery[swiperUniqueId];		
453
454				    }		    
455
456				}
457			}
458
459
460			// One page navigation scripts
461			if($('.dtportfolio-onepage-navigation-title-holder').length) {
462
463				$('.dtportfolio-onepage-navigation-title-holder li a').click(function(event) {
464					if($(this).parents('.dtportfolio-onepage-navigation-title-holder').hasClass('rounded')) {
465
466						$('.dtportfolio-onepage-navigation-title-holder li').removeClass('active');
467						$(this).parent('li').addClass('active');
468
469						var target = $(this).attr('href'); 
470						if( target.length ) { 
471							event.preventDefault(); 
472							$('html, body').stop().animate({ scrollTop: $(target).offset().top }, 1000); 
473						} 
474
475					} else {
476
477						$('.dtportfolio-onepage-navigation-title-holder li a').removeClass('active');
478						$(this).addClass('active');
479
480						var target = $(this).attr('href'); 
481						if( target.length ) { 
482							event.preventDefault(); 
483							$('html, body').stop().animate({ scrollTop: $(target).offset().top }, 1000); 
484						} 
485
486					}
487				});
488
489				$(window).scroll(function() {
490					$('.dtportfolio-onepage-navigation-title-holder li a').each(function(){
491						var section_id = $(this).attr('href');
492
493						if($(window).scrollTop() == 0) {
494
495							if($(this).parents('.dtportfolio-onepage-navigation-title-holder').hasClass('rounded')) {
496								$('.dtportfolio-onepage-navigation-title-holder li').removeClass('active');
497								$('.dtportfolio-onepage-navigation-title-holder li:first').addClass('active');
498							} else {
499								$('.dtportfolio-onepage-navigation-title-holder li a').removeClass('active');
500								$('.dtportfolio-onepage-navigation-title-holder li a:first').addClass('active');
501							}
502
503						} else {
504
505						    var top_of_element = $(section_id).offset().top+200;
506						    var bottom_of_element = $(section_id).offset().top + $(section_id).outerHeight();
507						    var bottom_of_screen = $(window).scrollTop() + $(window).height();
508
509						    if((bottom_of_screen > top_of_element) && (bottom_of_screen < bottom_of_element)){
510								if($(this).parents('.dtportfolio-onepage-navigation-title-holder').hasClass('rounded')) {
511									$('.dtportfolio-onepage-navigation-title-holder li').removeClass('active');
512									$('.dtportfolio-onepage-navigation-title-holder li a[href="'+section_id+'"]').parent('li').addClass('active');
513								} else {				    	
514									$('.dtportfolio-onepage-navigation-title-holder li a').removeClass('active');
515									$('.dtportfolio-onepage-navigation-title-holder li a[href="'+section_id+'"]').addClass('active');
516								}
517						    }
518
519						}
520				    });
521				});
522				
523			}	
524
525		});
526
527
528	    // Calculate portfolio template width
529		function calculatePortfolioTemplateWidth() {
530
531			$('.dtportfolio-fullwidth-wrapper').each(function () {
532
533				var windowWidth = $(window).width();
534				$fullwidth_next = $(this).next(".dtportfolio-fullwidth-wrapper-fix");
535				var offset = 0 - $fullwidth_next.offset().left;
536
537				$(this).css('width', windowWidth);
538				$(this).css('left', offset);	
539
540		        $(this).find('.dtportfolio-container:not(.swiper-wrapper, .portfolio-container-carousel, .dtportfolio-container-gallery-list)').isotope({
541					itemSelector: '.dtportfolio-item',
542					percentPosition: true,
543					masonry: {
544						columnWidth: '.dtportfolio-grid-sizer'
545					}        	
546		        });
547
548			});
549
550		}
551
552		// Calculate portfolio multirow height
553		function calculatePortfolioMultirowHeight() {
554
555			jQuery('.dtportfolio-image-gallery-container, .dtportfolio-swiper-container').each(function() {
556
557				var swiperItem = jQuery(this);
558
559				var effect = swiperItem.find('.swiper-wrapper').attr('data-carouseleffect');
560				var verticaldirection = swiperItem.find('.swiper-wrapper').attr('data-carouselverticaldirection');
561
562				if(effect == 'multirows') {
563
564					var numberofrows = parseInt(swiperItem.find('.swiper-wrapper').attr('data-carouselnumberofrows'), 10);
565					var slidespercolumn = 1;
566					if(effect == 'multirows') {
567						var slidespercolumn = numberofrows;
568					}
569
570					var carousel_height = 650;
571					var carousel_height_wrapper = 650;
572
573					if(swiperItem.hasClass('details-below-image')) {
574						var carousel_height_wrapper = parseInt(carousel_height)+(detailsSectionHeight*slidespercolumn);
575					}
576
577					if(effect == 'multirows') {
578						var carousel_height = (carousel_height/slidespercolumn);
579					}	
580
581					swiperItem.parents('.dtportfolio-container-wrapper').height(carousel_height_wrapper);
582					swiperItem.height(carousel_height_wrapper);
583					swiperItem.find('.swiper-slide').height(carousel_height);
584
585				} else if(verticaldirection == 'true') {
586
587					var carousel_height = 650;
588					var carousel_height_wrapper = 650;
589
590					swiperItem.parents('.dtportfolio-container-wrapper').height(carousel_height_wrapper);
591					swiperItem.height(carousel_height_wrapper);
592					swiperItem.find('.swiper-slide').height(carousel_height);
593
594				}
595
596			});
597
598			jQuery('.dtportfolio-single-mediaontop-section-holder').each(function () {
599
600				var mheight = jQuery(window.top).height();
601
602				jQuery(this).css('height', mheight);
603
604				var windowWidth = jQuery(window).width();
605
606				var fullwidth_next = jQuery(this).next('.dtportfolio-fullwidth-wrapper-fix');
607				var offset = 0 - fullwidth_next.offset().left;
608
609				jQuery(this).css('width', windowWidth);
610				jQuery(this).css('left', offset);			
611
612			});
613
614		}
615
616		// Calculate portfolio single item height for media on top, fixed gallery, fixed feature image
617		function calculatePortfolioSingleItemHeight() {
618
619			if($('body').hasClass('single-dt_portfolios')) {
620
621				var winHeight = $(window).height();
622				var headerHeight = $('#header-wrapper').height();
623				var footerHeight = $('#footer').height();
624
625				var height = parseInt((winHeight-headerHeight-footerHeight), 10);
626
627				$('.fixed-gallery').find('.dtportfolio-fixed-content').height(height).css('top', headerHeight);
628				$('.fixed-gallery').find('.dtportfolio-details').height(height).niceScroll({zindex: 999999, cursorborder: '1px solid #424242' });
629
630				$('.fixed-feature-image').find('.dtportfolio-fixed-content').height(height).css('top', headerHeight);
631				$('.fixed-feature-image').find('.dtportfolio-details').height(height).niceScroll({zindex: 999999, cursorborder: '1px solid #424242' });
632
633			}
634
635		}
636
637		// Function to animate portfolio items	
638		function animatePortfolioItems() {	
639			jQuery('.dtportfolio-item.animate').each(function(){
640				jQuery(this).one('inview', function (event, visible) {	
641					if (visible == true) {
642						var $this = $(this),
643						$animation = ( $this.data('animationeffect') !== undefined ) ? $this.data('animationeffect') : 'slideUp';
644						var	$delay = ( $this.data('animationdelay') !== undefined ) ? $this.data('animationdelay') : 400;
645						setTimeout(function() { $this.addClass($animation);	},$delay);
646					}
647				});
648			});
649			$(window).scroll();
650		}
651		//animatePortfolioItems();
652
653
654		// Make portfolio featured video to play on click
655	    $('#portfolio-featured-video').on('click', function() {            
656	        if($(this).hasClass('play')) {
657	        	$(this).get(0).play();
658	        } else {
659	        	$(this).get(0).pause();
660	        }
661	        $(this).toggleClass('pause play');
662	    });
663
664		// ilightbox for with gallery list, with gallery thumb hover effects
665		$('.dtportfolio-item').each( function() {
666			var ilightboxid = $(this).find('.dtportfolio-image-overlay').attr('data-ilightboxid');
667			if($('.'+ilightboxid).length) {
668				$('.'+ilightboxid).iLightBox({
669					attr: 'data-ilightboximg',
670					fullViewPort: 'stretch',
671				    controls: {
672				      mousewheel: true,
673				      swipe: true,
674				      thumbnail: true
675				    },		
676					path: 'horizontal',
677					infinite: true,
678		    	});	
679	    	}	
680		});	
681
682		// ilightbox for portfolio template listing, single page gallery listing
683		var $pphoto = $('a[data-gal^="prettyPhoto[dtgallery]"], a[data-gal^="prettyPhoto[gallery-listing]"]');
684		if ($pphoto.length && !$pphoto.parents('.dtportfolio-container, .dtportfolio-container-fullpage').hasClass('swiper-wrapper')) {
685			$($pphoto).iLightBox({
686				attr: 'href',
687				fullViewPort: 'stretch',
688			    controls: {
689			      mousewheel: true,
690			      swipe: true,
691			      thumbnail: true
692			    },		
693				path: 'vertical',
694				infinite: true,
695	    	});	
696		}
697
698		/* Reset Full Page jQuery */
699		if(dtportfoliofrontendobject.elementor_preview_mode == 'true') {
700			$('.dtportfolio-container-resetter div:first-child').each(function() {
701				if($('html').hasClass('fp-enabled')) {
702					$(this).fullpage.destroy('all');
703				}
704			});	
705		}
706
707
708		// Full page jquery
709		$('.dtportfolio-container-fullpage:not(.disable-fullpage-jquery)').each(function() {
710
711			if($(this).attr('data-fullpagenavigation') != '') {
712
713				$(this).fullpage({
714					navigation: true,
715					navigationPosition: $(this).attr('data-fullpagenavigation'),
716					css3: true,
717					autoScrolling: $(this).attr('data-disableautoscrolling'),
718					fitToSection: false,
719					scrollBar: true,
720				});
721
722			} else {
723
724				$(this).fullpage({
725					navigation: false,
726					css3: true,
727					autoScrolling: $(this).attr('data-disableautoscrolling'),
728					fitToSection: false,
729					scrollBar: true,
730				});
731
732			}
733
734		});	
735
736
737		// Parallax jquery
738		if($('.dtportfolio-parallax').length) {
739			$('.dtportfolio-parallax').each(function() {
740				if($(this).attr('data-jarallax') !== undefined) {
741				    $(this).jarallax({
742				        imgWidth: 1366,
743				        imgHeight: 768
744				    });
745				}
746		    });	
747		}
748
749		// Multiscroll
750		if($('.dtportfolio-multiscroll-container').length) {
751
752	    	$('.dtportfolio-multiscroll-container').multiscroll({
753				css3: true,
754				scrollingSpeed: 800
755			});
756			
757	    	$('.dtportfolio-container-wrapper').height($('.dtportfolio-multiscroll-container .dtportfolio-multiscroll').height());
758	    	if($('.multiscroll-button').length) {
759		        $('.multiscroll-button.down').on('click', function() {
760		            $.fn.multiscroll.moveSectionDown();
761		        });
762		        $('.multiscroll-button.up').on('click', function() {
763		            $.fn.multiscroll.moveSectionUp();
764		        });	
765	        }
766
767			if(currentWidth <= 767) {
768
769	            var $holder = $('.dtportfolio-multiscroll-container .dtportfolio-multiscroll');
770
771	            $holder.each(function( i, val ) {
772
773	                var $holder_class = $(this).attr('class');
774	                var $holder_classes = $holder_class.split(' ');
775
776	                var $holder_modified_classes = new Array();
777	                $.each( $holder_classes, function( j, value ) {
778
779	                    if(value.indexOf('dtportfolio-hover-') == 0) {
780	                    } else {
781	                        $holder_modified_classes.push(value);
782	                    }
783
784	                });
785	                $holder_modified_classes.push('dtportfolio-hover-overlay');
786
787	                $holder_modified_classes = $holder_modified_classes.join(' ');
788	                $(this).attr('class', $holder_modified_classes);
789
790	            });
791
792			}
793
794			/* Reset Multiscroll jQuery */
795			if(dtportfoliofrontendobject.elementor_preview_mode == 'true') {
796				$('.dtportfolio-container-resetter').multiscroll.destroy();
797			}
798
799		}
800
801
802		/* Reset Multiscroll jQuery - Style Attributes */
803		if(dtportfoliofrontendobject.elementor_preview_mode == 'true') {
804
805			if($("body[class*='ms-viewing-']")) {
806				$('body').removeAttr('style');
807				$('html').removeAttr('style');
808			}
809
810		}
811
812
813		// Infinite portfolio
814		
815		$('.dtportfolio-infinite-portfolio-load-more').each(function(){
816
817			var $this_global = $(this);
818			var $completedata_obj = $this_global.attr('data-complete-data');
819			var $completedata_json = $.parseJSON($completedata_obj);
820
821			var $pagination_type = $completedata_json['portfolio-pagination-type'];
822			var $paged = $completedata_json['paged'];
823
824			if($pagination_type == 'lazy-load') {
825
826				$(window).scroll(function(){
827					if($(window).scrollTop() == $(document).height() - $(window).height()){
828
829						var $wrapper = $this_global.prev('.dtportfolio-infinite-portfolio-wrapper');
830
831						$completedata_json['paged'] = $paged;
832						var $completedata_object = JSON.stringify($completedata_json);
833
834						$paged++;
835
836						$.ajax({
837							type : "post",
838							dataType : "html",
839							url : dtportfoliofrontendobject.ajaxurl,
840							data : { action: "dtportfolio_ajax_infinite_portfolios", completedata_json: $completedata_object },
841							beforeSend: function(){
842								jQuery('.dtportfolio-infinite-portfolio-load-more').prepend( '<i class="fa fa-spinner fa-spin"></i>' );
843							},						
844							success: function (data) {
845
846								data = $.trim(data);
847
848								if (data.length > 0) {
849
850									$wrapper.find('.dtportfolio-infinite-portfolio-container').isotope('insert', $(data));
851									setTimeout(function(){
852										$wrapper.find('.dtportfolio-infinite-portfolio-container').isotope('layout');
853									}, 400);
854
855									animatePortfolioItems();
856
857								} else {
858
859									$this_global.addClass('disable');
860									$wrapper.find(".message").removeClass("hidden");
861									setTimeout(function(){
862										$wrapper.find(".message").addClass('hidden');
863									}, 5000);
864
865								}
866								
867							},
868							error: function (jqXHR, textStatus, errorThrown) {
869							},
870							complete: function(){
871								jQuery(".dtportfolio-infinite-portfolio-load-more i").remove();
872							}																		
873						});	
874
875					}
876				});
877
878			} else if( $pagination_type == 'load-more') {
879				
880				$this_global.click(function(e){
881
882					e.preventDefault();
883
884					var $this = $(this);
885					var $wrapper = $this.prev('.dtportfolio-infinite-portfolio-wrapper');
886
887					$completedata_json['paged'] = $paged;
888					var $completedata_object = JSON.stringify($completedata_json);
889
890					$paged++;
891
892					$.ajax({
893						type : "post",
894						dataType : "html",
895						url : dtportfoliofrontendobject.ajaxurl,
896						data : { action: "dtportfolio_ajax_infinite_portfolios", completedata_json: $completedata_object },
897						beforeSend: function(){
898							jQuery('.dtportfolio-infinite-portfolio-load-more').prepend( '<i class="fa fa-spinner fa-spin"></i>' );
899						},					
900						success: function (data) {
901
902							data = $.trim(data);
903
904							if (data.length > 0) {
905
906								$wrapper.find('.dtportfolio-infinite-portfolio-container').isotope('insert', $(data));
907								setTimeout(function(){
908									$wrapper.find('.dtportfolio-infinite-portfolio-container').isotope('layout');
909								}, 400);
910
911								animatePortfolioItems();
912
913							} else {
914
915								$this.addClass('disable');
916								$wrapper.find(".message").removeClass("hidden");
917								setTimeout(function(){
918									$wrapper.find(".message").addClass('hidden');
919								}, 5000);
920
921							}
922
923						},
924						error: function (jqXHR, textStatus, errorThrown) {
925						},
926						complete: function(){
927							jQuery(".dtportfolio-infinite-portfolio-load-more i").remove();
928						}					
929					});
930				});
931
932			}
933
934		});
935
936		$(window).trigger('resize');
937
938	};
939
940
941    //Elementor JS Hooks
942    $(window).on('elementor/frontend/init', function () {
943
944    	elementorFrontend.hooks.addAction('frontend/element_ready/global', dtPortfolioPostsWidgetHandler);
945
946    });
947
948    // Visual Composer JS Hooks
949    if(dtportfoliofrontendobject.page_builder == 'visual-composer') {
950		dtPortfolioPostsWidgetHandler(jQuery('body'), jQuery);
951	}
952});

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.