PageSourceSearch

https://www.birsfaelder.li/wp/wp-content/themes/safarica/js/custom.js?ver=1.6.1

js birsfaelder.li collected 2026-10-02 14:11:06 UTC 5,681 bytes, 193 lines download raw bytes

1(function($) {
2	
3	$(document).ready(function() {
4	
5/*-----------------------------------------------------------------------------------*/
6/* Search Button Control
7/*-----------------------------------------------------------------------------------*/  
8$('.sfr-search-action').on('click',function(e){
9	e.preventDefault();
10	$('.nav-menu-content, .site-title-home, .sfr-search-wrapper').stop(true, true).fadeToggle('fast');
11	$('.sfr-search-wrapper input').focus();
12	$('.sfr-search-action .icon-search, .sfr-search-action .icon-cancel').toggleClass('sfr_hidden');
13});
14
15/*-----------------------------------------------------------------------------------*/
16/* Main Menu Dropdown Control
17/*-----------------------------------------------------------------------------------*/
18$('#sfr-menu ul li').hover(function(){
19    $(this).children('ul').stop(true, true).slideDown(200);
20},function(){
21    $(this).children('ul').stop(true, true).delay(50).slideUp(750);
22});
23
24/*-----------------------------------------------------------------------------------*/
25/* Load More Posts
26/*-----------------------------------------------------------------------------------*/
27var msn_it_class = 0;
28/* Load more posts handler */
29$("body").on('click', '#sfr_more_posts a',function(e){
30    	e.preventDefault();
31    	var $link = $(this);
32    	var msn_id = $(this).parent().attr('data-msn');
33    	$(this).addClass('button_loader');
34    
35$("<div>").load($link.attr("href"), function() {
36		
37		$("#sfr_post_colors").append($(this).find("#sfr_post_colors").html());
38
39			var new_content = $(this).find("#content #"+msn_id);
40			
41			var new_more_posts = $(this).find("#content #sfr_more_posts");
42			
43					
44			new_content.imagesLoaded( function() {
45				new_content.find('.post').addClass('msn_it_'+msn_it_class).appendTo("#content #"+msn_id);
46				sfr_check_flexslider($('.msn_it_'+msn_it_class));
47				$sfr_msn_container.masonry( 'appended', $("#content #"+msn_id).find('.msn_it_'+msn_it_class));
48				msn_it_class++;
49				
50				if(new_more_posts.length){
51					$link.parent().html(new_more_posts.html());
52				} else {
53					$link.parent().remove();
54				}
55			});
56			
57			
58			
59		});
60});
61
62
63/*-----------------------------------------------------------------------------------*/
64/*RESPONSIVE VIDEO CONTROL
65/*-----------------------------------------------------------------------------------*/
66
67if($.isFunction($.fn.fitVids)) {
68	$(".entry-header, .entry-content").fitVids();
69}
70
71
72/*-----------------------------------------------------------------------------------*/
73/*FACEBOOK HOVER FIX
74/*-----------------------------------------------------------------------------------*/
75if($('.share_facebook').length){
76$( ".share_facebook .fb-like" ).mouseenter(function() {
77  $('.share_colored .share_facebook').addClass('sfr_fb_show');
78});
79$( ".share_facebook .fb-like" ).mouseleave(function() {
80  $('.share_colored .share_facebook').removeClass('sfr_fb_show');
81});
82}
83
84/*-----------------------------------------------------------------------------------*/
85/* Masonry
86/*-----------------------------------------------------------------------------------*/
87
88if($('#sfr_main_nav').length){
89	selectnav('sfr_main_nav', {
90	  label: sfr_settings.translate.select_nav,
91	  nested: true,
92	  indent: '-'
93	});
94}
95
96
97
98/*-----------------------------------------------------------------------------------*/
99/* Masonry
100/*-----------------------------------------------------------------------------------*/
101
102	
103if($('#sfr_msn_2').length){
104	var $sfr_msn_container = $('#sfr_msn_2');
105	$('#sfr_msn_2').imagesLoaded( function() {
106		// initialize
107		$sfr_msn_container.masonry({
108	  	columnWidth: '.sfr_msn_col_2',
109	  	itemSelector: '.sfr_msn_col_2',
110	  	gutter: 33
111		});
112	});
113}
114
115if($('#sfr_msn_2_sid').length){
116var $sfr_msn_container = $('#sfr_msn_2_sid');
117	$('#sfr_msn_2_sid').imagesLoaded( function() {
118		// initialize
119		$sfr_msn_container.masonry({
120	  	columnWidth: '.sfr_msn_col_2_sid',
121	  	itemSelector: '.sfr_msn_col_2_sid',
122	  	gutter: 37
123		});
124	});
125}
126
127if($('#sfr_msn_3').length){
128var $sfr_msn_container = $('#sfr_msn_3');
129	$('#sfr_msn_3').imagesLoaded( function() {			
130		// initialize
131		$sfr_msn_container.masonry({
132	  	columnWidth: '.sfr_msn_col_3',
133	  	itemSelector: '.sfr_msn_col_3',
134	  	gutter: 33
135		});
136	});
137} 
138
139
140
141if($('#caru_slider').length){
142	sfr_check_carousel();
143}
144
145
146					
147}); 
148/*-----------------------------------------------------------------------------------*/
149/* Flexslider
150/*-----------------------------------------------------------------------------------*/
151
152function sfr_check_flexslider(objs){
153		objs.each(function( index ) {
154		  $(this).find('.single-slider').flexslider({
155    	keyboardNav: true,
156    	prevText:'<span class="icon-angle-left"></span>',
157    	nextText:'<span class="icon-angle-right"></span>',
158    	controlNav: false,
159    	slideshow: false,
160    	touch: true,
161    	useCSS: false,
162    	animation: 'slide'
163		});
164		});
165}
166
167/*-----------------------------------------------------------------------------------*/
168/* Carousel Slider
169/*-----------------------------------------------------------------------------------*/
170function sfr_check_carousel(){
171
172$(window).resize(function(){
173
174	var slider = $('#caru_slider'),
175		_width = $('#caru_wrapper').width();
176
177	//	show images
178	slider.find( '.slide' ).width( _width * 0.0505 );
179
180	//	enlarge first slide
181	slider.find( '.slide.active' ).width( _width * 0.9 );
182
183	//	update item width config
184	slider.trigger( 'configuration', ['items.width', _width * 0.0505] );
185
186});
187
188}
189	
190})(jQuery);
191
192
193

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.