<!DOCTYPE html>
<html lang="en">
	<head>
		<!-- Title -->
		<title>Home</title>

		<!-- Required Meta Tags Always Come First -->
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<!-- Favicon -->
		<link rel="shortcut icon" href="https://mz3il.com/themes/default/img/icon.png?v=1.4.9" />

		<meta name="title" content="Home">
		<meta name="description" content="يحتوي الموقع على جميع اصدارات الالبومات الرسمية للفنان مزعل فرحان بالاضافة الى الجلسات الخاصة والعامة والمقابلات التلفزيونية">
		<meta name="keywords" content="مزعل فرحان,مزعل,الرسمي,اغاني,شعبي,عملاق الفن,حزن,حزين,البومات مزعل فرحان">


		<link rel="canonical" href="https://mz3il.com" /><link rel="home" href="https://mz3il.com" /><link rel="alternate" href="https://mz3il.com?lang=arabic" hreflang="ar" /><link rel="alternate" href="https://mz3il.com?lang=english" hreflang="en" /><meta property="og:title" content="الفنان مزعل فرحان - عملاق الفن الشعبي"><meta property="og:image" content="https://mz3il.com/themes/default/img/logo.png"><meta property="og:image:width" content="500"><meta property="og:image:height" content="500"><meta property="og:description" content="يحتوي الموقع على جميع اصدارات الالبومات الرسمية للفنان مزعل فرحان بالاضافة الى الجلسات الخاصة والعامة والمقابلات التلفزيونية"><meta property="og:url" content="https://mz3il.com" />

		<!-- Google Fonts -->
		<link href="https://mz3il.com/themes/default/fonts/Roboto.css" rel="stylesheet">
		<link href="https://mz3il.com/themes/default/fonts/Muli.css" rel="stylesheet">

		<script src="https://mz3il.com/themes/default/js/jquery.min.js?v=1.4.9"></script>
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/jquery-ui.css?v=1.4.9">
		<script src="https://mz3il.com/themes/default/js/jquery-ui.min.js?v=1.4.9"></script>
		<!-- CSS -->
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/bootstrap.min.css?v=1.4.9">
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/owl.carousel.min.css?v=1.4.9">
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/style.css?v=1.4.9">
		<script src="https://mz3il.com/themes/default/js/wavesurfer.min.js?v=1.4.9"></script>

		<script type="text/javascript" src="https://mz3il.com/themes/default/js/tag-it.min.js?v=1.4.9"></script>
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/jquery.tagit.css?v=1.4.9">
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/bootstrap-colorpicker.min.css?v=1.4.9" />
		<script src="https://mz3il.com/themes/default/js/bootstrap-colorpicker.min.js?v=1.4.9"></script>
		<script type="text/javascript" src="https://mz3il.com/themes/default/js/fastclick.js?v=1.4.9"></script>
			    <script src="https://accounts.google.com/gsi/client" async defer></script>
	    		<!--  Scripts-->
		<script>
			function ajaxUrl() {
				return 'https://mz3il.com/endpoints';
			}
			function siteUrl() {
				return 'https://mz3il.com/';
			}
		</script>
		<!-- <script src="https://unpkg.com/wavesurfer.js"></script> -->
			    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
	    		<script src="https://mz3il.com/themes/default/js/emojionearea.min.js?v=1.4.9"></script>

		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/emojionearea.min.css?v=1.4.9">
		 <!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KFRNGFN9DH"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-KFRNGFN9DH');
</script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SGSN1BLJV3"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-SGSN1BLJV3');
</script>	    	    		<script>
			window.run_station = null;
            $(document).ready(function() {
                window.init_emojioneArea = function() {
                    $(".comment_input").emojioneArea({
                        useInternalCDN: true,
                        events: {
                            keyup: function (editor, event) {
                            	                            	id = $( $(this)[0].source[0]).attr('data-audio-id');
                                $($(".comment_input")).limit("640", '#charsLeft_'+id);
                                c_id = $( $(this)[0].source[0]).attr('data-comment-id');
                                if ($('#write_comment_'+c_id).length) {
                                	$($('#write_comment_'+c_id)).limit("640", '#charsLeft_r_'+c_id);
                                }
                                                                let emojioneArea = this; //this is instance of EmojioneArea
                                if (event.which === 13 && !event.shiftKey) {
                                    // $scope.onPressKeyTextarea(event);
																	var audioid = $( $(this)[0].source[0]).attr('data-audio-id');
																	var commentid = $( $(this)[0].source[0]).attr('data-comment-id');
																	if(typeof commentid !== 'undefined'){
																		registerCommentreplay(emojioneArea.getText(), audioid, commentid, event, $(this));
																	}else{
																		registerComment(emojioneArea.getText(), audioid, event, $(this));
																	}
                                    emojioneArea.setText('');
                                    emojioneArea.hidePicker();
                                    emojioneArea.editor.focus();
                                    event.preventDefault();
                                }
                            }
                        },
                        search: false,
                        recentEmojis: false,
                        filtersPosition: "bottom",
                        tones: false,
                        autocomplete: false,
                        filters: {animals_nature: false, food_drink: false, activity: false, travel_places: false, objects: false, symbols: false, flags: false}
                    });
                }
				window.init_emojioneArea();

				window.init_emojioneArea_replay = function(id) {
					$('#write_comment_'+id).emojioneArea({
						useInternalCDN: true,
						events: {
							keyup: function (editor, event) {
								let _emojioneArea = this; //this is instance of EmojioneArea
								if (event.which === 13 && !event.shiftKey) {
									var _audioid = $( $(this)[0].source[0]).attr('data-audio-id');
									var _commentid = $( $(this)[0].source[0]).attr('data-comment-id');
										registerCommentreplay(_emojioneArea.getText(), _audioid, _commentid, event, $(this));
										_emojioneArea.setText('');
										_emojioneArea.hidePicker();
										_emojioneArea.editor.focus();
										event.preventDefault();
								}
							}
						},
						search: false,
						recentEmojis: false,
						filtersPosition: "bottom",
						tones: false,
						autocomplete: false,
						filters: {animals_nature: false, food_drink: false, activity: false, travel_places: false, objects: false, symbols: false, flags: false}
					});
				}

				window.init_blogemojioneArea = function() {
                    $(".blog_comment_input").emojioneArea({
                        useInternalCDN: true,
                        events: {
                            keyup: function (editor, event) {
                                let emojioneArea = this; //this is instance of EmojioneArea
                                if (event.which === 13 && !event.shiftKey) {
                                    // $scope.onPressKeyTextarea(event);
									var audioid = $( $(this)[0].source[0]).attr('data-article-id');
                                    registerBlogComment(emojioneArea.getText(), audioid, event, $(this));
                                    emojioneArea.setText('');
                                    emojioneArea.hidePicker();
                                    emojioneArea.editor.focus();
                                    event.preventDefault();
                                }
                            }
                        },
                        search: false,
                        recentEmojis: false,
                        filtersPosition: "bottom",
                        tones: false,
                        autocomplete: false,
                        filters: {animals_nature: false, food_drink: false, activity: false, travel_places: false, objects: false, symbols: false, flags: false}
                    });
                }
                window.init_blogemojioneArea();
            });
		</script>

		<script>
		$(document).ready(function() {
		  $.ajaxSetup({
		    data: {
		        hash_id: getHashID()
		    },
		    cache: false
		  });
		});
		$(window).on("popstate", function () {
			if (history.state.ajax_url) {
				goToAjaxLink(history.state.ajax_url);
			}
		});
		window.search_url = 'https://mz3il.com/search/songs/';
        window.chatfetch = false;
        window.UpdateChatU = 0;
			$(document).on('click', '[data-load]', function(event) {
				$('.xzoom-source').remove();
				$('#buy_ticket_modal').modal('hide');
				if ($(this).attr('data-load') == '') {window.open($(this).attr('href'), '_blank');
					if (parseInt($('.ss_track_play_pause').attr('data_is_ad')) > 0) {
				 		is_sent = 1;
				 		song_id = $('#current-track').attr('value');
				 		onTimesUp(song_id);
				 		return false;
				 	}
					return false;
				}
				  //$('.sections li').removeClass('active');
			      $('#bar_loading').show().animate({width:20 + 80 * Math.random() + "%"}, 200);
			      event.preventDefault();
			      var url = $(this).attr('data-load');
			      $.ajax({
			        url: siteUrl() + '/ajax-load.php?path=' + url,
			        type: 'GET',
			        dataType: 'html'
			      })
			      .done(function(data_html, textStatus, request) {
			      	if (request.status == 201) {
			      		$('#login_box').modal('show');
			      	} else {
			      	    if(window.run_station !== null){
                            window.run_station.pause();
						}
                        data = JSON.parse($(data_html).filter('#json-data').val());



				        window.history.pushState({state:'new', ajax_url: url},'', data.url);

                        if(data.page_name == 'messages'){
                            window.chatfetch = true;
						}else{
                            window.chatfetch = false;
						}

				        if(data.page_name !== 'search'){
				            $('#search_keyword').val('');
						}

				        $('#container_content').html(data_html);
				        $('meta[name=title]').attr('content', data.site_title);
				        $('#page').attr('data-page', data.page_name);
				        $('meta[name=description]').attr('content', data.description);
				        $('meta[name=keywords]').attr('content', data.keyword);
				        $('title').html(data.site_title);
				        if (data.page_name) {
				        	setTimeout(function () {
				        		updateWaves = false;
				        		if ($('#current-track').val()) {
				        			if (Amplitude.getActiveSongMetadata().id == $('#current-track').val()) {
					        			updateWaves = true;
					        		} else {
					        			$('body').removeClass('player_running');
					        		}
				        		} else {
				        			updateWaves = true;
				        		}
				        		if (updateWaves == true) {
				        			var getCurrentPlaying = Number($('.amplitude-song-played-progress').attr('value')) * 100;
					        		$('#light-wave').width(getCurrentPlaying + '%');
					        		updateWaveForm();
				        		}
				        	}, 100);
				        	if( data.page_name == 'blogs' ){
                                window.search_url = 'https://mz3il.com/blogs/tag/';
							}
				        }
				        if (Amplitude.getActiveSongMetadata().id && $('#page').attr('data-page') == 'track') {
				        	if (Amplitude.getActiveSongMetadata().id == $('#current-track').val()) {
				        		$('body').addClass('player_running');
				        	}
				        }
				        if (Amplitude.getActiveSongMetadata().u_id && $('#page').attr('data-page') != 'track') {
				        	$('.playlist-list-song[data-id=' + Amplitude.getActiveSongMetadata().u_id + ']').addClass('playing');
				        	$('.list-recommended[data-id=' + Amplitude.getActiveSongMetadata().u_id + ']').addClass('playlist-list-song playing');
				        	if ($('.feed_post[data-id="' + Amplitude.getActiveSongMetadata().u_id + '"]').length > 0) {
				        		$.get('https://mz3il.com/endpoints/get-song-info', {id: Amplitude.getActiveSongMetadata().id}, function(data) {
				        			if (data.status == 200) {
				        				$('body').attr('song-duration', data.duration);
				        				if (data.songWaves.length > 0) {
											$('.feed_post[data-id="' + data.songID + '"]:first').find('.waveform-small').html(data.songWaves);
											$('#light-wave img').width($('#dark-wave').width() + 'px');
											$('.feed_post[data-id="' + data.songID + '"]:first').find('.post-actions').removeClass('hidden');
											$('.feed_post[data-id="' + data.songID + '"]:first').find('.ssong_comments').removeClass('hidden');
											$('.feed_post[data-id="' + data.songID + '"]:first').find('.art-info').removeClass('hidden');
				    						$('.feed_post[data-id="' + data.songID + '"]:first').find('.comment_list').html(data.comments);
				    						$('.feed_post[data-id="' + data.songID + '"]:first').find('.comment-waves').html(data.waves);
				    						var getCurrentPlaying = Number($('.amplitude-song-played-progress').attr('value')) * 100;
					        		        $('#light-wave').width(getCurrentPlaying + '%');
				    						updateWaveForm();
										}
				        			}
				        		});
				        	}
				        }
                        $('#music-user-ads-table').find('[type="checkbox"]').each(function(index, el) {
                            $(el).bootstrapToggle();
                        });

                        if( data.page_name === 'station'){
                            setTimeout(function () {
                            	$('body').addClass('player_running');
                            }, 100);
                        }

			      	}

			      })
			      .fail(function() {
			         window.location.href = siteUrl()+'/404';
			      })
			      .always(function() {
			      	if (typeof data !== 'undefined') {
			      		if (data.page_name == 'user' && data.scroll == true) {
				        	$('html,body').animate({
						        scrollTop: $('#myTab').offset().top - 350
						    });
				        } else {
				        	$('html,body').animate({
						        scrollTop: $('body').offset().top
						    });
				        }
                        window.init_emojioneArea();
			      	}
			        $('#bar_loading').animate({width:"100%"}, 200).fadeOut(300, function() {
			           $(this).width("0");
			        });
			      });
			  });
			window.artist_sell = 'off';
			var video_player;
		</script>

		<script src="https://mz3il.com/themes/default/js/header.js?2961"></script>

		
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/custom.style.css?3782" id="custom.style.css">
				<link rel="stylesheet" href="https://mz3il.com/themes/default/css/rtl.style.css?v=1.4.9">
				<link rel="stylesheet" href="https://mz3il.com/themes/default/js/lib/sweetalert2/dist/sweetalert2.min.css?v=1.4.9">
		<link rel="stylesheet" type="text/css" href="https://mz3il.com/themes/default/css/dataTables.bootstrap4.min.css?v=1.4.9">
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/bootstrap-select.min.css?v=1.4.9">
		<style>

