PageSourceSearch

https://gretaundstarks.de/js/site/common.js

js gretaundstarks.de collected 2026-09-24 09:21:31 UTC 6,436 bytes, 228 lines download raw bytes

1/*-------------------------------------------------------------------------
2
3	Theme Name: CARTEL - html - v.1
4	
5	For any questions concerning this theme please refer to documention or
6	our forum at support.udfrance.com.
7
8/*------------------------------------------------------------------------
9
10//GENERAL FUNCTONS ///////////////////////////////////////////////////////
11
12-------------------------------------------------------------------------*/
13
14$(document).ready(function(){
15						   
16	
17	/*vars used throughout*/
18	var toggleMenu =$('.mobileMenuToggle'),			//Mobile menu ref.
19	    menuLink=$('ul.navigation li'),
20		lightboxTransition = 'fade',				//Fancybox transition type
21	 	overlayOpacity =0.8,						//Fancybox overlay opacity
22	 	overlayColor = '#000',						//Fancybox overlay color	
23	 	videoWidth = 663,							//Fancybox video width
24	 	videoHeight = 374;							//Fancybox video height
25		lazyload = true;							//Whether to use lazy load or not
26
27
28	
29	//MOBILE MENU ---------------------------------------------------------------------------/
30
31	/* Clone navigation for mobile */
32	
33	//$('#header-inner header nav').clone().addClass('mobile-nav').appendTo('#header-inner header').find('.navigation').addClass('mobile-navigation');
34	
35	/* Use mobile navigation on iPad Landscape */
36	
37	if(navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i)){
38		$('#header-inner').addClass('is_tablet');
39		$('#header-inner .mobile-nav').css('display','block');
40		$('#header-inner ul.navigation, #header-inner ul.mobile-navigation').css('display','none');
41		$('#header-inner .mobileMenuToggle').css('display','block');
42	}
43
44	$('.mobileMenuToggle').on('click', function() {
45		if($(this).hasClass('open')) {
46			$('ul.mobile-navigation').slideUp('normal','easeInOutQuint');
47			$(this).removeClass('open');
48		} else {
49			$('ul.mobile-navigation').slideDown('normal','easeInOutQuint');
50			$(this).addClass('open');
51		}
52		return false;
53	});
54
55	
56	//SUB MENU ------------------------------------------------------------------------------/
57	
58
59	
60	menuLink.on({
61							 
62		mouseenter: function () {
63			
64			if($(this).children('ul').length && $(window).width() > 767){
65				
66				$(this).children('ul').css({display:'block',opacity:0,top:'43px'}).stop().animate({opacity:1,top:'45px'},400);
67				
68			}
69
70		}, 
71	
72		 mouseleave: function () {
73			 
74			if($(this).children('ul').length  && $(window).width() > 767){
75				
76				$(this).children('ul').stop().animate({opacity:0,top:'43px'},400,function(){
77																					  
78					
79					$(this).hide();
80					
81					
82				});
83				
84			}
85		}
86		
87	});
88				
89
90	//LIGHTBOX SPECIFIC ---------------------------------------------------------------------/
91
92	/*lightbox-img
93	-------------------------------*/
94	
95	$('a.lightbox').fancybox({
96										   
97			'transitionIn'		: lightboxTransition,
98			'transitionOut'		: lightboxTransition,
99			'titlePosition' 	: 'over',
100			'padding'			: '0',																		
101			'overlayOpacity'    : overlayOpacity,
102			'overlayColor'      : overlayColor,
103			'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {  
104						
105		
106			var obj = currentArray[ currentIndex ] //get current image
107			var target = $(obj).parent();		   //get its container	
108		
109		
110			//CASE 1: thumb has associated html content
111			if($(target).next().hasClass('fancybox-html')){
112					
113					
114				//check if stack order should be displayed
115									
116				if ($(target).next().length && $(obj).attr('rel')){
117										
118						return  '<span id="fancybox-title-over">' + '<div class="fancybox-num"> Image:'+(currentIndex + 1) + ' / ' + currentArray.length+'</div>'+($(target).next().html()) + '</span>';
119										
120				}else {
121											
122						return  '<span id="fancybox-title-over">' + ($(target).next().html()) + '</span>';
123										
124				}
125									
126								
127			//CASE 2:  thumb is a part of a group and has a title only
128			} else if($(obj).attr('rel') && $(obj).attr('title')){
129		
130					return  '<span id="fancybox-title-over">' + '<div class="fancybox-num"> Image:'+ (currentIndex + 1) + ' / ' + currentArray.length + '</div> '+ (title.length?''+title:'') + '</span>';
131									
132								
133			//CASE 3: thumb has no info but belongs to group
134			} else if($(obj).attr('rel')) {
135								
136					return  '<span id="fancybox-title-over">' + '<div class="fancybox-num" style="margin-bottom:0px"> Image:'+(currentIndex + 1) + ' / ' + currentArray.length+'</div>'+'</span>';
137								
138								
139			//CASE 4: thumb has a title only
140			} else if($(obj).attr('title')) {
141								
142				//if image is not associated with group, hide image numbering
143				return  '<span id="fancybox-title-over">' +(title.length ?''+title :'') + '</span>';
144									
145								
146				//CASE 5: no info & does not belong to group
147				}else{
148									
149				// hide title overlay
150				$('#fancybox-title-over').hide();
151									
152				}
153							
154			},
155						
156						
157			//animate image info on complete
158			'onComplete':function(){
159						
160				//check for smallest breakpoints		
161				if($(window).width()<=767){
162	
163			
164					$('.fancybox-title-over').css({display:'none'});
165					
166				}else{
167				
168					$('.fancybox-title-over').hide().fadeIn('slow');
169				
170				}
171						
172			}
173						
174			});
175	
176	
177	/*lightbox-media
178	-------------------------------*/
179	
180	$('a.media').fancybox({
181								   
182        'transitionIn'        : lightboxTransition,
183        'transitionOut'       : lightboxTransition,
184		'padding'			  : '0',	
185		'titlePosition'		  : 'outside',
186		'width'			      : videoWidth,
187		'height'			  : videoHeight,
188		'overlayOpacity'      : overlayOpacity,
189		'overlayColor'        : overlayColor,
190        'autoscale'           : false,
191        'type'                : 'iframe',
192		'swf'           	  : {
193		'wmode'               : 'transparent',
194		'allowfullscreen'  	: 'true'},
195		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {  
196						
197		
198			var obj = currentArray[ currentIndex ] //get current image
199			var target = $(obj).parent();		   //get its container	
200		
201			if($(target).next().hasClass('fancybox-html')){
202					
203	
204				return  '<span>' + ($(target).next().html()) + '</span>';
205						
206			
207			};
208		},
209		
210		//animate image info on complete
211		'onComplete':function(){
212						
213				//check for smallest breakpoints		
214				if($(window).width()<=767){
215			
216					$('.fancybox-title-outside').css({display:'none'});
217					
218				}else{
219				
220					$('.fancybox-title-outside').hide().fadeIn('slow');
221					
222				}
223						
224			}
225
226       });
227	
228});

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.