PageSourceSearch

https://mentoringusaitalia.org/wp-content/themes/awaken-theme/assets/scripts/functions_ver-4.2.15.js

js mentoringusaitalia.org collected 2026-09-25 11:24:22 UTC 10,001 bytes, 239 lines download raw bytes

1/* ---------------------------------------------------------------------------
2 * Hover on Section Function
3 * --------------------------------------------------------------------------- */
4jQuery(document).ready(function(){
5	jQuery(".blog-box").hover(function(){
6		jQuery(this).find("section").stop().animate({bottom:0}, 500);},
7		function() {
8			jQuery(this).find('section').stop().animate({bottom:-95}, 500);
9	});
10	
11	// Removing Audio text
12	jQuery('.mejs-offscreen').remove();
13	
14});
15/*---------------------------------------------------------------------------
16	 * Skills Function
17* --------------------------------------------------------------------------- */
18/*jQuery(document).ready(function(){
19		jQuery('.skillbar').each(function() {
20			jQuery(this).waypoint(function(direction) {
21				jQuery(this).find('.skillbar-bar').animate({
22					width: jQuery(this).attr('data-percent')
23				}, 2000);
24			}, {
25				offset: "100%",
26			triggerOnce: true
27			});
28	});
29	
30});*/
31
32/* ---------------------------------------------------------------------------
33	*  Mail Chimp Funtion For Ajax Submit Function
34	* --------------------------------------------------------------------------- */
35	function cs_mailchimp_submit(theme_url,counter,admin_url){
36		'use strict';
37		$ = jQuery;
38		$('#btn_newsletter_'+counter).hide();
39		$('#process_'+counter).html('<div id="process_newsletter_'+counter+'"><i class="fa fa-refresh fa-spin"></i></div>');
40		$.ajax({
41			type:'POST', 
42			url: admin_url,
43			data:$('#mcform_'+counter).serialize()+'&action=cs_mailchimp', 
44			success: function(response) {
45				$('#mcform_'+counter).get(0).reset();
46				$('#newsletter_mess_'+counter).fadeIn(600);
47				$('#newsletter_mess_'+counter).html(response);
48				$('#btn_newsletter_'+counter).fadeIn(600);
49				$('#process_'+counter).html('');
50			}
51		});
52	}
53	
54/* ---------------------------------------------------------------------------
55	 * Toggle Function
56* --------------------------------------------------------------------------- */
57
58jQuery(document).ready(function(){
59	jQuery(".hidediv").hide();
60	  jQuery(".showdiv").click(function(){
61		  jQuery(this).parents("article").stop().find(".hidediv").toggle(300);
62		  								  
63	  });
64});
65	 
66/*----------------------------------------------------------------------------
67	 *  Event Toggle Function
68	 * ----------------------------------------------------------------------------*/
69	jQuery('#toggle1').click(function() {
70		$('.csmap').slideToggle();
71		return false;
72	});
73	jQuery('#toggle1').click(function() {
74		$('#toggle1').toggleClass('active');
75		return false;
76	});
77
78/* ---------------------------------------------------------------------------
79	 *  Navigation Sub Menu Function
80	 * --------------------------------------------------------------------------- */
81jQuery(document).ready(function($) {
82	jQuery(".dropdown-menu").parent("li").addClass("parentIcon");
83	jQuery(".mega-grid").parent("li").addClass("parentIcon");
84});
85/*----------------------------------------------------------------------------
86	 *  Courses Toggle Function
87	 * ----------------------------------------------------------------------------*/
88	jQuery('#toggle02').click(function() {
89		$('.toggle-div').slideToggle();
90		return false;
91	});
92	jQuery('#toggle02').click(function() {
93		$('#toggle02').toggleClass('active');
94		return false;
95	});
96
97
98
99/* ---------------------------------------------------------------------------
100	 * Show Map Function
101	 * --------------------------------------------------------------------------- */
102	
103function cs_show_map(id, add,lat, long, zoom, home_url, get_template_directory_uri) {
104						
105	var a = jQuery("div.post-"+id).find("[id^=map]").length;
106	if (a > 1) {
107			jQuery("#event-"+id).slideToggle();
108		} else {
109			jQuery("article.post-"+id) .find("a.map-marker i").hide();
110			//jQuery("article.post-"+id) .find("a.map-marker").append('<img src="'+get_template_directory_uri+'/images/ajax-loader.gif" />');
111			jQuery("article.post-"+id) .find("a.map-marker").append('<i class="fa fa-spinner fa-spin"></i>');
112	var dataString = 'post_id=' + id + '&add=' + add + '&lat=' + lat + '&long=' + long + '&zoom='+ zoom;
113			jQuery.ajax({
114				type:"POST",
115				url: get_template_directory_uri+"/cs-templates/event-styles/event_map_ajax.php",
116				data:dataString, 
117				success:function(response){
118					
119					jQuery("article.post-"+id) .find("a.map-marker i").show();
120					jQuery("article.post-"+id) .find("a.map-marker .fa-spin").hide();
121					jQuery("div.post-"+id).toggleClass("event-map");
122					jQuery("div.post-"+id).show();
123					jQuery("#map_canvas"+id).html(response);
124				
125				}
126	});
127		}
128}
129
130/* ---------------------------------------------------------------------------
131* Parallex Function
132* --------------------------------------------------------------------------- */
133function cs_parallax_func(){
134	"use strict";
135	// Cache the Window object     
136	jQuery('section.parallex-bg[data-type="background"]').each(function(){
137		var $bgobj = jQuery(this); // assigning the object
138		jQuery(window).scroll(function() {
139			// Scroll the background at var speed
140			// the yPos is a negative value because we're scrolling it UP!								
141			var yPos = -(jQuery(window).scrollTop() / $bgobj.data('speed')); 
142			// Put together our final background position
143			var coords = '50% '+ yPos + 'px';
144			// Move the background
145			$bgobj.css({ backgroundPosition: coords });
146		}); // window scroll Ends
147	});
148}
149
150/* ---------------------------------------------------------------------------
151	* skills Function
152 	* --------------------------------------------------------------------------- */
153	function cs_skill_bar(){
154		
155		"use strict";	 
156		jQuery(document).ready(function($){
157			jQuery('.skillbar').each(function($) {
158				jQuery(this).waypoint(function(direction) {
159					jQuery(this).find('.skillbar-bar').animate({
160						width: jQuery(this).attr('data-percent')
161					}, 2000);
162				}, {
163					offset: "100%",
164					triggerOnce: true
165				});
166			});
167		});
168	}
169	
170/* ---------------------------------------------------------------------------
171	 * Upload Browse Button Style
172	 * --------------------------------------------------------------------------- */
173
174
175	function cs_user_profile_picture_del(picture_class,user_id,admin_url){
176		var dataString='picture_class=' + picture_class + 
177				'&user_id=' + user_id +
178				'&action=cs_admin_user_profile_picture_ajax';
179		jQuery(".profile-loading").html('<i class="fa fa-spinner fa-spin fa-2x"></i>');
180		jQuery.ajax({
181			type:"POST",
182			url: admin_url,
183			data:dataString, 
184			success:function(response){
185				if(response != 'error'){
186					jQuery("article figure").html(response);
187					jQuery("#user_avatar_display_box").remove();
188					jQuery(".profile-loading").html('');
189				} else {
190					jQuery(".profile-loading").html(' There is error while removing profile picture.');
191				}
192				
193			}
194		});
195		return false;
196	}
197
198
199/* ---------------------------------------------------------------------------
200	 * Upload Browse Button Style
201	 * --------------------------------------------------------------------------- */
202jQuery(document).ready(function($) {
203	jQuery(".cs-filter-menu li a").live("click", function(event) {
204		if (jQuery(this).hasClass('addclose')) {
205			jQuery(this).removeClass('addclose');
206		} else {
207			jQuery(".cs-filter-menu li a").removeAttr('class');
208			jQuery(this).addClass('addclose');
209		}
210		var a = jQuery(this).attr('href');
211		jQuery('.filter-pager').not(a).slideUp();
212		jQuery(a).slideToggle(300)
213		return false;
214	 });
215});
216/* ---------------------------------------------------------------------------
217	 * Responsive Menu
218	 * --------------------------------------------------------------------------- */
219	jQuery(document).ready(function($) {
220		jQuery(".navbar-toggle").live("click", function(event) {
221			if (jQuery(this).hasClass('addclose')) {
222				jQuery(this).removeClass('addclose');
223			} else {
224				//jQuery(".navbar-toggle").removeAttr('class');
225				jQuery(this).addClass('addclose');
226			}
227		});
228	});
229	
230	
231/* ---------------------------------------------------------------------------
232* Responsive Video Function
233* --------------------------------------------------------------------------- */
234
235  jQuery(document).ready(function($) {
236    jQuery(".main-section").fitVids();
237  });
238
239(function(e){"use strict";e.fn.fitVids=function(t){var n={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var r=document.head||document.getElementsByTagName("head")[0];var i=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}";var s=document.createElement("div");s.innerHTML='<p>x</p><style id="fit-vids-style">'+i+"</style>";r.appendChild(s.childNodes[1])}if(t){e.extend(n,t)}return this.each(function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];if(n.customSelector){t.push(n.customSelector)}var r=".fitvidsignore";if(n.ignore){r=r+", "+n.ignore}var i=e(this).find(t.join(","));i=i.not("object object");i=i.not(r);i.each(function(){var t=e(this);if(t.parents(r).length>0){return}if(this.tagName.toLowerCase()==="embed"&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length){return}if(!t.css("height")&&!t.css("width")&&(isNaN(t.attr("height"))||isNaN(t.attr("width")))){t.attr("height",9);t.attr("width",16)}var n=this.tagName.toLowerCase()==="object"||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height(),i=!isNaN(parseInt(t.attr("width"),10))?parseInt(t.attr("width"),10):t.width(),s=n/i;if(!t.attr("id")){var o="fitvid"+Math.floor(Math.random()*999999);t.attr("id",o)}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",s*100+"%");t.removeAttr("height").removeAttr("width")})})}})(window.jQuery||window.Zepto)

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.