</style>

		<style>
			.ui-menu-item img { padding-right: 10px; width: 32px; height: 32px; }
			.ui-menu-item span { color: #444; font-size: 12px; vertical-align: top }
		</style>

						<script src="https://mz3il.com/themes/default/js/plyr.polyfilled.js?v=1.4.9"></script>
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/plyr.css?v=1.4.9" />
								
		<link rel="stylesheet" href="https://mz3il.com/themes/default/css/swiper-bundle.min.css?v=1.4.9" />

		<script src="https://mz3il.com/themes/default/js/swiper-bundle.min.js?v=1.4.9"></script>
	</head>

	<body class="" data-lang="rtl">
			<div class="music_app">
			<div class="ma_container" id="page" data-page="404">
				<!-- Start Sidebar  -->
				<div class="ma_sidebar">
	<div class="sidebar">
		<div class="logo_container">
			<a href="https://mz3il.com" >
								<img src="https://mz3il.com/themes/default/img/logo.png?cache=216" alt="">
							</a>
		</div>
		<div class="sidebar_innr" data-simplebar>
			<ul class="sections">
				<h3>استعراض الموسيقي</h3>
				
				<li class="">
					<a href="https://mz3il.com">
						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,5V7H15V5H19M9,5V11H5V5H9M19,13V19H15V13H19M9,17V19H5V17H9M21,3H13V9H21V3M11,3H3V13H11V3M21,11H13V21H21V11M11,15H3V21H11V15Z"></path><path class="active_path" fill="currentColor" d="M4 13h6c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1zm0 8h6c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm10 0h6c.55 0 1-.45 1-1v-8c0-.55-.45-1-1-1h-6c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1zM13 4v4c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1h-6c-.55 0-1 .45-1 1z"></path></svg>
						الصفحة الرئيسية
					</a>
				</li>
				
								<li class="">
					<a href="https://mz3il.com/up">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M15 4.582V12a3 3 0 1 1-2-2.83V2.05c5.053.501 9 4.765 9 9.95 0 5.523-4.477 10-10 10S2 17.523 2 12c0-5.185 3.947-9.449 9-9.95v2.012A8.001 8.001 0 0 0 12 20a8 8 0 0 0 3-15.418z"/><path d="M13 9.17A3 3 0 1 0 15 12V2.458c4.057 1.274 7 5.064 7 9.542 0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2c.337 0 .671.017 1 .05v7.12z" class="active_path" fill="currentColor"></path></svg>
						مركز التحميل
					</a>
				</li>
								<li class="">
					<a href="https://mz3il.com/genres" data-load="genres">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M12,18.54L19.37,12.8L21,14.07L12,21.07L3,14.07L4.62,12.81L12,18.54M12,16L3,9L12,2L21,9L12,16M12,4.53L6.26,9L12,13.47L17.74,9L12,4.53Z"></path>
						</svg>
						الاقسام الفنية
					</a>
				</li>
				
				<li class="">
					<a href="https://mz3il.com/discover" data-load="discover">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M21,3V15.5A3.5,3.5 0 0,1 17.5,19A3.5,3.5 0 0,1 14,15.5A3.5,3.5 0 0,1 17.5,12C18.04,12 18.55,12.12 19,12.34V6.47L9,8.6V17.5A3.5,3.5 0 0,1 5.5,21A3.5,3.5 0 0,1 2,17.5A3.5,3.5 0 0,1 5.5,14C6.04,14 6.55,14.12 7,14.34V6L21,3Z"></path>
						</svg>
						الاكثر استماعا
					</a>
				</li>
				<li class="">
					<a href="https://mz3il.com/new_music" data-load="new_music">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M12,3V12.26C11.5,12.09 11,12 10.5,12C8,12 6,14 6,16.5C6,19 8,21 10.5,21C13,21 15,19 15,16.5V6H19V3H12Z"></path>
						</svg>
						الجديد والحديث
					</a>
				</li>
				<li class="">
					<a href="https://mz3il.com/top_music" data-load="top_music">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M16,11.78L20.24,4.45L21.97,5.45L16.74,14.5L10.23,10.75L5.46,19H22V21H2V3H4V17.54L9.5,8L16,11.78Z"></path>
						</svg>
						الافضل والاشهر
					</a>
				</li>
				<li class="">
					<a href="https://mz3il.com/albums" data-load="albums">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M4,6H2V20A2,2 0 0,0 4,22H18V20H4M18,7H15V12.5A2.5,2.5 0 0,1 12.5,15A2.5,2.5 0 0,1 10,12.5A2.5,2.5 0 0,1 12.5,10C13.07,10 13.58,10.19 14,10.5V5H18M20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2Z"></path></svg> الالبومات والجلسات
					</a>
				</li>
				<li class="">
					<a href="https://mz3il.com/spotlight" data-load="spotlight">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path>
						</svg>
						سبوت لايت
					</a>
				</li>

				<li class="">
					<a href="https://mz3il.com/playlists" data-load="playlists">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M19,9H2V11H19V9M19,5H2V7H19V5M2,15H15V13H2V15M17,13V19L22,16L17,13Z"></path>
						</svg>
						قوائم التشغيل
					</a>
				</li>
									<li class="">
						<a href="https://mz3il.com/fame" data-load="fame">
							<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bar-chart"><line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line></svg>
							الاعضاء المميزون
						</a>
					</li>
								
							</ul>

			<ul class="sections">
											</ul>

			<ul class="sections">
				<h3>الموسيقى الخاصة بك</h3>
				<li  class="">
					<a href="https://mz3il.com/recently_played" data-load="recently_played">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3"></path>
						</svg>
						تم الاستماع اليها حديثا
					</a>
				</li>
				<li  class="">
					<a href="https://mz3il.com/my_playlists" data-load="my_playlists">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"></path>
						</svg>
						قوائم التشغيل الخاصة بي
					</a>
				</li>
				<li class="">
					<a href="https://mz3il.com/favourites" data-load="favourites">
						<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
							<path fill="currentColor" d="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z"></path>
						</svg>
						المفضلة
					</a>
				</li>
			</ul>
						<div class="ma_footer">
				<p style="text-align:center">
  التسجيل المجاني في الموقع متاح لفترة محدودة
</p>
				<div class="ma_footer_cright">
					© 2026 الفنان مزعل فرحان - عملاق الفن الشعبي					<div class="lang_select dropup">
						<button type="button" class="btn dropdown-toggle" data-toggle="modal" data-target="#select-language">Arabic</button>
					</div>
				</div>
				<div class="ma_footer_links">
								<a href="https://www.facebook.com/mz3ilcom" target="_blank" class="bold">
				<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12.001 2.002c-5.522 0-9.999 4.477-9.999 9.999 0 4.99 3.656 9.126 8.437 9.879v-6.988h-2.54v-2.891h2.54V9.798c0-2.508 1.493-3.891 3.776-3.891 1.094 0 2.24.195 2.24.195v2.459h-1.264c-1.24 0-1.628.772-1.628 1.563v1.875h2.771l-.443 2.891h-2.328v6.988C18.344 21.129 22 16.992 22 12.001c0-5.522-4.477-9.999-9.999-9.999z"></path></svg> • 
			</a>
							<a href="http://x.com/mz3ilcom" target="_blank" class="bold">
				<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.633 7.997c.013.175.013.349.013.523 0 5.325-4.053 11.461-11.46 11.461-2.282 0-4.402-.661-6.186-1.809.324.037.636.05.973.05a8.07 8.07 0 0 0 5.001-1.721 4.036 4.036 0 0 1-3.767-2.793c.249.037.499.062.761.062.361 0 .724-.05 1.061-.137a4.027 4.027 0 0 1-3.23-3.953v-.05c.537.299 1.16.486 1.82.511a4.022 4.022 0 0 1-1.796-3.354c0-.748.199-1.434.548-2.032a11.457 11.457 0 0 0 8.306 4.215c-.062-.3-.1-.611-.1-.923a4.026 4.026 0 0 1 4.028-4.028c1.16 0 2.207.486 2.943 1.272a7.957 7.957 0 0 0 2.556-.973 4.02 4.02 0 0 1-1.771 2.22 8.073 8.073 0 0 0 2.319-.624 8.645 8.645 0 0 1-2.019 2.083z"></path></svg> • 
			</a>
													                      <a href="https://mz3il.com/blogs" data-load="blogs">الاخبار</a> • 
                                        <a href="https://mz3il.com/terms/about" data-load="terms/about">معلومات عنا</a> • 
                                                            <a href="https://mz3il.com/terms/terms" data-load="terms/terms">شروط</a> • 
                                        <a href="https://mz3il.com/contact" data-load="contact">اتصل</a> • 
                                        <a href="https://mz3il.com/terms/privacy" data-load="terms/privacy">سياسة الخصوصية</a> • 
                                        <a href="https://mz3il.com/terms/faqs" data-load="terms/faqs">faqs</a>
                                        				</div>
			</div>
		</div>
	</div>
</div>
<script>
function OpenStoreMenu(self) {
	$(self).find('span').find('svg').remove();
	if ($(".mystore_menu").is(":visible")) {
		$(".mystore_menu").slideUp();
		$(self).find('span').append('<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>');
	}
	else{
		$(".mystore_menu").slideDown();
		$(self).find('span').append('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="15" height="15" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"><path d="M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" fill="currentColor"/></svg>');
	}
}
$(document).on('click', '.sidebar .sidebar_innr a', function() {
	$('body').removeClass('side_open');
});
</script>

				<!-- End Sidebar  -->

				<!-- Header  -->
				<div id="main-header">
					<html>
<head>	
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PRVMWD3J');</script>
<!-- End Google Tag Manager -->
</head>	
<header>
<body>	
	
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PRVMWD3J"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->	
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6659210678596680"
     crossorigin="anonymous"></script></body>
	<div class="head_menu" id="open_slide">
		<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" /></svg>
	</div>
	<div class="head_logo">
		<a href="https://mz3il.com/">
						<img src="https://mz3il.com/themes/default/img/logo.png?cache=216" alt="">
					</a>
	</div>
	<div class="head_search">
		<form onSubmit="event.preventDefault();window.location = window.search_url + $('#search_keyword').val();">
    <!--action="https://mz3il.com/search/songs" method="POST" >-->
	<div class="head_search_cont">
		<input name="search_keyword" id="search_keyword" value="" type="text" class="form-control" placeholder="البحث عن الأغاني والالبومات وقوائم التشغيل والمزيد .." onfocus="Ma_OpenTrending();" autocomplete="off"/>
		<div class="head_search_mobi_close" id="close_search">
			<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
		</div>
		<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /></svg>
		<div class="search_dropdown hidden">
			<div data-simplebar>
				<div class="trend_head"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#2196f3" d="M16,6L18.29,8.29L13.41,13.17L9.41,9.17L2,16.59L3.41,18L9.41,12L13.41,16L19.71,9.71L22,12V6H16Z" /></svg> تتجه الآن</div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/عود" data-load="search/songs/عود">عود</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/الحب" data-load="search/songs/الحب">الحب</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/البومات" data-load="search/songs/البومات">البومات</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/الحكاية" data-load="search/songs/الحكاية">الحكاية</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/يبيحك" data-load="search/songs/يبيحك">يبيحك</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/باملا" data-load="search/songs/باملا">باملا</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/وردة" data-load="search/songs/وردة">وردة</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/حكاية" data-load="search/songs/حكاية">حكاية</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/بقايا" data-load="search/songs/بقايا">بقايا</a></div>
									<div class="serach_trend"><a href="https://mz3il.com/search/songs/دموعك" data-load="search/songs/دموعك">دموعك</a></div>
								<div class="text-center see_all">
					<a href="https://mz3il.com/search/songs" data-load="search/songs"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"></path></svg> البحث المتقدم</a>
				</div>
			</div>
		</div>
	</div>
</form>
	</div>
	<div class="head_user not_loggd_hdrr">
		<div class="head_search_mobi" id="open_search">
			<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z" /></svg>
		</div>
		<a href="#" data-toggle="modal" data-target="#login_box" class="btn login hide_hd_btn">تسجيل الدخول</a>
				<a href="#" data-toggle="modal" data-target="#signup_box" class="btn btn-primary btn-mat hide_hd_btn">تسجيل</a>
				<span class="opts_head_acc dropdown">
			<svg data-display="static" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"></path></svg>
			<div class="dropdown-menu dropdown-menu-right mat-dropdown">
				<ul class="list-unstyled mb-0">
					<li><a href="#" data-toggle="modal" data-target="#login_box">تسجيل الدخول</a></li>
										<li><a href="#" data-toggle="modal" data-target="#signup_box">تسجيل</a></li>
									</ul>
			</div>
		</span>
	</div>
</header>
</html>
				</div>
				<div id="bar_loading"></div>
				<!-- End Header  -->

				<!-- Content  -->
				<div id="container_content">
					<div class="ma_page_content">
	<div class="ma_pc_inner">
		<div class="container">
			<div class="content">
				<div class="text-center ma_404">
					<h3 class="light">عذرا، لم يتم العثور على الصفحة!</h3>
					<section>
						<span class="four">4</span>
						<span class="zero"><svg height="112px" viewBox="0 0 512 512" width="112px" xmlns="http://www.w3.org/2000/svg"><path d="m256 130.300781-75 24.898438v181.800781c-8.699219-3.601562-18.898438-6-30-6-33.601562 0-60 19.800781-60 45s26.398438 45 60 45 60-19.800781 60-45v-139.199219l45-15 105-35.101562v90.300781c-8.699219-3.601562-18.898438-6-30-6-33.601562 0-60 19.800781-60 45s26.398438 45 60 45 60-19.800781 60-45v-230.699219zm0 0" fill="#5a5a5a"/><path d="m391 85.300781v230.699219c0 25.199219-26.398438 45-60 45s-60-19.800781-60-45 26.398438-45 60-45c11.101562 0 21.300781 2.398438 30 6v-90.300781l-105 35.101562v-91.5zm0 0" fill="#444"/><path d="m256 0c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256zm0 482c-124.199219 0-226-101.5-226-226 0-55.199219 20.800781-107.101562 56.800781-147.898438l317.097657 317.097657c-40.796876 36-92.699219 56.800781-147.898438 56.800781zm169.199219-78.101562-317.097657-317.097657c40.796876-36 92.699219-56.800781 147.898438-56.800781 124.199219 0 226 101.5 226 226 0 55.199219-20.800781 107.101562-56.800781 147.898438zm0 0" fill="#ffa342"/><path d="m512 256c0 141-115 256-256 256v-30c55.199219 0 107.101562-20.800781 147.898438-56.800781l-147.898438-147.898438v-42.601562l169.199219 169.199219c36-40.796876 56.800781-92.699219 56.800781-147.898438 0-124.5-101.800781-226-226-226v-30c141 0 256 115 256 256zm0 0" fill="#f98f1d"/></svg></span>
						<span class="four">4</span>
					</section>
					<p>لا يمكن العثور على الصفحة التي تبحث عنها. يرجى التحقق من الرابط الذي اتبعته للوصول إلى هنا والمحاولة مرة أخرى.</p>
					<a href="https://mz3il.com/home" class="btn btn-primary btn-mat">الصفحة الرئيسية</a>
				</div>
			</div>
		</div>
	</div>
</div>
				</div>
				<!-- End Content  -->
			</div>
			<!-- Player  -->
			<div class="ma_player closed">
	<div class="player">
		<div class="player-video-preview" id="my_video_player_container">
			<div class="y_player_cover"></div>
			<div class="plyr__video-embed" id="my_video_player_">
			  <iframe
			    src="https://www.youtube.com/watch?v=rMHx_iUAGd0?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1"
			    allowfullscreen
			    allowtransparency
			    allow="autoplay"
			  ></iframe>
			</div>
		</div>
		<div class="song_details">
			<div class="song_details_inner player-song-url" data-load="">
				<div class="song_art">
					<a href="#" class="player-song-url" data-load=""><img amplitude-song-info="cover_art_url" amplitude-main-song-info="true"/></a>
				</div>
				<div class="song_title">
					<a href="#" class="player-song-url" data-load="">
						<h3 amplitude-song-info="name" amplitude-main-song-info="true" class="song_name">Ganja Burns</h3>
					</a><!-- 
					<a href="single_album.php" class="hide_mobi_alb_nm">
						<p amplitude-song-info="album" amplitude-main-song-info="true"></p>
					</a> -->
					<div class="song_time_sec">
						<span class="current_time">
						<span class="amplitude-current-hours" amplitude-main-current-hours="true"></span>:<span class="amplitude-current-minutes" amplitude-main-current-minutes="true"></span>:<span class="amplitude-current-seconds" amplitude-main-current-seconds="true"></span>
						</span>
						<span class="duration_seperate">/</span>
						<span class="duration_time">
						<span class="amplitude-duration-hours" amplitude-main-duration-hours="true"></span>:<span class="amplitude-duration-minutes" amplitude-main-duration-minutes="true"></span>:<span class="amplitude-duration-seconds" amplitude-main-duration-seconds="true"></span>
						</span>
					</div>
				</div>
				<div class="song_fav" title="Favorite" id="song-fav-button"></div>
			</div>
		</div>
		<div class="song_progress">
			<div class="song_controls">
				<div class="amplitude-prev" id="previous">
					<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
						<path fill="currentColor" d="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z" />
					</svg>
				</div>
				<div class="amplitude-play-pause" amplitude-main-play-pause="true" id="play-pause"></div>
				<div class="amplitude-next" id="next">
					<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
						<path fill="currentColor" d="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" />
					</svg>
				</div>
				<div class="amplitude-stop" id="stop">
					<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
						<path fill="currentColor" d="M18,18H6V6H18V18Z" />
					</svg>
				</div>
			</div>
			<div class="song_time">
				<span class="current_time">
				<span class="amplitude-current-hours" amplitude-main-current-hours="true"></span>:<span class="amplitude-current-minutes" amplitude-main-current-minutes="true"></span>:<span class="amplitude-current-seconds" amplitude-main-current-seconds="true"></span>
				</span>
				<div class="song_prog_mobi">
					<div class="progress_container">
						<input type="range" class="amplitude-song-slider" amplitude-main-song-slider="true"/>
						<progress id="song-played-progress" class="amplitude-song-played-progress" amplitude-main-song-played-progress="true"></progress>
						<progress id="song-buffered-progress" class="amplitude-buffered-progress" value="0"></progress>
					</div>
				</div>
				<span class="duration_seperate">/</span>
				<span class="duration_time">
				<span class="amplitude-duration-hours" amplitude-main-duration-hours="true"></span>:<span class="amplitude-duration-minutes" amplitude-main-duration-minutes="true"></span>:<span class="amplitude-duration-seconds" amplitude-main-duration-seconds="true"></span>
				</span>
			</div>
		</div>
		<div class="song_progress_right">
			<div class="song_volume">
				<div class="volume_controls">
					<div class="amplitude-mute amplitude-not-muted"></div>
					<div class="plyr_vol_mobi">
						<input type="range" class="amplitude-volume-slider"/>
						<div class="ms-range-fix"></div>
					</div>
				</div>
			</div>
			<div class="song_rs_controls">
				<div class="repeat_container">
					<div class="amplitude-repeat amplitude-repeat-on" id="repeat" title="كرر">
						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
							<path fill="currentColor" d="M17,17H7V14L3,18L7,22V19H19V13H17M7,7H17V10L21,6L17,2V5H5V11H7V7Z" />
						</svg>
					</div>
					<div class="amplitude-shuffle amplitude-shuffle-off" id="shuffle" title="خلط">
						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
							<path fill="currentColor" d="M14.83,13.41L13.42,14.82L16.55,17.95L14.5,20H20V14.5L17.96,16.54L14.83,13.41M14.5,4L16.54,6.04L4,18.59L5.41,20L17.96,7.46L20,9.5V4M10.59,9.17L5.41,4L4,5.41L9.17,10.58L10.59,9.17Z" />
						</svg>
					</div>
					<div class="amplitude-playback-speed amplitude-playback-speed-10"></div>
				</div>
			</div>
			<div class="song_queue" onclick="Ma_ShowQueue();">
				<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
					<path fill="currentColor" d="M18 5v8.333c-.455-.216-.957-.346-1.493-.346-1.934 0-3.507 1.573-3.507 3.507S14.573 20 16.507 20s3.507-1.573 3.507-3.507c0-.177-.027-.347-.053-.517H20V6h2V4h-3C18.447 4 18 4.448 18 5zM2 5H16V7H2z"/>
					<path fill="currentColor" d="M2 9H16V11H2zM2 13H11V15H2zM2 17H11V19H2z"/>
				</svg>
			</div>
		</div>
		<div class="ma_player_playlist" data-simplebar>
			<div class="queue_head">
				<h4>طابور</h4>
				<span onclick="clearQueues();">مسح</span>
			</div>
			<div id="queue-list">
							</div>
			<!-- <div class="song amplitude-song-container amplitude-play-pause" amplitude-song-index="1">
				<div class="song_icon_container">
					<img class="now-playing" src="https://521dimensions.com/img/open-source/amplitudejs/album-art/ask-the-dust.jpg"/>
				</div>
				<span class="song_duration">3:16</span>
				<div class="song_meta_data">
					<span class="song_title">The Gun</span>
					<span class="song_artist">Lorn</span>
				</div>
			</div>
			<div class="song amplitude-song-container amplitude-play-pause" amplitude-song-index="2">
				<div class="song_icon_container">
					<img class="now-playing" src="https://521dimensions.com/img/open-source/amplitudejs/album-art/anvil.jpg"/>
				</div>
				<span class="song_duration">3:32</span>
				<div class="song_meta_data">
					<span class="song_title">Anvil</span>
					<span class="song_artist">Lorn</span>
				</div>
			</div> -->
			
		</div>
	</div>
</div>
			<!-- End Player  -->
		</div>

		<!-- Login Modal  -->
		<!-- Modal -->
<div class="modal fade" id="login_box" tabindex="-1" role="dialog" aria-labelledby="login_box" aria-hidden="true">
	<div class="modal-dialog auth_box" role="document">
		<div class="modal-content">
			<div class="left_combo" style="background-image: url(https://mz3il.com/themes/default/img/music2.svg);">
				<h2>تسجيل الدخول</h2>
				<p>احصل على حق الوصول إلى الموسيقى وقوائم التشغيل والحساب</p>
			</div>
			<div class="right_combo">
				<div class="alert alert-danger alert-empty" id="output-errors"></div>
				<form method="post" action="" method="POST" id="login-form">
					<div class="form-group mat_input">
						<input type="text" class="form-control" placeholder="اسم المستخدم" autofocus name="username">
					</div>
					<div class="form-group mat_input">
						<input type="password" class="form-control" placeholder="كلمه السر" name="password">
					</div>
					<div class="forgot_password">
						<a href="https://mz3il.com/forgot-password">نسيت رقمك السري؟</a>
					</div>
					<input type="hidden" name="last_url" class="login_last_url">
					<button type="submit" class="btn btn-primary btn-mat" id="btn-submit">تسجيل الدخول</button>
											<div class="remember_me">
							<input type="checkbox" name="remember_device" id="remember_device" checked>
							<label for="remember_device"> 
								تذكرني
							</label>
							<div class="clear"></div>
						</div>
									</form>
								<div class="signup_">
					<span>ليس لديك حساب؟</span>
					<a href="#" data-dismiss="modal" data-toggle="modal" data-target="#signup_box">سجل</a>
				</div>
												<div class="text-center">
					<span class="u_divider">أو</span>
				</div>
								<div class="ma_social_login">
																																																																		<div id="buttonDiv"></div>
									</div>
			</div>
		</div>
	</div>
</div>

<script>
$(document).ready(function() { 
		function handleCredentialResponse(response) {
	   var id_token = response.credential;
	   $.post("https://mz3il.com/endpoints/auth/google_login?hash_id=" + getHashID(), {id_token: id_token}, function(data, textStatus, xhr) {
	    if (data.status == 200) {
            setTimeout(function () {
            	window.location.href = data.location;
            }, 1000);
	    }
	    else{
	    	$('#output-errors').html(data.message);
	    }
	   });
	}
	window.onload = function () {
	  google.accounts.id.initialize({
	    client_id: "590081848336-9vsat3m5bmfkcfinsopk8ol2cqbf2nei.apps.googleusercontent.com",
	    callback: handleCredentialResponse
	  });
	  google.accounts.id.renderButton(
	    document.getElementById("buttonDiv"),
	    { theme: "outline", size: "large" }  // customization attributes
	  );
	  google.accounts.id.prompt(); // also display the One Tap dialog
	}
	


    var options = { 
    	url: "https://mz3il.com/endpoints/auth/login?hash_id=" + getHashID(),
        beforeSubmit:  function () {
        	$('#output-errors').empty();
        	$("#btn-submit").text("ارجوك انتظر..");
        }, 
        success: function (data) {
        	$("#btn-submit").text("تسجيل الدخول");
        	if (data.status == 200) {
        		if (data.last_url) {
        			window.location.href = data.last_url;
        			return false;
        		}
        		if ($('#page').attr('data-page') != 'home' && $('#page').attr('data-page') != 'forgot' && $('#page').attr('data-page') != 'reset') {
        			$('#main-header').html(data.header);
        			$('#login_box').modal('hide');
        			if (Amplitude.getActiveSongMetadata().price > 0) {
        				location.href = window.location.href;
        			} else {
        				location.href = window.location.href;
        			}
        		} else {
        			location.href = window.location.href;
        		}
        	} else if (data.status == 400) {
        		var errros = data.errors.join("<br>");
        		$('#output-errors').html(errros);
        	} else if (data.status == 600) {
                location.href = data.location;
            }
        }
    }; 

    $('#login-form').ajaxForm(options); 
}); 


</script>
		<!-- End Login Modal  -->

		<!-- Signup Modal  -->
		<!-- Modal -->
<div class="modal fade" id="signup_box" tabindex="-1" role="dialog" aria-labelledby="signup_box" aria-hidden="true">
	<div class="modal-dialog auth_box" role="document">
		<div class="modal-content">
			<div class="left_combo" style="background-image: url(https://mz3il.com/themes/default/img/music2.svg);">
				<h2>سجل</h2>
				<p>احصل على حق الوصول إلى الموسيقى وقوائم التشغيل والحساب</p>
			</div>
			<div class="right_combo">
				<div class="alert alert-danger alert-empty" id="output-singup-errors"></div>
				<form method="post" action="POST" id="signup-form">
										<div class="form-group mat_input">
						<input type="text" name="name" class="form-control" placeholder="الاسم الكامل" autofocus>
					</div>
					<div class="form-group mat_input">
						<input type="text" name="username" class="form-control" placeholder="اسم المستخدم">
					</div>
									<div class="form-group mat_input">
						<input type="email" name="email" class="form-control" placeholder="عنوان بريد الكتروني">
					</div>
					<div class="form-group mat_input">
						<input type="password" name="password" class="form-control" placeholder="كلمه السر" id="password">
											</div>
					<div class="form-group mat_input">
						<input type="password" name="c_password" class="form-control" placeholder="تأكيد كلمة المرور">
					</div>
										<div class="recaptcha">
												<div class="g-recaptcha" data-sitekey="6LdQiMcpAAAAAHSqZ4j3Cd6d79CP3U6-i9otxKog"></div><br>
											</div>
					<button type="submit" class="btn btn-primary btn-mat" id="btn-singup-submit">سجل</button>
				</form>
				<div class="signup_">
					<span>هل لديك حساب؟</span>
					<a href="#" data-dismiss="modal" data-toggle="modal" data-target="#login_box">تسجيل الدخول</a>
				</div>
				<div class="terms_check">
					<span>بالتسجيل ، أنت توافق على موقعنا</span>
					<a href="https://mz3il.com/terms/terms">شروط</a>
					<span>و</span>
					<a href="https://mz3il.com/terms/privacy">سياسة الخصوصية</a>
				</div>
			</div>
		</div>
	</div>
</div>

<style>
.auth_box .modal-content {
	min-height: 560px;
}
</style>
<script>
$(document).ready(function() { 
    var options = { 
    	url: "https://mz3il.com/endpoints/auth/signup?hash_id=" + getHashID()+ '',
        beforeSubmit:  function () {
        		      	$('#output-singup-errors').removeClass("alert-success").addClass('alert-danger');
        	$('#output-singup-errors').empty();
        	$("#btn-singup-submit").text("ارجوك انتظر..");
	              }, 
        success: function (data) {
        	$("#btn-singup-submit").text("سجل");
        	if (data.status == 200) {

                if( typeof data.link !== "undefined" ){
                    location.href = 'https://mz3il.com';
                }

        		if ($('#page').attr('data-page') != 'home' && $('#page').attr('data-page') != 'forgot' && $('#page').attr('data-page') != 'reset') {
        			$('#main-header').html(data.header);
        			$('#signup_box').modal('hide');

        			if (Amplitude.getActiveSongMetadata().price > 0) {
        				location.href = 'https://mz3il.com/interest';//window.location.href;
        			} else {
        				ajaxRedirect('interest');
        			}
        		} else {
        			location.href = 'https://mz3il.com/interest';//window.location.href;
        		}
        	} else if (data.status == 400) {
        		var errros = data.errors.join("<br>");
        		$('#output-singup-errors').html(errros);
        	} else if (data.status == 403) {
        		$('#output-singup-errors').removeClass("alert-danger").addClass('alert-success');
        		$('#output-singup-errors').html(data.message);
        	}
        }
    }; 

    $('#signup-form').ajaxForm(options); 
}); 
</script>
		<!-- End Signup Modal  -->

		<!-- Modals -->
		<div class="modal fade" id="delete-song" tabindex="-1" role="dialog" aria-labelledby="delete-song" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">حذف المسار الخاص بك</h5>
			</div>
			<div class="modal-body">
				هل تريد بالتأكيد حذف هذا المسار؟
			</div>	
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
				<button type="button" class="btn btn-danger btn-mat" onclick="deleteSong();">حذف</button>
			</div>
		</div>
	</div>
</div>		<div class="modal fade" id="delete-comment" tabindex="-1" role="dialog" aria-labelledby="delete-comment" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">حذف تعليق</h5>
			</div>
			<div class="modal-body">
				هل أنت متأكد أنك تريد حذف هذا التعليق؟
			</div>	
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
				<button type="button" class="btn btn-danger btn-mat" onclick="deleteComment();">حذف</button>
			</div>
		</div>
	</div>
</div>

<div class="modal fade" id="delete-comment-replay" tabindex="-1" role="dialog" aria-labelledby="delete-comment-replay" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">حذف تعليق</h5>
			</div>
			<div class="modal-body">
				هل أنت متأكد أنك تريد حذف هذا التعليق؟
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
				<button type="button" class="btn btn-danger btn-mat" onclick="deleteCommentReplay(this);">حذف</button>
			</div>
		</div>
	</div>
</div>		<div class="modal fade" id="delete-post" tabindex="-1" role="dialog" aria-labelledby="delete-post" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">حذف مشاركتك</h5>
			</div>
			<div class="modal-body">
				هل أنت متأكد أنك تريد حذف هذه المشاركة؟
			</div>	
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
				<button type="button" class="btn btn-danger btn-mat" onclick="deletePost();">حذف</button>
			</div>
		</div>
	</div>
</div>		<div class="modal fade" id="reposted" tabindex="-1" role="dialog" aria-labelledby="reposted" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-body">
				<div class="no-track-found" style="padding: 30px 10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> تمت مشاركة الأغنية بنجاح على الجدول الزمني الخاص بك.</div>
			</div>	
		</div>
	</div>
</div>		<div class="modal fade" id="purchase-song" role="dialog" aria-labelledby="purchase-song" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">شراء المطلوبة</h5>
			</div>
			<div class="modal-body">
				لمتابعة الاستماع إلى هذا المسار ، تحتاج إلى شراء الأغنية.
			</div>	
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
				<button type="button" class="btn btn-primary btn-mat" onclick="purchaseTrack($(this));">شراء ﷼<span class="price"></span></button>
			</div>
		</div>
	</div>
</div>		<div class="modal fade" id="age-restricted" role="dialog" aria-labelledby="age-restricted" aria-hidden="true" data-id="0">
	<div class="modal-dialog mat_box" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">العمر مقيد المسار</h5>
			</div>
			<div class="modal-body">
				هذا المسار مقيد بحسب العمر للمشاهدين دون سن 18 عامًا, إنشاء حساب أو تسجيل الدخول لتأكيد عمرك.			</div>	
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">اغلاق</button>
			</div>
		</div>
	</div>
</div>		<div class="modal fade" id="create_copyright_box" tabindex="-1" role="dialog" aria-labelledby="create_copyright_box" aria-hidden="true">
	<div class="modal-dialog mat_box create_playlist" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title">إنشاء DMCA إنزال إشعار</h5>
			</div>
			<form method="post" action="" id="copyright-form">
				<div class="alert alert-danger alert-empty" id="output-copyright-errors"></div>
				<div class="create_playlist_innr">
					<div class="play_info">
						<div class="form-group mat_input" style="text-align: initial;">
							<textarea name="description" id="description" rows="6" style="width: 100%;"></textarea><br>
							<small>يرجى وصف طلبك بعناية وبقدر ما تستطيع ، لاحظ أن طلبات قانون الألفية الجديدة لحقوق طبع ونشر المواد الرقمية يمكن أن تؤدي إلى إنهاء الحساب.</small>
						</div>
						<hr>
						<div class="custom-control custom-radio">
							<input type="checkbox" id="confirm_1" name="confirm_1" class="custom-control-input">
							<label class="custom-control-label" for="confirm_1">لدي اعتقاد حسن النية بأن استخدام العمل المحمي بحقوق الطبع والنشر الموضح أعلاه غير مصرح به من قبل مالك حقوق الطبع والنشر أو وكيله أو القانون</label>
						</div>
						<div class="custom-control custom-radio">
							<input type="checkbox" id="confirm_2" name="confirm_2" class="custom-control-input">
							<label class="custom-control-label" for="confirm_2">أؤكد أنني مالك حقوق الطبع والنشر أو مفوض بالتصرف نيابة عن مالك الحق الحصري المزعوم انتهاكه.</label>
						</div>
					</div>
				</div>
				<input type="hidden" id="song-copyright-id" name="id">
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
					<button type="submit" class="btn btn-primary btn-mat" id="btn-copyright-submit">ارسال</button>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
$(document).ready(function() { 
    var options = { 
    	url: "https://mz3il.com/endpoints/copyright-create?hash_id=" + getHashID(),
        beforeSubmit:  function () {
        	$('#output-copyright-errors').removeClass('alert-success').addClass('alert-danger');
        	$('#output-copyright-errors').empty();
        	$("#btn-copyright-submit").text("ارجوك انتظر..");
        }, 
        success: function (data) {
        	$("#btn-copyright-submit").text("ارسال");
        	if (data.status == 200) {
        		$('#output-copyright-errors').addClass('alert-success').removeClass('alert-danger');
        		$('#output-copyright-errors').text("Thanks for your submission, we will review your request shortly.");
        		setTimeout(function () {
        			$('#copyright-form')[0].reset();
	        		$('#create_copyright_box').modal('hide');
	        		closeModal();
	        		$('#output-copyright-errors').empty();
        		}, 3000);
        	} else if (data.status == 400) {
        		var errros = data.errors.join("<br>");
        		$('#output-copyright-errors').html(errros);
        	}
        }
    }; 

    $('#copyright-form').ajaxForm(options); 
}); 
</script>		<div class="modal fade" id="comment_unreported" tabindex="-1" role="dialog" aria-labelledby="comment_unreported" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content">
			<div class="modal-body">
				<div class="no-track-found" style="padding: 30px 10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> تم حذف تقرير التعليق بنجاح.</div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="report_comment" tabindex="-1" role="dialog" aria-labelledby="report_comment" aria-hidden="true">
    <div class="modal-dialog mat_box create_playlist" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">الإبلاغ عن تعليق.</h5>
            </div>
            <form method="post" action="" id="comment-report-form">
                <div class="alert alert-danger alert-empty" id="output-report-comment-errors"></div>
                <div class="create_playlist_innr">
                    <div class="play_info">
                        <div class="form-group mat_input" style="text-align: initial;">
                            <textarea name="comment_description" id="comment_description" rows="5" style="width: 100%;"></textarea><br>
                            <small>يرجى وصف المشكلة التي تريد الإبلاغ عنها في هذا التعليق.</small>
                        </div>
                    </div>
                </div>
                <input type="hidden" id="comment_id" name="id">
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
                    <button type="submit" class="btn btn-primary btn-mat" id="btn-report-comment-submit">ارسال</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        var options = {
            url: "https://mz3il.com/endpoints/report-comment?hash_id=" + getHashID(),
            beforeSubmit:  function () {
                $('#output-report-comment-errors').removeClass('alert-success').addClass('alert-danger');
                $('#output-report-comment-errors').empty();
                $("#btn-report-comment-submit").text("ارجوك انتظر..");
            },
            success: function (data) {
                $("#bbtn-report-comment-submit").text("ارسال");
                if (data.status == 200) {
                    $('#output-report-comment-errors').addClass('alert-success').removeClass('alert-danger');
                    $('#output-report-comment-errors').text("Thanks for your submission, we will review your request shortly.");
                    setTimeout(function () {
                        $('#comment-report-form')[0].reset();
                        $('#report_comment').modal('hide');
                        closeModal();
                        var comment_id = $('#comment_id').val();
                        $('.comment_report[data-comment-id="'+comment_id+'"]').hide();
                        $('.comment_unreport[data-comment-id="'+comment_id+'"]').css({'visibility':'inherit'});
                        $('.comment_unreport[data-comment-id="'+comment_id+'"]').show();

                        $('#output-report-comment-errors').empty();
                    }, 3000);
                } else if (data.status == 400) {
                    var errros = data.errors.join("<br>");
                    $('#output-report-comment-errors').html(errros);
                }
            }
        };

        $('#comment-report-form').ajaxForm(options);
    });
