PageSourceSearch

https://www.bibbiafrancescana.org/wp-content/themes/bibbia/js/general.js?ver=fff1290b4ef834c8a40d90565c43ae51

js bibbiafrancescana.org collected 2026-10-02 13:36:49 UTC 13,709 bytes, 334 lines download raw bytes

1var $ = jQuery;
2var post_loveit;
3
4function validateEmail(email) {
5        if(!email)
6            return false;
7        var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
8        if( !emailReg.test( email ) ) {
9            return false;
10        } else {
11            return true;
12        }
13    }
14// Topmenu <ul> replace to <select>
15$(function() {
16	var $ = jQuery;
17    var tempMenu = jQuery('#topmenu').clone();
18    var mainNavigationMenu = jQuery('<div>');
19
20    mainNavigationMenu.attr('id', 'topmenu-select');
21
22    /* Replace unordered list with a "select" element to be populated with options, and create a variable to select our new empty option menu */
23    mainNavigationMenu.html('<select class="select_styled" id="topm-select"></select>');
24    jQuery('#topmenu').after(mainNavigationMenu);
25
26    var selectMenu = mainNavigationMenu.children('select');
27
28    /* Navigate our nav clone for information needed to populate options */
29    jQuery(tempMenu).children('#default_menu').children('ul').children('li').each(function() {
30        /* Get top-level link and text */
31        var href = jQuery(this).children('a').attr('href');
32        var text = jQuery(this).children('a').text();
33
34        /* Append this option to our "select" */
35        if (jQuery(this).is(".current-menu-item") && href != '#') {
36            jQuery(selectMenu).append('<option value="'+href+'" selected>'+text+'</option>');
37        } else if ( href == '#' ) {
38            jQuery(selectMenu).append('<option value="'+href+'" disabled="disabled">'+text+'</option>');
39        } else {
40            jQuery(selectMenu).append('<option value="'+href+'">'+text+'</option>');
41        }
42
43        /* Check for "children" and navigate for more options if they exist */
44        if (jQuery(this).children('ul').length > 0) {
45            jQuery(this).children('ul').children('li').not(".mega-nav-widget").each(function() {
46
47                /* Get child-level link and text */
48                var href2 = jQuery(this).children('a').attr('href');
49                var text2 = jQuery(this).children('a').text();
50
51                /* Append this option to our "select" */
52                if (jQuery(this).is(".current-menu-item") && href2 != '#') {
53                    jQuery(selectMenu).append('<option value="'+href2+'" selected> &nbsp;|-- '+text2+'</option>');
54                } else if ( href2 == '#' ) {
55                    jQuery(selectMenu).append('<option value="'+href2+'" disabled="disabled"> &nbsp;|-- '+text2+'</option>');
56                } else {
57                    jQuery(selectMenu).append('<option value="'+href2+'"> &nbsp;|-- '+text2+'</option>');
58                }
59
60                // if (jQuery(this).is(".current-menu-item")) {
61                // jQuery(selectMenu).append('<option value="'+href2+'" class="select-current" selected>'+text2+'</option>');
62                // } else {
63                // jQuery(selectMenu).append('<option value="'+href2+'"> &nbsp;|-- '+text2+'</option>');
64                // }
65
66                /* Check for "children" and navigate for more options if they exist */
67                if (jQuery(this).children('ul').length > 0) {
68                    jQuery(this).children('ul').children('li').each(function() {
69
70                        /* Get child-level link and text */
71                        var href3 = jQuery(this).children('a').attr('href');
72                        var text3 = jQuery(this).children('a').text();
73
74                        /* Append this option to our "select" */
75                        if (jQuery(this).is(".current-menu-item")) {
76                            jQuery(selectMenu).append('<option value="'+href3+'" class="select-current" selected> &nbsp;&nbsp;&nbsp;&nbsp;|-- '+text3+'</option>');
77                        } else {
78                            jQuery(selectMenu).append('<option value="'+href3+'"> &nbsp;&nbsp;&nbsp;&nbsp;|-- '+text3+'</option>');
79                        }
80
81                    });
82                }
83
84            });
85        }
86
87    });
88
89    /* When our select menu is changed, change the window location to match the value of the selected option. */
90    jQuery(selectMenu).change(function() {
91        location = this.options[this.selectedIndex].value;
92    });
93});
94  jQuery(document).ready(function() {
95	var $ = jQuery;
96	// Audio Player
97	var $players_on_page = $('.jp-audio').length;
98	var $song_title = '';
99
100	if($players_on_page > 0){
101		for(var i = 1; i <= $players_on_page; i++){
102			$('.jp-audio').eq(i-1).addClass('jp-audio'+i);
103		};
104	};
105
106});
107jQuery(document).ready(function() {
108    var $ = jQuery;
109    var default_opts = {
110        inline: true,
111        firstDay: 1,
112        showOtherMonths: true,
113        dayNamesMin: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
114        prevText: 'MM yy',
115        nextText: 'MM yy',
116        navigationAsDateFormat: true
117    };
118
119    var datepicker_opts = jQuery.extend(default_opts, tf_calendar.datepicker_opts);
120
121    jQuery('#calendar').datepicker(datepicker_opts);
122    $('.ui-datepicker-title').prepend('<div>' + tf_calendar.calendar_title + '</div>');
123    $("table.ui-datepicker-calendar td").addClass('ui-datepicker-unselectable');
124                    $(".ui-datepicker-next").before($('.ui-datepicker-title'));
125
126
127    jQuery('#newsletter_subscription_submit').on('click',function(){
128        var email = jQuery('.pp_pic_holder.pp_default #newsletter_subscription_email').val();
129        if(!validateEmail(email))
130        {
131            jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_wrong_email').show();
132            return false;
133        }
134        jQuery('.pp_pic_holder.pp_default #newsletter_subscription_ajax').show();
135        $.post(tf_script.ajaxurl, {
136                action:'tfuse_ajax_newsletter',
137                tf_action:'tfuse_ajax_newsletter_save_email',
138                email:jQuery('.pp_pic_holder.pp_default #newsletter_subscription_email').val(),
139            },function(data){
140                jQuery('.pp_pic_holder.pp_default #newsletter_subscription_ajax').hide();
141                if(data.status==-2) {
142                   jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_wrong_email').show();
143                }
144                else if(data.status==-1) {
145                    jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_wrong_email').hide();
146                    jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_message_failed').show();
147                    setTimeout(function(){
148                        jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_message_failed').hide();
149                    }, 3000);
150                }
151                else if(data.status==1) {
152                jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_wrong_email').hide();
153                    jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_message_failed').hide();
154                    jQuery('.pp_pic_holder.pp_default #newsletter_subscription_messages #newsletter_subscription_message_success').show();
155                }
156            },'json');
157            return false;
158    });
159
160	var screenRes = jQuery(window).width();
161   
162	// Remove links outline in IE 7
163	  $("a").attr("hideFocus", "true").css("outline", "none");
164
165	//dropdown parent
166      $(".dropdown-menu ul ul").parent("li").addClass("parent");
167
168    // style Select, Radio, Checkbox
169	  
170	  if ($("div,p").hasClass("input_styled")) {
171	    $(".input_styled input").customInput();
172	  }
173  	// toggle content
174    $(".toggle_content").hide(); 	
175    /*
176	$(".toggle").toggle(function(){
177		$(this).addClass("active");
178		}, function () {
179		$(this).removeClass("active");
180	});
181	*/
182	$(".toggle").click(function(){
183        $(this).next(".toggle_content").slideToggle(300,'easeInQuad');
184        var iteration=$(this).data('iteration')||1
185        switch ( iteration) {
186            case 1:
187                $(this).addClass("active");
188                break;
189            
190            case 2:
191                $(this).removeClass("active");
192                break;
193        }
194        iteration++;
195        if (iteration>2) iteration=1
196        $(this).data('iteration',iteration)
197	});
198	// Post List
199	jQuery(".recent_posts li:odd").addClass("odd");
200	jQuery(".popular_posts li:odd").addClass("odd");
201	// DropDown Menu
202		jQuery(".dropdown ul ul").parent("li").addClass("parent");
203		jQuery(".dropdown li ul li:first-child").addClass("first");
204		jQuery(".dropdown li ul li:last-child").addClass("last");
205
206	//FOOTER NAV
207	jQuery(".footer_nav li:first-child").addClass("first");
208	jQuery(".footer_nav li:last-child").addClass("last");
209
210	// Resources Item 
211	jQuery(".resources_list .resources_item:odd").addClass("odd");
212	jQuery(".resources_list .resources_item:even").addClass("even");
213	jQuery(".resources_list .resources_item:last-child").addClass("last");
214        
215        jQuery("#resource .carousel-inner .item:first-child").addClass("active");
216
217	// widget archive
218	jQuery(".widget_archive ul li:even").addClass("even");
219
220	//Comment List 
221
222	jQuery(".comment_list .children ul").parent("li").addClass("parent");
223	jQuery(".comment_list ol ul").parent("li").addClass("parent");
224	jQuery(".comment_list .parent").next("li").css("border-top","1px solid #e3e1da");
225        
226        //player
227        jQuery('.resource_btn').each(function(){
228            var id_rec = jQuery(this).attr('id');
229            var id_player = jQuery("#"+id_rec + " .jp-jplayer");
230            var first = true; 
231            jQuery("#"+id_rec + " .resources_preview.audio").on('click',function() {
232            	
233	                if (first)
234	                {                    
235	                    jQuery("#"+id_rec).css('height','+=55');
236	                    jQuery("#"+id_rec + " .mp3").addClass('visible');	                    
237	                    id_player.jPlayer("play");
238	                    var jpData = id_player.data('jPlayer');	                    
239	                    if(jpData.status.paused)
240	                    {
241	                    	jQuery("#"+id_rec + " .jp-play").trigger('click');
242		            };
243	  
244	        	    jQuery("#"+id_rec + " .resources_preview.audio").text('Pause');
245			    jQuery('#toptitle').text('New Word');
246	                    first = false;
247	                }
248	                else
249	                {
250	                    jQuery("#"+id_rec).css('height','-=55');
251	                    jQuery("#"+id_rec + " .mp3").removeClass('visible');
252			    jQuery("#"+id_rec + " .resources_preview.audio").text('Play');
253	                   
254	                    id_player.jPlayer("pause");
255			    jpData = id_player.data('jPlayer');
256	                    jQuery("#"+id_rec + " .jp-pause").trigger('click');
257	                    
258	                    first = true;
259	                }
260             
261                
262            });
263            jQuery("#"+id_rec + " .resources_preview.video").on('click',function(){
264                jQuery("#"+id_rec + " #mp4").fadeToggle('fast');
265                
266                if(first)
267                {
268					jQuery("#"+id_rec + " .resources_preview.video").text('Pause');
269                    jQuery("#"+id_rec + " video").trigger("play");
270                    jQuery("#"+id_rec).css('height','+=270');
271                    first = false;
272                }
273                else
274                {
275				jQuery("#"+id_rec + " .resources_preview.video").text('Play');
276                    jQuery("#"+id_rec + " video").trigger("pause");
277                    jQuery("#"+id_rec).css('height','-=270');
278                    first = true;
279                }
280            });
281        
282        });
283    // prettyPhoto lightbox, check if <a> has atrr data-rel and hide for Mobiles
284	if($('a').is('[data-rel]') && screenRes > 600) {
285        $('a[data-rel]').each(function() {
286			$(this).attr('rel', $(this).data('rel'));
287		});
288		$("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false});	
289             
290     if(jQuery('.row').hasClass('top-info'))
291     {
292         jQuery('.middle_row').css('padding-top','5px');
293     }
294            
295  jQuery('.love_it').bind('click', function(){       
296        var y = jQuery(this).attr('id');
297        var value = jQuery('#'+y).attr('rel');
298        if (value == 'tfuse_loved') {   return false;}
299        var id1 = jQuery(this).prev('.love_it_hidden').attr('id'); 
300        var id = parseInt(id1.replace('hidden_','')); 
301        datasend = 'action=tfuse_loveit_callback&id=' + id;
302        jQuery.ajax({
303            type: "POST",
304            url: tf_script.ajaxurl,
305            data: datasend, // data to be send
306            dataType: "html",
307            success: function(response) {
308              var obj = jQuery.parseJSON(response);
309              console.log(obj);
310                if (obj['succes'] == true)
311                { 
312                   var numb = parseInt(obj.numb)+1;
313                   jQuery('#'+y).html('<span class="link-comments" >'+numb+'</span>');
314                   jQuery('#'+y).attr('rel','tfuse_loved');
315                   jQuery.ajax({
316                       type:"POST",
317                       url: tf_script.ajaxurl,
318                       data: 'action=tfuse_loveit_cookies_action&cookies=true&id='+id,
319                       dataType: "html"
320                   });
321                }
322            }
323        });
324        return false;
325    });
326    }
327});
328
329jQuery(document).ready(function($) {
330        jQuery('a[data-rel]').each(function() {
331        jQuery(this).attr('rel', jQuery(this).data('rel'));
332        });
333        jQuery("a[rel^='prettyPhoto']").prettyPhoto({social_tools:false});
334        });

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.