// source --> https://guvenlebahisoyna.biz/wp-content/plugins/sport-sbook-wp/js/sports-book-front.js?ver=1.0.3 
(function( $ ) {
    // Add Color Picker to all inputs that have 'color-field' class
    $(function() {

			$('.open-close').click(function(e) {

					var category   = $(this).data('categories');
					var content_id = $(this).data('id');
					var post_no = $(this).data('post_no');
					html = '';
					$.ajax({
              
			              type: 'GET',
			              url: ajax_params.ajaxurl,
			              contentType: "application/json",
						  dataType: "json",
			              //data: 'action=sports_book_get_category_posts&category='+category,
			              data: {
			        	  	action  	: 'sports_book_get_category_posts',
			        	  	category    : category,
			        	  	post_no    : post_no
			        	  },
			        	  	beforeSend: function( ) {
							    $('#content_'+content_id).html('');
							},
			                success: function(results) {
			                     //$('#content_'+content_id).html(results);
			                     for (var i = 0 ; i < results.title_arr.length; i++) {
			                     	/*if(results.title_arr[i] != null){
			                     		img += '<img src="'+images_arr+'">';
			                     	}*/
			                     	html+= '<div class="col-md-6">\
													<div class="inner_col_style">\
														<a href="'+results.permalink_arr[i]+'">\
															<div class="img_col">\
																<img src="'+results.images_arr[i]+'">\
															</div>\
															<div class="heading_col">\
																<p>'+results.title_arr[i]+'</p>\
															</div>\
														</a>\
													</div>\
												</div>'
			                     }
								 
			                     //$('.collapse').collapse();
			                     //$('#collapse-cate-'+content_id).collapse('show');
			                     //console.log(results.title_arr);
			                     //$('#content_'+content_id).html('');
			                     $('#content_'+content_id).html(html);
								 html='';
			                },
			                error: function( jqXHR, textStatus, errorThrown ) {
			                    console.log( 'Could not get posts, server response: ' + textStatus + ': ' + errorThrown );
			                    $('.emoji-loading-icon').remove();
			                }
			        });
			});

	});
     
})( jQuery );
// source --> https://guvenlebahisoyna.biz/wp-content/plugins/stop-user-enumeration/frontend/js/frontend.js?ver=1.7.7 
/*
Remove numbers from comment author
*/

document.addEventListener('DOMContentLoaded', function (event) {
    var commentForm = document.getElementById("commentform");
    if (null === commentForm) {
        return;
    }
    var author = commentForm.querySelector("#author");
    if (null === author) {
        return;
    }
    author.addEventListener(
        'blur',
        function () {
            this.value = this.value.replace(/\d+/g, '');
        },
        false
    );
});