</script>		<div class="modal fade" id="blog_comment_unreported" tabindex="-1" role="dialog" aria-labelledby="comment_unreported" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content">
			<div class="modal-body">
				<div class="no-track-found" style="padding: 30px 10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> تم حذف تقرير التعليق بنجاح.</div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="blog_report_comment" tabindex="-1" role="dialog" aria-labelledby="blog_report_comment" aria-hidden="true">
    <div class="modal-dialog mat_box create_playlist" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">الإبلاغ عن تعليق.</h5>
            </div>
            <form method="post" action="" id="blog-comment-report-form">
                <div class="alert alert-danger alert-empty" id="output-blog-report-comment-errors"></div>
                <div class="create_playlist_innr">
                    <div class="play_info">
                        <div class="form-group mat_input" style="text-align: initial;">
                            <textarea name="comment_description" id="blog_comment_description" rows="5" style="width: 100%;"></textarea><br>
                            <small>يرجى وصف المشكلة التي تريد الإبلاغ عنها في هذا التعليق.</small>
                        </div>
                    </div>
                </div>
                <input type="hidden" id="blog_comment_id" name="id">
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
                    <button type="submit" class="btn btn-primary btn-mat" id="btn-blog-report-comment-submit">ارسال</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        var options = {
            url: "https://mz3il.com/endpoints/blog-report-comment?hash_id=" + getHashID(),
            beforeSubmit:  function () {
                $('#output-blog-report-comment-errors').removeClass('alert-success').addClass('alert-danger');
                $('#output-blog-report-comment-errors').empty();
                $("#btn-blog-report-comment-submit").text("ارجوك انتظر..");
            },
            success: function (data) {
                $("#btn-blog-report-comment-submit").text("ارسال");
                if (data.status == 200) {
                    $('#output-blog-report-comment-errors').addClass('alert-success').removeClass('alert-danger');
                    $('#output-blog-report-comment-errors').text("Thanks for your submission, we will review your request shortly.");
                    setTimeout(function () {
                        $('#blog-comment-report-form')[0].reset();
                        $('#blog_report_comment').modal('hide');
                        closeModal();
                        var comment_id = $('#blog_comment_id').val();
                        $('.blog_comment_report[data-comment-id="'+comment_id+'"]').hide();
                        $('.blog_comment_unreport[data-comment-id="'+comment_id+'"]').css({'visibility':'inherit'});
                        $('.blog_comment_unreport[data-comment-id="'+comment_id+'"]').show();

                        $('#output-blog-report-comment-errors').empty();
                    }, 3000);
                } else if (data.status == 400) {
                    var errros = data.errors.join("<br>");
                    $('#output-blog-report-comment-errors').html(errros);
                }
            }
        };

        $('#blog-comment-report-form').ajaxForm(options);
    });
</script>		<div class="modal fade" id="track_unreported" tabindex="-1" role="dialog" aria-labelledby="track_unreported" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content">
            <div class="modal-body">
				<div class="no-track-found" style="padding: 30px 10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> تم حذف تقرير المسار بنجاح.</div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="report_track" tabindex="-1" role="dialog" aria-labelledby="report_track" aria-hidden="true">
    <div class="modal-dialog mat_box create_playlist" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">تقرير المسار.</h5>
            </div>
            <form method="post" action="" id="track-report-form">
                <div class="alert alert-danger alert-empty" id="output-report-track-errors"></div>
                <div class="create_playlist_innr">
                    <div class="play_info">
                        <div class="form-group mat_input" style="text-align: initial;">
                            <textarea name="track_description" id="track_description" rows="5" style="width: 100%;"></textarea>
                            <small>يرجى وصف المشكلة التي تريد الإبلاغ عنها في هذا المسار.</small>
                        </div>
                    </div>
                </div>
                <input type="hidden" id="report_track_id" name="id">
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
                    <button type="submit" class="btn btn-primary btn-mat" id="btn-report-track-submit">ارسال</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        var options = {
            url: "https://mz3il.com/endpoints/report-track?hash_id=" + getHashID(),
            beforeSubmit:  function () {
                $('#output-report-track-errors').removeClass('alert-success').addClass('alert-danger');
                $('#output-report-track-errors').empty();
                $("#btn-report-track-submit").text("ارجوك انتظر..");
            },
            success: function (data) {
                $("#btn-report-track-submit").text("ارسال");
                if (data.status == 200) {
                    $('#output-report-track-errors').addClass('alert-success').removeClass('alert-danger');
                    $('#output-report-track-errors').text("شكرًا على إرسالك ، سنراجع طلبك قريبًا.");
                    setTimeout(function () {
                        $('#track-report-form')[0].reset();
                        $('#report_track').modal('hide');
                        closeModal();
                        var track_id = $('#report_track_id').val();
                        $('.track_report[data-track-id="'+track_id+'"]').hide();
                        $('.track_unreport[data-track-id="'+track_id+'"]').css({'visibility':'inherit'});
                        $('.track_unreport[data-track-id="'+track_id+'"]').show();

                        $('#output-report-track-errors').empty();
                    }, 3000);
                } else if (data.status == 400) {
                    var errros = data.errors.join("<br>");
                    $('#output-report-track-errors').html(errros);
                }
            }
        };

        $('#track-report-form').ajaxForm(options);
    });
</script>		<div class="modal fade" id="track_unreported" tabindex="-1" role="dialog" aria-labelledby="track_unreported" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content">
            <div class="modal-body">
				<div class="no-track-found" style="padding: 30px 10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> تم حذف تقرير المسار بنجاح.</div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="review_track" tabindex="-1" role="dialog" aria-labelledby="report_track" aria-hidden="true">
    <div class="modal-dialog mat_box create_playlist" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">مراجعة المسار.</h5>
            </div>
            <form method="post" action="" id="track-review-form">
                <div class="alert alert-danger alert-empty" id="output-review-track-errors"></div>
                <div class="create_playlist_innr">
                    <div class="play_info">
                        <div class="form-group mat_input">
							<section class='rating-widget'>
                                <div class='rating-stars text-center'>
                                    <ul id='stars'>
                                        <li class='star' title='Poor' data-value='1'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg></li>
                                        <li class='star' title='Fair' data-value='2'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg></li>
                                        <li class='star' title='Good' data-value='3'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg></li>
                                        <li class='star' title='Excellent' data-value='4'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg></li>
                                        <li class='star' title='WOW!!!' data-value='5'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" /></svg></li>
                                    </ul>
                                </div>
                            </section>
                            <textarea name="track_review_description" id="track_review_description" class="form-control" rows="5" placeholder="الرجاء إدخال رأيك."></textarea>
                        </div>
                    </div>
                </div>
                <input type="hidden" id="review_track_id" name="id">
                <input type="hidden" id="review_track_oid">
                <input type="hidden" id="track_stars" name="track_stars" value="0">
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
                    <button type="submit" class="btn btn-primary btn-mat" disabled="disabled" id="btn-review-track-submit">ارسال</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(document).ready(function(){
        /* 1. Visualizing things on Hover - See next part for action on click */
        $('#stars li').on('mouseover', function(){
            var onStar = parseInt($(this).data('value'), 10); // The star currently mouse on

            // Now highlight all the stars that's not after the current hovered star
            $(this).parent().children('li.star').each(function(e){
                if (e < onStar) {
                    $(this).addClass('hover');
                }
                else {
                    $(this).removeClass('hover');
                }
            });

        }).on('mouseout', function(){
            $(this).parent().children('li.star').each(function(e){
                $(this).removeClass('hover');
            });
        });

        $('#track_review_description').bind('input propertychange', function() {
            if(this.value.length){
                var ratingValue = parseInt($('#stars li.selected').last().data('value'), 10);
                if (ratingValue > 1) {
                    $('#btn-review-track-submit').removeAttr('disabled');
                }
            }
        });

        /* 2. Action to perform on click */
        $('#stars li').on('click', function(){
            var onStar = parseInt($(this).data('value'), 10); // The star currently selected
            var stars = $(this).parent().children('li.star');
            for (i = 0; i < stars.length; i++) {
                $(stars[i]).removeClass('selected');
            }
            for (i = 0; i < onStar; i++) {
                $(stars[i]).addClass('selected');
            }
            // JUST RESPONSE (Not needed)
            var ratingValue = parseInt($('#stars li.selected').last().data('value'), 10);
            var msg = "";
            if (ratingValue > 1) {
                $('#track_stars').val(ratingValue);
                if( $('#track_review_description').val() !== '' ) {
                    $('#btn-review-track-submit').removeAttr('disabled');
                }
                msg = "Thanks! You rated this " + ratingValue + " stars.";
            }
            else {
                msg = "We will improve ourselves. You rated this " + ratingValue + " stars.";
            }
        });
    });

    $(document).ready(function() {
        var options = {
            url: "https://mz3il.com/endpoints/review-track?hash_id=" + getHashID(),
            beforeSubmit:  function () {
                $('#output-review-track-errors').removeClass('alert-success').addClass('alert-danger');
                $('#output-review-track-errors').empty();
                $("#btn-review-track-submit").text("ارجوك انتظر..");
            },
            success: function (data) {
                $("#btn-review-track-submit").text("ارسال");
                if (data.status == 200) {
                    $('#output-review-track-errors').addClass('alert-success').removeClass('alert-danger');
                    $('#output-review-track-errors').text("شكرا لتقديمك.");
                    setTimeout(function () {
                        $('#track-review-form')[0].reset();
                        $('#review_track').modal('hide');
                        closeModal();
                        goToAjaxLink('track/'+$('#review_track_oid').val());
                        $('#output-review-track-errors').empty();
                    }, 3000);
                } else if (data.status == 400) {
                    var errros = data.errors.join("<br>");
                    $('#output-review-track-errors').html(errros);
                }
            }
        };

        $('#track-review-form').ajaxForm(options);
    });
