var href = "0";

jQuery(document).ready(function(){	
   // Lista gier
   jQuery('div.game_list_alphabet_mini a').click(function() { 
	            jQuery("div#message_choose_game").css('display', 'none');
				var content_show = jQuery(this).attr("id"); 
				  jQuery.ajax({
						method: "get",
						url: site_url + "/ajax/gamemenu/mini/1/href/" + href,
						data: jQuery.param({letter: content_show}),
						beforeSend: function(){ jQuery("div.game_list_more_mini").fadeOut(0); jQuery("div.game_menu_column").fadeOut(0); jQuery("div#game_menu_mini_loading").fadeIn(0).css('display', 'block');}, 
						complete: function(){ jQuery("div#game_menu_mini_loading").fadeOut(0);},
						success: function(html){ 
						   jQuery("div.game_list_more_mini").fadeIn(0); 
						   jQuery("div.game_menu_column").fadeIn(0); 
						   jQuery("div.game_list_more_mini").html(html); 
				        }
			         }); 
   }); 
   
   jQuery('a#choose_other_game').click(function() { 
	   jQuery("div.game_description_add").fadeOut(0).css('display', 'none');
	   jQuery("a#choose_other_game").fadeOut(0).css('display', 'none');
	   jQuery("div.game_list").fadeIn(1000).css('display', 'block');
	   jQuery("div#game_menu_mini_loading").css('display', 'none');
	   jQuery("div#message_choose_game").css('display', 'block');
	   game_id = "";
   }); 
   
});

// Pokazuje stronę gry
function show_game_page(game_id)
{
    jQuery.ajax({
			method: "get",
			url: site_url + "/ajax/gamedescription",
			data: jQuery.param({gid: game_id}),
			beforeSend: function(){ jQuery("div.game_description_add").fadeOut(0); jQuery("div.game_list_more_mini").fadeOut(0); jQuery("div.game_menu_column").fadeOut(0); jQuery("div#game_menu_mini_loading").fadeIn(0).css('display', 'block');}, 
			complete: function(){ jQuery("div#game_menu_mini_loading").fadeOut(0); },
			success: function(html){ 
			   jQuery("div.game_list").fadeOut(0).css('display', 'none');
			   jQuery("div.game_description_add").fadeIn(1000).css('display', 'block');
			   jQuery("a#choose_other_game").fadeIn(1000).css('display', 'block');
			   jQuery("div.game_description_add").html(html); 
	        }
     });
    
	 return false;
}