PageSourceSearch

https://fitradio.com/js/2016/main.js?d=20210112

js fitradio.com collected 2026-10-01 11:29:35 UTC 8,306 bytes, 359 lines download raw bytes

1	
2	
3	
4	//------------------------------------//
5  //Intro Height//
6  //------------------------------------//
7  function introHeight() {
8      var wh = $(window).height();
9      $('#home').css({height: wh, marginTop: 0});
10  }
11
12  introHeight();
13  $(window).bind('resize',function () {
14      //Update slider height on resize
15      introHeight();
16  });
17  
18  
19  
20  //------------------------------------//
21  //Back Stretch//
22  //------------------------------------//
23  $.backstretch([
24        "/img/header-home-mobile.jpg?d=20160108"
25    ], {duration: 2000, fade: 750});
26	
27	$('.backstretch > img').attr('alt', 'FitRadio');
28
29	//------------------------------------//
30  //Owl Carousel//
31  //------------------------------------//
32  
33	$('#featured-music-carousel').owlCarousel({
34    loop:true,
35    mouseDrag: false,
36    autoplay:true,
37    autoplayTimeout:4000,
38    animateOut: 'fadeOut',
39    animateIn: 'fadeIn',
40    nav: false,
41    responsiveClass:true,
42    items:1
43  })
44		 
45	$('#trending-carousel').owlCarousel({
46    loop:true,
47    mouseDrag: false,
48    autoplay:false,
49    autoplayTimeout:4000,
50    nav:true,
51    navText: '<>',
52    dots: false,
53    responsive:{
54        0:{
55            items:1
56        },
57        600:{
58            items:3
59        },
60        1000:{
61            items:5
62        }
63    }
64  })
65  
66    $('#strength-carousel').owlCarousel({
67    loop:true,
68    mouseDrag: true,
69    autoplay:true,
70    autoplayTimeout:4000,
71    margin:10,
72    nav:true,
73    navText: '<>',
74    dots: false,
75    responsive:{
76        0:{
77            items:1
78        },
79        600:{
80            items:3
81        },
82        1000:{
83            items:5
84        }
85    }
86  })
87  
88  $('#program-carousel').owlCarousel({
89    loop:true,
90    mouseDrag: true,
91    autoplay:true,
92    autoplayTimeout:4000,
93    margin:10,
94    nav:true,
95    navText: '<>',
96    dots: false,
97    responsive:{
98        0:{
99            items:1
100        },
101        600:{
102            items:3
103        },
104        1000:{
105            items:4
106        }
107    }
108  })
109  
110   $('#coach-carousel').owlCarousel({
111    loop:true,
112    mouseDrag: true,
113    autoplay:true,
114    autoplayTimeout:4000,
115    margin:60,
116    nav:true,
117    navText: '<>',
118    dots: false,
119    responsive:{
120        0:{
121            items:1
122        },
123        600:{
124            items:2
125        },
126        1000:{
127            items:3
128        }
129    }
130  })
131
132
133  
134  $('#dj-carousel').owlCarousel({
135    loop:true,
136    mouseDrag: false,
137    autoplay:false,
138    autoplayTimeout:4000,
139    nav:true,
140    navText: '<>',
141    dots: false,
142    responsive:{
143        0:{
144            items:2
145        },
146        600:{
147            items:3
148        },
149        1000:{
150            items:6
151        }
152    }
153  })
154
155		 
156
157	//------------------------------------//
158	  //WOW Animation//
159	  //------------------------------------//
160	  wow = new WOW(
161	    {
162	      boxClass:     'wow',      // animated element css class (default is wow)
163	      animateClass: 'animated', // animation css class (default is animated)
164	      offset:       0,          // distance to the element when triggering the animation (default is 0)
165	      mobile:       false        // trigger animations on mobile devices (true is default)
166	    }
167	  );
168	  wow.init();
169		
170	
171	
172	//------------------------------------//
173	//Collapse Panel
174	//------------------------------------//
175      $('#nav-expander').on('click',function(e){
176    		e.preventDefault();
177    		$('body').toggleClass('nav-expanded');
178    	});
179    	$('#nav-close').on('click',function(e){
180    		e.preventDefault();
181    		$('body').removeClass('nav-expanded');
182    	});
183    	
184   
185   //------------------------------------//
186	//Accordion
187	//------------------------------------//
188   function toggleChevron(e) {
189          $(e.target)
190              .prev('.panel-heading')
191              .find("i.fa")
192              .toggleClass('fa-minus fa-plus');
193      }
194      $('#accordion').on('hidden.bs.collapse', toggleChevron);
195      $('#accordion').on('shown.bs.collapse', toggleChevron); 	
196    	
197  //------------------------------------//
198	//Profile Animations
199	//------------------------------------//  	
200   $('.user-dj-profile').addClass('intro');
201   $('.profile-add').addClass('intro-add');
202   $('.profile-share').addClass('intro-share');
203   $('.profile-facebook').addClass('intro-facebook');
204   $('.profile-twitter').addClass('intro-twitter');
205   
206   
207  //------------------------------------//
208    //Share Button//
209    //------------------------------------//
210    var shareBtn = $('.share-menu .share-btn');
211    var shareIcons = $('.share-menu .social');
212
213    shareBtn.click(function(e){
214        e.preventDefault();
215        $(this).toggleClass('active');
216        shareIcons.toggleClass('active');
217    });
218    
219    
220    
221  //------------------------------------//
222  //Pop Overs//
223  //------------------------------------// 
224	$( document ).ready(function() {	
225try {
226    $slider = $('<div id="volume">').slider({
227       orientation: 'vertical',
228       range: "max", // <--- needed...
229       min: 0,
230       max: 100,
231       value: 80,
232       slide: function(event, ui) {
233          $("#fit-player").jPlayer("volume", ui.value/100);
234       }
235    });
236}
237catch(err) {
238}
239try {
240$('#volume-popup')
241    .popover({
242        trigger: 'manual',
243        placement: 'top'
244    })
245    .click(function() {
246        var $this = $(this);
247        
248        if ($this.toggleClass('active').hasClass('active')) {
249            $this.popover('show');
250            $('.popover-content')
251                .empty()
252                .append($slider);
253        } else {
254            $slider.detach();
255            $this.popover('hide');
256        }
257    }); 
258}
259catch(err) {
260}	
261     }); 
262		
263	//------------------------------------//
264  //Profile Menu mobile//
265  //------------------------------------//
266    var YTMenu = (function() {
267
268    	function init() {
269    		
270    		[].slice.call( document.querySelectorAll( '.dr-menu' ) ).forEach( function( el, i ) {
271    
272    			var trigger = el.querySelector( 'div.dr-trigger' ),
273    				icon = trigger.querySelector( 'span.dr-icon-menu' ),
274    				open = false;
275    
276    			trigger.addEventListener( 'click', function( event ) {
277    				if( !open ) {
278    					el.className += ' dr-menu-open';
279    					open = true;
280    				}
281    			}, false );
282    
283    			icon.addEventListener( 'click', function( event ) {
284    				if( open ) {
285    					event.stopPropagation();
286    					open = false;
287    					el.className = el.className.replace(/\bdr-menu-open\b/,'');
288    					return false;
289    				}
290    			}, false );
291    
292    		} );
293    
294    	}
295    
296    	init();
297
298    	})();	
299		
300//------------------------------------//
301  //Scroll Animation//
302  //------------------------------------//
303	var $animation_elements = $('.wave, .home-icons, .time-line, .slideLeft');
304	var $window = $(window);
305	
306	function check_if_in_view() {
307		  var window_height = $window.height();
308		  var window_top_position = $window.scrollTop();
309		  var window_bottom_position = (window_top_position + window_height);
310		
311		  $.each($animation_elements, function() {
312		    var $element = $(this);
313		    var element_height = $element.outerHeight();
314		    var element_top_position = $element.offset().top;
315		    var element_bottom_position = (element_top_position + element_height);
316		
317		    //check to see if this current container is within viewport
318		    if ((element_bottom_position >= window_top_position) &&
319		        (element_top_position <= window_bottom_position)) {
320		      $element.addClass('animate');
321		    }
322		  });
323		}
324		
325		$window.on('scroll resize', check_if_in_view);
326		$window.trigger('scroll');
327		
328		
329		
330		
331		//------------------------------------//
332	  //Flipster Cover Flow//
333	  //------------------------------------//
334	  /*if(typeof($("#flat")) !="undefined") {
335				$("#flat").flipster({
336				    style: 'flat',
337				    spacing: -0.0,
338				    nav: true
339				});
340	  }*/
341	
342//------------------------------------//
343//Audio preview//
344//------------------------------------//	
345	$('#playpause').on("click",function(){
346	var audio=document.getElementById('mixpreview');	
347  if($(this).hasClass('fa-play-circle-o'))
348   {
349     $(this).removeClass('fa-play-circle-o');
350     $(this).addClass('fa-pause');
351     audio.play();
352   }
353  else
354   {
355     $(this).removeClass('fa-pause');
356     $(this).addClass('fa-play-circle-o');
357     audio.pause();
358   }
359});			

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.