</script>		<div class="modal fade" id="bank_transfer_modal_response" tabindex="-1" role="dialog" aria-labelledby="bank_transfer_modal_response" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content">
            <div class="modal-body">
                <div class="no-track-found" style="padding: 30px 10px;">
                    <span id="bank_transfer_modal_response_txt"></span>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="bank_transfer_modal modal fade modal-fixed-footer" tabindex="-1" role="dialog" aria-hidden="true" data-id="0">
    <div class="modal-dialog mat_box" role="document">
        <div class="modal-content dt_bank_trans_modal">
            <div class="modal-header">
                <h5 class="modal-title">التحويل المصرفي</h5>
            </div>
            <div class="modal-body">
                                <div class="bank_info"><div class="dt_settings_header bg_gradient">
    <div class="bank_info_innr">
        <h4 class="bank_name">Garanti Bank</h4>
        <div class="row">
            <div class="col-md-12">
                <div class="bank_account">
                    <p>4796824372433055</p>
                    <span class="help-block">Account number / IBAN</span>
                </div>
            </div>
            <div class="col-md-12">
                <div class="bank_account_holder">
                    <p>Antoian Kordiyal</p>
                    <span class="help-block">Account name</span>
                </div>
            </div>
            <div class="col-md-6">
                <div class="bank_account_code">
                    <p>TGBATRISXXX</p>
                    <span class="help-block">Routing code</span>
                </div>
            </div>
            <div class="col-md-6">
                <div class="bank_account_country">
                    <p>United States</p>
                    <span class="help-block">Country</span>
                </div>
            </div>
        </div>
    </div>
</div></div>
                                                <div class="dt_user_profile hide_alert_info_bank_trans">
                <span class="valign-wrapper">
					<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"></path></svg> ملحوظة:
                </span>
                    <ul class="browser-default dt_prof_vrfy">
                        <li id="bank_note">In order to confirm the bank transfer, you will need to upload a receipt or take a screenshot of your transfer within 1 day from your payment date. If a bank transfer is made but no receipt is uploaded within this period, your order will be cancelled. We will verify and confirm your receipt within 3 working days from the date you upload it.</li>
                    </ul>
                </div>
                                <p class="dt_bank_trans_upl_rec">
                    <a href="javascript:void(0);" onclick="$('.bank_transfer_modal').addClass('up_rec_active'); return false">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                            <path fill="currentColor" d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z"></path>
                        </svg> تحميل الإيصال
                    </a>
                </p>
                <div class="upload_bank_receipts">
                    <div onclick="document.getElementById('receipt_img').click(); return false">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z"></path></svg>
                        <p>تحميل الإيصال</p>
                        <img id="receipt_img_preview" src="">
                    </div>
                </div>
                <input type="file" id="receipt_img" class="hide" accept="image/x-png, image/gif, image/jpeg" name="receipt_img">
            </div>
            <!--<span style="display: block;text-align: center;" id="receipt_img_path"></span>-->
            <div class="modal-footer">
                <div class="bank_transfr_progress hide" id="img_upload_progress">
                    <div class="progress">
                        <div id="img_upload_progress_bar" class="determinate progress-bar progress-bar-striped bg-success progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
                    </div>
                </div>
                <button class="btn btn-default" data-dismiss="modal">اغلاق</button>
                <button class="btn btn-primary btn-mat" disabled id="btn-upload-receipt" data-selected="" data-mode="" data-id="" data-title="" data-price="">تؤكد</button>
            </div>
        </div>
    </div>
</div>
<script>
    document.getElementById('receipt_img').removeEventListener("change", handleReceiptImgChange, true);
    document.getElementById('receipt_img').addEventListener('change', handleReceiptImgChange, { passive: false });
    function handleReceiptImgChange(){
        let imgPath = $(this)[0].files[0].name;
        if (typeof(FileReader) != "undefined") {
            let reader = new FileReader();
            reader.onload = function(e) {
                $('#receipt_img_preview').attr('src', e.target.result);
            };
            reader.readAsDataURL(this.files[0]);
        }
        $('#receipt_img_path').html(imgPath);
        $('.bank_transfer_modal').addClass('up_rec_img_ready');
        $('#btn-upload-receipt').removeAttr('disabled');
        $('#btn-upload-receipt').removeClass('btn-flat').addClass('btn-success');
    }
    document.getElementById('btn-upload-receipt').addEventListener('click', function(e) {
        e.preventDefault();
        let bar = $('#img_upload_progress');
        let percent = $('#img_upload_progress_bar');

        let id = $(this).attr("data-id");
        if (!id) {
            return false;
        }
        let title = $(this).attr("data-title");
        let price = $(this).attr("data-price");
        let mode = $(this).attr("data-mode");

        let formData = new FormData();
        formData.append("hash_id",'f97c4fa2021087e2d31655452d759e3305537b2b');
        formData.append("description",title);
        formData.append("price", price);
        formData.append("mode", mode);
        formData.append("track_id", id);
        formData.append("receipt_img", $("#receipt_img")[0].files[0], $("#receipt_img")[0].files[0].value);
        bar.removeClass('hide');
        $.ajax({
            xhr: function() {
                let xhr = new window.XMLHttpRequest();
                xhr.upload.addEventListener("progress", function(evt){
                    if (evt.lengthComputable) {
                        let percentComplete = evt.loaded / evt.total;
                        percentComplete = parseInt(percentComplete * 100);
                        //status.html( percentComplete + "%");
                        percent.width(percentComplete + '%');
                        percent.html(percentComplete + '%');
                        if (percentComplete === 100) {
                            bar.addClass('hide');
                            percent.width('0%');
                            percent.html('0%');
                        }
                    }
                }, false);
                return xhr;
            },
            url: ajaxUrl() + '/upload-receipt',
            type: "POST",
            async: true,
            enctype: 'multipart/form-data',
            processData: false,
            contentType: false,
            cache: false,
            timeout: 60000,
            dataType: false,
            data: formData,
            success: function(result) {
                if( result.status == 200 ){
                    $('#payment_modal').modal('hide');
                    $('#paymentpro_modal').modal('hide');
                    $('.bank_transfer_modal').modal('hide');

                    $('#bank_transfer_modal_response_txt').html('تم تحميل إيصالك بنجاح.');
                    $('#bank_transfer_modal_response').modal('show');

                    setTimeout(function () {
                        $('#bank_transfer_modal_response').modal('hide');
                    },2000);
                    return false;
                }
            }
        });
    });
</script>		<div class="modal fade mat_box" id="logged-out-modal" role="dialog" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title"><i class="fa fa-exclamation-circle"></i> انتهت الجلسة</h4>
            </div>
            <div class="modal-body">
                <p>انتهت جلستك ، يرجى تسجيل الدخول مرة أخرى.</p>
            </div>
            <div class="modal-footer">
                <a href="https://mz3il.com/discover" class="btn btn-default">تسجيل الدخول</a>
            </div>
        </div>
    </div>
</div>		<div class="modal fade mat_box" id="verify_code" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="two_factor_title">
                    تم إرسال رسالة تأكيد والبريد الإلكتروني.                </h5>
            </div>
            <form id="confirmation_code_form" class="confirmation_code_form" method="POST">
                <div class="modal-body">
                    <div id="confirmation_code_form_alert"></div>
                    <span class="verfy_sett_email_phone_ico"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21,13.34C20.37,13.12 19.7,13 19,13A6,6 0 0,0 13,19C13,19.34 13.03,19.67 13.08,20H3A2,2 0 0,1 1,18V6C1,4.89 1.89,4 3,4H19A2,2 0 0,1 21,6V13.34M23.5,17L18.5,22L15,18.5L16.5,17L18.5,19L22,15.5L23.5,17M3,6V8L11,13L19,8V6L11,11L3,6Z" /></svg></span>
                    <p id="two_factor_desc">
                        لقد أرسلنا رسالة ورسالة بريد إلكتروني تحتوي على رمز التأكيد لتمكين المصادقة الثنائية                    </p>
                    <div class="form-group verfy_sett_email_phone">
                        <input type="text" class="form-control" name="code" placeholder="رمز التأكيد">
                    </div>
                </div>
                <div class="modal-footer">
					<button data-dismiss="modal" class="btn btn-default">إلغاء</button>
                    <button id="confirmation_code_form_btn" type="submit" class="btn btn-primary">حفظ</button>
                </div>
                <input type="hidden" id="confirmation_code_form_user_id" name="user_id" value="">
            </form>
        </div>
    </div>
</div>

<div class="modal fade mat_box" id="verify_email_phone" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="verify_email_phone_title">
                                    </h5>
            </div>
            <form id="verify_email_phone_form" class="verify_email_phone_form" method="POST">
                <div class="modal-body">
                    <div id="verify_email_phone_form_alert"></div>
                    <span class="verfy_sett_email_phone_ico"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17,19V5H7V19H17M17,1A2,2 0 0,1 19,3V21A2,2 0 0,1 17,23H7C5.89,23 5,22.1 5,21V3C5,1.89 5.89,1 7,1H17M9,7H15V9H9V7M9,11H13V13H9V11Z" /></svg></span>
                    <p id="verify_email_phone_desc">
                                            </p>
                    <div class="form-group verfy_sett_email_phone">
                        <input type="text" class="form-control" name="code" placeholder="رمز التأكيد">
                    </div>
                </div>
                <div class="modal-footer">
					<button data-dismiss="modal" class="btn btn-default">إلغاء</button>
                    <button id="verify_email_phone_form_btn" type="submit" class="btn btn-primary">حفظ</button>
                </div>
            </form>
        </div>
    </div>
</div>		<div class="modal fade" id="refund_order" tabindex="-1" role="dialog" aria-labelledby="refund_order" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">طلب استرداد</h5>
      </div>
      <form class="refund_order_form" method="post">
        <div class="modal-body">
          <div class="modal_refund_order_modal_alert"></div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <textarea placeholder="يرجى توضيح السبب" name="message" id="refund_order_message"></textarea>
        </div>
      </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
          <button type="submit" class="btn btn-primary btn-mat">طلب</button>
        </div>
      </form>
    </div>
  </div>
</div>
		<div class="modal fade" id="add_address_modal" tabindex="-1" role="dialog" aria-labelledby="add_address_modal" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">إضافة عنوان جديد</h5>
      </div>
      <form class="address_form" method="post">
        <div class="modal-body">
          <div class="modal_add_address_modal_alert"></div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <input type="text" name="name" id="name" autofocus placeholder="الاسم">
        </div>
      </div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <input type="text" name="phone" id="phone" autofocus placeholder="هاتف">
        </div>
      </div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <input type="text" name="country" id="country" autofocus placeholder="بلد">
        </div>
      </div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <input type="text" name="city" id="city" autofocus placeholder="مدينة">
        </div>
      </div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <input type="text" name="zip" id="zip" autofocus placeholder="الرمز البريدي / الرمز البريدي">
        </div>
      </div>
          <div class="form-group mat_input">
        <div class="col-md-12">
          <textarea placeholder="عنوان" name="address"></textarea>
        </div>
      </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
          <button type="submit" class="btn btn-primary btn-mat">إضافة</button>
        </div>
      </form>
    </div>
  </div>
</div>
		<div class="modal fade" id="delete-address" tabindex="-1" role="dialog" aria-labelledby="delete-address" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">حذف عنوانك</h5>
      </div>
      <div class="modal-body">
        هل أنت متأكد من أنك تريد حذف هذا العنوان؟
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-danger btn-mat" data-dismiss="modal">حذف</button>
      </div>
    </div>
  </div>
</div>

		<div class="modal fade" id="buy_product_modal" tabindex="-1" role="dialog" aria-labelledby="buy_product" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">تنبيه الدفع</h5>
      </div>
      <div class="modal-body">
        <div class="modal_product_pay_alert"></div>
        أنت على وشك شراء العناصر، هل تريد المتابعة؟
      </div>
      <div class="modal-footer">
        <input type="hidden" id="product_id">
        <input type="hidden" id="product_price">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-primary btn-mat">دفع</button>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade" id="delete-product" tabindex="-1" role="dialog" aria-labelledby="delete-product" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">حذف المنتج الخاص بك</h5>
      </div>
      <div class="modal-body">
        هل أنت متأكد أنك تريد حذف هذا المنتج؟
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-danger btn-mat" data-dismiss="modal">حذف</button>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade" id="story_pay" tabindex="-1" role="dialog" aria-labelledby="story_pay" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">دفع ثمن القصة</h5>
      </div>
      <div class="modal-body">
        <div class="modal_story_pay_alert"></div>
        هل أنت متأكد أنك تريد أن تدفع مقابل إنشاء قصة؟
      </div>
      <div class="modal-footer">
        <input type="hidden" id="story_pay_id">
        <input type="hidden" id="story_pay_file">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-primary btn-mat" onclick="PayForStory()">دفع ﷼0</button>
      </div>
    </div>
  </div>
</div>

		<div class="modal fade" id="wallet_to_pay" tabindex="-1" role="dialog" aria-labelledby="wallet_to_pay" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">دفع من المحفظة</h5>
      </div>
      <div class="modal-body">
        <div class="modal_wallet_pay_alert"></div>
        <div id="wallet_to_pay_text"></div>
      </div>
      <div class="modal-footer">
        <input type="hidden" id="wallet_to_pay_price">
        <input type="hidden" id="wallet_to_pay_type">
        <input type="hidden" id="wallet_to_pay_id">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-primary btn-mat" onclick="PayFromWallet()">دفع ﷼0</button>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade buy_event_ticket" id="buy_ticket_modal" tabindex="-1" role="dialog" aria-labelledby="buy_ticket_modal" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="buy_event_ticket_top">
        <h5 class="modal-title">شراء تذكرة</h5>
        <p class="subtitle">هل أنت متأكد أنك تريد شراء تذكرة؟</p>
        <div class="ticket-img"></div>
        <div class="d-flex justify-content-between buy_event_ticket_top_mid">
          <div class="avail_ticket">
            <b>التذاكر المتاحة</b>
            <p></p>
          </div>
          <div class="avail_ticket_price text-right">
            <b>السعر</b>
            <p></p>
          </div>
        </div>
      </div>
      <div class="buy_event_ticket_mid"></div>
      <div class="buy_event_ticket_bottom">
        <div class="modal-body-alert"></div>
        <div class="row mx-0">
          <div class="col-6 px-1">
            <button type="button" class="btn btn-default btn-mat btn-block" data-dismiss="modal">إلغاء</button>
          </div>
          <div class="col-6 px-1">
            <button type="button" class="btn btn-primary btn-mat btn-block">يشترى</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade" id="unjoin-event" tabindex="-1" role="dialog" aria-labelledby="unjoin-event" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">حدث المغادرة</h5>
      </div>
      <div class="modal-body">
        هل أنت متأكد أنك تريد أن تترك هذا الحدث؟
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-primary btn-mat" data-dismiss="modal">يترك</button>
      </div>
    </div>
  </div>
</div>

		<div class="modal fade" id="delete-event" tabindex="-1" role="dialog" aria-labelledby="delete-event" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">حذف الحدث الخاص بك</h5>
      </div>
      <div class="modal-body">
        هل أنت متأكد من حذف هذا الحدث؟
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
        <button type="button" class="btn btn-danger btn-mat" data-dismiss="modal">حذف</button>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade" id="albums_success" role="dialog" aria-labelledby="albums" aria-hidden="true" data-id="{{t_id}}">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content add_to_plist">
      <div class="modal-body" style="background: #1b711e;">
        <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
        <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" xml:space="preserve" width="50" height="50">
<g>
<g>
<path fill="currentColor" d="M449.716,239.842c-0.543-7.535-7.082-13.191-14.628-12.661c-7.536,0.543-13.204,7.092-12.662,14.628
  c0.337,4.655,0.506,9.431,0.506,14.191c0,109.061-88.726,197.787-197.786,197.787C116.086,453.787,27.36,365.06,27.36,256
  S116.086,58.214,225.147,58.214c43.191,0,84.21,13.668,118.62,39.525c6.041,4.538,14.615,3.321,19.154-2.718
  c4.54-6.04,3.323-14.616-2.717-19.154c-39.189-29.447-85.891-45.012-135.058-45.012C101.001,30.854,0,131.855,0,256
  s101.001,225.145,225.147,225.145S450.292,380.146,450.292,256C450.292,250.586,450.097,245.15,449.716,239.842z"/>
</g>
</g>
<g>
<g>
<path fill="currentColor" d="M496.395,61.77c-20.808-20.807-54.666-20.807-75.474,0l-197.11,197.108l-69.874-69.875
  c-20.808-20.807-54.666-20.807-75.474,0c-20.808,20.808-20.808,54.666,0,75.474l120.341,120.341
  c6.895,6.895,15.951,10.342,25.007,10.342c9.057,0,18.113-3.447,25.008-10.342l247.576-247.576
  C517.201,116.435,517.201,82.579,496.395,61.77z M477.049,117.897L229.472,365.475c-3.12,3.12-8.2,3.12-11.32,0L97.811,245.133
  c-10.141-10.141-10.141-26.64,0-36.781c5.07-5.072,11.729-7.606,18.39-7.606s13.321,2.535,18.39,7.606l71.882,71.882
  c4.632,4.631,10.791,7.181,17.339,7.181c6.551,0,12.71-2.551,17.341-7.182L440.268,81.116c10.138-10.141,26.64-10.141,36.781,0
  C487.189,91.257,487.189,107.756,477.049,117.897z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
        <br><br>
        <b>تم نقل المسار إلى الألبوم التالي.</b>
      </div>
    </div>
  </div>
</div>
		<div class="modal fade" id="ShowAlert" tabindex="-1" role="dialog" aria-labelledby="ShowAlert" aria-hidden="true" data-id="0">
  <div class="modal-dialog mat_box" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title"></h5>
      </div>
      <div class="modal-body ShowAlertText">

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">إلغاء</button>
      </div>
    </div>
  </div>
