PageSourceSearch

https://www.transbaltic.eu/wp-content/themes/transbaltic/scripts/transbaltic.js

js transbaltic.eu collected 2026-10-08 06:33:20 UTC 5,945 bytes, 313 lines download raw bytes

1/*!
2 * Modified: 2009-12-09 10:47:50
3 * CHECKSUM[e6b106bf017fb0fe7175e23011ec0e2f]
4 */
5 
6
7 
8
9// Super Class
10
11window.$Transbaltic = new function() {
12
13	var $this = this;
14	
15	// Constructor
16	
17	$(function(){ 
18	
19		$this.init();	
20		 
21	});
22	
23	
24	$this.init = function() { 
25	
26		$this.formHints('#mainWrapper');
27		$this.modal('.StripedTable a');
28		$this.toggleNext('.ShowFormLink');
29		
30		$this.initSpecialForm1();
31		
32		$this.initGallery();
33		
34		/*
35		$('.alignright').each(function() {
36		
37			var p = $(this).parent();
38		
39			p.css('float', 'right');
40			p.css('display', 'inline');
41			p.css('width', $(this).width());
42		
43		});
44		*/
45		
46	};
47	
48	/**
49	*
50	*/
51	$this.initGallery = function() {
52	
53		// 
54		$('#Content .ngg-gallery-thumbnail a').fancybox({titlePosition: 'inside'});
55	
56	}
57	
58	
59	$this.initSpecialForm1 = function() {
60	
61		$('#vegetarianDetails').hide();
62		
63		$('#allergyNo').click(function() {
64		
65			if($(this).attr('checked')) {
66		
67				$('#vegetarianDetails').slideUp();
68				
69			}
70		});
71		
72		$('#allergyYes').click(function() {
73		
74			if($(this).attr('checked')) {
75		
76				$('#vegetarianDetails').slideDown();
77				
78			}
79		});		
80	
81	}
82	
83	$this.toggleNext = function(selector) {
84	
85		$(selector).nextAll('div.SignUpFormWrapper:not(.showForm)').hide().end().click(function(e){
86		
87			e.preventDefault();
88			$(this).toggleClass('Active').nextAll('div.SignUpFormWrapper').toggle();
89			return false;
90		
91		});
92	
93	}
94	
95	$this.formHints = function(selector) {
96	
97		$(selector).find('input.hint, textarea.hint').each(function() {
98		
99			var obj = $(this);	
100			var hintvalue = obj.val();
101			var textTransformVal = obj.css('text-transform');
102			obj.attr('hintvalue', hintvalue);
103			
104			if (!obj.attr('title')) obj.attr('title',hintvalue);
105
106			$(this).focus(function(){
107			
108				$(this).css('text-transform', 'none');
109				if ($(this).val() == hintvalue) $(this).val("");
110				
111	    	}).blur(function(){	
112	    	
113	    		if ($(this).val() == "") {
114		    		$(this).css('text-transform', textTransformVal);
115	    			$(this).val(hintvalue);
116	    		}
117	    		
118			});
119		});
120	};
121	
122	
123	$this.modal = function(selector) {
124	
125	
126	
127	$(selector).each(function(){
128	
129	$(this).click(function(e){
130	
131		e.preventDefault();
132	
133	})
134	
135	
136$(this).qtip(
137   {
138      content: {
139         title: {
140            text: $(this).text(),
141            button: ' '
142         },
143         text: 'loading...',
144         url: $(this).attr('href') + '?ajax=1'
145      },
146      position: {
147         target: $(document.body), // Position it via the document body...
148         corner: 'center' // ...at the center of the viewport
149      },
150      show: {
151         when: 'click', // Show it on click
152         solo: true // And hide all other tooltips
153      },
154      hide: { 
155      	when: { event: 'unfocus' } },
156      style: {
157      		width: 500,
158      		color: "#999999",
159      		title: {"background-color": "#ffffff"}
160      	
161      },
162      api: {
163         beforeShow: function()
164         {
165            // Fade in the modal "blanket" using the defined show speed
166            $('#qtip-blanket').fadeIn(this.options.show.effect.length);
167         },
168         beforeHide: function()
169         {
170            // Fade out the modal "blanket" using the defined hide speed
171            $('#qtip-blanket').fadeOut(this.options.hide.effect.length);
172         }
173      }
174   });
175
176	
177	
178	});
179	
180
181   // Create the modal backdrop on document load so all modal tooltips can use it
182   $('<div id="qtip-blanket">')
183      .css({
184         position: 'absolute',
185         top: 0, // Use document scrollTop so it's on-screen even if the window is scrolled
186         left: 0,
187         height: $(document).height(), // Span the full document height...
188         width: '100%', // ...and full width
189
190         opacity: 0.7, // Make it slightly transparent
191         backgroundColor: 'black',
192         zIndex: 5000  // Make sure the zIndex is below 6000 to keep it below tooltips!
193      })
194      .appendTo(document.body) // Append to the document body
195      .hide(); // Hide it initially
196};
197
198	
199};
200
201window.$Calendar = new function() {
202
203	var $this = this;
204	
205	$(function(){ 
206	
207		$this.init();
208		 
209	});
210	
211	$this.init = function() {
212	
213		$this.applyFilterFunctionality();
214	
215	}
216	
217	$this.applyFilterFunctionality = function() {
218	
219		$('#filterCalButton').click(function() {
220		
221			//alert(1);
222		
223		});
224	
225	}
226	
227	
228	$this.navigate = function(month, year, calendarModuleFile, targetElmId, loadingPostId) {
229	       
230		var extraData = '';
231	       
232		$('#calendarLoading').css('display', 'block');
233	       
234		if(($('#calFilterInternal').is(':checked'))) {
235		
236			extraData += '&internal';
237		
238		}
239		
240		if(($('#calFilterExternal').is(':checked'))) {
241		
242			extraData += '&external';
243		
244		}		
245		
246		$.ajax({
247			method: 'get',
248			dataType: 'html',
249			url: calendarModuleFile,
250			data: 'month='+month+'&year='+year+'&loadingPostId=' + loadingPostId + '&isAjax=1' + extraData,
251			success: function(result) { 
252			
253				var targetElm = $('#' + targetElmId);				
254				targetElm.html(result);
255				
256			},
257			complete: function() {
258			
259				$('#calendarLoading').css('display', 'none');
260			
261			}
262		});
263		
264		return false;
265
266	}
267
268}
269
270window.$partnerMap = new function() {
271
272	var $this = this;
273	
274	$this.openList = function(wpHome, listId) {
275	
276		var targetElm = $('#listWrapper2');
277		var loaderElm = $('#listWrapper1 .loader');
278		var listWrapper = $('#listWrapper1');
279	
280		listWrapper.show();
281		loaderElm.show();
282		targetElm.html('');
283	
284		$.ajax({
285			method: 'get',
286			dataType: 'html',
287			url: wpHome + '/wp-content/themes/transbaltic/modules/partnerMapList.php',
288			data: 'listId=' + listId,
289			success: function(result) { 
290
291				loaderElm.hide();			
292				targetElm.html(result);
293				
294				$('div#partnerMapWrapper2 div#listWrapper1 div.bg').css('height', ($('div#partnerMapWrapper2 div#listWrapper2').height() + 20) + 'px');
295				
296			},
297			complete: function() {
298
299				$('#listWrapper1 a.close').click(function(event) {
300				
301					event.preventDefault();
302					listWrapper.hide();
303				
304				});
305
306			}
307		});	
308	
309	}
310	
311	
312	
313}

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.