/***************************************************
--------- Hodnocení Líbí se mi, nelíbí s mi --------
***************************************************/
$(function(){
                    $("a.libi").click(function(){
                	//get the id
                	the_id = $(this).attr('id');
                                 
                	// show the spinner
                	$(this).parent().html("<img src='/img/ico/loader.gif' alt='Načítá se' />");
                	
                	//fadeout the vote-count 
                	$(".votes_count").fadeOut("fast");
                	
                	//the main ajax request
                		$.ajax({
                			type: "POST",
                			data: "action=libi&id="+$(this).attr("id"),
                			url: "/vtipy/libi-nelibi-akce.php",
                			success: function(msg)
                			{
                				$(".votes_count").html(msg);
                				//fadein the vote count
                				$(".votes_count").fadeIn();
                				//remove the spinner
                				$(".vote_buttons").remove();
                			}
                		});
                	});
                	
                	$("a.nelibi").click(function(){
                	//get the id
                	the_id = $(this).attr('id');
                    
                	// show the spinner
                	$(this).parent().html("<img src='/img/ico/loader.gif' alt='Načítá se' />");
                    
                    //fadeout the vote-count
                    $(".votes_count").fadeOut();
                	
                	//the main ajax request
                		$.ajax({
                			type: "POST",
                			data: "action=nelibi&id="+$(this).attr("id"),
                			url: "/vtipy/libi-nelibi-akce.php",
                			success: function(msg)
                			{
                				$(".votes_count").html(msg);
                				$(".votes_count").fadeIn();
           				        $(".vote_buttons").remove();
                			}
                		});
                	});
                });
                
                
/***************************************************
----------------------- FaceBox --------------------
***************************************************/
jQuery(document).ready(function($) {
    $('a[rel*=facebox]').facebox({}) 
})