</div>
		
		<div class="modal fade" id="select-language" tabindex="-1" role="dialog" aria-hidden="true">
			<div class="modal-dialog modal-lg mat_box lang_select_modal" role="document">
				<div class="modal-content">
					<div class="modal-body">
						<div class="row">
							<div class="col-md-4">
								<div class="language_info">
									<h3>Language</h3>
									<svg enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m164.061 1.765c89.491 0 164.061 30.492 164.061 123.688 0 39.307-13.272 67.453-35.329 86.867-4.005 3.525-5.715 8.976-4.326 14.127 3.903 14.48 9.536 29.7 17.262 43.91 5.927 10.9-2.075 24.048-14.477 23.702-30.009-.836-62.771-14.812-87.325-41.505-2.922-3.177-7.103-4.882-11.405-4.53-9.262.757-18.773 1.118-28.462 1.118-89.49 0-164.06-30.493-164.06-123.689s74.57-123.688 164.061-123.688z" fill="#b0da87"/><g><g fill="#fff"><ellipse cx="55.409" cy="104.463" rx="29.792" ry="23.725"/><ellipse cx="216.893" cy="104.463" rx="29.792" ry="23.725"/></g><g fill="#4e5660"><path d="m86.952 86.146c-4.143 0-7.5-3.357-7.5-7.5 0-3.684-2.996-6.681-6.68-6.681s-6.681 2.997-6.681 6.681c0 4.143-3.357 7.5-7.5 7.5s-7.5-3.357-7.5-7.5c0-11.955 9.726-21.681 21.681-21.681 11.954 0 21.68 9.726 21.68 21.681 0 4.143-3.357 7.5-7.5 7.5z"/><path d="m213.711 86.146c-4.143 0-7.5-3.357-7.5-7.5 0-3.684-2.997-6.681-6.681-6.681s-6.68 2.997-6.68 6.681c0 4.143-3.357 7.5-7.5 7.5s-7.5-3.357-7.5-7.5c0-11.955 9.726-21.681 21.68-21.681 11.955 0 21.681 9.726 21.681 21.681 0 4.143-3.357 7.5-7.5 7.5z"/><path d="m136.151 109.573c-7.933 0-15.476-3.436-20.696-9.425-2.722-3.123-2.396-7.86.727-10.582 3.122-2.721 7.859-2.396 10.582.727 2.37 2.72 5.792 4.28 9.388 4.28s7.018-1.561 9.388-4.28c2.722-3.123 7.459-3.447 10.582-.727 3.123 2.722 3.448 7.459.727 10.582-5.222 5.99-12.765 9.425-20.698 9.425z"/></g></g><path d="m347.939 96.356c89.491 0 164.061 30.492 164.061 123.688 0 39.308-13.272 67.453-35.329 86.867-4.005 3.525-5.715 8.976-4.326 14.127 3.903 14.48 9.536 29.7 17.262 43.91 5.927 10.9-2.075 24.048-14.477 23.702-30.009-.836-62.771-14.812-87.325-41.505-2.922-3.177-7.103-4.882-11.405-4.53-9.262.757-18.773 1.118-28.462 1.118-89.491 0-164.061-30.492-164.061-123.688.002-93.197 74.572-123.689 164.062-123.689z" fill="#8daee1"/><path d="m296.422 218.871c-27.969-18.07-64.598-28.515-109.1-31.162-2.253 9.825-3.443 20.58-3.443 32.335 0 93.196 74.57 123.688 164.061 123.688 3.718 0 7.401-.071 11.062-.179.006-.645.024-1.283.024-1.931 0-53.841-21.648-96.288-62.604-122.751z" fill="#6a95d6"/><path d="m401.315 262.7-43.695-115.784c-.025-.068-.053-.137-.08-.204-1.573-3.826-5.262-6.297-9.398-6.297h-.009c-4.141.004-7.829 2.482-9.396 6.314-.023.057-.046.113-.067.171l-44.098 115.78c-1.475 3.87.469 8.203 4.34 9.678 3.866 1.474 8.203-.468 9.678-4.34l9.142-24.004h60.498l9.051 23.983c1.133 3.003 3.987 4.853 7.017 4.853.88 0 1.775-.156 2.647-.485 3.876-1.462 5.832-5.789 4.37-9.665zm-77.87-33.686 24.675-64.786 24.449 64.786z" fill="#fff"/><path d="m164.061 217.934c-89.491 0-164.061 30.493-164.061 123.689 0 39.307 13.272 67.453 35.329 86.867 4.005 3.525 5.715 8.976 4.326 14.127-3.903 14.48-9.536 29.7-17.262 43.909-5.927 10.9 2.075 24.048 14.477 23.702 30.009-.836 62.771-14.812 87.325-41.505 2.922-3.177 7.103-4.882 11.405-4.53 9.262.757 18.773 1.118 28.462 1.118 89.491 0 164.061-30.492 164.061-123.688-.002-93.196-74.572-123.689-164.062-123.689z" fill="#fbf1cf"/><path d="m98.158 224.732c-57.403 13.375-98.158 47.997-98.158 116.891 0 39.307 13.272 67.453 35.329 86.867 4.005 3.525 5.715 8.976 4.326 14.127-3.903 14.48-9.536 29.7-17.262 43.909-5.927 10.9 2.075 24.048 14.477 23.702 30.009-.836 62.771-14.812 87.325-41.505 2.922-3.177 7.103-4.882 11.405-4.53 9.262.757 18.773 1.118 28.461 1.118 9.979 0 19.771-.382 29.296-1.185-109.038-33.437-126.653-188.039-95.199-239.394z" fill="#fae0bd"/><path d="m215.939 289.092h-44.267v-19.954c0-4.143-3.357-7.5-7.5-7.5s-7.5 3.357-7.5 7.5v19.954h-44.267c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5h73.205c-1.638 18.399-10.545 38.587-23.975 56.243-7.491-6.699-13.58-14.368-17.432-21.597-1.947-3.654-6.487-5.039-10.146-3.092-3.655 1.948-5.039 6.49-3.092 10.146 4.554 8.546 11.825 17.845 20.986 25.993-8.01 8.521-17.087 16.084-26.839 22.069-3.53 2.167-4.636 6.785-2.47 10.315 1.416 2.307 3.878 3.578 6.399 3.578 1.338 0 2.692-.357 3.916-1.108 11.003-6.753 21.527-15.56 30.892-25.717 8.934 5.854 18.992 10.334 29.679 12.277.453.083.905.122 1.351.122 3.555 0 6.712-2.537 7.37-6.159.741-4.075-1.962-7.979-6.037-8.721-7.906-1.438-15.595-4.733-22.631-9.119 2.391-3.137 4.675-6.357 6.821-9.658 12.049-18.525 18.971-37.605 20.252-55.574h15.285c4.143 0 7.5-3.357 7.5-7.5s-3.358-7.498-7.5-7.498z" fill="#4e5660"/></g></svg>
								</div>
							</div>
							<div class="col-md-8">
								<ul class="lang_modal">
																			<li class="language_select"><a href="?lang=arabic">Arabic</a></li>
																			<li class="language_select"><a href="?lang=english">English</a></li>
																	</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="queue_overlay" onclick="javascript:$('body').removeClass('data-queue-open');"></div>
		<div class="sidenav_overlay" onclick="javascript:$('body').removeClass('side_open');"></div>


		<script>
$(document).on('click', '#follow-user', function(event) {
	$(this).toggleClass('btn-primary btn-success');
	$(this).text("التالية");
	$(this).attr("id", "unfollow-user");
	$.post('https://mz3il.com/endpoints/follow-user/add', {id: $(this).attr('data-user-id')});
});

$(function () {
	setTimeout(function () {
	    Fingerprint2.get(function (components) {
	      $.post(ajaxUrl() + '/set-finger-print', {components: components});
	    })
	}, 500);
});

$(document).on('click', '.comment_input', function(event){
    $('#login_box').modal('show');
});

// unfollow user
$(document).on('click', '#unfollow-user', function(event) {
	$(this).toggleClass('btn-success btn-primary');
	$(this).text("إتبع");
	$(this).attr("id", "follow-user");
	$.post('https://mz3il.com/endpoints/follow-user/remove', {id: $(this).attr('data-user-id')});
});

function likeSong(id, type, element) {
	if (!id || !type) {
		return false;
	}
	if (type == 'track-page') {
		if (element.attr('liked')) {
			element.removeClass('track-liked').removeAttr('liked', 'true');
			element.find('svg path').attr('fill', '#333');
			element.find('span').html("اعجبني");

            $('#track_likes_count').attr('data-count',parseInt($('#track_likes_count').attr('data-count')) - 1);
            $('#track_likes_count').html(parseInt($('#track_likes_count').attr('data-count')));

            if( $('#dislike-track').hasClass('track-disliked') ){
                $('#dislike-track-text').html("لم يعجبني");
                $('#dislike-track').addClass('track-disliked');
            }
            // $('#like-track').removeAttr('liked');
            // $('#dislike-track').attr('disliked', 'true');

		} else {
			element.addClass('track-liked').attr('liked', 'true');
            $('#dislike-track').removeAttr('disliked');
			element.find('svg path').attr('fill', '#fff');
			element.find('span').html("احب");

            $('#track_likes_count').attr('data-count',parseInt($('#track_likes_count').attr('data-count')) + 1);
            $('#track_likes_count').html(parseInt($('#track_likes_count').attr('data-count')));

            if( $('#dislike-track').hasClass('track-disliked') ){
                $('#dislike-track').removeClass('track-disliked');
                $('#dislike-track-text').html("لم يعجبنى");

                $('#track_dislikes_count').attr('data-count',parseInt($('#track_dislikes_count').attr('data-count')) - 1);
                $('#track_dislikes_count').html(parseInt($('#track_dislikes_count').attr('data-count')));
            }

		}
	}
	$.get('https://mz3il.com/endpoints/like-track', {id: id, type: type});
}

function dislikeSong(id, type, element) {
    if (!id || !type) {
        return false;
    }
    if (type == 'track-page') {
        if (element.attr('disliked')) {
            element.removeClass('track-disliked').removeAttr('disliked', 'true');
            element.find('span').html("لم يعجبنى");

            $('#track_dislikes_count').attr('data-count',parseInt($('#track_dislikes_count').attr('data-count')) - 1);
            $('#track_dislikes_count').html(parseInt($('#track_dislikes_count').attr('data-count')));

            if( $('#like-track').hasClass('track-liked') ){
                $('#like-track-text').html("احب");
                $('#like-track').addClass('track-liked');
            }
            // $('#like-track').attr('liked', 'true');
            // $('#dislike-track').removeAttr('disliked');

        } else {
            element.addClass('track-disliked').attr('disliked', 'true');
            $('#like-track').removeAttr('liked');

            element.find('span').html("لم يعجبني");

            $('#track_dislikes_count').attr('data-count',parseInt($('#track_dislikes_count').attr('data-count')) + 1);
            $('#track_dislikes_count').html(parseInt($('#track_dislikes_count').attr('data-count')));

            if( $('#like-track').hasClass('track-liked') ){
                $('#like-track').removeClass('track-liked');
                $('#like-track-text').html("اعجبني");
                $('#like-track svg path').attr('fill','currentColor');

                $('#track_likes_count').attr('data-count',parseInt($('#track_likes_count').attr('data-count')) - 1);
                $('#track_likes_count').html(parseInt($('#track_likes_count').attr('data-count')));
            }

        }
    }
    $.get('https://mz3il.com/endpoints/dislike-track', {id: id, type: type});
}

function loadMore(type, get_data) {
	element = $("#load-more-button");
	$default_text = element.html();
	$track_id = 0;
	views = 0;
	product_id = 0;
	let v_ids = [];
	if (type == 'songs') {
		$last_id = $('.feed_post:last-child').attr('data-id');
		$append_div = '#user-feed-data';
	} else if (type == 'recently_played') {
		$last_id = $('.track_list:last').attr('data-time');
		$append_div = '#recently_played';
	} else if (type == 'comments') {
		$last_id = $('.comment_item:last').attr('comment-id');
		$append_div = '.comment_list';
		$track_id = $('.comment_item:last').attr('comment-song-id')
	} else if (type == 'blog_comments') {
		$last_id = $('.comment_item:last').attr('comment-id');
		$append_div = '.comment_list';
		$track_id = $('.comment_item:last').attr('comment-song-id')
	} else if (type == 'latest_music' || type == 'top_music') {
		$last_id = $('#new-music .track_list:last').attr('data-id');
		$append_div = '#new-music';
	} else if (type == 'categories') {
		$last_id = $('.list-recommended:last').attr('data-id');
		$append_div = 'ul.s_list_songs';
	} else if (type == 'followers') {
        $last_id = $('.follower_list:last-child').attr('data-id');
        $append_div = '#followers';
    } else if (type == 'followings') {
        $last_id = $('.following_list:last-child').attr('data-id');
        $append_div = '#followings';
    } else if (type == 'songs_search') {
        $last_id = $('.song_search_list:last-child').attr('data-id');
        $append_div = '#songs_search_result';
    } else if (type == 'artists_search') {
        $last_id = $('.artist_list:last-child').attr('data-id');
        $append_div = '#artists_search_result';
    } else if (type == 'albums_search') {
        $last_id = $('.track_list:last-child').attr('data-id');
        $append_div = '#albums_search_result';
    } else if (type == 'playlists_search') {
        $last_id = $('.playlist-p-list:last-child').attr('data-id');
        $append_div = '#playlists_search_result';
    } else if (type == 'store_albums') {
        $last_id = $('.track_list:last-child').attr('data-id');
        $append_div = '.store_albums';
    } else if (type == 'store_songs') {
        $last_id = $('.song_list:last-child').attr('data-id');
        $append_div = '.store_songs';
    } else if (type == 'blogs') {
        $last_id = $('.blog_list').last().attr('data-id');
        $append_div = '.blog_articles';
    } else if (type == 'stations') {
        $last_id = $('#new-music .track_list:last').attr('data-id');
        $append_div = '#new-music';
    }
    else if(type == 'fame_page'){
    	$last_id = $('#fame_page_result .artist_lists:last').attr('data-id');
    	views   = $('#fame_page_result .artist_lists:last').attr('data_views');
        $append_div = '#fame_page_result';
        $('.artist_lists').each(function(i, obj) {
            v_ids.push($(obj).attr('data_v_id'));
        });
    }
    else if(type == 'products_search'){
        $last_id = $('.events-list-wrapper:last').attr('data-product');
        $append_div = '#products_search_result';

    }
    else if(type == 'events_search'){
    	$last_id = $('.events-list-wrapper:last').attr('data-event');
    	$append_div = '#events_search_result';

    }
    else if(type == 'events'){
    	$last_id = $('.events-list-wrapper:last').attr('data-event');
    	$append_div = '#events_search_result';

    }
    else if(type == 'manage_events'){
    	$last_id = $('.events-list-wrapper:last').attr('data-event');
    	$append_div = '#manage_events_result';

    }
    else if(type == 'joined_events'){
    	$last_id = $('.events-list-wrapper:last').attr('data-event');
    	$append_div = '#events_search_result';

    }
    else if(type == 'purchased_events'){
    	$last_id = $('.events-list-wrapper:last').attr('data-event');
    	$append_div = '#events_search_result';

    }
    else if(type == 'products'){
    	$last_id = $('.events-list-wrapper:last').attr('data-product');
    	$append_div = '#store_result';

    }
    else if(type == 'manage_products'){
    	$last_id = $('.events-list-wrapper:last').attr('data-product');
    	$append_div = '#products_result';

    }
    else if(type == 'reviews'){
    	$last_id = $('.review_list:last').attr('id');
    	$append_div = '.reviews_section';
    	product_id = $('#product_page_id').val();

    }
    else if(type == 'orders'){
        $last_id = $('.song_list:last').attr('data-order');
        $append_div = '.store_songs';
    }


	if (get_data == 'all' || get_data == 'liked' || get_data == 'spotlight' || get_data == 'events') {
		$last_id = $('.feed_post:last-child').attr('data-a-id');
		type = 'activities';
	}
	if (get_data == 'playlists') {
		$last_id = $('.playlist-p-list:last-child').attr('data-id');
		type = 'playlists';
	}
	if (get_data == 'albums') {
		$last_id = $('.album-p-list:last-child').attr('data-id');
		type = 'albums';
	}
    if (get_data == 'stations') {
        $last_id = $('.track_list:last-child').attr('data-id');
        type = 'stations';
    }
    if (get_data == 'store') {
    	$last_id = $('.feed_post:last-child').attr('a_id');
    }
	element.text("ارجوك انتظر..");

    let geners = [];
    let price = [];
    let filter_type = null;
    let current_tag = null;
    if($('#current_tag').length > 0){
        current_tag = $('#current_tag').val();
    }
    if($('#filter_search_tag').length > 0){
        current_tag = $('#filter_search_tag').val();
    }
    if($('#filter_type').length > 0){
        filter_type = $('#filter_type').val();
    }
    if($('.song_category').length > 0){
        $('.song_category').each(function(i, obj) {
            if(this.checked){
                geners.push($(obj).attr('data-category'));
            }
        });
    }
    if($( "#slider-range" ).length > 0){
        price = $("#slider-range").slider("option").values;
    }
    let params = {'geners': geners, 'filter_type': filter_type,'current_tag': current_tag, 'price': price };

	$.get(ajaxUrl() + '/load-more/' + type, {id: $last_id, userID: $('#user-id').val(), track_id: $track_id, get_data: get_data,params: params,views:views,v_ids:v_ids,product_id:product_id}, function(data) {
		if (data.status == 200 && data.html.length > 0) {
			$($append_div).append(data.html);
		} else {
			$default_text = "لم يتم العثور على المزيد من المسارات";
			if (type == 'comments' || type == 'blog_comments') {
				$default_text = "لم يتم العثور على المزيد من التعليقات";
			}
			if (type == 'all') {
				$default_text = "لم يتم العثور على المزيد من الأنشطة";
			}
			if (type == 'playlists' || type == 'playlists_search') {
				$default_text = "لم يتم العثور على المزيد من قوائم التشغيل";
			}
            if (type == 'followers') {
                $default_text = "لم يتم العثور على المزيد من المتابعين";
            }
            if (type == 'followings') {
                $default_text = "لا مزيد من التالية وجدت";
            }
            if (type == 'artists_search' || type == 'fame_page') {
                $default_text = "لم يتم العثور على المزيد من الفنانين";
            }
            if (type == 'albums_search' || type == 'store_albums') {
                $default_text = "لم يتم العثور على المزيد من الألبومات";
            }
            if (type == 'blogs_search' || type == 'blogs') {
                $default_text = "لم يتم العثور على المزيد من المقالات";
            }
            if (type == 'stations' ) {
                $default_text = "لم يتم العثور على المزيد من المحطات";
            }
            if (type == 'events_search' || type == 'events' || type == 'joined_events' || type == 'manage_events') {
                $default_text = "لم يتم العثور على المزيد من الأحداث";
            }
            if (type == 'purchased_events') {
                $default_text = "لم يتم العثور على المزيد من التذاكر";
            }
            if (type == 'products' || type == 'manage_products' || type == 'products_search') {
                $default_text = "لم يتم العثور على المزيد من المنتجات";
            }
            if (type == 'reviews') {
                $default_text = "لم يتم العثور على المزيد من المراجعات";
            }
            if (type == 'orders') {
                $default_text = "No more orders found";
            }
        }
		element.html($default_text);
	});
}

