HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/lesanew/www/wp-content/plugins/neobeat-core/inc/website-song/assets/js/parts/website-song.js
(function ($) {
	"use strict";
	
	$(document).ready(function () {
		qodefWebsiteSong.init();
	});
	
	var qodefWebsiteSong = {
		init: function () {
			var playButton = $('.qodef-website-song');
			
			var audioTrack = playButton.find('audio').get(0);
			
			if (playButton.length){
				playButton.each(function(){
					
					playButton.on('click',function(){
						if(playButton.hasClass('qodef-track-in-progress')){
							audioTrack.pause();
							playButton.addClass('qodef-track-paused').removeClass('qodef-track-in-progress');
							$(".qodef-equalizer-bar").addClass("noAnim");
						}else if(playButton.hasClass('qodef-track-paused')) {
							audioTrack.play();
							playButton.addClass('qodef-track-playing qodef-track-in-progress').removeClass('qodef-track-paused');
							$(".qodef-equalizer-bar").removeClass("noAnim");
						}else{
							audioTrack.play();
							playButton.addClass('qodef-track-playing qodef-track-in-progress');
							$(".qodef-equalizer-bar").removeClass("noAnim");
						}
					});
					
					playButton.find('audio').on("bind","ended", function(){
						audioTrack.play();
					});
				});
				
				qodefWebsiteSong.changeSkin();
			}
		},
		changeSkin: function (){
			var btt = $('.qodef-m-website-song'),
				skinElements = $('.qodef-row-btt-light, #qodef-page-footer:not(.qodef-footer--light)'),
				skinSet = false,
				skinTrigger = new Array();
			
			//Control button skin
			var bttSkin = function() {
				if (skinElements.length) {
					skinElements.each(function(i){
						var skinElement = $(this);
						
						if (qodef.scroll + btt.position().top >= skinElement.offset().top && qodef.scroll + btt.position().top <= skinElement.offset().top + skinElement.outerHeight()) {
							skinTrigger[i] = true;
						} else {
							skinTrigger[i] = false;
						}
					});
					
					if (jQuery.inArray(true, skinTrigger) != -1) {
						if (!skinSet) {
							btt.addClass('qodef-light');
							skinSet = true;
						}
					} else {
						if (skinSet) {
							btt.removeClass('qodef-light');
							skinSet = false;
						}
					}
				}
			}
			
			if (btt.length && skinElements.length) {
				$(document).ready(function (){
					bttSkin();
				});
				$(window).scroll(function() {
					bttSkin();
				});
			}
		}
	};
	
	
})(jQuery);