PageSourceSearch

https://kansalaisopistot.fi/wp-content/themes/megazine/javascript/gdl-scripts.js?ver=1.0

js kansalaisopistot.fi collected 2026-10-02 03:33:53 UTC 5,914 bytes, 184 lines download raw bytes

1jQuery(document).ready(function(){
2
3	// Menu Navigation
4	jQuery('#main-superfish-wrapper ul.sf-menu').supersubs({
5		minWidth: 14.5, maxWidth: 27, extraWidth: 1
6	}).superfish({
7		delay: 400, speed: 'fast', animation: {opacity:'show',height:'show'}
8	});
9	
10	// Search Default text
11	jQuery('.search-text input').on("blur", function(){
12		var default_value = jQuery(this).attr("data-default");
13		if (jQuery(this).val() == ""){
14			jQuery(this).val(default_value);
15		}	
16	}).on("focus", function(){
17		var default_value = jQuery(this).attr("data-default");
18		if (jQuery(this).val() == default_value){
19			jQuery(this).val("");
20		}
21	});	
22
23	// Social Hover
24	jQuery("#gdl-social-icon .social-icon").hover(function(){
25		jQuery(this).animate({ opacity: 0.55 }, 150);
26	}, function(){
27		jQuery(this).animate({ opacity: 1 }, 150);
28	});
29	
30	// Accordion
31	var gdl_accordion = jQuery('ul.gdl-accordion');
32	gdl_accordion.find('li').not('.active').each(function(){
33		jQuery(this).children('.accordion-content').css('display', 'none');
34	});
35	gdl_accordion.find('li').click(function(){
36		if( !jQuery(this).hasClass('active') ){
37			jQuery(this).addClass('active').children('.accordion-content').slideDown();
38			jQuery(this).siblings('li').removeClass('active').children('.accordion-content').slideUp();
39		}
40	});
41	
42	// Toggle Box
43	var gdl_toggle_box = jQuery('ul.gdl-toggle-box');
44	gdl_toggle_box.find('li').not('.active').each(function(){
45		jQuery(this).children('.toggle-box-content').css('display', 'none');
46	});
47	gdl_toggle_box.find('li').click(function(){
48		if( jQuery(this).hasClass('active') ){
49			jQuery(this).removeClass('active').children('.toggle-box-content').slideUp();
50		}else{
51			jQuery(this).addClass('active').children('.toggle-box-content').slideDown();
52		}
53	});	
54	
55	// Tab
56	var gdl_tab = jQuery('div.gdl-tab');
57	gdl_tab.find('li a').click(function(){
58		if( jQuery(this).hasClass('active') ) return;
59		
60		var data_tab = jQuery(this).attr('data-tab');
61		var tab_title = jQuery(this).parents('ul.gdl-tab-title');
62		var tab_content = tab_title.siblings('ul.gdl-tab-content');
63		
64		// tab title
65		tab_title.find('a.active').removeClass('active');
66		jQuery(this).addClass('active');
67		
68		// tab content
69		tab_content.find('li.active').removeClass('active').css('display', 'none');
70		tab_content.find('li[data-tab="' + data_tab + '"]').fadeIn().addClass('active');
71		
72		e.preventDefault();
73	});
74	
75	// Scroll Top
76	jQuery('div.scroll-top').click(function() {
77		jQuery('html, body').animate({ scrollTop:0 }, { duration: 600, easing: "easeOutExpo"});
78		return false;
79	});
80	
81	// Blog Hover
82	jQuery(".blog-media-wrapper.gdl-image img, .port-media-wrapper.gdl-image img, .gdl-gallery-image img").hover(function(){
83		jQuery(this).animate({ opacity: 0.55 }, 150);
84	}, function(){
85		jQuery(this).animate({ opacity: 1 }, 150);
86	});
87	
88	// Port Hover
89	jQuery(".portfolio-item .portfolio-thumbnail-image-hover").hover(function(){
90		jQuery(this).animate({ opacity: 1 }, 200);
91	}, function(){
92		jQuery(this).animate({ opacity: 0 }, 200);
93	});
94	
95	// JW Player Responsive
96	responsive_jwplayer();
97	function responsive_jwplayer(){
98		jQuery('[id^="jwplayer"][id$="wrapper"]').each(function(){
99			var data_ratio = jQuery(this).attr('data-ratio');
100			if( !data_ratio || data_ratio.length == 0 ){
101				data_ratio = jQuery(this).height() / jQuery(this).width();
102				jQuery(this).css('max-width', '100%');
103				jQuery(this).attr('data-ratio', data_ratio);
104			}
105			jQuery(this).height(jQuery(this).width() * data_ratio);
106		});
107	}
108	jQuery(window).resize(function(){
109		responsive_jwplayer();
110	});
111
112});
113jQuery(window).load(function(){
114
115	// Set Portfolio Max Height
116	function set_portfolio_height(){
117		jQuery('div.portfolio-item-holder').each(function(){
118			var max_height = 0; 
119			jQuery(this).children('.portfolio-item').height('auto');
120			jQuery(this).children('.portfolio-item').each(function(){
121				if( max_height < jQuery(this).height()){
122					max_height = jQuery(this).height();
123				}				
124			});
125			jQuery(this).children('.portfolio-item').height(max_height);
126		});
127	}
128	setTimeout(function(){ set_portfolio_height(); }, 100);
129
130	// Personnal Item Height
131	function set_personnal_height(){
132		jQuery(".personnal-item-holder .row").each(function(){
133			var max_height = 0;
134			jQuery(this).find('.personnal-item').height('auto');
135			jQuery(this).find('.personnal-item-wrapper').each(function(){
136				if( max_height < jQuery(this).height()){
137					max_height = jQuery(this).height();
138				}
139			});
140			jQuery(this).find('.personnal-item').height(max_height);
141		});		
142	}
143	set_personnal_height();
144	
145	// Price Table Height
146	function set_price_table_height(){
147		jQuery(".price-table-wrapper .row").each(function(){
148			var max_height = 0;
149			jQuery(this).find('.price-item').height('auto');
150			jQuery(this).find('.price-item-wrapper').each(function(){
151				if( max_height < jQuery(this).height()){
152					max_height = jQuery(this).height();
153				}
154			});
155			jQuery(this).find('.price-item').height(max_height);
156		});		
157	}	
158	set_price_table_height();
159	
160	// set the page header gimmick
161	function set_page_header(){
162		jQuery('.gdl-header-wrapper').each(function(){
163			var temp_height = jQuery(this).children('.gdl-header-title').outerHeight();
164			var temp_width = jQuery(this).width() - jQuery(this).children('.gdl-header-title').outerWidth();
165			
166			if( temp_width > 0 ){ 
167				jQuery(this).children('.gdl-header-gimmick').css({ 'width': temp_width - 6, 'height': temp_height});
168			}else{
169				jQuery(this).children('.gdl-header-gimmick').css({ 'width': '0px'});
170			}			
171		});
172	}
173	set_page_header();
174	
175	// When window resize, set all function again
176	jQuery(window).resize(function(){
177		set_portfolio_height()	
178		set_personnal_height();
179		set_price_table_height();
180		set_page_header();
181	});	
182	
183});
184

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.