$(document).on('click', '.amplitude-next', function(event) {
	console.log($('#current-track').val());

});
var is_sent = 0;
var is_video_checked = 0;
var is_paused = 0;
$(function () {
	var songsObject = [{
        "name": "",
        "artist": "",
        "album": "",
        "url": "",
        "cover_art_url": "",
        "youtube_url": "",
	}];
		Amplitude.init({
	"songs": songsObject,
    "callbacks": {
		 'after_next': function(){
		 	setTimeout(function () {

				if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && !Amplitude.audio().paused && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
			 			$('#my_video_player_container').html('<div class="y_player_cover"></div><span class="player_exit" onclick="HidePlayer()"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span><div class="plyr__video-embed" id="my_video_player_"><iframe src="'+Amplitude.getActiveSongMetadata().youtube_url+'?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1" allowfullscreen allowtransparency ></iframe> </div>')
			 			$('#my_video_player_container').slideDown();
				 		video_player = new Plyr('#my_video_player_',{muted: true,controls: []});
					 	video_player.on('ready', event => {
							video_player.play();
						});
			 	}
			},500);
		 },
		 'after_prev': function(){
		 	setTimeout(function () {
				if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && !Amplitude.audio().paused && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
			 			$('#my_video_player_container').html('<div class="y_player_cover"></div><span class="player_exit" onclick="HidePlayer()"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span><div class="plyr__video-embed" id="my_video_player_"><iframe src="'+Amplitude.getActiveSongMetadata().youtube_url+'?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1" allowfullscreen allowtransparency ></iframe> </div>')
			 			$('#my_video_player_container').slideDown();
				 		video_player = new Plyr('#my_video_player_',{muted: true,controls: []});
					 	video_player.on('ready', event => {
							video_player.play();
						});
			 	}
			},500);


		 },
		 'time_update': function(songPlayedInSeconds){
		 	if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
		 		if ((Amplitude.audio().duration - Amplitude.audio().currentTime) > 1) {
		 			video_player.currentTime = Amplitude.audio().currentTime;
                    // if (video_player.paused && !Amplitude.audio().paused) {
                        video_player.play();
                    // }
		 		}
                if (Amplitude.audio().paused) {
                    is_paused = 1;
                    video_player.pause();
                }
			}
		 },
		 'after_play': function(){
            var song_seconds = Amplitude.getSongDuration();
            if (song_seconds) {
                $('body').attr('song-duration', song_seconds);
            }
		 	if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && !$('#my_video_player_container').is(":visible") && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
		 		$('#my_video_player_container').html('<div class="y_player_cover"></div><span class="player_exit" onclick="HidePlayer()"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span><div class="plyr__video-embed" id="my_video_player_"><iframe src="'+Amplitude.getActiveSongMetadata().youtube_url+'?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1" allowfullscreen allowtransparency ></iframe> </div>')
	 			$('#my_video_player_container').slideDown();
		 		video_player = new Plyr('#my_video_player_',{muted: true,controls: []});
			 	video_player.on('ready', event => {
					video_player.play();
				});
			}
			if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && $('#my_video_player_container').is(":visible") && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
				video_player.play();
			}

		 	setTimeout(function () {
			 	$('body').addClass('audio_playing');
			 	$('body').addClass('player_running');
			 	$('#play-pause').addClass('amplitude-playing');
		 	}, 100);
		 },
		 'after_pause': function(){
		 	if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
			 	video_player.pause();
			}
		 	$('body').removeClass('audio_playing');
		 	$('#play-pause').removeClass('amplitude-playing');
		 	$('body').removeClass('player_running');
		 },
		 'after_stop': function(){
		 	if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
			 	$('#my_video_player_container').slideUp();
			 	$('#my_video_player_container').html('');
			}
		 	if (parseInt($('.ss_track_play_pause').attr('data_is_ad')) > 0 && is_sent == 0) {
		 		is_sent = 1;
		 		song_id = $('#current-track').attr('value');
		 		onTimesUp(song_id);
		 		return false;
		 	}
		 	$('body').removeClass('audio_playing');
		 	$('#play-pause').removeClass('amplitude-playing');
		 	$('body').removeClass('player_running');
		 	$('#light-wave').width('0px');
		 	// console.log("Stopped..");
		 	// $('.song_details').hide();
		 }
	 }
});

});

const FULL_DASH_ARRAY = 283;
const WARNING_THRESHOLD = 10;
const ALERT_THRESHOLD = 5;

const TIME_LIMIT = 10;
let timePassed = 0;
let timeLeft = TIME_LIMIT;
let timerInterval = null;

function onTimesUp(song_id) {
	if (typeof wavesurfer != "undefined") {
		wavesurfer.pause();
	}
	if (typeof Amplitude != "undefined") {
		Amplitude.pause();
		Amplitude.removeSong(0);
	}
	$('#queue-' + song_id).remove();
	$(".song_controls").css("pointer-events","auto");
    $(".song_progress").css("pointer-events","auto");
    $(".song_progress_right").css("pointer-events","auto");
    $(".ma_player_playlist").css("pointer-events","auto");
    $("#waveform").css("pointer-events","auto");
	playSong(song_id,0,'yes');
	$('body').removeClass('player_running');
    clearInterval(timerInterval);
    goToAjaxLink('track/' + song_id);
}

function startTimer(song_id) {
  $(".song_controls").css("pointer-events","none");
  $(".song_progress").css("pointer-events","none");
  $(".song_progress_right").css("pointer-events","none");
  $(".ma_player_playlist").css("pointer-events","none");
  $("#waveform").css("pointer-events","none");
  timerInterval = setInterval(() => {
    timePassed = timePassed += 1;
    timeLeft = TIME_LIMIT - timePassed;
    if (timeLeft >= 0) {
    	document.getElementById("base-timer-label").innerHTML = formatTime(
	      timeLeft
	    );
	    setCircleDasharray();
    }

    if (timeLeft === 0) {
    	song_id = "'"+song_id+"'";
    	$(".pause_btn").replaceWith('<div class="pause_btn" onclick="onTimesUp('+song_id+')"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f98f1d" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M8,8L13,12L8,16M14,8H16V16H14"/></svg></div>');
    }
  }, 1000);
}

function formatTime(time) {
  const minutes = Math.floor(time / 60);
  let seconds = time % 60;

  if (seconds < 10) {
    seconds = `0${seconds}`;
  }

  return `${minutes}:${seconds}`;
}

function calculateTimeFraction() {
  const rawTimeFraction = timeLeft / TIME_LIMIT;
  return rawTimeFraction - (1 / TIME_LIMIT) * (1 - rawTimeFraction);
}

function setCircleDasharray() {
  const circleDasharray = `${(
    calculateTimeFraction() * FULL_DASH_ARRAY
  ).toFixed(0)} 283`;
  document
    .getElementById("base-timer-path-remaining")
    .setAttribute("stroke-dasharray", circleDasharray);
}

var songIndex = [];
function playSong(id,audio_ad_id = 0,skip = '') {
	if (typeof setPlayerInterval != 'undefined') {
		clearInterval(setPlayerInterval);
	}
	if (!$('body').attr('first-play')) {
		//Amplitude.removeSong(0);
		$('body').attr('first-play', "true");
		
	}


	if (Amplitude.getActiveSongMetadata().id && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
		if (Amplitude.getActiveSongMetadata().id == id) {
			Amplitude.play();
			if ($('#page').attr('data-page') != 'track') {
				goToAjaxLink('track/' + Amplitude.getActiveSongMetadata().id);
			}
			// $('#container_content').append('<a href="#" id="redirect-user" data-load="track/' + Amplitude.getActiveSongMetadata().id + '"></a>');
			// $('#redirect-user').trigger('click');
			if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && ($('#audio_ad_id').length == 0 || ($('#audio_ad_id').length != 0 && parseInt($('#audio_ad_id').val()) == 0))) {
		 		console.log(Amplitude)
			 	video_player.play();
			 	if (!$('#my_video_player_container').is(":visible")) {
			 		$('#my_video_player_container').slideDown();

			 	}
			}
			if ($('body').attr('first-play')) {
				if (skip != 'yes') {
					return false;
				}
			}
		}
	}

	$('#bar_loading').show().animate({width:20 + 80 * Math.random() + "%"}, 200);
	$.get('https://mz3il.com/endpoints/get-song-info', {id: id,audio_ad_id: audio_ad_id}, function(data) {
		if (data.age == true) {
			$('#age-restricted').modal('show');
			$('#bar_loading').animate({width:"100%"}, 200).fadeOut(300, function() {
	           $(this).width("0");
	        });
			return false;
		}
		$("#light-wave").stop(true);
		$('.waveform-small').html("");
		$('.ssong_comments.small-waves').addClass('hidden');
		$('.post-actions').addClass('hidden');
		if (data.status == 200) {
			$('body').attr('song-duration', data.duration);
			if ($('.feed_post[data-id="' + data.songID + '"]:first').length > 0) {
				if (data.songWaves.length > 0) {
					$('.feed_post[data-id="' + data.songID + '"]:first').find('.waveform-small').html(data.songWaves);
					$('#light-wave img').width($('#dark-wave').width() + 'px');
				}
				$('.feed_post[data-id="' + data.songID + '"]:first').find('.art-info').removeClass('hidden');
				$('.feed_post[data-id="' + data.songID + '"]:first').find('.post-actions').removeClass('hidden');
				$('.feed_post[data-id="' + data.songID + '"]:first').find('.ssong_comments').removeClass('hidden');
			    $('.feed_post[data-id="' + data.songID + '"]:first').find('.comment_list').html(data.comments);
			    $('.feed_post[data-id="' + data.songID + '"]:first').find('.comment-waves').html(data.waves);
				$('html,body').animate({
			        scrollTop: $('.feed_post[data-id="' + data.songID + '"]:first').offset().top
			    }, 'slow');
			}

			$('body').addClass('player_running');
			if ($('.amplitude-song-container').length == 0) {
				Amplitude.removeSong(0)
			}
		    if ($('#queue-' + id).length == 0 || data.is_ad == 'yes') {
				var songObject = {
			        "name": data.songTitle,
			        "artist": data.artistName,
			        "album": data.albumName,
			        "url": data.songURL,
			        "cover_art_url": data.coverURL,
			        "youtube_url": data.youtube_url,
			        "id": id,
			        "u_id": data.songID,
			        "data_load": 'track/' + id,
			        "href": data.songPageURL,
			        "duration": data.songDuration,
			        "purchase": data.purchase,
			        'price': data.price,
			        "is_favoriated": data.is_favoriated,
			        "showDemo": data.showDemo
				};
		    	var songIndex = Amplitude.addSong(songObject);
				data.qID = songIndex;
				songObject.qID = songIndex;

				Amplitude.playSongAtIndex(songIndex);
				if (data.is_ad != 'yes') {
					addToQueue(data, songObject, false);
					addView(data.songID);

				}

				$('.amplitude-song-container').removeClass('amplitude-playing');
				//$('.amplitude-song-container[amplitude-song-index="' + songIndex + '"]').addClass('amplitude-playing');
				$('#queue-list').find('.amplitude-song-container').last().addClass('amplitude-playing');
		    } else {
		    	songIndex = $('#queue-' + id).attr('amplitude-song-index');
		    	Amplitude.playSongAtIndex(songIndex);
		    }
		    setTimeout(function () {
				if (Amplitude.getActiveSongMetadata().youtube_url != '' && typeof Amplitude.getActiveSongMetadata().youtube_url !== 'undefined' && data.is_ad != 'yes') {
			 			$('#my_video_player_container').html('<div class="y_player_cover"></div><span class="player_exit" onclick="HidePlayer()"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span><div class="plyr__video-embed" id="my_video_player_"><iframe src="'+Amplitude.getActiveSongMetadata().youtube_url+'?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1" allowfullscreen allowtransparency ></iframe> </div>')
			 			$('#my_video_player_container').slideDown();
				 		video_player = new Plyr('#my_video_player_',{muted: true,controls: []});
					 	video_player.on('ready', event => {
							video_player.play();
						});
			 	}
			},500);
		    $('.player-song-url').attr('href', data.songPageURL);

		    if (data.data_load != '') {
		    	Amplitude.getActiveSongMetadata().data_load = '';
		    	$('.player-song-url').attr('data-load', '');
		    }
		    else{
		    	$('.player-song-url').attr('data-load', 'track/' + id);
		    }

			$('#song-fav-button').html(data.favorite_button);
			$('.ma_player').removeClass('closed');
			if (data.is_ad == 'yes') {
				document.querySelector(".pause_btn").innerHTML = `
				<div class="base-timer">
				  <svg class="base-timer__svg" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g class="base-timer__circle"><circle class="base-timer__path-elapsed" cx="50" cy="50" r="45"></circle><path id="base-timer-path-remaining" stroke-dasharray="283" class="base-timer__path-remaining" d="M 50, 50 m -45, 0 a 45,45 0 1,0 90,0 a 45,45 0 1,0 -90,0"></path></g></svg>
				  <span id="base-timer-label" class="base-timer__label">${formatTime(
				    timeLeft
				  )}</span><p>لتخطي الإعلان</p>
				</div>
				`;
				startTimer(id);
				$('.ss_track_play_pause').attr('data_is_ad', 1);
			}
		} else {
			alert("Can't load the song, please try again later.")
		}
		$('#bar_loading').animate({width:"100%"}, 200).fadeOut(300, function() {
           $(this).width("0");
        });
	});
}

function addToQueue(data, object, fetch) {
    if (fetch == false) {
        html = '<div class="song amplitude-song-container amplitude-play-pause" id="queue-' + object.id + '" onclick="playSong(\'' + object.id + '\')" amplitude-song-index="' + object.qID + '"><div class="song_icon_container"><img class="now-playing" src="'+ object.cover_art_url+'"/></div><span class="song_duration">' + object.duration + '</span><div class="song_meta_data"><span class="song_title">' + object.name + '</span><span class="song_artist">' + object.artist + '</span></div></div>';
        $('#queue-list').append(html);
    }
    setTimeout(function () {
        $.post('https://mz3il.com/endpoints/add-queue', {qdata: object});
    }, 2000);
}

function registerBlogComment(value, id, event, element) {
	if (!value || !id) {
		return false;
	}
	if(event.which == 13) {
		element.attr('disabled', "true");
        $.post('https://mz3il.com/endpoints/register-blog-comment', {id: id, value: value}, function(data) {
        	if (data.status == 300) {
                $('#login_box').modal('show');
            }
        	if (data.status == 200) {
        		$('.no-comments-found').remove();
        		$('.no-track-found').remove();
        		element.val("");
        		$('.comment-list-' + id).prepend(data.html);
        	}
        	element.removeAttr('disabled');
        });
    }

}

function registerCommentreplay(value, id, commentid, event, element) {
    if (!value || !id || !commentid) {
        return false;
    }
    //fix
    if(event.which == 13) {
        element.attr('disabled', "true");
        $.post('https://mz3il.com/endpoints/register-comment-replay', {id: id, value: value, cid:commentid}, function(data) {
            if (data.status == 300) {
                $('#login_box').modal('show');
            }
            if (data.status == 200) {
                $('.no-comments-found').remove();
                $('.no-track-found').remove();
                element.val("");
                $('.comment-replay-list-' + commentid).append(data.html);
                //window.init_emojioneArea();
            }
            element.removeAttr('disabled');
        });
    }

}

function registerComment(value, id, event, element) {
	if (!value || !id) {
		return false;
	}
	if(event.which == 13) {
		element.attr('disabled', "true");
		time = "";
		timeSeconds = "";
		if (Amplitude.getActiveSongMetadata().id == id) {
			time = Amplitude.audio().currentTime;
		    timeSeconds = $('.amplitude-song-played-progress').val();
		}
		wave = 0;
		if ($('#light-wave').val()) {
			wave = $('#light-wave').val();
		}
        $.post('https://mz3il.com/endpoints/register-comment', {id: id, value: value, timePercentage: timeSeconds, time: time, wave: wave}, function(data) {
        	if (data.status == 300) {
                $('#login_box').modal('show');
            }
        	if (data.status == 200) {
        		$('.no-comments-found').remove();
        		$('.no-track-found').remove();
        		element.val("");
        		$('.comment-waves').append(data.comment_wave);
        		$('.comment-list-' + id).prepend(data.html);
                //window.init_emojioneArea();
        	}
        	element.removeAttr('disabled');
        });
    }

}

$(document).on('mouseover', '.comment-on-wave', function(event) {
	$(this).find('.comment-on-wave-data').css({
		display: 'block',
	});
});
$(document).on('mouseleave', '.comment-on-wave', function(event) {
	$(this).find('.comment-on-wave-data').css({
		display: 'none',
	});
});

$('.comment-on-wave-data').on('hover', function(event) {

});

function goToWave(secnods) {
	setTimeout(function () {
		Amplitude.skipTo(secnods, Amplitude.getActiveSongMetadata().qID);
	}, 200);
}

function goTo(element) {
	mainElement = element.parents('li');

	if (Amplitude.getActiveSongMetadata().id != mainElement.attr('comment-song-id')) {
		playSong(mainElement.attr('song-id'));
	}

	setTimeout(function () {
		Amplitude.skipTo(mainElement.attr('comment-seconds'), Amplitude.getActiveSongMetadata().qID);
	}, 200);
}

function deleteComment(element) {
	mainElement = $('#delete-comment');
	comment_id = mainElement.attr('data-id');
    mode = mainElement.attr('data-mode');
	if (!comment_id) {
		return false;
	}
	$('#delete-comment').modal('hide');
	$('.comment-' + comment_id).slideUp('200', function () {
		$(this).remove();
	});
    if(mode == 'blog'){
        $.get('https://mz3il.com/endpoints/delete-blog-comment', {id: comment_id});
    }else{
        $.get('https://mz3il.com/endpoints/delete-comment', {id: comment_id});
    }
}

function deleteCommentReplay(element) {
    mainElement = $('#delete-comment-replay');
    comment_id = mainElement.attr('data-id');
    mode = mainElement.attr('data-mode');
    if (!comment_id) {
        return false;
    }
    $('#delete-comment-replay').modal('hide');
    $('.comment-replay-' + comment_id).slideUp('200', function () {
        $(this).remove();
    });
    $.get('https://mz3il.com/endpoints/delete-comment-replay', {id: comment_id});
}

function likeComment(comment_id) {
    if (!comment_id) {
        return false;
    }
    var clickval = $('.comment_like[data-comment-id="'+comment_id+'"]').attr("onclick");
    $('.comment_like[data-comment-id="'+comment_id+'"]').attr('onclick',clickval.replace('likeComment', 'UnlikeComment') );
    $('.comment_like[data-comment-id="'+comment_id+'"] path').attr('fill','#e62117');
    $.get('https://mz3il.com/endpoints/like-comment', {id: comment_id});
    let c = parseInt($('#comment_like_'+comment_id).html());
    $('#comment_like_'+comment_id).html( c + 1);
}

function UnlikeComment(comment_id) {
    if (!comment_id) {
        return false;
    }
    var clickval = $('.comment_like[data-comment-id="'+comment_id+'"]').attr("onclick");
    $('.comment_like[data-comment-id="'+comment_id+'"]').attr('onclick',clickval.replace('UnlikeComment', 'likeComment') );
    $('.comment_like[data-comment-id="'+comment_id+'"] path').attr('fill','currentColor');
    $.get('https://mz3il.com/endpoints/unlike-comment', {id: comment_id});

    let c = parseInt($('#comment_like_'+comment_id).html());
    $('#comment_like_'+comment_id).html( c - 1);

}

function BloglikeComment(comment_id) {
    if (!comment_id) {
        return false;
    }
    var clickval = $('.comment_like[data-comment-id="'+comment_id+'"]').attr("onclick");
    $('.comment_like[data-comment-id="'+comment_id+'"]').attr('onclick',clickval.replace('likeComment', 'UnlikeComment') );
    $('.comment_like[data-comment-id="'+comment_id+'"] path').attr('fill','#e62117');
    $.get('https://mz3il.com/endpoints/like-blog-comment', {id: comment_id});
    let c = parseInt($('#comment_like_'+comment_id).html());
    $('#comment_like_'+comment_id).html( c + 1);
}

function BlogUnlikeComment(comment_id) {
    if (!comment_id) {
        return false;
    }
    var clickval = $('.comment_like[data-comment-id="'+comment_id+'"]').attr("onclick");
    $('.comment_like[data-comment-id="'+comment_id+'"]').attr('onclick',clickval.replace('UnlikeComment', 'likeComment') );
    $('.comment_like[data-comment-id="'+comment_id+'"] path').attr('fill','currentColor');
    $.get('https://mz3il.com/endpoints/unlike-blog-comment', {id: comment_id});

    let c = parseInt($('#comment_like_'+comment_id).html());
    $('#comment_like_'+comment_id).html( c - 1);

}
function BlogUnReportComment(comment_id,user_id) {
    if (!comment_id) {
        return false;
    }
    $('.blog_comment_report[data-comment-id="'+comment_id+'"]').show();
    $('.blog_comment_report[data-comment-id="'+comment_id+'"]').css({'visibility':'inherit'});
    $('.blog_comment_unreport[data-comment-id="'+comment_id+'"]').hide();

    $.get(ajaxUrl() + '/blog-unreport-comment', {id: comment_id,uid: user_id}, function (data) {
        if (data.status == 200) {
            $('#blog_comment_unreported').modal('show');
            setTimeout(function () {
                $('#blog_comment_unreported').modal('hide');
            }, 3000);
        }
    });

}
function UnReportComment(comment_id,user_id) {
    if (!comment_id) {
        return false;
    }
    $('.comment_report[data-comment-id="'+comment_id+'"]').show();
    $('.comment_report[data-comment-id="'+comment_id+'"]').css({'visibility':'inherit'});
    $('.comment_unreport[data-comment-id="'+comment_id+'"]').hide();

    $.get(ajaxUrl() + '/unreport-comment', {id: comment_id,uid: user_id}, function (data) {
        if (data.status == 200) {
            $('#comment_unreported').modal('show');
            setTimeout(function () {
                $('#comment_unreported').modal('hide');
            }, 3000);
        }
    });

}

function UnReportTrack(track_id,user_id) {
    if (!track_id) {
        return false;
    }
    $('.track_report[data-track-id="'+track_id+'"]').show();
    $('.track_report[data-track-id="'+track_id+'"]').css({'visibility':'inherit'});
    $('.track_unreport[data-track-id="'+track_id+'"]').hide();

    $.get(ajaxUrl() + '/unreport-track', {'id': track_id,'uid': user_id}, function (data) {
        if (data.status == 200) {
            $('#track_unreported').modal('show');
            setTimeout(function () {
                $('#track_unreported').modal('hide');
            }, 3000);
        }
    });

}
function PayFromWallet() {
    $('#wallet_to_pay').find('.btn-mat').attr('disabled', 'true');
    $(".modal_story_pay_alert").html('');
    price = $('#wallet_to_pay_price').val();
    type = $('#wallet_to_pay_type').val();
    id = $('#wallet_to_pay_id').val();
    $.post('https://mz3il.com/endpoints/wallet/pay', {price: price,type: type,id: id}, function(data, textStatus, xhr) {
        $('#wallet_to_pay').find('.btn-mat').removeAttr('disabled');
        if (data.status == 200) {
            clearQueues();
            $(".modal_wallet_pay_alert").html('<div class="alert alert-success bg-success"><i class="fa fa-check"></i> دفع بنجاح</div>');
            setTimeout(function () {
                location.href = data.url;
            },3000);
        }
        else{
            $(".modal_wallet_pay_alert").html('<div class="alert alert-danger bg-danger"><i class="fa fa-info-circle"></i> '+data.error+'</div>');
        }
    });
}

function purchaseTrack(id, element,type,price) {
            $('#login_box').modal('show');
    }



function TrackReadMore() {
    var dots = document.getElementById("dots");
    var moreText = document.getElementById("more");
    var btnText = document.getElementById("btn-track-load-more");

    if (dots.style.display === "none") {
        dots.style.display = "inline";
        btnText.innerHTML = "اقرأ أكثر";
        moreText.style.display = "none";
    } else {
        dots.style.display = "none";
        btnText.innerHTML = "أقرأ أقل";
        moreText.style.display = "inline";
    }
}
















function getUrl() {
	var url = window.location.href;
	return url.replace("https://mz3il.com", "");
}

function ajaxRedirect(url) {
	if (!url) {
		url = getUrl();
	}
	goToAjaxLink(url);
}

function favorite(id, element) {
	if (element.hasClass('is_favoriated')) {
		element.html('<path fill="#fff" d="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z" />');
		element.removeClass("is_favoriated");
		if (Amplitude.getActiveSongMetadata()) {
			Amplitude.getActiveSongMetadata().is_favoriated = false;
		}
	} else {
		element.addClass("is_favoriated");
		element.html('<path fill="#ff9900" d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z" />');
		if (Amplitude.getActiveSongMetadata()) {
			Amplitude.getActiveSongMetadata().is_favoriated = true;
		}
	}

	$.get('https://mz3il.com/endpoints/favorite-track', {id: id});
}

function addToLists(id) {
	getID = $('#playlists').attr('data-id');
	if (!getID) {
		return false;
	}
	var playlists = "";
	$(".select-playlist-list").each(function (index, item) {
		if ($(this).hasClass('active')) {
			 playlists += $(this).attr('data-id') + ",";
		}
	});
	if (playlists) {
		$('#playlists').find('.btn-mat').text("ارجوك انتظر..");
		$.get(ajaxUrl() + "/playlist/add-to-playlist", {playlists: playlists, id: getID}, function (data) {
			if (data.status == 200) {
				$('#playlists').modal('hide');
				setTimeout(function () {
					$('#playlists').remove();
				}, 200);
			} else if (data.status == 300) {
				alert("الرجاء تحديد قائمة التشغيل التي تريد إضافة هذه الأغنية إليها.")
			} else {
				$('#playlists').modal('hide');
				setTimeout(function () {
					$('#playlists').remove();
				}, 200);
			}
		});
	}
}

function addToAlbum(id) {
    getID = $('#albums').attr('data-id');
    if (!getID) {
        return false;
    }
    var playlists = "";
    $(".select-albums-list").each(function (index, item) {
        if ($(this).hasClass('active')) {
            var albums = $(this).attr('data-id');

            $('#playlists').find('.btn-mat').text("ارجوك انتظر..");
            $.get(ajaxUrl() + "/album/add-to-album", {album: albums, id: getID}, function (data) {
                if (data.status == 200) {
                    $('#albums_success').modal('show');
                    $('#albums').modal('hide');
                    setTimeout(function () {
                        $('#albums').remove();
                    }, 200);
                    setTimeout(function () {
                        $('#albums_success').modal('hide');
                    }, 3000);
                } else if (data.status == 300) {
                    alert("الرجاء تحديد الألبوم الذي تريد إضافة هذه الأغنية إليه.")
                } else {
                    $('#albums').modal('hide');
                    setTimeout(function () {
                        $('#albums').remove();
                    }, 200);
                }
            });

        }
    });

}

function blockUser(id, username, type) {
	if (!id || !username) {
		return false;
	}
	if (!confirm("هل أنت متأكد أنك تريد حظر هذا المستخدم")) {
		return false;
	}
	$.get('https://mz3il.com/endpoints/block-user/' + type, {id: id}, function (data) {
		goToAjaxLink('user/' + username);
	});
}

$(document).on('click', '#night_mode_toggle', function(event) {
    mode = $(this).attr('data-mode');
    $.post('https://mz3il.com/endpoints/?mode=' + mode, {}, function(data, textStatus, xhr) { /* pass */ });
    if (mode !== 'night') {
        //$("head link[rel='stylesheet']").last().after("<link rel='stylesheet' href='http://deepsound.test/themes/default/css/day.style.css' id='night-mode-css' type='text/css' media='screen'>");

        $('body').append('<link rel="stylesheet" href="https://mz3il.com/themes/default/css/day.style.css" id="night-mode-css">');
        $('#night_mode_toggle').attr('data-mode', 'night');
        $('.switch .txt').text('وضع الليل');
        $('.logo_container img').attr('src', 'https://mz3il.com/themes/default/img/logo-white.png?cache=216');
                    if($('#dark-wave').length > 0){
                $('#dark-wave').attr('src',$('#dark-wave').attr('src').replace('_dark.png','_day.png'));
            }
                if($('#light-wave').length > 0){
        $('#light-wave').css({'border-right':'1px solid rgb(191, 191, 191)'});
            }
    } else {
        $('#night-mode-css').remove();
        $('#night_mode_toggle').attr('data-mode', 'day');
        $('.switch .txt').text('وضع اليوم');
        $('.logo_container img').attr('src', 'https://mz3il.com/themes/default/img/logo.png?cache=216');
                    if($('#dark-wave').length > 0){
        $('#dark-wave').attr('src',$('#dark-wave').attr('src').replace('_day.png','_dark.png'));
                }
                if($('#light-wave').length > 0){
        $('#light-wave').css({'border-right':'1px solid rgb(71, 71, 71)'});
            }
    }


});

$(document).ready(function() {
    FastClick.attach(document.body);
});

function hide_announcement(id){
    if (!id) { return false; }
    $("#announcement-"+id).slideUp('fast',function(){
        $(this).remove();
        $.post('https://mz3il.com/endpoints/user/hide-announcement', {id: id}, function(data, textStatus, xhr) { /* pass */ });
    })
}
function AddEventInterested(id,self,type = 'interest') {
	if (type == 'interest') {
		$(self).html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z"></path></svg> <span class="button-text"> مهتم</span>')
        $(self).attr('onclick', "AddEventInterested('"+id+"',this,'uninterest')");
    }
    else{
    	$(self).html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M16.5,5C15,5 13.58,5.91 13,7.2V17.74C17.25,13.87 20,11.2 20,8.5C20,6.5 18.5,5 16.5,5M16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3Z"></path></svg> <span class="button-text"> مهتم</span>')
        $(self).attr('onclick', "AddEventInterested('"+id+"',this,'interest')");
    }
    $.post('https://mz3il.com/endpoints/event/interest', {id: id,type: type}, function(data, textStatus, xhr) {});
}
function JoinEvent(id,self,type = 'join') {
	if (type == 'join') {
		$('#going-'+id).find('button').html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M0.41,13.41L6,19L7.41,17.58L1.83,12M22.24,5.58L11.66,16.17L7.5,12L6.07,13.41L11.66,19L23.66,7M18,7L16.59,5.58L10.24,11.93L11.66,13.34L18,7Z"></path></svg> <span class="button-text"> انضم</span>')
        $('#going-'+id).find('button').attr('onclick', "JoinEvent('"+id+"',this,'unjoin')");
    }
    else{
    	$('#going-'+id).find('button').html('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10.74,11.72C11.21,12.95 11.16,14.23 9.75,14.74C6.85,15.81 6.2,13 6.16,12.86L10.74,11.72M5.71,10.91L10.03,9.84C9.84,8.79 10.13,7.74 10.13,6.5C10.13,4.82 8.8,1.53 6.68,2.06C4.26,2.66 3.91,5.35 4,6.65C4.12,7.95 5.64,10.73 5.71,10.91M17.85,19.85C17.82,20 17.16,22.8 14.26,21.74C12.86,21.22 12.8,19.94 13.27,18.71L17.85,19.85M20,13.65C20.1,12.35 19.76,9.65 17.33,9.05C15.22,8.5 13.89,11.81 13.89,13.5C13.89,14.73 14.17,15.78 14,16.83L18.3,17.9C18.38,17.72 19.89,14.94 20,13.65Z"></path></svg> <span class="button-text"> انضم</span>')
        $('#going-'+id).find('button').attr('onclick', "JoinEvent('"+id+"',this,'join')");
    }
    $.post('https://mz3il.com/endpoints/event/join', {id: id,type: type}, function(data, textStatus, xhr) {});
}
function BuyTicket(id,self,type = 'join',price = 0,show_type = 'show',available_tickets = 0, image = '') {
	$('#buy_ticket_modal').find('.modal-body-alert').html('');
	$('#buy_ticket_modal').find('.btn-primary').removeAttr('disabled');
    $('#buy_ticket_modal').find('.btn-primary').text("يشترى");
	if (parseInt(price) > parseInt("{{ME org_wallet}}")) {
		$('#buy_ticket_modal').find('.modal-body-alert').html(`<div class="alert alert-info"><a href="https://mz3il.com/settings/{{ME username/wallet}}" data-load="settings/{{ME username}}/wallet">يرجى تباريز محفظتك.</a></div>`);
		$('#buy_ticket_modal').find('.btn-primary').attr('disabled', 'true');
		$('#buy_ticket_modal').modal('show');
        return false;
	}
	if(parseInt(price) > 0 && show_type == 'hide'){
		$('#buy_ticket_modal').find('.btn-primary').attr('onclick', "BuyTicket('"+id+"',this,'"+type+"','"+price+"','show','"+available_tickets+"')");
		$('#buy_ticket_modal').find('.avail_ticket p').html(""+available_tickets+"");
		$('#buy_ticket_modal').find('.avail_ticket_price p').html("﷼"+price);
		$('#buy_ticket_modal').find('.ticket-img').html("<img src='" + image + "' alt='Picture'>");
        $('#buy_ticket_modal').modal('show');
        return false;
	}
	$('#buy_ticket_modal').find('.btn-primary').attr('disabled', 'true');
    $('#buy_ticket_modal').find('.btn-primary').text("ارجوك انتظر..");
    $.post('https://mz3il.com/endpoints/event/buy', {id: id,price: price}, function(data, textStatus, xhr) {
    	$('#buy_ticket_modal').find('.btn-primary').removeAttr('disabled');
        $('#buy_ticket_modal').find('.btn-primary').text("يشترى");
    	if (data.status == 200) {
    		$('#buy_ticket_modal').find('.modal-body-alert').html(`<div class="alert alert-success bg-success"><i class="fa fa-check"></i> ${data.message}</div>`);
            setTimeout(function () {
            	$('#buy_ticket_modal').find('.modal-body-alert').html('');
            	$('#buy_ticket_modal').modal('hide');
            	location.href = 'https://mz3il.com/purchased';
            },2000);
    	}
    	else{
    		$('#buy_ticket_modal').find('.modal-body-alert').html(`<div class="alert alert-danger bg-danger"><i class="fa fa-check"></i> ${data.message}</div>`);
    	}
    });
}
function DeleteEvent(id,type = 'show') {
	if (type == 'hide') {
      $('#delete-event').find('.btn-mat').attr('onclick', "DeleteEvent('"+id+"')");
      $('#delete-event').modal('show');
      return false;
    }
	$('[data-event="'+id+'"').slideUp();
	$('[data-event="'+id+'"').remove();
	$.post('https://mz3il.com/endpoints/event/delete', {id: id}, function(data, textStatus, xhr) {});
}
function StartStories(user_id,story_id) {
	$('#container_content').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>');
	$.post('https://mz3il.com/endpoints/story/start', {user_id: user_id,story_id:story_id}, function(data, textStatus, xhr) {
		if (data.status == 200) {
			if (!Amplitude.audio().paused) {
				Amplitude.pause();
				window.playAudio = 'yes';
			}
			else{
                window.playAudio = 'no';
            }
			$('.lightbox-container').html(data.html);
		}
		else{
			if (window.playAudio && window.playAudio == 'yes') {
				Amplitude.play();
				window.playAudio = 'no';
			}
			CloseLightbox();
		}
	});
}
function NextStory(user_id,story_id,next_user_id,next_story_id) {
	CloseLightbox();
	$('#container_content').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>');
	$.post('https://mz3il.com/endpoints/story/next', {user_id: user_id,story_id:story_id,next_user_id:next_user_id,next_story_id:next_story_id}, function(data, textStatus, xhr) {
		if (data.status == 200) {
			if (!Amplitude.audio().paused) {
				Amplitude.pause();
				window.playAudio = 'yes';
			}
			$('.lightbox-container').html(data.html);
		}
		else{
			if (window.playAudio && window.playAudio == 'yes') {
				Amplitude.play();
				window.playAudio = 'no';
			}
			CloseLightbox();
		}
	});
}
function PreviousStory(user_id,story_id,pre_user_id,pre_story_id) {
	CloseLightbox();
	$('#container_content').append('<div class="lightbox-container"><div class="lightbox-backgrond" onclick="Wo_CloseLightbox();"></div><div class="lb-preloader" style="display:block"><svg width="50px" height="50px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><circle cx="50" cy="50" r="40" stroke="#676d76" fill="none" stroke-width="6" stroke-linecap="round"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="0" to="502"></animate><animate attributeName="stroke-dasharray" dur="1.5s" repeatCount="indefinite" values="150.6 100.4;1 250;150.6 100.4"></animate></circle></svg></div></div>');
	$.post('https://mz3il.com/endpoints/story/previous', {user_id: user_id,story_id:story_id,pre_user_id:pre_user_id,pre_story_id:pre_story_id}, function(data, textStatus, xhr) {
		if (data.status == 200) {
			if (!Amplitude.audio().paused) {
				Amplitude.pause();
				window.playAudio = 'yes';
			}
			$('.lightbox-container').html(data.html);
		}
		else{
			if (window.playAudio && window.playAudio == 'yes') {
				Amplitude.play();
				window.playAudio = 'no';
			}
			CloseLightbox();
		}
	});
}
function CloseLightbox() {
  $('.lightbox-container').remove();
  document.body.style.overflow = 'auto';
}
function GetMoreStoryViews(story_id,self) {
  $('.lightpost-'+story_id).addClass('dont_close')
  last_view = $('.story_views_').last().attr('id');
  $(self).addClass('dont_close_story_'+story_id);
  $(self).find('span').html("ارجوك انتظر");
  $.post('https://mz3il.com/endpoints/story/story_views', {last_view:last_view,story_id:story_id}, function(data, textStatus, xhr) {
    if (data.status == 200) {
      $(self).find('button').html('<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather"><polyline points="6 9 12 15 18 9"></polyline></svg> تحميل المزيد');

      $('.views_container_').append(data.html);
    }
    else{
      $(self).find('button').html("لا مزيد من المشاهدات");

    }
  });
}
function DeleteStory(id) {
	if (!id || !confirm("هل أنت متأكد أنك تريد حذف قصتك؟")) {
    return false;
  }

  $.ajax({
    url: 'https://mz3il.com/endpoints/story/delete',
    type: 'POST',
    dataType: 'json',
    data: {id:id},
  })
  .done(function(data) {
    if (data.status == 200) {
      location.reload();
    }
  })
  .fail(function() {
    console.log("error");
  })
}
function DeleteProduct(id,type = 'show') {
	if (type == 'hide') {
      $('#delete-product').find('.btn-mat').attr('onclick', "DeleteProduct('"+id+"')");
      $('#delete-product').modal('show');
      return false;
    }
	$('[data-product="'+id+'"').slideUp();
	$('[data-product="'+id+'"').remove();
	$.post('https://mz3il.com/endpoints/product/delete', {id: id}, function(data, textStatus, xhr) {});
}
function AddProductToCart(self,id,type) {
	if (type == 'add') {
		$(self).text("إزالة من العربة");
		$(self).attr('onclick', "AddProductToCart(this,'"+id+"','remove')");
	}
	else{
		$(self).text("أضف إلى السلة");
		$(self).attr('onclick', "AddProductToCart(this,'"+id+"','add')");
	}
	qty = 1;
	if ($('#cart_product_qty').length > 0) {
		qty = $('#cart_product_qty').val();
	}
	$.post('https://mz3il.com/endpoints/product/add_cart', {product_id: id,qty:qty}, function(data, textStatus, xhr) {
		if (data.status == 200) {
			$('.unread_cart_count').html(data.count);
		}
	});
}
function GetCart() {
	$.post('https://mz3il.com/endpoints/product/get_cart', {param1: 'value1'}, function(data, textStatus, xhr) {
		if (data.status == 200 && data.html != '') {
			$('#cart-list').html(data.html);
		}
		else{
			$('#cart-list').html('<div class="no-track-found"><svg xmlns="http://www.w3.org/2000/svg" data-display="static" data-toggle="dropdown" aria-haspopup="true" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-shopping-cart"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>عربة التسوق فارغة.</div>');
		}
	});
}
function RemoveProductFromCart(id) {
	$('#cart_product_'+id).remove();
	$('#checkout_product_'+id).remove();
	$.post('https://mz3il.com/endpoints/product/remove_cart', {product_id: id}, function(data, textStatus, xhr) {
		if (data.status == 200) {
			$('.unread_cart_count').html(data.count);
		}
	});
}
function LoadCheckout() {
	$('#load_checkout').click();
}
$(document).ready(function() {
    var options = {
    	url: "https://mz3il.com/endpoints/address/add?hash_id=" + getHashID(),
        beforeSubmit:  function () {
        	$('.modal_add_address_modal_alert').empty();
        	$("#add_address_modal").find('.btn-mat').attr('disabled', 'true');
        	$("#add_address_modal").find('.btn-mat').text("ارجوك انتظر..");
        },
        success: function (data) {
        	$("#add_address_modal").find('.btn-mat').text("إضافة");
        	$("#add_address_modal").find('.btn-mat').removeAttr('disabled')
        	if (data.status == 200) {
        		$('.modal_add_address_modal_alert').html('<div class="alert alert-success bg-success"><i class="fa fa-check"></i> '+
	            data.message
	            +'</div>');
	            if (data.url && data.url != '') {
	            	if ($('#load_checkout').length < 1) {
	            		setTimeout(function () {
			            	/*location.href = data.url;*/
                            $('.modal_add_address_modal_alert').empty();
                            $("#add_address_modal").find('.btn-mat').removeAttr('disabled')
                            $("#add_address_modal").find('.btn-mat').text("إضافة");
                            $('#add_address_modal').modal('hide');
                            $('.address_form')[0].reset();
                            load_page = 'feed';
                            if ($('#json-data').length > 0) {
                                json_data = JSON.parse($('#json-data').val());
                                load_page = json_data.ajax_url;
                            }
                            else{
                                load_page = "feed";
                            }
                            goToAjaxLink(load_page);
			            },2000);
	            	}
	            	else{
	            		setTimeout(function () {
			            	$('.modal_add_address_modal_alert').empty();
							$("#add_address_modal").find('.btn-mat').removeAttr('disabled')
							$("#add_address_modal").find('.btn-mat').text("إضافة");
							$('#add_address_modal').modal('hide');
							$('#load_checkout').click();
			            },2000);
	            	}
	            }
        	} else {
        		$('.modal_add_address_modal_alert').html('<div class="alert alert-danger bg-danger"><i class="fa fa-check"></i> '+
            data.message
            +'</div>');
        	}
        }
    };
    $('.address_form').ajaxForm(options);
});
function NewAddress() {
	$('.modal_add_address_modal_alert').empty();
	$("#add_address_modal").find('.btn-mat').removeAttr('disabled')
	$("#add_address_modal").find('.btn-mat').text("إضافة");
	$('#add_address_modal').modal('show');
}
function BuyProducts(type = 'show',price) {
	if ($('.payment_address').length < 1) {
		$('.checkout_alert').html("<div class='alert alert-danger bg-danger'><i class='fa fa-info-circle'></i> يرجى إضافة عنوان جديد</div>");
		return false;
	}
	if ($('input[name=choose-address]:checked').length < 1) {
		$('.checkout_alert').html("<div class='alert alert-danger bg-danger'><i class='fa fa-info-circle'></i> يرجى اختيار العنوان</div>");
		return false;
	}
	address_id = $('input[name=choose-address]:checked').val();
	if (type == 'hide') {
        $('#buy_product_modal').find('.btn-mat').html("دفع ﷼"+price);
        $('#buy_product_modal').find('.btn-mat').attr('onclick', "BuyProducts('show','"+price+"')");
        $('#buy_product_modal').modal('show');
        return false;
    }
    $('#buy_product_modal').find('.btn-mat').html("ارجوك انتظر..");
    $('#buy_product_modal').find('.btn-mat').attr('disabled', "true");
	$.post('https://mz3il.com/endpoints/product/buy',{address_id: address_id}, function(data, textStatus, xhr) {
		$('#buy_product_modal').find('.btn-mat').removeAttr('disabled');
		$('#buy_product_modal').find('.btn-mat').text("دفع ﷼"+price);
		if (data.status == 200) {
			$('#buy_product_modal').find('.modal_product_pay_alert').html("<div class='alert alert-success bg-success'><i class='fa fa-check'></i> "+data.message+"</div>");
			setTimeout(function () {
            	$('#buy_product_modal').find('.modal_product_pay_alert').html("");
            	location.href = "https://mz3il.com/purchased";
            },2000);
		}
		else{
			$('#buy_product_modal').find('.modal_product_pay_alert').html("<div class='alert alert-danger bg-danger'><i class='fa fa-info-circle'></i> "+data.message+"</div>");
		}
	});
}
function ChangeQty(self,product_id) {
	qty = $(self).val();
	$.post('https://mz3il.com/endpoints/product/change_qty', {product_id: product_id,qty: qty}, function(data, textStatus, xhr) {
		LoadCheckout();
	});
}
function ChangeStatus(self,hash_id) {
	status = $(self).val();
	$.post('https://mz3il.com/endpoints/product/change_status', {hash_order: hash_id,status: status}, function(data, textStatus, xhr) {
		$('#load_order').click();
	});
}
function RefundOrder(hash_id,type = 'show') {
	if (type == 'hide') {
        $('#refund_order').find('.btn-mat').attr('onclick', "RefundOrder('"+hash_id+"')");
        $('#refund_order').modal('show');
        return false;
    }
    $('#refund_order').find('.btn-mat').html("ارجوك انتظر..");
    $('#refund_order').find('.btn-mat').attr('disabled', "true");
    message = $('#refund_order_message').val();
    $.post('https://mz3il.com/endpoints/product/refund', {hash_order: hash_id,message: message}, function(data, textStatus, xhr) {
    	$('#refund_order').find('.btn-mat').removeAttr('disabled');
		$('#refund_order').find('.btn-mat').text("طلب");
		if (data.status == 200) {
			$('#refund_order').find('.modal_refund_order_modal_alert').html("<div class='alert alert-success bg-success'><i class='fa fa-check'></i> "+data.message+"</div>");
			setTimeout(function () {
				$('#refund_order').modal('hide');
            	$('#refund_order').find('.modal_refund_order_modal_alert').html("");
            	$('#load_order').click();
            },2000);
		}
		else{
			$('#refund_order').find('.modal_refund_order_modal_alert').html("<div class='alert alert-danger bg-danger'><i class='fa fa-info-circle'></i> "+data.message+"</div>");
		}
	});
}
function DownloadPurchased(id,type = 'event') {
	url = 'event/download';
	if (type == 'order') {
		url = 'product/download';
	}
	$.post('https://mz3il.com/endpoints/'+url,{id,id}, function(data, textStatus, xhr) {
		$('.ma_page_content').append(data.html);
		setTimeout(function () {
			$('.ticket_card_'+id).remove();
		},10000);
	});
}
function HidePlayer() {
	$('#my_video_player_container').slideUp();
}
function OpenWriteReview(product_id) {
	$('#write_product_review_product_id').val(product_id)
	$('#write_product_review').modal('show');
}
function showResponseAlert(item,alert_class,message,time = 0) {
    $(item).html('<div class="alert alert-'+alert_class+'">'+message+'</div>');
    if (time > 0) {
        setTimeout(() => {
            $(item).html('');
        },time);
    }
}
</script>
		<script src="https://mz3il.com/themes/default/js/fingerprint2.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/jquery.form.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/popper.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/bootstrap.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/owl.carousel.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/simplebar.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/amplitude.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/script.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/Chart.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/highcharts/highcharts.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/footer.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/bootstrap-select.min.js?v=1.4.9"></script>
		<script type="text/javascript" language="javascript" src="https://mz3il.com/themes/default/js/jquery.dataTables.min.js?v=1.4.9"></script>
		<script type="text/javascript" language="javascript" src="https://mz3il.com/themes/default/js/dataTables.bootstrap4.min.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/lib/sweetalert2/dist/sweetalert2.js?v=1.4.9"></script>
		<script src="https://mz3il.com/themes/default/js/bootstrap-toggle.min.js?v=1.4.9"></script>
		<input type="hidden" class="main_session" value="f97c4fa2021087e2d31655452d759e3305537b2b">
    <script type="text/javascript">
    (function (factory) {
        if (typeof define === 'function' && define.amd) {
            // AMD. Register as an anonymous module.
            define(['jquery'], factory);
        } else {
            // Browser globals
            factory(jQuery);
        }
    }(function ($) {
        $.timeago = function(timestamp) {
            if (timestamp instanceof Date) {
                return inWords(timestamp);
            } else if (typeof timestamp === "string") {
                return inWords($.timeago.parse(timestamp));
            } else if (typeof timestamp === "number") {
                return inWords(new Date(timestamp));
            } else {
                return inWords($.timeago.datetime(timestamp));
            }
        };
        var $t = $.timeago;

        $.extend($.timeago, {
            settings: {
                refreshMillis: 60000,
                allowPast: true,
                allowFuture: false,
                localeTitle: false,
                cutoff: 0,
                strings: {
                    prefixAgo: null,
                    prefixFromNow: null,
                    suffixAgo: "منذ",
                    suffixFromNow: "من الان",
                    inPast: "في اي لحظة الان",
                    seconds: "في هذة اللحظة",
                    minute: "منذ دقيقة واحدة",
                    minutes: "منذ %d دقائق",
                    hour: "منذ ساعة تقريبا",
                    hours: "منذ %d ساعة",
                    day: "قبل يوم واحد",
                    days: "منذ %d أيام",
                    month: "منذ شهر تقريبا",
                    months: "منذ %d أشهر",
                    year: "قبل نحو سنة",
                    years: "%d سنوات مضت",
                    wordSeparator: " ",
                    numbers: []
                }
            },

            inWords: function(distanceMillis) {
                if(!this.settings.allowPast && ! this.settings.allowFuture) {
                    throw 'timeago allowPast and allowFuture settings can not both be set to false.';
                }

                var $l = this.settings.strings;
                var prefix = $l.prefixAgo;
                var suffix = $l.suffixAgo;
                if (this.settings.allowFuture) {
                    if (distanceMillis < 0) {
                        prefix = $l.prefixFromNow;
                        suffix = $l.suffixFromNow;
                    }
                }

                if(!this.settings.allowPast && distanceMillis >= 0) {
                    return this.settings.strings.inPast;
                }

                var seconds = Math.abs(distanceMillis) / 1000;
                var minutes = seconds / 60;
                var hours = minutes / 60;
                var days = hours / 24;
                var years = days / 365;

                function substitute(stringOrFunction, number) {
                    var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
                    var value = ($l.numbers && $l.numbers[number]) || number;
                    return string.replace(/%d/i, value);
                }

                var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
                    seconds < 90 && substitute($l.minute, 1) ||
                    minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
                    minutes < 90 && substitute($l.hour, 1) ||
                    hours < 24 && substitute($l.hours, Math.round(hours)) ||
                    hours < 42 && substitute($l.day, 1) ||
                    days < 30 && substitute($l.days, Math.round(days)) ||
                    days < 45 && substitute($l.month, 1) ||
                    days < 365 && substitute($l.months, Math.round(days / 30)) ||
                    years < 1.5 && substitute($l.year, 1) ||
                    substitute($l.years, Math.round(years));

                var separator = $l.wordSeparator || "";
                if ($l.wordSeparator === undefined) { separator = " "; }

                    return $.trim([prefix, words].join(separator));


            },

            parse: function(iso8601) {
                var s = $.trim(iso8601);
                s = s.replace(/\.\d+/,""); // remove milliseconds
                s = s.replace(/-/,"/").replace(/-/,"/");
                s = s.replace(/T/," ").replace(/Z/," UTC");
                s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
                s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
                return new Date(s);
            },
            datetime: function(elem) {
                var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
                return $t.parse(iso8601);
            },
            isTime: function(elem) {
                // jQuery's `is()` doesn't play well with HTML5 in IE
                return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
            }
        });

        // functions that can be called via $(el).timeago('action')
        // init is default when no action is given
        // functions are called with context of a single element
        var functions = {
            init: function(){
                var refresh_el = $.proxy(refresh, this);
                refresh_el();
                var $s = $t.settings;
                if ($s.refreshMillis > 0) {
                    this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis);
                }
            },
            update: function(time){
                var parsedTime = $t.parse(time);
                $(this).data('timeago', { datetime: parsedTime });
                if($t.settings.localeTitle) $(this).attr("title", parsedTime.toLocaleString());
                refresh.apply(this);
            },
            updateFromDOM: function(){
                $(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
                refresh.apply(this);
            },
            dispose: function () {
                if (this._timeagoInterval) {
                    window.clearInterval(this._timeagoInterval);
                    this._timeagoInterval = null;
                }
            }
        };

        $.fn.timeago = function(action, options) {
            var fn = action ? functions[action] : functions.init;
            if(!fn){
                throw new Error("Unknown function name '"+ action +"' for timeago");
            }
            // each over objects here and call the requested function
            this.each(function(){
                fn.call(this, options);
            });
            return this;
        };

        function refresh() {
            var data = prepareData(this);
            var $s = $t.settings;

            if (!isNaN(data.datetime)) {
                if ( $s.cutoff == 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
                    $(this).text(inWords(data.datetime));
                }
            }
            return this;
        }

        function prepareData(element) {
            element = $(element);
            if (!element.data("timeago")) {
                element.data("timeago", { datetime: $t.datetime(element) });
                var text = $.trim(element.text());
                if ($t.settings.localeTitle) {
                    element.attr("title", element.data('timeago').datetime.toLocaleString());
                } else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
                    element.attr("title", text);
                }
            }
            return element.data("timeago");
        }

        function inWords(date) {
            return $t.inWords(distance(date));
        }

        function distance(date) {
            return (new Date().getTime() - date.getTime());
        }

        // fix for IE6 suckage
        document.createElement("abbr");
        document.createElement("time");
    }));


    $(function () {
        setInterval(function () {

                if ( $('.ajax-time').length > 0) {
                    $('.ajax-time').timeago()
                        .removeClass('.ajax-time');
                }
            },
            500);
    });
</script>		<script>
            
            $('#rmjs-1').readmore({
                speed: 75,
                collapsedHeight: 190,
                moreLink: '<a href="#" class="hash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /></svg> اقرأ أكثر</a>',
				lessLink: '<a href="#" class="hash"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /></svg> أقرأ أقل</a>',
                afterToggle: function(trigger, element, expanded) {
                    //if(! expanded) {
                        // The "Close" link was clicked
                        $('html, body').animate({scrollTop: element.offset().top}, {duration: 100});
                    //}
                }
            });
            var running = false;
            $( document ).on( 'change', '#chat_message_upload_media_file', function(e){
                if( running === true ){
                    running = false;
                    return false;
                }
                running = true;
                var countFiles = $(this)[0].files.length;
                var imgPath = $(this)[0].value;
                var extn = imgPath.substring(imgPath.lastIndexOf('.') + 1).toLowerCase();

                if(countFiles > 1) {
                    M.toast({html: 'Please select Four Images only.'});
                } else if (extn == "gif" || extn == "png" || extn == "jpg" || extn == "jpeg") {

                    let from = $( '#user-id' ).val();
                    let formData = new FormData();
                    formData.append( "media", $(this)[0].files[0],$(this)[0].files[0].value );
                    formData.append( 'to' , $('#user-id').val() );
                    formData.append( 'message_id' , window.message_id );

                    var img = $('<img style="width: 300px;border-radius: 20px;">');
                    //if (typeof(FileReader) != "undefined") {
                    let reader = new FileReader();
                    reader.onload = function(e) {
                        img.attr('src', e.target.result);
                    };
                    reader.readAsDataURL($(this)[0].files[0]);
                    //}

                    $('.lds-facebook').removeClass('hide');
                    $('#btn_chat_f_send').addClass('hide');

                    $( '.chat_message_upload_media_imgprogress' ).removeClass( 'hide' );
                    $( '.chat_message_upload_media_imgstatus' ).removeClass( 'hide' );
                    $.ajax({
                        xhr: function() {
                            let xhr = new window.XMLHttpRequest();
                            xhr.upload.addEventListener("progress", function(evt){
                                if (evt.lengthComputable) {
                                    let percentComplete = evt.loaded / evt.total;
                                    percentComplete = parseInt(percentComplete * 100);
                                    //console.log( 'prog: ' + percentComplete + '%');
                                    $( '#chat_message_upload_media_imgstatus' ).html( percentComplete + '%');
                                    $( '.chat_message_upload_media_imgdeterminate' ).css({'width': percentComplete + '%'});
                                    if (percentComplete === 100) {
                                        $( '.chat_message_upload_media_imgprogress' ).addClass( 'hide' );
                                        $( '.chat_message_upload_media_imgstatus' ).addClass( 'hide' );
                                        $( '#chat_message_upload_media_imgstatus' ).html( '' );
                                    }
                                }
                            }, false);
                            return xhr;
                        },
                        beforeSend: function() {
                            $('.messages').append('<div class="data_message" data-id="' + window.message_id + '"><div class="message to-user pull-right" data-id=""><div class="user-message"></div><div class="clear"></div></div><div class="clear"></div></div>');
                            img.appendTo($('.data_message[data-id="' + window.message_id + '"]').find('.user-message'));
                            $('.user-messages').scrollTop($('.user-messages')[0].scrollHeight);
                            window.message_id = makeid();
                        },
                        url: 'https://mz3il.com/endpoints/messages/upload_media?hash_id=' + $('.main_session').val(),
                        type: "POST",
                        async: true,
                        data: formData,
                        cache: false,
                        contentType: false,
                        processData: false,
                        timeout: 60000,
                        dataType: false,
                        success: function(data) {
                            $('.data_message[data-id="' + data.message_id + '"]').replaceWith(data.message);
                            running = false;
                        }
                    });

                }else{
                    M.toast({html: 'Please select only Images.'});
                }
            });

            // update user last seen
            function getRandomBetween(min, max) {
                return min + Math.random() * (max - min);
            }
            function UpdateLastSeen() {
                $.get('https://mz3il.com/endpoints/user/update_lastseen', { }, function () {
                    setTimeout(UpdateLastSeen, getRandomBetween(60000, 120000));
                });
            }
            setTimeout(UpdateLastSeen, getRandomBetween(60000, 120000));

            function GetArtist(key,form = '') {
            	$.post('https://mz3il.com/endpoints/tag_artist/tag', {key: key}, function(data, textStatus, xhr) {
            		if (data.html) {
            			if (form != '') {
            				$('#group_chat_mbr_list_'+form).html(data.html);
            			}
            			else{
            				$('.group_chat_mbr_list').html(data.html);
            			}
            		}
            	});
            }
            function ApproveRequest(id) {
            	$.post('https://mz3il.com/endpoints/tag_artist/approve', {id: id}, function(data, textStatus, xhr) {});
            }
            function DeclineRequest(id) {
            	$.post('https://mz3il.com/endpoints/tag_artist/decline', {id: id}, function(data, textStatus, xhr) {});
            }
            function count_char(self,id) {
			    $(self).limit("640", id);
			}

												
		</script>
		<script src="https://mz3il.com/themes/default/js/footer.js?4137"></script>
															</body>
</html>
